From 040f8224617ad3924f606c8982da369f898693d1 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Fri, 17 Jun 2022 14:25:51 +0100 Subject: arm: fix checking ICE in arm_print_operand [PR106004] Sigh, another instance where I incorrectly used XUINT instead of UINTVAL. I've also made the code here a little more robust (although I think this case can't in fact be reached) if the 32-bit clear mask includes bit 31. This case, if reached, would print out an out-of-range value based on the size of the compiler's HOST_WIDE_INT type due to sign-extension. We avoid this by masking the value after inversion. gcc/ChangeLog: PR target/106004 * config/arm/arm.cc (arm_print_operand, case 'V'): Use UINTVAL. Clear bits in the mask above bit 31. --- gcc/config/arm/arm.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 2925907..33fb98d 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -24199,7 +24199,8 @@ arm_print_operand (FILE *stream, rtx x, int code) return; } - unsigned HOST_WIDE_INT val = ~XUINT (x, 0); + unsigned HOST_WIDE_INT val + = ~UINTVAL (x) & HOST_WIDE_INT_UC (0xffffffff); int lsb = exact_log2 (val & -val); asm_fprintf (stream, "#%d, #%d", lsb, (exact_log2 (val + (val & -val)) - lsb)); -- cgit v1.1 From d6b423882a05d7b4f40ae1e9d942c9c4c13761b7 Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Fri, 17 Jun 2022 21:57:35 +0800 Subject: RISC-V: Supress warning for comparison of integer expressions of different signedness gcc/ChangeLog: * config/riscv/bitmanip.md: Supress warning. --- gcc/config/riscv/bitmanip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md index 6c1ccc6..d1570ce 100644 --- a/gcc/config/riscv/bitmanip.md +++ b/gcc/config/riscv/bitmanip.md @@ -102,7 +102,7 @@ { unsigned HOST_WIDE_INT mask = UINTVAL (operands[3]); /* scale: shift within the sh[123]add.uw */ - int scale = 32 - clz_hwi (mask); + unsigned HOST_WIDE_INT scale = 32 - clz_hwi (mask); /* bias: pre-scale amount (i.e. the prior shift amount) */ int bias = ctz_hwi (mask) - scale; -- cgit v1.1 From 06a1b0418fb31b833119089ea37d5d3df372a13e Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Fri, 17 Jun 2022 14:07:37 +0000 Subject: rs6000: Fix some error messages for invalid conversions "* something" isn't a type. "something *" is. 2022-06-17 Segher Boessenkool * config/rs6000/rs6000.cc (rs6000_invalid_conversion): Correct some types. --- gcc/config/rs6000/rs6000.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 59481d9..3d1f895 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -28305,13 +28305,13 @@ rs6000_invalid_conversion (const_tree fromtype, const_tree totype) && tomode != VOIDmode) { if (frommode == XOmode) - return N_("invalid conversion from type %<* __vector_quad%>"); + return N_("invalid conversion from type %<__vector_quad *%>"); if (tomode == XOmode) - return N_("invalid conversion to type %<* __vector_quad%>"); + return N_("invalid conversion to type %<__vector_quad *%>"); if (frommode == OOmode) - return N_("invalid conversion from type %<* __vector_pair%>"); + return N_("invalid conversion from type %<__vector_pair *%>"); if (tomode == OOmode) - return N_("invalid conversion to type %<* __vector_pair%>"); + return N_("invalid conversion to type %<__vector_pair *%>"); } } -- cgit v1.1 From 1d6044c250e3badfa2a403fee670b295106bf4fc Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 17 Jun 2022 16:22:20 +0200 Subject: i386: Fix VPMOV splitter [PR105993] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit REGNO should not be used with register_operand before reload because subregs of registers or even subregs of memory match the predicate. The build with RTL checking enabled does not tolerate REGNO with non-reg operand. The patch splits the splitter into two related splitters and uses (match_dup ...) RTXes instead of REGNO comparisons. 2022-06-17 Uroš Bizjak gcc/ChangeLog: PR target/105993 * config/i386/sse.md (vpmov splitter): Use (match_dup ...) instead of REGNO comparisons in combine splitter. gcc/testsuite/ChangeLog: PR target/105993 * gcc.target/i386/pr105993.c: New test. --- gcc/config/i386/sse.md | 30 ++++++++++++++++-------------- gcc/testsuite/gcc.target/i386/pr105993.c | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr105993.c (limited to 'gcc') diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 3e3d96f..64ac490 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -23875,21 +23875,23 @@ (xor:V_128_256 (match_operand:V_128_256 1 "register_operand") (match_operand:V_128_256 2 "register_operand")) (match_operand:V_128_256 3 "nonimmediate_operand")) - (match_operand:V_128_256 4 "register_operand")))] - "TARGET_XOP - && (REGNO (operands[4]) == REGNO (operands[1]) - || REGNO (operands[4]) == REGNO (operands[2]))" + (match_dup 1)))] + "TARGET_XOP" [(set (match_dup 0) (if_then_else:V_128_256 (match_dup 3) - (match_dup 5) - (match_dup 4)))] -{ - /* To handle the commutivity of XOR, operands[4] is either operands[1] - or operands[2], we need operands[5] to be the other one. */ - if (REGNO (operands[4]) == REGNO (operands[1])) - operands[5] = operands[2]; - else - operands[5] = operands[1]; -}) + (match_dup 2) + (match_dup 1)))]) +(define_split + [(set (match_operand:V_128_256 0 "register_operand") + (xor:V_128_256 + (and:V_128_256 + (xor:V_128_256 (match_operand:V_128_256 1 "register_operand") + (match_operand:V_128_256 2 "register_operand")) + (match_operand:V_128_256 3 "nonimmediate_operand")) + (match_dup 2)))] + "TARGET_XOP" + [(set (match_dup 0) (if_then_else:V_128_256 (match_dup 3) + (match_dup 1) + (match_dup 2)))]) ;; XOP horizontal add/subtract instructions (define_insn "xop_phaddbw" diff --git a/gcc/testsuite/gcc.target/i386/pr105993.c b/gcc/testsuite/gcc.target/i386/pr105993.c new file mode 100644 index 0000000..79e3414 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr105993.c @@ -0,0 +1,18 @@ +/* PR target/105993 */ +/* { dg-do compile } */ +/* { dg-options "-O -mxop" } */ + +typedef unsigned short __attribute__((__vector_size__ (16))) V; +V x, y, z; + +char c; +short s; + +V +foo (void) +{ + V u = __builtin_shufflevector (z, y, 2, 1, 0, 8, 4, 1, 7, 2); + V v = ~(__builtin_bswap16 (s) & (u ^ c)); + + return v; +} -- cgit v1.1 From 1f8278bfcfc7f7157bf2b405471e67dd5097636b Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 17 Jun 2022 17:01:31 +0200 Subject: i386: Fix assert in ix86_function_arg [PR105970] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mode of pointer argument should equal ptr_mode, not Pmode. 2022-06-17 Uroš Bizjak gcc/ChangeLog: PR target/105970 * config/i386/i386.cc (ix86_function_arg): Assert that the mode of pointer argumet is equal to ptr_mode, not Pmode. gcc/testsuite/ChangeLog: PR target/105970 * gcc.target/i386/pr105970.c: New test. --- gcc/config/i386/i386.cc | 2 +- gcc/testsuite/gcc.target/i386/pr105970.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr105970.c (limited to 'gcc') diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 3d189e1..f158cc3 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -3348,7 +3348,7 @@ ix86_function_arg (cumulative_args_t cum_v, const function_arg_info &arg) if (POINTER_TYPE_P (arg.type)) { /* This is the pointer argument. */ - gcc_assert (TYPE_MODE (arg.type) == Pmode); + gcc_assert (TYPE_MODE (arg.type) == ptr_mode); /* It is at -WORD(AP) in the current frame in interrupt and exception handlers. */ reg = plus_constant (Pmode, arg_pointer_rtx, -UNITS_PER_WORD); diff --git a/gcc/testsuite/gcc.target/i386/pr105970.c b/gcc/testsuite/gcc.target/i386/pr105970.c new file mode 100644 index 0000000..326486f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr105970.c @@ -0,0 +1,6 @@ +/* PR target/105970 */ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-mx32 -mgeneral-regs-only -maddress-mode=long" } */ + +#include "../../gcc.dg/torture/pr68037-1.c" -- cgit v1.1 From cc378e655740e93743e7f43e14faaff707aef6c1 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 17 Jun 2022 17:19:44 +0200 Subject: alpha: Introduce target specific store_data_bypass_p function [PR105209] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch introduces alpha-specific version of store_data_bypass_p that ignores TRAP_IF that would result in assertion failure (and internal compiler error) in the generic store_data_bypass_p function. While at it, also remove ev4_ist_c reservation, store_data_bypass_p can handle the patterns with multiple sets since some time ago. 2022-06-17 Uroš Bizjak gcc/ChangeLog: PR target/105209 * config/alpha/alpha-protos.h (alpha_store_data_bypass_p): New. * config/alpha/alpha.cc (alpha_store_data_bypass_p): New function. (alpha_store_data_bypass_p_1): Ditto. * config/alpha/ev4.md: Use alpha_store_data_bypass_p instead of generic store_data_bypass_p. (ev4_ist_c): Remove insn reservation. gcc/testsuite/ChangeLog: PR target/105209 * gcc.target/alpha/pr105209.c: New test. --- gcc/config/alpha/alpha-protos.h | 2 + gcc/config/alpha/alpha.cc | 69 +++++++++++++++++++++++++++++++ gcc/config/alpha/ev4.md | 15 ++----- gcc/testsuite/gcc.target/alpha/pr105209.c | 26 ++++++++++++ 4 files changed, 101 insertions(+), 11 deletions(-) create mode 100644 gcc/testsuite/gcc.target/alpha/pr105209.c (limited to 'gcc') diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h index 0c832bf..adfdd77 100644 --- a/gcc/config/alpha/alpha-protos.h +++ b/gcc/config/alpha/alpha-protos.h @@ -73,6 +73,8 @@ extern void alpha_end_function (FILE *, const char *, tree); extern bool alpha_find_lo_sum_using_gp (rtx); +extern int alpha_store_data_bypass_p (rtx_insn *, rtx_insn *); + #ifdef REAL_VALUE_TYPE extern int check_float_value (machine_mode, REAL_VALUE_TYPE *, int); #endif diff --git a/gcc/config/alpha/alpha.cc b/gcc/config/alpha/alpha.cc index 3db5337..0a85e66 100644 --- a/gcc/config/alpha/alpha.cc +++ b/gcc/config/alpha/alpha.cc @@ -7564,6 +7564,75 @@ alpha_does_function_need_gp (void) return 0; } +/* Helper function for alpha_store_data_bypass_p, handle just a single SET + IN_SET. */ + +static bool +alpha_store_data_bypass_p_1 (rtx_insn *out_insn, rtx in_set) +{ + if (!MEM_P (SET_DEST (in_set))) + return false; + + rtx out_set = single_set (out_insn); + if (out_set) + return !reg_mentioned_p (SET_DEST (out_set), SET_DEST (in_set)); + + rtx out_pat = PATTERN (out_insn); + if (GET_CODE (out_pat) != PARALLEL) + return false; + + for (int i = 0; i < XVECLEN (out_pat, 0); i++) + { + rtx out_exp = XVECEXP (out_pat, 0, i); + + if (GET_CODE (out_exp) == CLOBBER || GET_CODE (out_exp) == USE + || GET_CODE (out_exp) == TRAP_IF) + continue; + + gcc_assert (GET_CODE (out_exp) == SET); + + if (reg_mentioned_p (SET_DEST (out_exp), SET_DEST (in_set))) + return false; + } + + return true; +} + +/* True if the dependency between OUT_INSN and IN_INSN is on the store + data not the address operand(s) of the store. IN_INSN and OUT_INSN + must be either a single_set or a PARALLEL with SETs inside. + + This alpha-specific version of store_data_bypass_p ignores TRAP_IF + that would result in assertion failure (and internal compiler error) + in the generic store_data_bypass_p function. */ + +int +alpha_store_data_bypass_p (rtx_insn *out_insn, rtx_insn *in_insn) +{ + rtx in_set = single_set (in_insn); + if (in_set) + return alpha_store_data_bypass_p_1 (out_insn, in_set); + + rtx in_pat = PATTERN (in_insn); + if (GET_CODE (in_pat) != PARALLEL) + return false; + + for (int i = 0; i < XVECLEN (in_pat, 0); i++) + { + rtx in_exp = XVECEXP (in_pat, 0, i); + + if (GET_CODE (in_exp) == CLOBBER || GET_CODE (in_exp) == USE + || GET_CODE (in_exp) == TRAP_IF) + continue; + + gcc_assert (GET_CODE (in_exp) == SET); + + if (!alpha_store_data_bypass_p_1 (out_insn, in_exp)) + return false; + } + + return true; +} /* Helper function to set RTX_FRAME_RELATED_P on instructions, including sequences. */ diff --git a/gcc/config/alpha/ev4.md b/gcc/config/alpha/ev4.md index 01b9a72..c8ff4ed 100644 --- a/gcc/config/alpha/ev4.md +++ b/gcc/config/alpha/ev4.md @@ -44,14 +44,7 @@ ; Stores can issue before the data (but not address) is ready. (define_insn_reservation "ev4_ist" 1 (and (eq_attr "tune" "ev4") - (eq_attr "type" "ist")) - "ev4_ib1+ev4_abox") - -; ??? Separate from ev4_ist because store_data_bypass_p can't handle -; the patterns with multiple sets, like store-conditional. -(define_insn_reservation "ev4_ist_c" 1 - (and (eq_attr "tune" "ev4") - (eq_attr "type" "st_c")) + (eq_attr "type" "ist,st_c")) "ev4_ib1+ev4_abox") (define_insn_reservation "ev4_fst" 1 @@ -110,7 +103,7 @@ (define_bypass 0 "ev4_iaddlog,ev4_shiftcm,ev4_icmp" "ev4_ist" - "store_data_bypass_p") + "alpha_store_data_bypass_p") ; Multiplies use a non-pipelined imul unit. Also, "no [ebox] insn can ; be issued exactly three cycles before an integer multiply completes". @@ -121,7 +114,7 @@ (eq_attr "opsize" "si"))) "ev4_ib0+ev4_imul,ev4_imul*18,ev4_ebox") -(define_bypass 20 "ev4_imulsi" "ev4_ist" "store_data_bypass_p") +(define_bypass 20 "ev4_imulsi" "ev4_ist" "alpha_store_data_bypass_p") (define_insn_reservation "ev4_imuldi" 23 (and (eq_attr "tune" "ev4") @@ -129,7 +122,7 @@ (eq_attr "opsize" "!si"))) "ev4_ib0+ev4_imul,ev4_imul*20,ev4_ebox") -(define_bypass 22 "ev4_imuldi" "ev4_ist" "store_data_bypass_p") +(define_bypass 22 "ev4_imuldi" "ev4_ist" "alpha_store_data_bypass_p") ; Most FP insns have a 6 cycle latency, but with a 4 cycle bypass back in. (define_insn_reservation "ev4_fpop" 6 diff --git a/gcc/testsuite/gcc.target/alpha/pr105209.c b/gcc/testsuite/gcc.target/alpha/pr105209.c new file mode 100644 index 0000000..b89be96 --- /dev/null +++ b/gcc/testsuite/gcc.target/alpha/pr105209.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftrapv -mcpu=ev4" } */ + +typedef struct tnode_t { + struct tnode_t *tn_left, *tn_right; + int v_quad; +} tnode_t; + +int constant_addr(const tnode_t *, long *); +int constant_addr(const tnode_t *tn, long *offsp) +{ + long offs1 = 0, offs2 = 0; + + if (tn->v_quad > 0) { + offs1 = tn->v_quad; + return 0; + } else if (tn->v_quad > -1) { + offs2 = tn->tn_right->v_quad; + if (!constant_addr(tn->tn_left, &offs1)) + return 0; + } else { + return 0; + } + *offsp = offs1 + offs2; + return 1; +} -- cgit v1.1 From a284fadcce8ef443cc3cc047a8017745efb51758 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 17 Jun 2022 17:40:49 +0200 Subject: c++: Use fold_non_dependent_expr rather than maybe_constant_value in __builtin_shufflevector handling [PR106001] In this case the STATIC_CAST_EXPR expressions in the call aren't type nor value dependent, but maybe_constant_value still ICEs on those when processing_template_decl. Calling fold_non_dependent_expr on it instead fixes the ICE and folds them to INTEGER_CSTs. 2022-06-17 Jakub Jelinek PR c++/106001 * typeck.cc (build_x_shufflevector): Use fold_non_dependent_expr instead of maybe_constant_value. * g++.dg/ext/builtin-shufflevector-4.C: New test. --- gcc/cp/typeck.cc | 2 +- gcc/testsuite/g++.dg/ext/builtin-shufflevector-4.C | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/ext/builtin-shufflevector-4.C (limited to 'gcc') diff --git a/gcc/cp/typeck.cc b/gcc/cp/typeck.cc index f9ce14f..6e4f23a 100644 --- a/gcc/cp/typeck.cc +++ b/gcc/cp/typeck.cc @@ -6344,7 +6344,7 @@ build_x_shufflevector (location_t loc, vec *args, auto_vec mask; for (unsigned i = 2; i < args->length (); ++i) { - tree idx = maybe_constant_value ((*args)[i]); + tree idx = fold_non_dependent_expr ((*args)[i], complain); mask.safe_push (idx); } tree exp = c_build_shufflevector (loc, arg0, arg1, mask, complain & tf_error); diff --git a/gcc/testsuite/g++.dg/ext/builtin-shufflevector-4.C b/gcc/testsuite/g++.dg/ext/builtin-shufflevector-4.C new file mode 100644 index 0000000..dae129b --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/builtin-shufflevector-4.C @@ -0,0 +1,18 @@ +// PR c++/106001 +// { dg-do compile } + +typedef int V __attribute__((vector_size (2 * sizeof (int)))); + +template +void +foo () +{ + V v = {}; + v = __builtin_shufflevector (v, v, static_cast(1), static_cast(0)); +} + +void +bar () +{ + foo <0> (); +} -- cgit v1.1 From 7f195a2270910a6ed08bd76e3a16b0a6503f9faf Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 14 Jun 2022 11:33:42 -0700 Subject: libgo: permit loff_t and off_t to be macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are macros in musl libc, rather than typedefs, and -fgo-dump-spec doesn't handle that case. Based on patch by Sören Tempel. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/412075 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 0cda305..4b75dd3 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -8db6b78110f84e22c409f334aeaefb80a8b39917 +a409e049737ec9a358a19233e017d957db3d6d2a The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1 From 5a66d7dd2bf4c99b743de65a5b0bcfab44c77305 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 18 Jun 2022 00:16:19 +0000 Subject: Daily bump. --- gcc/ChangeLog | 42 ++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/cp/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 25 +++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0154e46..ac77b6a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,45 @@ +2022-06-17 Uroš Bizjak + + PR target/105209 + * config/alpha/alpha-protos.h (alpha_store_data_bypass_p): New. + * config/alpha/alpha.cc (alpha_store_data_bypass_p): New function. + (alpha_store_data_bypass_p_1): Ditto. + * config/alpha/ev4.md: Use alpha_store_data_bypass_p instead + of generic store_data_bypass_p. + (ev4_ist_c): Remove insn reservation. + +2022-06-17 Uroš Bizjak + + PR target/105970 + * config/i386/i386.cc (ix86_function_arg): Assert that + the mode of pointer argumet is equal to ptr_mode, not Pmode. + +2022-06-17 Uroš Bizjak + + PR target/105993 + * config/i386/sse.md (vpmov splitter): Use (match_dup ...) + instead of REGNO comparisons in combine splitter. + +2022-06-17 Segher Boessenkool + + * config/rs6000/rs6000.cc (rs6000_invalid_conversion): Correct some + types. + +2022-06-17 Kito Cheng + + * config/riscv/bitmanip.md: Supress warning. + +2022-06-17 Richard Earnshaw + + PR target/106004 + * config/arm/arm.cc (arm_print_operand, case 'V'): Use UINTVAL. + Clear bits in the mask above bit 31. + +2022-06-17 Richard Earnshaw + + * config/arm/mve.md (*mve_mov): Re-order constraints + to avoid spilling trivial literals to the constant pool. + 2022-06-16 David Malcolm * gimple-ssa-warn-access.cc (warn_string_no_nul): Add diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 0ebec28..00d863e 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220617 +20220618 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 658525d..e7fb222 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2022-06-17 Jakub Jelinek + + PR c++/106001 + * typeck.cc (build_x_shufflevector): Use fold_non_dependent_expr + instead of maybe_constant_value. + 2022-06-16 Nathan Sidwell * decl2.cc (finish_objects): Add startp parameter, adjust. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5cdb390..cd1e992 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,28 @@ +2022-06-17 Jakub Jelinek + + PR c++/106001 + * g++.dg/ext/builtin-shufflevector-4.C: New test. + +2022-06-17 Uroš Bizjak + + PR target/105209 + * gcc.target/alpha/pr105209.c: New test. + +2022-06-17 Uroš Bizjak + + PR target/105970 + * gcc.target/i386/pr105970.c: New test. + +2022-06-17 Uroš Bizjak + + PR target/105993 + * gcc.target/i386/pr105993.c: New test. + +2022-06-17 Richard Earnshaw + + * gcc.target/arm/acle/cde-mve-full-assembly.c: Adjust expected + output. + 2022-06-16 David Malcolm * gcc.dg/analyzer/stdarg-1.c -- cgit v1.1 From 479b6f449ee999501ad6eff0b7db8d0cd5b2d28d Mon Sep 17 00:00:00 2001 From: Takayuki 'January June' Suwa Date: Fri, 17 Jun 2022 22:47:49 +0900 Subject: xtensa: Defer storing integer constants into litpool until reload Storing integer constants into litpool in the early stage of compilation hinders some integer optimizations. In fact, such integer constants are not subject to the constant folding process. For example: extern unsigned short value; extern void foo(void); void test(void) { if (value == 30001) foo(); } .literal_position .literal .LC0, value .literal .LC1, 30001 test: l32r a3, .LC0 l32r a2, .LC1 l16ui a3, a3, 0 extui a2, a2, 0, 16 // runtime zero-extension despite constant bne a3, a2, .L1 j.l foo, a9 .L1: ret.n This patch defers the placement of integer constants into litpool until the start of reload: .literal_position .literal .LC0, value .literal .LC1, 30001 test: l32r a3, .LC0 l32r a2, .LC1 l16ui a3, a3, 0 bne a3, a2, .L1 j.l foo, a9 .L1: ret.n gcc/ChangeLog: * config/xtensa/constraints.md (Y): Change to include integer constants until reload begins. * config/xtensa/predicates.md (move_operand): Ditto. * config/xtensa/xtensa.cc (xtensa_emit_move_sequence): Change to allow storing integer constants into litpool only after reload begins. --- gcc/config/xtensa/constraints.md | 6 ++++-- gcc/config/xtensa/predicates.md | 5 +++-- gcc/config/xtensa/xtensa.cc | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md index e7ac8db..0b7dcd1 100644 --- a/gcc/config/xtensa/constraints.md +++ b/gcc/config/xtensa/constraints.md @@ -113,8 +113,10 @@ (define_constraint "Y" "A constant that can be used in relaxed MOVI instructions." - (and (match_code "const_int,const_double,const,symbol_ref,label_ref") - (match_test "TARGET_AUTO_LITPOOLS"))) + (ior (and (match_code "const_int,const_double,const,symbol_ref,label_ref") + (match_test "TARGET_AUTO_LITPOOLS")) + (and (match_code "const_int") + (match_test "can_create_pseudo_p ()")))) ;; Memory constraints. Do not use define_memory_constraint here. Doing so ;; causes reload to force some constants into the constant pool, but since diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md index edd13ae..0590c0f 100644 --- a/gcc/config/xtensa/predicates.md +++ b/gcc/config/xtensa/predicates.md @@ -147,8 +147,9 @@ (match_test "!constantpool_mem_p (op) || GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0"))) (ior (and (match_code "const_int") - (match_test "GET_MODE_CLASS (mode) == MODE_INT - && xtensa_simm12b (INTVAL (op))")) + (match_test "(GET_MODE_CLASS (mode) == MODE_INT + && xtensa_simm12b (INTVAL (op))) + || can_create_pseudo_p ()")) (and (match_code "const_int,const_double,const,symbol_ref,label_ref") (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS) && CONSTANT_P (op) diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc index d6f08b1..c5d00ac 100644 --- a/gcc/config/xtensa/xtensa.cc +++ b/gcc/config/xtensa/xtensa.cc @@ -1182,7 +1182,8 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) return 1; } - if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16) + if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16 + && ! (CONST_INT_P (src) && can_create_pseudo_p ())) { src = force_const_mem (SImode, src); operands[1] = src; -- cgit v1.1 From 9991d84d2a84355fd3fc9afc89a963f45991bfa9 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Sat, 18 Jun 2022 09:06:20 +0100 Subject: PR tree-optimization/105835: Two narrowing patterns for match.pd. This patch resolves PR tree-optimization/105835, which is a code quality (dead code elimination) regression at -O1 triggered/exposed by a recent change to canonicalize X&-Y as X*Y. The new (shorter) form exposes some missed optimization opportunities that can be handled by adding some extra simplifications to match.pd. One transformation is to simplify "(short)(x ? 65535 : 0)" into the equivalent "x ? -1 : 0", or more accurately x ? (short)-1 : (short)0", as INTEGER_CSTs record their type, and integer conversions can be pushed inside COND_EXPRs reducing the number of gimple statements. The other transformation is that (short)(X * 65535), where X is [0,1], into the equivalent (short)X * -1, (or again (short)-1 where tree's INTEGER_CSTs encode their type). This is valid because multiplications where one operand is [0,1] are guaranteed not to overflow, and hence integer conversions can also be pushed inside these multiplications. These narrowing conversion optimizations can be identified by range analyses, such as EVRP, but these are only performed at -O2 and above, which is why this regression is only visible with -O1. 2022-06-18 Roger Sayle gcc/ChangeLog PR tree-optimization/105835 * match.pd (convert (mult zero_one_valued_p@1 INTEGER_CST@2)): Narrow integer multiplication by a zero_one_valued_p operand. (convert (cond @1 INTEGER_CST@2 INTEGER_CST@3)): Push integer conversions inside COND_EXPR where both data operands are integer constants. gcc/testsuite/ChangeLog PR tree-optimization/105835 * gcc.dg/pr105835.c: New test case. --- gcc/match.pd | 15 +++++++++++++++ gcc/testsuite/gcc.dg/pr105835.c | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr105835.c (limited to 'gcc') diff --git a/gcc/match.pd b/gcc/match.pd index 3e9572e..a63b649 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -1881,6 +1881,15 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) && !TYPE_UNSIGNED (TREE_TYPE (@0))) (mult (convert @0) @1))) +/* Narrow integer multiplication by a zero_one_valued_p operand. + Multiplication by [0,1] is guaranteed not to overflow. */ +(simplify + (convert (mult@0 zero_one_valued_p@1 INTEGER_CST@2)) + (if (INTEGRAL_TYPE_P (type) + && INTEGRAL_TYPE_P (TREE_TYPE (@0)) + && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@0))) + (mult (convert @1) (convert @2)))) + /* Convert ~ (-A) to A - 1. */ (simplify (bit_not (convert? (negate @0))) @@ -4356,6 +4365,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) ) #endif +(simplify + (convert (cond@0 @1 INTEGER_CST@2 INTEGER_CST@3)) + (if (INTEGRAL_TYPE_P (type) + && INTEGRAL_TYPE_P (TREE_TYPE (@0))) + (cond @1 (convert @2) (convert @3)))) + /* Simplification moved from fold_cond_expr_with_comparison. It may also be extended. */ /* This pattern implements two kinds simplification: diff --git a/gcc/testsuite/gcc.dg/pr105835.c b/gcc/testsuite/gcc.dg/pr105835.c new file mode 100644 index 0000000..354c81c --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr105835.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-optimized" } */ + +void foo(); + +static int b; + +static short a(short c, unsigned short d) { return c - d; } + +int main() { + int e = -(0 < b); + if (a(1, e)) + b = 0; + else + foo(); +} + +/* { dg-final { scan-tree-dump-not "goto" "optimized" } } */ -- cgit v1.1 From ef662120177d39af5f88ffc622d90bb6ae0ca1d3 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 18 Jun 2022 11:07:13 +0200 Subject: varasm: Fix up ICE in narrowing_initializer_constant_valid_p [PR105998] The following testcase ICEs because there is NON_LVALUE_EXPR (location wrapper) around a VAR_DECL and has TYPE_MODE V2SImode and SCALAR_INT_TYPE_MODE on that ICEs. Or for -m32 -march=i386 TYPE_MODE is DImode, but SCALAR_INT_TYPE_MODE still uses the raw V2SImode and ICEs too. 2022-06-18 Jakub Jelinek PR middle-end/105998 * varasm.cc (narrowing_initializer_constant_valid_p): Check SCALAR_INT_MODE_P instead of INTEGRAL_MODE_P, also break on ! INTEGRAL_TYPE_P and do the same check also on op{0,1}'s type. * c-c++-common/pr105998.c: New test. --- gcc/testsuite/c-c++-common/pr105998.c | 12 ++++++++++++ gcc/varasm.cc | 10 ++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/pr105998.c (limited to 'gcc') diff --git a/gcc/testsuite/c-c++-common/pr105998.c b/gcc/testsuite/c-c++-common/pr105998.c new file mode 100644 index 0000000..85277b9 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr105998.c @@ -0,0 +1,12 @@ +/* PR middle-end/105998 */ + +typedef int __attribute__((__vector_size__ (sizeof (long long)))) V; + +V v; + +long long +foo (void) +{ + long long l = (long long) ((0 | v) - ((V) { } == 0)); + return l; +} diff --git a/gcc/varasm.cc b/gcc/varasm.cc index 826a9ca..4db8506 100644 --- a/gcc/varasm.cc +++ b/gcc/varasm.cc @@ -4716,7 +4716,10 @@ narrowing_initializer_constant_valid_p (tree value, tree endtype, tree *cache) { tree inner = TREE_OPERAND (op0, 0); if (inner == error_mark_node - || ! INTEGRAL_MODE_P (TYPE_MODE (TREE_TYPE (inner))) + || ! INTEGRAL_TYPE_P (TREE_TYPE (op0)) + || ! SCALAR_INT_MODE_P (TYPE_MODE (TREE_TYPE (op0))) + || ! INTEGRAL_TYPE_P (TREE_TYPE (inner)) + || ! SCALAR_INT_MODE_P (TYPE_MODE (TREE_TYPE (inner))) || (GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (TREE_TYPE (op0))) > GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (TREE_TYPE (inner))))) break; @@ -4728,7 +4731,10 @@ narrowing_initializer_constant_valid_p (tree value, tree endtype, tree *cache) { tree inner = TREE_OPERAND (op1, 0); if (inner == error_mark_node - || ! INTEGRAL_MODE_P (TYPE_MODE (TREE_TYPE (inner))) + || ! INTEGRAL_TYPE_P (TREE_TYPE (op1)) + || ! SCALAR_INT_MODE_P (TYPE_MODE (TREE_TYPE (op1))) + || ! INTEGRAL_TYPE_P (TREE_TYPE (inner)) + || ! SCALAR_INT_MODE_P (TYPE_MODE (TREE_TYPE (inner))) || (GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (TREE_TYPE (op1))) > GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (TREE_TYPE (inner))))) break; -- cgit v1.1 From 2c7cfc7b418564a2f1f0e7a5b38dec7013ba5e18 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 18 Jun 2022 11:09:48 +0200 Subject: ubsan: Add -fsanitize-trap= support On Thu, Jun 16, 2022 at 09:32:02PM +0100, Jonathan Wakely wrote: > It looks like clang has addressed this deficiency now: > > https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#usage Thanks, that is roughly what I'd implement anyway and apparently they have it already since 2015, we've added the -fsanitize-undefined-trap-on-error support back in 2014 and didn't change it since then. As a small divergence from clang, I chose -fsanitize-undefined-trap-on-error to be a (deprecated) alias for -fsanitize-trap aka -fsanitize-trap=all rather thn -fsanitize-trap=undefined which seems to be what clang does, because for a deprecated option it is IMHO more important backwards compatibility with what gcc did over the past 8 years rather than clang compatibility. Some sanitizers (e.g. asan, lsan, tsan) don't support traps, -fsanitize-trap=address etc. will be rejected (if enabled at the end of command line), -fno-sanitize-trap= can be specified even for them. This is similar behavior to -fsanitize-recover=. One complication is vptr sanitization, which can't easily trap, as the whole slow path of the checking is inside of libubsan. Previously, -fsanitize=vptr -fsanitize-undefined-trap-on-error silently ignored vptr sanitization. This patch similarly to what clang does will accept -fsanitize-trap=all or -fsanitize-trap=undefined which enable the vptr bit as trapping and again that causes silent disabling of vptr sanitization, while -fsanitize-trap=vptr is rejected (already during option processing). 2022-06-18 Jakub Jelinek gcc/ * common.opt (flag_sanitize_trap): New variable. (fsanitize-trap=, fsanitize-trap): New options. (fsanitize-undefined-trap-on-error): Change into deprecated alias for -fsanitize-trap=all. * opts.h (struct sanitizer_opts_s): Add can_trap member. * opts.cc (finish_options): Complain about unsupported -fsanitize-trap= options. (sanitizer_opts): Add can_trap values to all entries. (get_closest_sanitizer_option): Ignore -fsanitize-trap= options which have can_trap false. (parse_sanitizer_options): Add support for -fsanitize-trap=. For -fsanitize-trap=all, enable SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT. Disallow -fsanitize-trap=vptr here. (common_handle_option): Handle OPT_fsanitize_trap_ and OPT_fsanitize_trap. * sanopt.cc (maybe_optimize_ubsan_null_ifn): Check flag_sanitize_trap & SANITIZE_{NULL,ALIGNMENT} instead of flag_sanitize_undefined_trap_on_error. * gcc.cc (sanitize_spec_function): Use flag_sanitize & ~flag_sanitize_trap instead of flag_sanitize and drop use of flag_sanitize_undefined_trap_on_error in "undefined" handling. * ubsan.cc (ubsan_instrument_unreachable): Use flag_sanitize_trap & SANITIZE_??? instead of flag_sanitize_undefined_trap_on_error. (ubsan_expand_bounds_ifn, ubsan_expand_null_ifn, ubsan_expand_objsize_ifn, ubsan_expand_ptr_ifn, ubsan_build_overflow_builtin, instrument_bool_enum_load, ubsan_instrument_float_cast, instrument_nonnull_arg, instrument_nonnull_return, instrument_builtin): Likewise. * doc/invoke.texi (-fsanitize-trap=, -fsanitize-trap): Document. (-fsanitize-undefined-trap-on-error): Document as deprecated alias of -fsanitize-trap. gcc/c-family/ * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift): Use flag_sanitize_trap & SANITIZE_??? instead of flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved and flag_sanitize_trap differs for them, emit __builtin_trap only for the comparison where trap is requested. (ubsan_instrument_vla, ubsan_instrument_return): Use lag_sanitize_trap & SANITIZE_??? instead of flag_sanitize_undefined_trap_on_error. gcc/cp/ * cp-ubsan.cc (cp_ubsan_instrument_vptr_p): Use flag_sanitize_trap & SANITIZE_VPTR instead of flag_sanitize_undefined_trap_on_error. gcc/testsuite/ * c-c++-common/ubsan/nonnull-4.c: Use -fsanitize-trap=all instead of -fsanitize-undefined-trap-on-error. * c-c++-common/ubsan/div-by-zero-4.c: Use -fsanitize-trap=signed-integer-overflow instead of -fsanitize-undefined-trap-on-error. * c-c++-common/ubsan/overflow-add-4.c: Use -fsanitize-trap=undefined instead of -fsanitize-undefined-trap-on-error. * c-c++-common/ubsan/pr56956.c: Likewise. * c-c++-common/ubsan/pr68142.c: Likewise. * c-c++-common/ubsan/pr80932.c: Use -fno-sanitize-trap=all -fsanitize-trap=shift,undefined instead of -fsanitize-undefined-trap-on-error. * c-c++-common/ubsan/align-8.c: Use -fsanitize-trap=alignment instead of -fsanitize-undefined-trap-on-error. --- gcc/c-family/c-ubsan.cc | 116 +++++++++++++-------- gcc/common.opt | 15 ++- gcc/cp/cp-ubsan.cc | 2 +- gcc/doc/invoke.texi | 35 ++++++- gcc/gcc.cc | 5 +- gcc/opts.cc | 119 +++++++++++++++------- gcc/opts.h | 1 + gcc/sanopt.cc | 4 +- gcc/testsuite/c-c++-common/ubsan/align-8.c | 2 +- gcc/testsuite/c-c++-common/ubsan/div-by-zero-4.c | 2 +- gcc/testsuite/c-c++-common/ubsan/nonnull-4.c | 2 +- gcc/testsuite/c-c++-common/ubsan/overflow-add-4.c | 2 +- gcc/testsuite/c-c++-common/ubsan/pr56956.c | 2 +- gcc/testsuite/c-c++-common/ubsan/pr68142.c | 2 +- gcc/testsuite/c-c++-common/ubsan/pr80932.c | 2 +- gcc/ubsan.cc | 24 +++-- 16 files changed, 226 insertions(+), 109 deletions(-) (limited to 'gcc') diff --git a/gcc/c-family/c-ubsan.cc b/gcc/c-family/c-ubsan.cc index a2cd8fb..360ba82 100644 --- a/gcc/c-family/c-ubsan.cc +++ b/gcc/c-family/c-ubsan.cc @@ -83,8 +83,9 @@ ubsan_instrument_division (location_t loc, tree op0, tree op1) x = NULL_TREE; flag = SANITIZE_SI_OVERFLOW; } - else if (flag_sanitize_undefined_trap_on_error - || (((flag_sanitize_recover & SANITIZE_DIVIDE) == 0) + else if ((((flag_sanitize_trap & SANITIZE_DIVIDE) == 0) + == ((flag_sanitize_trap & SANITIZE_SI_OVERFLOW) == 0)) + && (((flag_sanitize_recover & SANITIZE_DIVIDE) == 0) == ((flag_sanitize_recover & SANITIZE_SI_OVERFLOW) == 0))) { t = fold_build2 (TRUTH_OR_EXPR, boolean_type_node, t, x); @@ -105,7 +106,7 @@ ubsan_instrument_division (location_t loc, tree op0, tree op1) make sure it gets evaluated before the condition. */ t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), unshare_expr (op0), t); t = fold_build2 (COMPOUND_EXPR, TREE_TYPE (t), unshare_expr (op1), t); - if (flag_sanitize_undefined_trap_on_error) + if ((flag_sanitize_trap & flag) && x == NULL_TREE) tt = build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -113,25 +114,41 @@ ubsan_instrument_division (location_t loc, tree op0, tree op1) ubsan_type_descriptor (type), NULL_TREE, NULL_TREE); data = build_fold_addr_expr_loc (loc, data); - enum built_in_function bcode - = (flag_sanitize_recover & flag) - ? BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW - : BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW_ABORT; - tt = builtin_decl_explicit (bcode); - op0 = unshare_expr (op0); - op1 = unshare_expr (op1); - tt = build_call_expr_loc (loc, tt, 3, data, ubsan_encode_value (op0), - ubsan_encode_value (op1)); - if (x) + if (flag_sanitize_trap & flag) + tt = build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_TRAP), + 0); + else { - bcode = (flag_sanitize_recover & SANITIZE_SI_OVERFLOW) - ? BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW - : BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW_ABORT; - tree xt = builtin_decl_explicit (bcode); + enum built_in_function bcode + = (flag_sanitize_recover & flag) + ? BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW + : BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW_ABORT; + tt = builtin_decl_explicit (bcode); op0 = unshare_expr (op0); op1 = unshare_expr (op1); - xt = build_call_expr_loc (loc, xt, 3, data, ubsan_encode_value (op0), + tt = build_call_expr_loc (loc, tt, 3, data, ubsan_encode_value (op0), ubsan_encode_value (op1)); + } + if (x) + { + tree xt; + if (flag_sanitize_trap & SANITIZE_SI_OVERFLOW) + xt = build_call_expr_loc (loc, + builtin_decl_explicit (BUILT_IN_TRAP), + 0); + else + { + enum built_in_function bcode + = (flag_sanitize_recover & SANITIZE_SI_OVERFLOW) + ? BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW + : BUILT_IN_UBSAN_HANDLE_DIVREM_OVERFLOW_ABORT; + xt = builtin_decl_explicit (bcode); + op0 = unshare_expr (op0); + op1 = unshare_expr (op1); + xt = build_call_expr_loc (loc, xt, 3, data, + ubsan_encode_value (op0), + ubsan_encode_value (op1)); + } x = fold_build3 (COND_EXPR, void_type_node, x, xt, void_node); } } @@ -225,8 +242,9 @@ ubsan_instrument_shift (location_t loc, enum tree_code code, } else { - if (flag_sanitize_undefined_trap_on_error - || ((!(flag_sanitize_recover & SANITIZE_SHIFT_EXPONENT)) + if (((!(flag_sanitize_trap & SANITIZE_SHIFT_EXPONENT)) + == (!(flag_sanitize_trap & SANITIZE_SHIFT_BASE))) + && ((!(flag_sanitize_recover & SANITIZE_SHIFT_EXPONENT)) == (!(flag_sanitize_recover & SANITIZE_SHIFT_BASE)))) t = fold_build2 (TRUTH_OR_EXPR, boolean_type_node, t, tt); else @@ -234,7 +252,7 @@ ubsan_instrument_shift (location_t loc, enum tree_code code, } } - if (flag_sanitize_undefined_trap_on_error) + if ((flag_sanitize_trap & recover_kind) && else_t == void_node) tt = build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -244,26 +262,40 @@ ubsan_instrument_shift (location_t loc, enum tree_code code, NULL_TREE); data = build_fold_addr_expr_loc (loc, data); - enum built_in_function bcode - = (flag_sanitize_recover & recover_kind) - ? BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS - : BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS_ABORT; - tt = builtin_decl_explicit (bcode); - op0 = unshare_expr (op0); - op1 = unshare_expr (op1); - tt = build_call_expr_loc (loc, tt, 3, data, ubsan_encode_value (op0), - ubsan_encode_value (op1)); + if (flag_sanitize_trap & recover_kind) + tt = build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_TRAP), 0); + else + { + enum built_in_function bcode + = (flag_sanitize_recover & recover_kind) + ? BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS + : BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS_ABORT; + tt = builtin_decl_explicit (bcode); + op0 = unshare_expr (op0); + op1 = unshare_expr (op1); + tt = build_call_expr_loc (loc, tt, 3, data, ubsan_encode_value (op0), + ubsan_encode_value (op1)); + } if (else_t != void_node) { - bcode = (flag_sanitize_recover & SANITIZE_SHIFT_BASE) + tree else_tt; + if (flag_sanitize_trap & SANITIZE_SHIFT_BASE) + else_tt + = build_call_expr_loc (loc, + builtin_decl_explicit (BUILT_IN_TRAP), 0); + else + { + enum built_in_function bcode + = (flag_sanitize_recover & SANITIZE_SHIFT_BASE) ? BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS : BUILT_IN_UBSAN_HANDLE_SHIFT_OUT_OF_BOUNDS_ABORT; - tree else_tt = builtin_decl_explicit (bcode); - op0 = unshare_expr (op0); - op1 = unshare_expr (op1); - else_tt = build_call_expr_loc (loc, else_tt, 3, data, - ubsan_encode_value (op0), - ubsan_encode_value (op1)); + else_tt = builtin_decl_explicit (bcode); + op0 = unshare_expr (op0); + op1 = unshare_expr (op1); + else_tt = build_call_expr_loc (loc, else_tt, 3, data, + ubsan_encode_value (op0), + ubsan_encode_value (op1)); + } else_t = fold_build3 (COND_EXPR, void_type_node, else_t, else_tt, void_node); } @@ -282,7 +314,7 @@ ubsan_instrument_vla (location_t loc, tree size) tree t, tt; t = fold_build2 (LE_EXPR, boolean_type_node, size, build_int_cst (type, 0)); - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_VLA) tt = build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -307,10 +339,10 @@ ubsan_instrument_vla (location_t loc, tree size) tree ubsan_instrument_return (location_t loc) { - if (flag_sanitize_undefined_trap_on_error) - return build_call_expr_loc - /* pass_warn_function_return checks for BUILTINS_LOCATION. */ - (BUILTINS_LOCATION, builtin_decl_explicit (BUILT_IN_TRAP), 0); + if (flag_sanitize_trap & SANITIZE_RETURN) + /* pass_warn_function_return checks for BUILTINS_LOCATION. */ + return build_call_expr_loc (BUILTINS_LOCATION, + builtin_decl_explicit (BUILT_IN_TRAP), 0); tree data = ubsan_create_data ("__ubsan_missing_return_data", 1, &loc, NULL_TREE, NULL_TREE); diff --git a/gcc/common.opt b/gcc/common.opt index 8e961f1..32917aa 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -223,6 +223,10 @@ unsigned int flag_sanitize Variable unsigned int flag_sanitize_recover = (SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT | SANITIZE_KERNEL_ADDRESS | SANITIZE_KERNEL_HWADDRESS) & ~(SANITIZE_UNREACHABLE | SANITIZE_RETURN) +; What sanitizers should use __builtin_trap () instead of runtime diagnostics +Variable +unsigned int flag_sanitize_trap + ; Flag whether a prefix has been added to dump_base_name Variable bool dump_base_name_prefixed = false @@ -1105,12 +1109,19 @@ fsanitize-recover Common This switch is deprecated; use -fsanitize-recover= instead. +fsanitize-trap= +Common Driver Joined +Use traps instead of diagnostics of undefined behavior sanitizers. + +fsanitize-trap +Common Driver + fsanitize-address-use-after-scope Common Driver Var(flag_sanitize_address_use_after_scope) Init(0) fsanitize-undefined-trap-on-error -Common Driver Var(flag_sanitize_undefined_trap_on_error) Init(0) -Use trap instead of a library function for undefined behavior sanitization. +Common Driver Alias(fsanitize-trap) +This switch is deprecated; use -fsanitize-trap= instead. fasynchronous-unwind-tables Common Var(flag_asynchronous_unwind_tables) Optimization diff --git a/gcc/cp/cp-ubsan.cc b/gcc/cp/cp-ubsan.cc index 2532521..edad2bd 100644 --- a/gcc/cp/cp-ubsan.cc +++ b/gcc/cp/cp-ubsan.cc @@ -32,7 +32,7 @@ along with GCC; see the file COPYING3. If not see static bool cp_ubsan_instrument_vptr_p (tree type) { - if (!flag_rtti || flag_sanitize_undefined_trap_on_error) + if (!flag_rtti || (flag_sanitize_trap & SANITIZE_VPTR)) return false; if (!sanitize_flags_p (SANITIZE_VPTR)) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 60b7b5a..50f5787 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -609,6 +609,7 @@ Objective-C and Objective-C++ Dialects}. -fprofile-exclude-files=@var{regex} @gol -fprofile-reproducible=@r{[}multithreaded@r{|}parallel-runs@r{|}serial@r{]} @gol -fsanitize=@var{style} -fsanitize-recover -fsanitize-recover=@var{style} @gol +-fsanitize-trap -fsanitize-trap=@var{style} @gol -fasan-shadow-offset=@var{number} -fsanitize-sections=@var{s1},@var{s2},... @gol -fsanitize-undefined-trap-on-error -fbounds-check @gol -fcf-protection=@r{[}full@r{|}branch@r{|}return@r{|}none@r{|}check@r{]} @gol @@ -16116,13 +16117,37 @@ undefined,float-cast-overflow,float-divide-by-zero,bounds-strict Enable sanitization of local variables to detect use-after-scope bugs. The option sets @option{-fstack-reuse} to @samp{none}. +@item -fsanitize-trap@r{[}=@var{opts}@r{]} +@opindex fsanitize-trap +@opindex fno-sanitize-trap +The @option{-fsanitize-trap=} option instructs the compiler to +report for sanitizers mentioned in comma-separated list of @var{opts} +undefined behavior using @code{__builtin_trap} rather than a @code{libubsan} +library routine. If this option is enabled for certain sanitizer, +it takes precedence over the @option{-fsanitizer-recover=} for that +sanitizer, @code{__builtin_trap} will be emitted and be fatal regardless +of whether recovery is enabled or disabled using @option{-fsanitize-recover=}. + +The advantage of this is that the @code{libubsan} library is not needed +and is not linked in, so this is usable even in freestanding environments. + +Currently this feature works with @option{-fsanitize=undefined} (and its suboptions +except for @option{-fsanitize=vptr}), @option{-fsanitize=float-cast-overflow}, +@option{-fsanitize=float-divide-by-zero} and +@option{-fsanitize=bounds-strict}. @code{-fsanitize-trap=all} can be also +specified, which enables it for @code{undefined} suboptions, +@option{-fsanitize=float-cast-overflow}, +@option{-fsanitize=float-divide-by-zero} and +@option{-fsanitize=bounds-strict}. +If @code{-fsanitize-trap=undefined} or @code{-fsanitize-trap=all} is used +and @code{-fsanitize=vptr} is enabled on the command line, the +instrumentation is silently ignored as the instrumentation always needs +@code{libubsan} support, @option{-fsanitize-trap=vptr} is not allowed. + @item -fsanitize-undefined-trap-on-error @opindex fsanitize-undefined-trap-on-error -The @option{-fsanitize-undefined-trap-on-error} option instructs the compiler to -report undefined behavior using @code{__builtin_trap} rather than -a @code{libubsan} library routine. The advantage of this is that the -@code{libubsan} library is not needed and is not linked in, so this -is usable even in freestanding environments. +The @option{-fsanitize-undefined-trap-on-error} option is deprecated +equivalent of @option{-fsanitize-trap=all}. @item -fsanitize-coverage=trace-pc @opindex fsanitize-coverage=trace-pc diff --git a/gcc/gcc.cc b/gcc/gcc.cc index 563f535..5cbb385 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -10313,8 +10313,9 @@ sanitize_spec_function (int argc, const char **argv) return (flag_sanitize & SANITIZE_THREAD) ? "" : NULL; if (strcmp (argv[0], "undefined") == 0) return ((flag_sanitize - & (SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT)) - && !flag_sanitize_undefined_trap_on_error) ? "" : NULL; + & ~flag_sanitize_trap + & (SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT))) + ? "" : NULL; if (strcmp (argv[0], "leak") == 0) return ((flag_sanitize & (SANITIZE_ADDRESS | SANITIZE_LEAK | SANITIZE_THREAD)) diff --git a/gcc/opts.cc b/gcc/opts.cc index 55859f5..959d48d 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -1232,6 +1232,18 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, error_at (loc, "%<-fsanitize-recover=%s%> is not supported", sanitizer_opts[i].name); + /* Check -fsanitize-trap option. */ + for (int i = 0; sanitizer_opts[i].name != NULL; ++i) + if ((opts->x_flag_sanitize_trap & sanitizer_opts[i].flag) + && !sanitizer_opts[i].can_trap + /* Allow -fsanitize-trap=all or -fsanitize-trap=undefined + to set flag_sanitize_trap & SANITIZE_VPTR bit which will + effectively disable -fsanitize=vptr, just disallow + explicit -fsanitize-trap=vptr. */ + && sanitizer_opts[i].flag != SANITIZE_VPTR) + error_at (loc, "%<-fsanitize-trap=%s%> is not supported", + sanitizer_opts[i].name); + /* When instrumenting the pointers, we don't want to remove the null pointer checks. */ if (opts->x_flag_sanitize & (SANITIZE_NULL | SANITIZE_NONNULL_ATTRIBUTE @@ -2020,48 +2032,50 @@ enable_fdo_optimizations (struct gcc_options *opts, /* -f{,no-}sanitize{,-recover}= suboptions. */ const struct sanitizer_opts_s sanitizer_opts[] = { -#define SANITIZER_OPT(name, flags, recover) \ - { #name, flags, sizeof #name - 1, recover } - SANITIZER_OPT (address, (SANITIZE_ADDRESS | SANITIZE_USER_ADDRESS), true), +#define SANITIZER_OPT(name, flags, recover, trap) \ + { #name, flags, sizeof #name - 1, recover, trap } + SANITIZER_OPT (address, (SANITIZE_ADDRESS | SANITIZE_USER_ADDRESS), true, + false), SANITIZER_OPT (hwaddress, (SANITIZE_HWADDRESS | SANITIZE_USER_HWADDRESS), - true), + true, false), SANITIZER_OPT (kernel-address, (SANITIZE_ADDRESS | SANITIZE_KERNEL_ADDRESS), - true), + true, false), SANITIZER_OPT (kernel-hwaddress, (SANITIZE_HWADDRESS | SANITIZE_KERNEL_HWADDRESS), + true, false), + SANITIZER_OPT (pointer-compare, SANITIZE_POINTER_COMPARE, true, false), + SANITIZER_OPT (pointer-subtract, SANITIZE_POINTER_SUBTRACT, true, false), + SANITIZER_OPT (thread, SANITIZE_THREAD, false, false), + SANITIZER_OPT (leak, SANITIZE_LEAK, false, false), + SANITIZER_OPT (shift, SANITIZE_SHIFT, true, true), + SANITIZER_OPT (shift-base, SANITIZE_SHIFT_BASE, true, true), + SANITIZER_OPT (shift-exponent, SANITIZE_SHIFT_EXPONENT, true, true), + SANITIZER_OPT (integer-divide-by-zero, SANITIZE_DIVIDE, true, true), + SANITIZER_OPT (undefined, SANITIZE_UNDEFINED, true, true), + SANITIZER_OPT (unreachable, SANITIZE_UNREACHABLE, false, true), + SANITIZER_OPT (vla-bound, SANITIZE_VLA, true, true), + SANITIZER_OPT (return, SANITIZE_RETURN, false, true), + SANITIZER_OPT (null, SANITIZE_NULL, true, true), + SANITIZER_OPT (signed-integer-overflow, SANITIZE_SI_OVERFLOW, true, true), + SANITIZER_OPT (bool, SANITIZE_BOOL, true, true), + SANITIZER_OPT (enum, SANITIZE_ENUM, true, true), + SANITIZER_OPT (float-divide-by-zero, SANITIZE_FLOAT_DIVIDE, true, true), + SANITIZER_OPT (float-cast-overflow, SANITIZE_FLOAT_CAST, true, true), + SANITIZER_OPT (bounds, SANITIZE_BOUNDS, true, true), + SANITIZER_OPT (bounds-strict, SANITIZE_BOUNDS | SANITIZE_BOUNDS_STRICT, true, true), - SANITIZER_OPT (pointer-compare, SANITIZE_POINTER_COMPARE, true), - SANITIZER_OPT (pointer-subtract, SANITIZE_POINTER_SUBTRACT, true), - SANITIZER_OPT (thread, SANITIZE_THREAD, false), - SANITIZER_OPT (leak, SANITIZE_LEAK, false), - SANITIZER_OPT (shift, SANITIZE_SHIFT, true), - SANITIZER_OPT (shift-base, SANITIZE_SHIFT_BASE, true), - SANITIZER_OPT (shift-exponent, SANITIZE_SHIFT_EXPONENT, true), - SANITIZER_OPT (integer-divide-by-zero, SANITIZE_DIVIDE, true), - SANITIZER_OPT (undefined, SANITIZE_UNDEFINED, true), - SANITIZER_OPT (unreachable, SANITIZE_UNREACHABLE, false), - SANITIZER_OPT (vla-bound, SANITIZE_VLA, true), - SANITIZER_OPT (return, SANITIZE_RETURN, false), - SANITIZER_OPT (null, SANITIZE_NULL, true), - SANITIZER_OPT (signed-integer-overflow, SANITIZE_SI_OVERFLOW, true), - SANITIZER_OPT (bool, SANITIZE_BOOL, true), - SANITIZER_OPT (enum, SANITIZE_ENUM, true), - SANITIZER_OPT (float-divide-by-zero, SANITIZE_FLOAT_DIVIDE, true), - SANITIZER_OPT (float-cast-overflow, SANITIZE_FLOAT_CAST, true), - SANITIZER_OPT (bounds, SANITIZE_BOUNDS, true), - SANITIZER_OPT (bounds-strict, SANITIZE_BOUNDS | SANITIZE_BOUNDS_STRICT, true), - SANITIZER_OPT (alignment, SANITIZE_ALIGNMENT, true), - SANITIZER_OPT (nonnull-attribute, SANITIZE_NONNULL_ATTRIBUTE, true), + SANITIZER_OPT (alignment, SANITIZE_ALIGNMENT, true, true), + SANITIZER_OPT (nonnull-attribute, SANITIZE_NONNULL_ATTRIBUTE, true, true), SANITIZER_OPT (returns-nonnull-attribute, SANITIZE_RETURNS_NONNULL_ATTRIBUTE, - true), - SANITIZER_OPT (object-size, SANITIZE_OBJECT_SIZE, true), - SANITIZER_OPT (vptr, SANITIZE_VPTR, true), - SANITIZER_OPT (pointer-overflow, SANITIZE_POINTER_OVERFLOW, true), - SANITIZER_OPT (builtin, SANITIZE_BUILTIN, true), - SANITIZER_OPT (shadow-call-stack, SANITIZE_SHADOW_CALL_STACK, false), - SANITIZER_OPT (all, ~0U, true), + true, true), + SANITIZER_OPT (object-size, SANITIZE_OBJECT_SIZE, true, true), + SANITIZER_OPT (vptr, SANITIZE_VPTR, true, false), + SANITIZER_OPT (pointer-overflow, SANITIZE_POINTER_OVERFLOW, true, true), + SANITIZER_OPT (builtin, SANITIZE_BUILTIN, true, true), + SANITIZER_OPT (shadow-call-stack, SANITIZE_SHADOW_CALL_STACK, false, false), + SANITIZER_OPT (all, ~0U, true, true), #undef SANITIZER_OPT - { NULL, 0U, 0UL, false } + { NULL, 0U, 0UL, false, false } }; /* -fzero-call-used-regs= suboptions. */ @@ -2114,7 +2128,7 @@ struct edit_distance_traits /* Given ARG, an unrecognized sanitizer option, return the best matching sanitizer option, or NULL if there isn't one. OPTS is array of candidate sanitizer options. - CODE is OPT_fsanitize_ or OPT_fsanitize_recover_. + CODE is OPT_fsanitize_, OPT_fsanitize_recover_ or OPT_fsanitize_trap_. VALUE is non-zero for the regular form of the option, zero for the "no-" form (e.g. "-fno-sanitize-recover="). */ @@ -2139,6 +2153,13 @@ get_closest_sanitizer_option (const string_fragment &arg, && value) continue; + /* For -fsanitize-trap= (and not -fno-sanitize-trap=), + don't offer the non-trapping options. */ + if (code == OPT_fsanitize_trap_ + && !opts[i].can_trap + && value) + continue; + bm.consider (opts[i].name); } return bm.get_best_meaningful_candidate (); @@ -2183,10 +2204,13 @@ parse_sanitizer_options (const char *p, location_t loc, int scode, if (complain) error_at (loc, "%<-fsanitize=all%> option is not valid"); } - else + else if (code == OPT_fsanitize_recover_) flags |= ~(SANITIZE_THREAD | SANITIZE_LEAK | SANITIZE_UNREACHABLE | SANITIZE_RETURN | SANITIZE_SHADOW_CALL_STACK); + else /* if (code == OPT_fsanitize_trap_) */ + flags |= (SANITIZE_UNDEFINED + | SANITIZE_UNDEFINED_NONDEFAULT); } else if (value) { @@ -2197,6 +2221,10 @@ parse_sanitizer_options (const char *p, location_t loc, int scode, && sanitizer_opts[i].flag == SANITIZE_UNDEFINED) flags |= (SANITIZE_UNDEFINED & ~(SANITIZE_UNREACHABLE | SANITIZE_RETURN)); + else if (code == OPT_fsanitize_trap_ + && sanitizer_opts[i].flag == SANITIZE_VPTR) + error_at (loc, "%<-fsanitize-trap=%s%> is not supported", + sanitizer_opts[i].name); else flags |= sanitizer_opts[i].flag; } @@ -2215,6 +2243,8 @@ parse_sanitizer_options (const char *p, location_t loc, int scode, const char *suffix; if (code == OPT_fsanitize_recover_) suffix = "-recover"; + else if (code == OPT_fsanitize_trap_) + suffix = "-trap"; else suffix = ""; @@ -2647,6 +2677,12 @@ common_handle_option (struct gcc_options *opts, opts->x_flag_sanitize_recover, value, true); break; + case OPT_fsanitize_trap_: + opts->x_flag_sanitize_trap + = parse_sanitizer_options (arg, loc, code, + opts->x_flag_sanitize_trap, value, true); + break; + case OPT_fasan_shadow_offset_: /* Deferred. */ break; @@ -2665,6 +2701,15 @@ common_handle_option (struct gcc_options *opts, &= ~(SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT); break; + case OPT_fsanitize_trap: + if (value) + opts->x_flag_sanitize_trap + |= (SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT); + else + opts->x_flag_sanitize_trap + &= ~(SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT); + break; + case OPT_O: case OPT_Os: case OPT_Ofast: diff --git a/gcc/opts.h b/gcc/opts.h index a43ce66..73a96f3 100644 --- a/gcc/opts.h +++ b/gcc/opts.h @@ -473,6 +473,7 @@ extern const struct sanitizer_opts_s unsigned int flag; size_t len; bool can_recover; + bool can_trap; } sanitizer_opts[]; extern const struct zero_call_used_regs_opts_s diff --git a/gcc/sanopt.cc b/gcc/sanopt.cc index 125e0c9..c318763 100644 --- a/gcc/sanopt.cc +++ b/gcc/sanopt.cc @@ -392,11 +392,11 @@ maybe_optimize_ubsan_null_ifn (class sanopt_ctx *ctx, gimple *stmt) stmts have same location. */ else if (integer_zerop (align)) remove = (flag_sanitize_recover & SANITIZE_NULL) == 0 - || flag_sanitize_undefined_trap_on_error + || (flag_sanitize_trap & SANITIZE_NULL) != 0 || gimple_location (g) == gimple_location (stmt); else if (tree_int_cst_le (cur_align, align)) remove = (flag_sanitize_recover & SANITIZE_ALIGNMENT) == 0 - || flag_sanitize_undefined_trap_on_error + || (flag_sanitize_trap & SANITIZE_ALIGNMENT) != 0 || gimple_location (g) == gimple_location (stmt); if (!remove && gimple_bb (g) == gimple_bb (stmt) diff --git a/gcc/testsuite/c-c++-common/ubsan/align-8.c b/gcc/testsuite/c-c++-common/ubsan/align-8.c index 5fe0e0f..53b2b6c 100644 --- a/gcc/testsuite/c-c++-common/ubsan/align-8.c +++ b/gcc/testsuite/c-c++-common/ubsan/align-8.c @@ -1,6 +1,6 @@ /* Limit this to known non-strict alignment targets. */ /* { dg-do run { target { i?86-*-linux* x86_64-*-linux* } } } */ -/* { dg-options "-O -fsanitize=alignment -fsanitize-undefined-trap-on-error -Wno-address-of-packed-member -fdump-tree-sanopt-details" } */ +/* { dg-options "-O -fsanitize=alignment -fsanitize-trap=alignment -Wno-address-of-packed-member -fdump-tree-sanopt-details" } */ /* { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } */ /* { dg-shouldfail "ubsan" } */ diff --git a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-4.c b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-4.c index ef431c9..e2cc9fe 100644 --- a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-4.c +++ b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-4.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error -Wno-overflow" } */ +/* { dg-options "-fsanitize=signed-integer-overflow -fsanitize-trap=signed-integer-overflow -Wno-overflow" } */ #define INT_MIN (-__INT_MAX__ - 1) diff --git a/gcc/testsuite/c-c++-common/ubsan/nonnull-4.c b/gcc/testsuite/c-c++-common/ubsan/nonnull-4.c index b49c72e..65b6dfb 100644 --- a/gcc/testsuite/c-c++-common/ubsan/nonnull-4.c +++ b/gcc/testsuite/c-c++-common/ubsan/nonnull-4.c @@ -1,6 +1,6 @@ /* { dg-do run } */ /* { dg-shouldfail "ubsan" } */ -/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */ +/* { dg-options "-fsanitize=undefined -fsanitize-trap=all" } */ int q, r; void *a, *b, *c = (void *) &q, *d, *e, *f = (void *) &q, *g, *h; diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-add-4.c b/gcc/testsuite/c-c++-common/ubsan/overflow-add-4.c index 3f6f6bd..ac9df4d 100644 --- a/gcc/testsuite/c-c++-common/ubsan/overflow-add-4.c +++ b/gcc/testsuite/c-c++-common/ubsan/overflow-add-4.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable -fsanitize-undefined-trap-on-error" } */ +/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable -fsanitize-trap=undefined" } */ /* { dg-shouldfail "ubsan" } */ #define INT_MAX __INT_MAX__ diff --git a/gcc/testsuite/c-c++-common/ubsan/pr56956.c b/gcc/testsuite/c-c++-common/ubsan/pr56956.c index 996e1dd..a3280c2 100644 --- a/gcc/testsuite/c-c++-common/ubsan/pr56956.c +++ b/gcc/testsuite/c-c++-common/ubsan/pr56956.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */ +/* { dg-options "-fsanitize=undefined -fsanitize-trap=undefined" } */ unsigned int __attribute__((noinline,noclone)) foo (unsigned int x) diff --git a/gcc/testsuite/c-c++-common/ubsan/pr68142.c b/gcc/testsuite/c-c++-common/ubsan/pr68142.c index 9498f08..13b7ef6 100644 --- a/gcc/testsuite/c-c++-common/ubsan/pr68142.c +++ b/gcc/testsuite/c-c++-common/ubsan/pr68142.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */ +/* { dg-options "-fsanitize=undefined -fsanitize-trap=undefined" } */ int __attribute__((noinline,noclone)) h(int a) diff --git a/gcc/testsuite/c-c++-common/ubsan/pr80932.c b/gcc/testsuite/c-c++-common/ubsan/pr80932.c index 92903f7..3ee56c8 100644 --- a/gcc/testsuite/c-c++-common/ubsan/pr80932.c +++ b/gcc/testsuite/c-c++-common/ubsan/pr80932.c @@ -1,6 +1,6 @@ /* PR sanitizer/80932 */ /* { dg-do run } */ -/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */ +/* { dg-options "-fsanitize=undefined -fno-sanitize-trap=all -fsanitize-trap=shift,undefined" } */ int x = 1; diff --git a/gcc/ubsan.cc b/gcc/ubsan.cc index 6c05814..3aa25b5 100644 --- a/gcc/ubsan.cc +++ b/gcc/ubsan.cc @@ -647,7 +647,7 @@ ubsan_instrument_unreachable (gimple_stmt_iterator *gsi) gimple *g; location_t loc = gimple_location (gsi_stmt (*gsi)); - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_UNREACHABLE) g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -719,7 +719,7 @@ ubsan_expand_bounds_ifn (gimple_stmt_iterator *gsi) /* Generate __ubsan_handle_out_of_bounds call. */ *gsi = gsi_after_labels (then_bb); - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_BOUNDS) g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -827,7 +827,8 @@ ubsan_expand_null_ifn (gimple_stmt_iterator *gsip) set_immediate_dominator (CDI_DOMINATORS, then_bb, cond_bb); /* Put the ubsan builtin call into the newly created BB. */ - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & ((check_align ? SANITIZE_ALIGNMENT + 0 : 0) + | (check_null ? SANITIZE_NULL + 0 : 0))) g = gimple_build_call (builtin_decl_implicit (BUILT_IN_TRAP), 0); else { @@ -997,7 +998,7 @@ ubsan_expand_objsize_ifn (gimple_stmt_iterator *gsi) } /* Generate __ubsan_handle_type_mismatch call. */ - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_OBJECT_SIZE) g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -1143,7 +1144,7 @@ ubsan_expand_ptr_ifn (gimple_stmt_iterator *gsip) } /* Put the ubsan builtin call into the newly created BB. */ - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_POINTER_OVERFLOW) g = gimple_build_call (builtin_decl_implicit (BUILT_IN_TRAP), 0); else { @@ -1518,7 +1519,7 @@ tree ubsan_build_overflow_builtin (tree_code code, location_t loc, tree lhstype, tree op0, tree op1, tree *datap) { - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_SI_OVERFLOW) return build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_TRAP), 0); tree data; @@ -1741,7 +1742,8 @@ instrument_bool_enum_load (gimple_stmt_iterator *gsi) } gsi2 = gsi_after_labels (then_bb); - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & (TREE_CODE (type) == BOOLEAN_TYPE + ? SANITIZE_BOOL : SANITIZE_ENUM)) g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -1904,7 +1906,7 @@ ubsan_instrument_float_cast (location_t loc, tree type, tree expr) if (integer_zerop (t)) return NULL_TREE; - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_FLOAT_CAST) fn = build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -1974,7 +1976,7 @@ instrument_nonnull_arg (gimple_stmt_iterator *gsi) gsi_insert_after (gsi, g, GSI_NEW_STMT); *gsi = gsi_after_labels (then_bb); - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_NONNULL_ATTRIBUTE) g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -2030,7 +2032,7 @@ instrument_nonnull_return (gimple_stmt_iterator *gsi) gsi_insert_after (gsi, g, GSI_NEW_STMT); *gsi = gsi_after_labels (then_bb); - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_RETURNS_NONNULL_ATTRIBUTE) g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0); else { @@ -2279,7 +2281,7 @@ instrument_builtin (gimple_stmt_iterator *gsi) gsi_insert_after (gsi, g, GSI_NEW_STMT); *gsi = gsi_after_labels (then_bb); - if (flag_sanitize_undefined_trap_on_error) + if (flag_sanitize_trap & SANITIZE_BUILTIN) g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0); else { -- cgit v1.1 From 856a9b8fc2b457963898c539f0db92a1baa0bf27 Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Wed, 15 Jun 2022 22:20:09 +0200 Subject: Fortran: check POS and LEN arguments simplifying bit intrinsics [PR105986] gcc/fortran/ChangeLog: PR fortran/105986 * simplify.cc (gfc_simplify_btest): Add check for POS argument. (gfc_simplify_ibclr): Add check for POS argument. (gfc_simplify_ibits): Add check for POS and LEN arguments. (gfc_simplify_ibset): Add check for POS argument. gcc/testsuite/ChangeLog: PR fortran/105986 * gfortran.dg/check_bits_3.f90: New test. --- gcc/fortran/simplify.cc | 12 ++++++++++++ gcc/testsuite/gfortran.dg/check_bits_3.f90 | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/check_bits_3.f90 (limited to 'gcc') diff --git a/gcc/fortran/simplify.cc b/gcc/fortran/simplify.cc index 233cc42..c8f2ef9 100644 --- a/gcc/fortran/simplify.cc +++ b/gcc/fortran/simplify.cc @@ -1644,6 +1644,9 @@ gfc_simplify_btest (gfc_expr *e, gfc_expr *bit) if (e->expr_type != EXPR_CONSTANT || bit->expr_type != EXPR_CONSTANT) return NULL; + if (!gfc_check_bitfcn (e, bit)) + return &gfc_bad_expr; + if (gfc_extract_int (bit, &b) || b < 0) return gfc_get_logical_expr (gfc_default_logical_kind, &e->where, false); @@ -3353,6 +3356,9 @@ gfc_simplify_ibclr (gfc_expr *x, gfc_expr *y) if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT) return NULL; + if (!gfc_check_bitfcn (x, y)) + return &gfc_bad_expr; + gfc_extract_int (y, &pos); k = gfc_validate_kind (x->ts.type, x->ts.kind, false); @@ -3384,6 +3390,9 @@ gfc_simplify_ibits (gfc_expr *x, gfc_expr *y, gfc_expr *z) || z->expr_type != EXPR_CONSTANT) return NULL; + if (!gfc_check_ibits (x, y, z)) + return &gfc_bad_expr; + gfc_extract_int (y, &pos); gfc_extract_int (z, &len); @@ -3438,6 +3447,9 @@ gfc_simplify_ibset (gfc_expr *x, gfc_expr *y) if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT) return NULL; + if (!gfc_check_bitfcn (x, y)) + return &gfc_bad_expr; + gfc_extract_int (y, &pos); k = gfc_validate_kind (x->ts.type, x->ts.kind, false); diff --git a/gcc/testsuite/gfortran.dg/check_bits_3.f90 b/gcc/testsuite/gfortran.dg/check_bits_3.f90 new file mode 100644 index 0000000..3018e69 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/check_bits_3.f90 @@ -0,0 +1,16 @@ +! { dg-do compile } +! PR fortran/105986 +! Contributed by G.Steinmetz + +program p + integer :: i + logical, parameter :: a(*) = [(btest(8_4,i), i=-1,-1)] ! { dg-error "nonnegative" } + integer, parameter :: b(*) = [(ibclr(8_4,i), i=-1,-1)] ! { dg-error "nonnegative" } + integer, parameter :: c(*) = [(ibset(8_4,i), i=-1,-1)] ! { dg-error "nonnegative" } + logical, parameter :: d(*) = [(btest(8_1,i), i= 8, 8)] ! { dg-error "must be less" } + integer, parameter :: e(*) = [(ibclr(8_2,i), i=16,16)] ! { dg-error "must be less" } + integer, parameter :: f(*) = [(ibset(8_4,i), i=32,32)] ! { dg-error "must be less" } + integer, parameter :: g(*) = [(ibits(8_4,i,1),i=-1,-1)] ! { dg-error "nonnegative" } + integer, parameter :: h(*) = [(ibits(8_4,1,i),i=-1,-1)] ! { dg-error "nonnegative" } + integer, parameter :: j(*) = [(ibits(8_4,i,i),i=32,32)] ! { dg-error "must be less" } +end -- cgit v1.1 From 4390e7bfbc641a52c6192b448768dafdf4565527 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 19 Jun 2022 00:16:23 +0000 Subject: Daily bump. --- gcc/ChangeLog | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/c-family/ChangeLog | 11 +++++++++ gcc/cp/ChangeLog | 6 +++++ gcc/fortran/ChangeLog | 8 +++++++ gcc/testsuite/ChangeLog | 32 +++++++++++++++++++++++++ 6 files changed, 120 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac77b6a..cf564d1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,65 @@ +2022-06-18 Jakub Jelinek + + * common.opt (flag_sanitize_trap): New variable. + (fsanitize-trap=, fsanitize-trap): New options. + (fsanitize-undefined-trap-on-error): Change into deprecated alias + for -fsanitize-trap=all. + * opts.h (struct sanitizer_opts_s): Add can_trap member. + * opts.cc (finish_options): Complain about unsupported + -fsanitize-trap= options. + (sanitizer_opts): Add can_trap values to all entries. + (get_closest_sanitizer_option): Ignore -fsanitize-trap= + options which have can_trap false. + (parse_sanitizer_options): Add support for -fsanitize-trap=. + For -fsanitize-trap=all, enable + SANITIZE_UNDEFINED | SANITIZE_UNDEFINED_NONDEFAULT. Disallow + -fsanitize-trap=vptr here. + (common_handle_option): Handle OPT_fsanitize_trap_ and + OPT_fsanitize_trap. + * sanopt.cc (maybe_optimize_ubsan_null_ifn): Check + flag_sanitize_trap & SANITIZE_{NULL,ALIGNMENT} instead of + flag_sanitize_undefined_trap_on_error. + * gcc.cc (sanitize_spec_function): Use + flag_sanitize & ~flag_sanitize_trap instead of flag_sanitize + and drop use of flag_sanitize_undefined_trap_on_error in + "undefined" handling. + * ubsan.cc (ubsan_instrument_unreachable): Use + flag_sanitize_trap & SANITIZE_??? instead of + flag_sanitize_undefined_trap_on_error. + (ubsan_expand_bounds_ifn, ubsan_expand_null_ifn, + ubsan_expand_objsize_ifn, ubsan_expand_ptr_ifn, + ubsan_build_overflow_builtin, instrument_bool_enum_load, + ubsan_instrument_float_cast, instrument_nonnull_arg, + instrument_nonnull_return, instrument_builtin): Likewise. + * doc/invoke.texi (-fsanitize-trap=, -fsanitize-trap): Document. + (-fsanitize-undefined-trap-on-error): Document as deprecated + alias of -fsanitize-trap. + +2022-06-18 Jakub Jelinek + + PR middle-end/105998 + * varasm.cc (narrowing_initializer_constant_valid_p): Check + SCALAR_INT_MODE_P instead of INTEGRAL_MODE_P, also break on + ! INTEGRAL_TYPE_P and do the same check also on op{0,1}'s type. + +2022-06-18 Roger Sayle + + PR tree-optimization/105835 + * match.pd (convert (mult zero_one_valued_p@1 INTEGER_CST@2)): + Narrow integer multiplication by a zero_one_valued_p operand. + (convert (cond @1 INTEGER_CST@2 INTEGER_CST@3)): Push integer + conversions inside COND_EXPR where both data operands are + integer constants. + +2022-06-18 Takayuki 'January June' Suwa + + * config/xtensa/constraints.md (Y): + Change to include integer constants until reload begins. + * config/xtensa/predicates.md (move_operand): Ditto. + * config/xtensa/xtensa.cc (xtensa_emit_move_sequence): + Change to allow storing integer constants into litpool only after + reload begins. + 2022-06-17 Uroš Bizjak PR target/105209 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 00d863e..ff3ede7 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220618 +20220619 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 1040d4a..a605c3c 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,14 @@ +2022-06-18 Jakub Jelinek + + * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift): + Use flag_sanitize_trap & SANITIZE_??? instead of + flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved + and flag_sanitize_trap differs for them, emit __builtin_trap only + for the comparison where trap is requested. + (ubsan_instrument_vla, ubsan_instrument_return): Use + lag_sanitize_trap & SANITIZE_??? instead of + flag_sanitize_undefined_trap_on_error. + 2022-06-13 Jason Merrill * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e7fb222..5c1c306 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2022-06-18 Jakub Jelinek + + * cp-ubsan.cc (cp_ubsan_instrument_vptr_p): Use + flag_sanitize_trap & SANITIZE_VPTR instead of + flag_sanitize_undefined_trap_on_error. + 2022-06-17 Jakub Jelinek PR c++/106001 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 27d445a..b668944 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2022-06-18 Harald Anlauf + + PR fortran/105986 + * simplify.cc (gfc_simplify_btest): Add check for POS argument. + (gfc_simplify_ibclr): Add check for POS argument. + (gfc_simplify_ibits): Add check for POS and LEN arguments. + (gfc_simplify_ibset): Add check for POS argument. + 2022-06-08 Tobias Burnus * openmp.cc (gfc_match_omp_clauses): Check also parent namespace diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cd1e992..d77961e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,35 @@ +2022-06-18 Harald Anlauf + + PR fortran/105986 + * gfortran.dg/check_bits_3.f90: New test. + +2022-06-18 Jakub Jelinek + + * c-c++-common/ubsan/nonnull-4.c: Use -fsanitize-trap=all + instead of -fsanitize-undefined-trap-on-error. + * c-c++-common/ubsan/div-by-zero-4.c: Use + -fsanitize-trap=signed-integer-overflow instead of + -fsanitize-undefined-trap-on-error. + * c-c++-common/ubsan/overflow-add-4.c: Use -fsanitize-trap=undefined + instead of -fsanitize-undefined-trap-on-error. + * c-c++-common/ubsan/pr56956.c: Likewise. + * c-c++-common/ubsan/pr68142.c: Likewise. + * c-c++-common/ubsan/pr80932.c: Use + -fno-sanitize-trap=all -fsanitize-trap=shift,undefined + instead of -fsanitize-undefined-trap-on-error. + * c-c++-common/ubsan/align-8.c: Use -fsanitize-trap=alignment + instead of -fsanitize-undefined-trap-on-error. + +2022-06-18 Jakub Jelinek + + PR middle-end/105998 + * c-c++-common/pr105998.c: New test. + +2022-06-18 Roger Sayle + + PR tree-optimization/105835 + * gcc.dg/pr105835.c: New test case. + 2022-06-17 Jakub Jelinek PR c++/106001 -- cgit v1.1 From 75ab2f0ebd3c6ab678fea03906186068b89f9fbc Mon Sep 17 00:00:00 2001 From: Takayuki 'January June' Suwa Date: Mon, 20 Jun 2022 04:12:48 +0900 Subject: xtensa: Apply a few minor fixes No functional changes. gcc/ChangeLog: * config/xtensa/xtensa.cc (xtensa_emit_move_sequence): Use can_create_pseudo_p(), instead of using individual reload_in_progress and reload_completed. (xtensa_expand_block_set_small_loop): Use xtensa_simm8x256(), the existing predicate function. (xtensa_is_insn_L32R_p, gen_int_relational, xtensa_emit_sibcall): Use the standard RTX code predicate macros such as MEM_P, SYMBOL_REF_P and/or CONST_INT_P. * config/xtensa/xtensa.md: Avoid using numeric literals to determine if callee-saved register, at the split patterns for indirect sibcall fixups. --- gcc/config/xtensa/xtensa.cc | 16 ++++++++-------- gcc/config/xtensa/xtensa.md | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'gcc') diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc index c5d00ac..2c534ff 100644 --- a/gcc/config/xtensa/xtensa.cc +++ b/gcc/config/xtensa/xtensa.cc @@ -752,7 +752,7 @@ gen_int_relational (enum rtx_code test_code, /* relational test (EQ, etc) */ } /* See if we need to invert the result. */ - invert = ((GET_CODE (cmp1) == CONST_INT) + invert = (CONST_INT_P (cmp1) ? p_info->invert_const : p_info->invert_reg); @@ -1209,7 +1209,7 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) } } - if (!(reload_in_progress | reload_completed) + if (can_create_pseudo_p () && !xtensa_valid_move (mode, operands)) operands[1] = force_reg (mode, operands[1]); @@ -1612,7 +1612,7 @@ xtensa_expand_block_set_small_loop (rtx *operands) thus limited to only offset to the end address for ADDI/ADDMI instruction. */ if (align == 4 - && ! (bytes <= 127 || (bytes <= 32512 && bytes % 256 == 0))) + && ! (bytes <= 127 || xtensa_simm8x256 (bytes))) return 0; /* If no 4-byte aligned, loop count should be treated as the @@ -2169,7 +2169,7 @@ xtensa_emit_sibcall (int callop, rtx *operands) static char result[64]; rtx tgt = operands[callop]; - if (GET_CODE (tgt) == CONST_INT) + if (CONST_INT_P (tgt)) sprintf (result, "j.l\t" HOST_WIDE_INT_PRINT_HEX ", a9", INTVAL (tgt)); else if (register_operand (tgt, VOIDmode)) @@ -4282,17 +4282,17 @@ xtensa_rtx_costs (rtx x, machine_mode mode, int outer_code, } static bool -xtensa_is_insn_L32R_p(const rtx_insn *insn) +xtensa_is_insn_L32R_p (const rtx_insn *insn) { rtx x = PATTERN (insn); if (GET_CODE (x) == SET) { - x = XEXP (x, 1); - if (GET_CODE (x) == MEM) + x = SET_SRC (x); + if (MEM_P (x)) { x = XEXP (x, 0); - return (GET_CODE (x) == SYMBOL_REF || CONST_INT_P (x)) + return (SYMBOL_REF_P (x) || CONST_INT_P (x)) && CONSTANT_POOL_ADDRESS_P (x); } } diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md index ef6bbc4..84b975c 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -1246,14 +1246,14 @@ int i = 0; rtx x = XEXP (operands[1], 0); long l[2]; - if (GET_CODE (x) == SYMBOL_REF + if (SYMBOL_REF_P (x) && CONSTANT_POOL_ADDRESS_P (x)) x = get_pool_constant (x); else if (GET_CODE (x) == CONST) { x = XEXP (x, 0); gcc_assert (GET_CODE (x) == PLUS - && GET_CODE (XEXP (x, 0)) == SYMBOL_REF + && SYMBOL_REF_P (XEXP (x, 0)) && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)) && CONST_INT_P (XEXP (x, 1))); i = INTVAL (XEXP (x, 1)); @@ -2212,7 +2212,7 @@ (match_operand 1 ""))] "reload_completed && !TARGET_WINDOWED_ABI && SIBLING_CALL_P (insn) - && IN_RANGE (REGNO (operands[0]), 12, 15)" + && ! call_used_or_fixed_reg_p (REGNO (operands[0]))" [(set (reg:SI A10_REG) (match_dup 0)) (call (mem:SI (reg:SI A10_REG)) @@ -2245,7 +2245,7 @@ (match_operand 2 "")))] "reload_completed && !TARGET_WINDOWED_ABI && SIBLING_CALL_P (insn) - && IN_RANGE (REGNO (operands[1]), 12, 15)" + && ! call_used_or_fixed_reg_p (REGNO (operands[1]))" [(set (reg:SI A10_REG) (match_dup 1)) (set (match_dup 0) -- cgit v1.1 From 46880cd8be7c307f147a8785ac8f58e04a35d34e Mon Sep 17 00:00:00 2001 From: Takayuki 'January June' Suwa Date: Mon, 20 Jun 2022 04:13:56 +0900 Subject: xtensa: Fix RTL insn cost estimation about relaxed MOVI instructions These instructions will all be converted to L32R ones with litpool entries by the assembler. gcc/ChangeLog: * config/xtensa/xtensa.cc (xtensa_is_insn_L32R_p): Consider relaxed MOVI instructions as L32R. --- gcc/config/xtensa/xtensa.cc | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc index 2c534ff..13f2b2b 100644 --- a/gcc/config/xtensa/xtensa.cc +++ b/gcc/config/xtensa/xtensa.cc @@ -4286,17 +4286,23 @@ xtensa_is_insn_L32R_p (const rtx_insn *insn) { rtx x = PATTERN (insn); - if (GET_CODE (x) == SET) + if (GET_CODE (x) != SET) + return false; + + x = XEXP (x, 1); + if (MEM_P (x)) { - x = SET_SRC (x); - if (MEM_P (x)) - { - x = XEXP (x, 0); - return (SYMBOL_REF_P (x) || CONST_INT_P (x)) - && CONSTANT_POOL_ADDRESS_P (x); - } + x = XEXP (x, 0); + return (SYMBOL_REF_P (x) || CONST_INT_P (x)) + && CONSTANT_POOL_ADDRESS_P (x); } + /* relaxed MOVI instructions, that will be converted to L32R by the + assembler. */ + if (CONST_INT_P (x) + && ! xtensa_simm12b (INTVAL (x))) + return true; + return false; } -- cgit v1.1 From e058dfc43fa0df112293584e8f48f6f2cfa3e72a Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 20 Jun 2022 00:16:24 +0000 Subject: Daily bump. --- gcc/ChangeLog | 19 +++++++++++++++++++ gcc/DATESTAMP | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cf564d1..eada60b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2022-06-19 Takayuki 'January June' Suwa + + * config/xtensa/xtensa.cc (xtensa_is_insn_L32R_p): + Consider relaxed MOVI instructions as L32R. + +2022-06-19 Takayuki 'January June' Suwa + + * config/xtensa/xtensa.cc (xtensa_emit_move_sequence): + Use can_create_pseudo_p(), instead of using individual + reload_in_progress and reload_completed. + (xtensa_expand_block_set_small_loop): Use xtensa_simm8x256(), + the existing predicate function. + (xtensa_is_insn_L32R_p, gen_int_relational, xtensa_emit_sibcall): + Use the standard RTX code predicate macros such as MEM_P, + SYMBOL_REF_P and/or CONST_INT_P. + * config/xtensa/xtensa.md: Avoid using numeric literals to determine + if callee-saved register, at the split patterns for indirect sibcall + fixups. + 2022-06-18 Jakub Jelinek * common.opt (flag_sanitize_trap): New variable. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index ff3ede7..02f5d3a 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220619 +20220620 -- cgit v1.1 From 970b03c0037549a571ecea9afa41de78eb859b3a Mon Sep 17 00:00:00 2001 From: yulong Date: Wed, 8 Jun 2022 10:19:21 +0800 Subject: RISC-V: Fix a bug that is the CMO builtins are missing parameter We changed builtins format about zicbom and zicboz subextensions and modified test cases. diff with the previous version: 1.We modified the FUNCTION_TYPE from RISCV_VOID_FTYPE_SI/DI to RISCV_VOID_FTYPE_VOID_PTR. 2.We added a new RISCV_ATYPE_VOID_PTR in riscv-builtins.cc and a new DEF_RISCV_FTYPE (1, (VOID, VOID_PTR)) in riscv-ftypes.def. 3.We deleted DEF_RISCV_FTYPE (1, (VOID, SI/DI)). 4.We modified the input parameters of the test cases. Thanks, Simon and Kito. gcc/ChangeLog: * config/riscv/riscv-builtins.cc (RISCV_ATYPE_VOID_PTR): New. * config/riscv/riscv-cmo.def (RISCV_BUILTIN): Changed the FUNCTION_TYPE of RISCV_BUILTIN. * config/riscv/riscv-ftypes.def (0): Remove unused. (1): New. gcc/testsuite/ChangeLog: * gcc.target/riscv/cmo-zicbom-1.c: modified the input parameters. * gcc.target/riscv/cmo-zicbom-2.c: modified the input parameters. * gcc.target/riscv/cmo-zicboz-1.c: modified the input parameters. * gcc.target/riscv/cmo-zicboz-2.c: modified the input parameters. --- gcc/config/riscv/riscv-builtins.cc | 1 + gcc/config/riscv/riscv-cmo.def | 16 ++++++++-------- gcc/config/riscv/riscv-ftypes.def | 3 +-- gcc/testsuite/gcc.target/riscv/cmo-zicbom-1.c | 26 +++++++++++++++++--------- gcc/testsuite/gcc.target/riscv/cmo-zicbom-2.c | 26 +++++++++++++++++--------- gcc/testsuite/gcc.target/riscv/cmo-zicboz-1.c | 10 +++++++--- gcc/testsuite/gcc.target/riscv/cmo-zicboz-2.c | 10 +++++++--- 7 files changed, 58 insertions(+), 34 deletions(-) (limited to 'gcc') diff --git a/gcc/config/riscv/riscv-builtins.cc b/gcc/config/riscv/riscv-builtins.cc index 795132a..1218fdf 100644 --- a/gcc/config/riscv/riscv-builtins.cc +++ b/gcc/config/riscv/riscv-builtins.cc @@ -133,6 +133,7 @@ AVAIL (prefetchi64, TARGET_ZICBOP && TARGET_64BIT) #define RISCV_ATYPE_USI unsigned_intSI_type_node #define RISCV_ATYPE_SI intSI_type_node #define RISCV_ATYPE_DI intDI_type_node +#define RISCV_ATYPE_VOID_PTR ptr_type_node /* RISCV_FTYPE_ATYPESN takes N RISCV_FTYPES-like type codes and lists their associated RISCV_ATYPEs. */ diff --git a/gcc/config/riscv/riscv-cmo.def b/gcc/config/riscv/riscv-cmo.def index b30ecf9..9fe5094 100644 --- a/gcc/config/riscv/riscv-cmo.def +++ b/gcc/config/riscv/riscv-cmo.def @@ -1,16 +1,16 @@ // zicbom -RISCV_BUILTIN (clean_si, "zicbom_cbo_clean", RISCV_BUILTIN_DIRECT, RISCV_SI_FTYPE, clean32), -RISCV_BUILTIN (clean_di, "zicbom_cbo_clean", RISCV_BUILTIN_DIRECT, RISCV_DI_FTYPE, clean64), +RISCV_BUILTIN (clean_si, "zicbom_cbo_clean", RISCV_BUILTIN_DIRECT_NO_TARGET, RISCV_VOID_FTYPE_VOID_PTR, clean32), +RISCV_BUILTIN (clean_di, "zicbom_cbo_clean", RISCV_BUILTIN_DIRECT_NO_TARGET, RISCV_VOID_FTYPE_VOID_PTR, clean64), -RISCV_BUILTIN (flush_si, "zicbom_cbo_flush", RISCV_BUILTIN_DIRECT, RISCV_SI_FTYPE, flush32), -RISCV_BUILTIN (flush_di, "zicbom_cbo_flush", RISCV_BUILTIN_DIRECT, RISCV_DI_FTYPE, flush64), +RISCV_BUILTIN (flush_si, "zicbom_cbo_flush", RISCV_BUILTIN_DIRECT_NO_TARGET, RISCV_VOID_FTYPE_VOID_PTR, flush32), +RISCV_BUILTIN (flush_di, "zicbom_cbo_flush", RISCV_BUILTIN_DIRECT_NO_TARGET, RISCV_VOID_FTYPE_VOID_PTR, flush64), -RISCV_BUILTIN (inval_si, "zicbom_cbo_inval", RISCV_BUILTIN_DIRECT, RISCV_SI_FTYPE, inval32), -RISCV_BUILTIN (inval_di, "zicbom_cbo_inval", RISCV_BUILTIN_DIRECT, RISCV_DI_FTYPE, inval64), +RISCV_BUILTIN (inval_si, "zicbom_cbo_inval", RISCV_BUILTIN_DIRECT_NO_TARGET, RISCV_VOID_FTYPE_VOID_PTR, inval32), +RISCV_BUILTIN (inval_di, "zicbom_cbo_inval", RISCV_BUILTIN_DIRECT_NO_TARGET, RISCV_VOID_FTYPE_VOID_PTR, inval64), // zicboz -RISCV_BUILTIN (zero_si, "zicboz_cbo_zero", RISCV_BUILTIN_DIRECT, RISCV_SI_FTYPE, zero32), -RISCV_BUILTIN (zero_di, "zicboz_cbo_zero", RISCV_BUILTIN_DIRECT, RISCV_DI_FTYPE, zero64), +RISCV_BUILTIN (zero_si, "zicboz_cbo_zero", RISCV_BUILTIN_DIRECT_NO_TARGET, RISCV_VOID_FTYPE_VOID_PTR, zero32), +RISCV_BUILTIN (zero_di, "zicboz_cbo_zero", RISCV_BUILTIN_DIRECT_NO_TARGET, RISCV_VOID_FTYPE_VOID_PTR, zero64), // zicbop RISCV_BUILTIN (prefetchi_si, "zicbop_cbo_prefetchi", RISCV_BUILTIN_DIRECT, RISCV_SI_FTYPE_SI, prefetchi32), diff --git a/gcc/config/riscv/riscv-ftypes.def b/gcc/config/riscv/riscv-ftypes.def index 6242129..c2b45c6 100644 --- a/gcc/config/riscv/riscv-ftypes.def +++ b/gcc/config/riscv/riscv-ftypes.def @@ -28,7 +28,6 @@ along with GCC; see the file COPYING3. If not see DEF_RISCV_FTYPE (0, (USI)) DEF_RISCV_FTYPE (1, (VOID, USI)) -DEF_RISCV_FTYPE (0, (SI)) -DEF_RISCV_FTYPE (0, (DI)) +DEF_RISCV_FTYPE (1, (VOID, VOID_PTR)) DEF_RISCV_FTYPE (1, (SI, SI)) DEF_RISCV_FTYPE (1, (DI, DI)) diff --git a/gcc/testsuite/gcc.target/riscv/cmo-zicbom-1.c b/gcc/testsuite/gcc.target/riscv/cmo-zicbom-1.c index e2ba218..6341f78 100644 --- a/gcc/testsuite/gcc.target/riscv/cmo-zicbom-1.c +++ b/gcc/testsuite/gcc.target/riscv/cmo-zicbom-1.c @@ -1,21 +1,29 @@ /* { dg-do compile } */ /* { dg-options "-march=rv64gc_zicbom -mabi=lp64" } */ -int foo1() +int var; + +void foo1() { - return __builtin_riscv_zicbom_cbo_clean(); + __builtin_riscv_zicbom_cbo_clean(0); + __builtin_riscv_zicbom_cbo_clean(&var); + __builtin_riscv_zicbom_cbo_clean((void*)0x111); } -int foo2() +void foo2() { - return __builtin_riscv_zicbom_cbo_flush(); + __builtin_riscv_zicbom_cbo_flush(0); + __builtin_riscv_zicbom_cbo_flush(&var); + __builtin_riscv_zicbom_cbo_flush((void*)0x111); } -int foo3() +void foo3() { - return __builtin_riscv_zicbom_cbo_inval(); + __builtin_riscv_zicbom_cbo_inval(0); + __builtin_riscv_zicbom_cbo_inval(&var); + __builtin_riscv_zicbom_cbo_inval((void*)0x111); } -/* { dg-final { scan-assembler-times "cbo.clean" 1 } } */ -/* { dg-final { scan-assembler-times "cbo.flush" 1 } } */ -/* { dg-final { scan-assembler-times "cbo.inval" 1 } } */ +/* { dg-final { scan-assembler-times "cbo.clean" 3 } } */ +/* { dg-final { scan-assembler-times "cbo.flush" 3 } } */ +/* { dg-final { scan-assembler-times "cbo.inval" 3 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/cmo-zicbom-2.c b/gcc/testsuite/gcc.target/riscv/cmo-zicbom-2.c index a605e8b..a04f106 100644 --- a/gcc/testsuite/gcc.target/riscv/cmo-zicbom-2.c +++ b/gcc/testsuite/gcc.target/riscv/cmo-zicbom-2.c @@ -1,21 +1,29 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gc_zicbom -mabi=ilp32" } */ -int foo1() +int var; + +void foo1() { - return __builtin_riscv_zicbom_cbo_clean(); + __builtin_riscv_zicbom_cbo_clean(0); + __builtin_riscv_zicbom_cbo_clean(&var); + __builtin_riscv_zicbom_cbo_clean((void*)0x111); } -int foo2() +void foo2() { - return __builtin_riscv_zicbom_cbo_flush(); + __builtin_riscv_zicbom_cbo_flush(0); + __builtin_riscv_zicbom_cbo_flush(&var); + __builtin_riscv_zicbom_cbo_flush((void*)0x111); } -int foo3() +void foo3() { - return __builtin_riscv_zicbom_cbo_inval(); + __builtin_riscv_zicbom_cbo_inval(0); + __builtin_riscv_zicbom_cbo_inval(&var); + __builtin_riscv_zicbom_cbo_inval((void*)0x111); } -/* { dg-final { scan-assembler-times "cbo.clean" 1 } } */ -/* { dg-final { scan-assembler-times "cbo.flush" 1 } } */ -/* { dg-final { scan-assembler-times "cbo.inval" 1 } } */ +/* { dg-final { scan-assembler-times "cbo.clean" 3 } } */ +/* { dg-final { scan-assembler-times "cbo.flush" 3 } } */ +/* { dg-final { scan-assembler-times "cbo.inval" 3 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/cmo-zicboz-1.c b/gcc/testsuite/gcc.target/riscv/cmo-zicboz-1.c index 96c1674..5eb78ab 100644 --- a/gcc/testsuite/gcc.target/riscv/cmo-zicboz-1.c +++ b/gcc/testsuite/gcc.target/riscv/cmo-zicboz-1.c @@ -1,9 +1,13 @@ /* { dg-do compile } */ /* { dg-options "-march=rv64gc_zicboz -mabi=lp64" } */ -int foo1() +int var; + +void foo1() { - return __builtin_riscv_zicboz_cbo_zero(); + __builtin_riscv_zicboz_cbo_zero(0); + __builtin_riscv_zicboz_cbo_zero(&var); + __builtin_riscv_zicboz_cbo_zero((void*)0x121); } -/* { dg-final { scan-assembler-times "cbo.zero" 1 } } */ +/* { dg-final { scan-assembler-times "cbo.zero" 3 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/cmo-zicboz-2.c b/gcc/testsuite/gcc.target/riscv/cmo-zicboz-2.c index 9d99839..fdc9c71 100644 --- a/gcc/testsuite/gcc.target/riscv/cmo-zicboz-2.c +++ b/gcc/testsuite/gcc.target/riscv/cmo-zicboz-2.c @@ -1,9 +1,13 @@ /* { dg-do compile } */ /* { dg-options "-march=rv32gc_zicboz -mabi=ilp32" } */ -int foo1() +int var; + +void foo1() { - return __builtin_riscv_zicboz_cbo_zero(); + __builtin_riscv_zicboz_cbo_zero(0); + __builtin_riscv_zicboz_cbo_zero(&var); + __builtin_riscv_zicboz_cbo_zero((void*)0x121); } -/* { dg-final { scan-assembler-times "cbo.zero" 1 } } */ +/* { dg-final { scan-assembler-times "cbo.zero" 3 } } */ -- cgit v1.1 From 9f55aee9dca759da84afd4563ff72d3ca8ab8a1c Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 25 Jan 2022 19:16:06 +0100 Subject: Add operators / and * for profile_{count,probability}. gcc/ChangeLog: * bb-reorder.cc (find_traces_1_round): Add operators / and * and use them. (better_edge_p): Likewise. * cfgloop.cc (find_subloop_latch_edge_by_profile): Likewise. * cfgloopmanip.cc (scale_loop_profile): Likewise. * cfgrtl.cc (force_nonfallthru_and_redirect): Likewise. * cgraph.cc (cgraph_edge::maybe_hot_p): Likewise. * config/sh/sh.cc (expand_cbranchdi4): Likewise. * dojump.cc (do_compare_rtx_and_jump): Likewise. * final.cc (compute_alignments): Likewise. * ipa-cp.cc (update_counts_for_self_gen_clones): Likewise. (decide_about_value): Likewise. * ipa-inline-analysis.cc (do_estimate_edge_time): Likewise. * loop-unroll.cc (unroll_loop_runtime_iterations): Likewise. * modulo-sched.cc (sms_schedule): Likewise. * omp-expand.cc (extract_omp_for_update_vars): Likewise. (expand_omp_ordered_sink): Likewise. (expand_omp_for_ordered_loops): Likewise. (expand_omp_for_static_nochunk): Likewise. * predict.cc (maybe_hot_count_p): Likewise. (probably_never_executed): Likewise. (set_even_probabilities): Likewise. (handle_missing_profiles): Likewise. (expensive_function_p): Likewise. * profile-count.h: Likewise. * profile.cc (compute_branch_probabilities): Likewise. * stmt.cc (emit_case_dispatch_table): Likewise. * symtab-thunks.cc (expand_thunk): Likewise. * tree-ssa-loop-manip.cc (tree_transform_and_unroll_loop): Likewise. * tree-ssa-sink.cc (select_best_block): Likewise. * tree-switch-conversion.cc (switch_decision_tree::analyze_switch_statement): Likewise. (switch_decision_tree::balance_case_nodes): Likewise. (switch_decision_tree::emit_case_nodes): Likewise. * tree-vect-loop.cc (scale_profile_for_vect_loop): Likewise. --- gcc/bb-reorder.cc | 6 ++--- gcc/cfgloop.cc | 2 +- gcc/cfgloopmanip.cc | 5 ++-- gcc/cfgrtl.cc | 4 ++-- gcc/cgraph.cc | 5 ++-- gcc/config/sh/sh.cc | 2 +- gcc/dojump.cc | 2 +- gcc/final.cc | 12 ++++------ gcc/ipa-cp.cc | 10 ++++---- gcc/ipa-inline-analysis.cc | 2 +- gcc/loop-unroll.cc | 8 +++---- gcc/modulo-sched.cc | 20 ++++++++-------- gcc/omp-expand.cc | 24 ++++++++------------ gcc/predict.cc | 17 +++++++------- gcc/profile-count.h | 46 ++++++++++++++++++++++++++++++++++--- gcc/profile.cc | 5 ++-- gcc/stmt.cc | 5 ++-- gcc/symtab-thunks.cc | 10 ++++---- gcc/tree-ssa-loop-manip.cc | 11 ++++----- gcc/tree-ssa-sink.cc | 3 +-- gcc/tree-switch-conversion.cc | 53 +++++++++++++++++++++---------------------- gcc/tree-vect-loop.cc | 5 ++-- 22 files changed, 137 insertions(+), 120 deletions(-) (limited to 'gcc') diff --git a/gcc/bb-reorder.cc b/gcc/bb-reorder.cc index d20ccb8..6600f44 100644 --- a/gcc/bb-reorder.cc +++ b/gcc/bb-reorder.cc @@ -761,7 +761,7 @@ find_traces_1_round (int branch_th, profile_count count_th, & EDGE_CAN_FALLTHRU) && !(single_succ_edge (e->dest)->flags & EDGE_COMPLEX) && single_succ (e->dest) == best_edge->dest - && (e->dest->count.apply_scale (2, 1) + && (e->dest->count * 2 >= best_edge->count () || for_size)) { best_edge = e; @@ -944,7 +944,7 @@ better_edge_p (const_basic_block bb, const_edge e, profile_probability prob, /* The BEST_* values do not have to be best, but can be a bit smaller than maximum values. */ - profile_probability diff_prob = best_prob.apply_scale (1, 10); + profile_probability diff_prob = best_prob / 10; /* The smaller one is better to keep the original order. */ if (optimize_function_for_size_p (cfun)) @@ -966,7 +966,7 @@ better_edge_p (const_basic_block bb, const_edge e, profile_probability prob, is_better_edge = false; else { - profile_count diff_count = best_count.apply_scale (1, 10); + profile_count diff_count = best_count / 10; if (count < best_count - diff_count || (!best_count.initialized_p () && count.nonzero_p ())) diff --git a/gcc/cfgloop.cc b/gcc/cfgloop.cc index 5ffcc77..57bf7b1 100644 --- a/gcc/cfgloop.cc +++ b/gcc/cfgloop.cc @@ -619,7 +619,7 @@ find_subloop_latch_edge_by_profile (vec latches) } if (!tcount.initialized_p () || !(tcount.ipa () > HEAVY_EDGE_MIN_SAMPLES) - || (tcount - mcount).apply_scale (HEAVY_EDGE_RATIO, 1) > tcount) + || (tcount - mcount) * HEAVY_EDGE_RATIO > tcount) return NULL; if (dump_file) diff --git a/gcc/cfgloopmanip.cc b/gcc/cfgloopmanip.cc index 7736e3e..db07fd6 100644 --- a/gcc/cfgloopmanip.cc +++ b/gcc/cfgloopmanip.cc @@ -563,8 +563,7 @@ scale_loop_profile (class loop *loop, profile_probability p, /* Probability of exit must be 1/iterations. */ count_delta = e->count (); - e->probability = profile_probability::always () - .apply_scale (1, iteration_bound); + e->probability = profile_probability::always () / iteration_bound; other_e->probability = e->probability.invert (); /* In code below we only handle the following two updates. */ @@ -586,7 +585,7 @@ scale_loop_profile (class loop *loop, profile_probability p, we look at the actual profile, if it is available. */ p = profile_probability::always (); - count_in = count_in.apply_scale (iteration_bound, 1); + count_in *= iteration_bound; p = count_in.probability_in (loop->header->count); if (!(p > profile_probability::never ())) p = profile_probability::very_unlikely (); diff --git a/gcc/cfgrtl.cc b/gcc/cfgrtl.cc index 06be46d..afbdbfe 100644 --- a/gcc/cfgrtl.cc +++ b/gcc/cfgrtl.cc @@ -1686,8 +1686,8 @@ force_nonfallthru_and_redirect (edge e, basic_block target, rtx jump_label) add also edge from asm goto bb to target. */ if (asm_goto_edge) { - new_edge->probability = new_edge->probability.apply_scale (1, 2); - jump_block->count = jump_block->count.apply_scale (1, 2); + new_edge->probability /= 2; + jump_block->count /= 2; edge new_edge2 = make_edge (new_edge->src, target, e->flags & ~EDGE_FALLTHRU); new_edge2->probability = probability - new_edge->probability; diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc index 23749a2..7eeda53 100644 --- a/gcc/cgraph.cc +++ b/gcc/cgraph.cc @@ -2935,11 +2935,10 @@ cgraph_edge::maybe_hot_p (void) return false; if (caller->frequency == NODE_FREQUENCY_EXECUTED_ONCE) { - if (count.apply_scale (2, 1) < where->count.apply_scale (3, 1)) + if (count * 2 < where->count * 3) return false; } - else if (count.apply_scale (param_hot_bb_frequency_fraction , 1) - < where->count) + else if (count * param_hot_bb_frequency_fraction < where->count) return false; return true; } diff --git a/gcc/config/sh/sh.cc b/gcc/config/sh/sh.cc index 03e1c04..9bee618 100644 --- a/gcc/config/sh/sh.cc +++ b/gcc/config/sh/sh.cc @@ -2178,7 +2178,7 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison) && prob.to_reg_br_prob_base () >= (int) (REG_BR_PROB_BASE * 3 / 8U) && prob.to_reg_br_prob_base () <= (int) (REG_BR_PROB_BASE * 5 / 8U)) { - msw_taken_prob = prob.apply_scale (1, 2); + msw_taken_prob = prob / 2; msw_skip_prob = rev_prob.apply_scale (REG_BR_PROB_BASE, rev_prob.to_reg_br_prob_base () + REG_BR_PROB_BASE); diff --git a/gcc/dojump.cc b/gcc/dojump.cc index 17a73da..2af0cd1 100644 --- a/gcc/dojump.cc +++ b/gcc/dojump.cc @@ -1131,7 +1131,7 @@ do_compare_rtx_and_jump (rtx op0, rtx op1, enum rtx_code code, int unsignedp, profile_probability cprob = profile_probability::guessed_always (); if (first_code == UNORDERED) - cprob = cprob.apply_scale (1, 100); + cprob /= 100; else if (first_code == ORDERED) cprob = cprob.apply_scale (99, 100); else diff --git a/gcc/final.cc b/gcc/final.cc index a986886..c5427d2 100644 --- a/gcc/final.cc +++ b/gcc/final.cc @@ -642,8 +642,7 @@ compute_alignments (void) flow_loops_dump (dump_file, NULL, 1); } loop_optimizer_init (AVOID_CFG_MODIFICATIONS); - profile_count count_threshold = cfun->cfg->count_max.apply_scale - (1, param_align_threshold); + profile_count count_threshold = cfun->cfg->count_max / param_align_threshold; if (dump_file) { @@ -710,10 +709,9 @@ compute_alignments (void) if (!has_fallthru && (branch_count > count_threshold - || (bb->count > bb->prev_bb->count.apply_scale (10, 1) + || (bb->count > bb->prev_bb->count * 10 && (bb->prev_bb->count - <= ENTRY_BLOCK_PTR_FOR_FN (cfun) - ->count.apply_scale (1, 2))))) + <= ENTRY_BLOCK_PTR_FOR_FN (cfun)->count / 2)))) { align_flags alignment = JUMP_ALIGN (label); if (dump_file) @@ -727,9 +725,7 @@ compute_alignments (void) && single_succ (bb) == EXIT_BLOCK_PTR_FOR_FN (cfun)) && optimize_bb_for_speed_p (bb) && branch_count + fallthru_count > count_threshold - && (branch_count - > fallthru_count.apply_scale - (param_align_loop_iterations, 1))) + && (branch_count > fallthru_count * param_align_loop_iterations)) { align_flags alignment = LOOP_ALIGN (label); if (dump_file) diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc index a94041c..f26bfcc 100644 --- a/gcc/ipa-cp.cc +++ b/gcc/ipa-cp.cc @@ -4652,8 +4652,7 @@ update_counts_for_self_gen_clones (cgraph_node *orig_node, { profile_count orig_count = n->count; profile_count new_count - = (redist_sum.apply_scale (1, self_gen_clones.length ()) - + other_edges_count[i]); + = (redist_sum / self_gen_clones.length () + other_edges_count[i]); new_count = lenient_count_portion_handling (new_count, orig_node); n->count = new_count; profile_count::adjust_for_ipa_scaling (&new_count, &orig_count); @@ -4685,7 +4684,7 @@ update_counts_for_self_gen_clones (cgraph_node *orig_node, for (cgraph_edge *e = cs; e; e = get_next_cgraph_edge_clone (e)) if (e->callee->ultimate_alias_target () == orig_node && processed_edges.contains (e)) - e->count = e->count.apply_scale (1, den); + e->count /= den; } } @@ -4713,8 +4712,7 @@ update_counts_for_self_gen_clones (cgraph_node *orig_node, && desc.unproc_orig_rec_edges > 0) { desc.count = n->count - desc.count; - desc.count - = desc.count.apply_scale (1, desc.unproc_orig_rec_edges); + desc.count = desc.count /= desc.unproc_orig_rec_edges; adjust_clone_incoming_counts (n, &desc); } else if (dump_file) @@ -6084,7 +6082,7 @@ decide_about_value (struct cgraph_node *node, int index, HOST_WIDE_INT offset, if (node->count.ipa ().nonzero_p ()) { unsigned dem = self_gen_clones->length () + 1; - rec_count_sum = node->count.ipa ().apply_scale (1, dem); + rec_count_sum = node->count.ipa () / dem; } else rec_count_sum = profile_count::zero (); diff --git a/gcc/ipa-inline-analysis.cc b/gcc/ipa-inline-analysis.cc index 11d8d09..1ca685d 100644 --- a/gcc/ipa-inline-analysis.cc +++ b/gcc/ipa-inline-analysis.cc @@ -254,7 +254,7 @@ do_estimate_edge_time (struct cgraph_edge *edge, sreal *ret_nonspec_time) probability that caller will call the callee is low however, since it may hurt optimization of the caller's hot path. */ if (edge->count.ipa ().initialized_p () && edge->maybe_hot_p () - && (edge->count.ipa ().apply_scale (2, 1) + && (edge->count.ipa () * 2 > (edge->caller->inlined_to ? edge->caller->inlined_to->count.ipa () : edge->caller->count.ipa ()))) diff --git a/gcc/loop-unroll.cc b/gcc/loop-unroll.cc index 69df1ae..1956c54 100644 --- a/gcc/loop-unroll.cc +++ b/gcc/loop-unroll.cc @@ -978,7 +978,7 @@ unroll_loop_runtime_iterations (class loop *loop) /* Compute count increments for each switch block and initialize innermost switch block. Switch blocks and peeled loop copies are built from innermost outward. */ - iter_count = new_count = swtch->count.apply_scale (1, max_unroll + 1); + iter_count = new_count = swtch->count / (max_unroll + 1); swtch->count = new_count; for (i = 0; i < n_peel; i++) @@ -995,7 +995,7 @@ unroll_loop_runtime_iterations (class loop *loop) /* Create item for switch. */ unsigned j = n_peel - i - (extra_zero_check ? 0 : 1); - p = profile_probability::always ().apply_scale (1, i + 2); + p = profile_probability::always () / (i + 2); preheader = split_edge (loop_preheader_edge (loop)); /* Add in count of edge from switch block. */ @@ -1021,12 +1021,12 @@ unroll_loop_runtime_iterations (class loop *loop) if (extra_zero_check) { /* Add branch for zero iterations. */ - p = profile_probability::always ().apply_scale (1, max_unroll + 1); + p = profile_probability::always () / (max_unroll + 1); swtch = ezc_swtch; preheader = split_edge (loop_preheader_edge (loop)); /* Recompute count adjustments since initial peel copy may have exited and reduced those values that were computed above. */ - iter_count = swtch->count.apply_scale (1, max_unroll + 1); + iter_count = swtch->count / (max_unroll + 1); /* Add in count of edge from switch block. */ preheader->count += iter_count; branch_code = compare_and_jump_seq (copy_rtx (niter), const0_rtx, EQ, diff --git a/gcc/modulo-sched.cc b/gcc/modulo-sched.cc index 1e1fa70..2c95c09 100644 --- a/gcc/modulo-sched.cc +++ b/gcc/modulo-sched.cc @@ -1439,10 +1439,10 @@ sms_schedule (void) /* Perform SMS only on loops that their average count is above threshold. */ - if ( latch_edge->count () > profile_count::zero () - && (latch_edge->count() - < single_exit (loop)->count ().apply_scale - (param_sms_loop_average_count_threshold, 1))) + if (latch_edge->count () > profile_count::zero () + && (latch_edge->count () + < (single_exit (loop)->count () + * param_sms_loop_average_count_threshold))) { if (dump_file) { @@ -1464,12 +1464,12 @@ sms_schedule (void) } /* Make sure this is a doloop. */ - if ( !(count_reg = doloop_register_get (head, tail))) - { - if (dump_file) - fprintf (dump_file, "SMS doloop_register_get failed\n"); - continue; - } + if (!(count_reg = doloop_register_get (head, tail))) + { + if (dump_file) + fprintf (dump_file, "SMS doloop_register_get failed\n"); + continue; + } /* Don't handle BBs with calls or barriers or !single_set with the exception of do-loop control part insns. diff --git a/gcc/omp-expand.cc b/gcc/omp-expand.cc index e7a8af4..2572957 100644 --- a/gcc/omp-expand.cc +++ b/gcc/omp-expand.cc @@ -3120,8 +3120,7 @@ extract_omp_for_update_vars (struct omp_for_data *fd, tree *nonrect_bounds, if (i < fd->collapse - 1) { e = make_edge (last_bb, bb, EDGE_FALSE_VALUE); - e->probability - = profile_probability::guessed_always ().apply_scale (1, 8); + e->probability = profile_probability::guessed_always () / 8; struct omp_for_data_loop *l = &fd->loops[i + 1]; if (l->m1 == NULL_TREE || l->outer != 1) @@ -3240,8 +3239,7 @@ extract_omp_for_update_vars (struct omp_for_data *fd, tree *nonrect_bounds, if (update_bb == NULL) update_bb = this_bb; e = make_edge (this_bb, bb, EDGE_FALSE_VALUE); - e->probability - = profile_probability::guessed_always ().apply_scale (1, 8); + e->probability = profile_probability::guessed_always () / 8; if (prev_bb == NULL) set_immediate_dominator (CDI_DOMINATORS, this_bb, bb); prev_bb = this_bb; @@ -3533,7 +3531,7 @@ expand_omp_ordered_sink (gimple_stmt_iterator *gsi, struct omp_for_data *fd, GSI_CONTINUE_LINKING); gsi_insert_after (gsi, gimple_build_cond_empty (cond), GSI_NEW_STMT); edge e3 = make_edge (e1->src, e2->dest, EDGE_FALSE_VALUE); - e3->probability = profile_probability::guessed_always ().apply_scale (1, 8); + e3->probability = profile_probability::guessed_always () / 8; e1->probability = e3->probability.invert (); e1->flags = EDGE_TRUE_VALUE; set_immediate_dominator (CDI_DOMINATORS, e2->dest, e1->src); @@ -3687,7 +3685,7 @@ expand_omp_for_ordered_loops (struct omp_for_data *fd, tree *counts, remove_edge (e1); make_edge (body_bb, new_header, EDGE_FALLTHRU); e3->flags = EDGE_FALSE_VALUE; - e3->probability = profile_probability::guessed_always ().apply_scale (1, 8); + e3->probability = profile_probability::guessed_always () / 8; e1 = make_edge (new_header, new_body, EDGE_TRUE_VALUE); e1->probability = e3->probability.invert (); @@ -5484,16 +5482,14 @@ expand_omp_for_static_nochunk (struct omp_region *region, ep->probability = profile_probability::guessed_always ().apply_scale (3, 4); ep = find_edge (entry_bb, second_bb); ep->flags = EDGE_TRUE_VALUE; - ep->probability = profile_probability::guessed_always ().apply_scale (1, 4); + ep->probability = profile_probability::guessed_always () / 4; if (fourth_bb) { ep = make_edge (third_bb, fifth_bb, EDGE_FALSE_VALUE); - ep->probability - = profile_probability::guessed_always ().apply_scale (1, 2); + ep->probability = profile_probability::guessed_always () / 2; ep = find_edge (third_bb, fourth_bb); ep->flags = EDGE_TRUE_VALUE; - ep->probability - = profile_probability::guessed_always ().apply_scale (1, 2); + ep->probability = profile_probability::guessed_always () / 2; ep = find_edge (fourth_bb, fifth_bb); redirect_edge_and_branch (ep, sixth_bb); } @@ -5504,12 +5500,10 @@ expand_omp_for_static_nochunk (struct omp_region *region, if (exit1_bb) { ep = make_edge (exit_bb, exit2_bb, EDGE_FALSE_VALUE); - ep->probability - = profile_probability::guessed_always ().apply_scale (1, 2); + ep->probability = profile_probability::guessed_always () / 2; ep = find_edge (exit_bb, exit1_bb); ep->flags = EDGE_TRUE_VALUE; - ep->probability - = profile_probability::guessed_always ().apply_scale (1, 2); + ep->probability = profile_probability::guessed_always () / 2; ep = find_edge (exit1_bb, exit2_bb); redirect_edge_and_branch (ep, exit3_bb); } diff --git a/gcc/predict.cc b/gcc/predict.cc index 5734e4c..62da149 100644 --- a/gcc/predict.cc +++ b/gcc/predict.cc @@ -172,7 +172,7 @@ maybe_hot_count_p (struct function *fun, profile_count count) if (node->frequency == NODE_FREQUENCY_EXECUTED_ONCE && count < (ENTRY_BLOCK_PTR_FOR_FN (fun)->count.apply_scale (2, 3))) return false; - if (count.apply_scale (param_hot_bb_frequency_fraction, 1) + if (count * param_hot_bb_frequency_fraction < ENTRY_BLOCK_PTR_FOR_FN (fun)->count) return false; return true; @@ -219,7 +219,7 @@ probably_never_executed (struct function *fun, profile_count count) if (count.precise_p () && profile_status_for_fn (fun) == PROFILE_READ) { const int unlikely_frac = param_unlikely_bb_count_fraction; - if (count.apply_scale (unlikely_frac, 1) >= profile_info->runs) + if (count * unlikely_frac >= profile_info->runs) return false; return true; } @@ -916,12 +916,12 @@ set_even_probabilities (basic_block bb, else { profile_probability remainder = prob.invert (); - remainder -= profile_probability::very_unlikely () - .apply_scale (unlikely_count, 1); + remainder -= (profile_probability::very_unlikely () + * unlikely_count); int count = nedges - unlikely_count - 1; gcc_assert (count >= 0); - e->probability = remainder.apply_scale (1, count); + e->probability = remainder / count; } } else @@ -940,7 +940,7 @@ set_even_probabilities (basic_block bb, if (unlikely_edges != NULL && unlikely_edges->contains (e)) e->probability = profile_probability::very_unlikely (); else - e->probability = all.apply_scale (1, scale); + e->probability = all / scale; } else e->probability = profile_probability::never (); @@ -3619,7 +3619,7 @@ handle_missing_profiles (void) if (call_count > 0 && fn && fn->cfg - && call_count.apply_scale (unlikely_frac, 1) >= profile_info->runs) + && call_count * unlikely_frac >= profile_info->runs) { drop_profile (node, call_count); worklist.safe_push (node); @@ -3684,8 +3684,7 @@ expensive_function_p (int threshold) if (!ENTRY_BLOCK_PTR_FOR_FN (cfun)->count.nonzero_p ()) return true; - profile_count limit = ENTRY_BLOCK_PTR_FOR_FN - (cfun)->count.apply_scale (threshold, 1); + profile_count limit = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count * threshold; profile_count sum = profile_count::zero (); FOR_EACH_BB_FN (bb, cfun) { diff --git a/gcc/profile-count.h b/gcc/profile-count.h index 7c66f8d..be6e2d5 100644 --- a/gcc/profile-count.h +++ b/gcc/profile-count.h @@ -185,7 +185,7 @@ public: static profile_probability very_unlikely () { /* Be consistent with PROB_VERY_UNLIKELY in predict.h. */ - profile_probability r = guessed_always ().apply_scale (1, 2000); + profile_probability r = guessed_always () / 2000; r.m_val--; return r; } @@ -193,14 +193,14 @@ public: static profile_probability unlikely () { /* Be consistent with PROB_VERY_LIKELY in predict.h. */ - profile_probability r = guessed_always ().apply_scale (1, 5); + profile_probability r = guessed_always () / 5; r.m_val--; return r; } static profile_probability even () { - return guessed_always ().apply_scale (1, 2); + return guessed_always () / 2; } static profile_probability very_likely () @@ -600,6 +600,26 @@ public: return initialized_p () && other.initialized_p () && m_val >= other.m_val; } + profile_probability operator* (int64_t num) const + { + return apply_scale (num, 1); + } + + profile_probability operator*= (int64_t den) const + { + return *this * den; + } + + profile_probability operator/ (int64_t den) const + { + return apply_scale (1, den); + } + + profile_probability operator/= (int64_t den) const + { + return *this / den; + } + /* Get the value of the count. */ uint32_t value () const { return m_val; } @@ -992,6 +1012,26 @@ public: return ipa ().initialized_p () && ipa ().m_val >= (uint64_t) other; } + profile_count operator* (int64_t num) const + { + return apply_scale (num, 1); + } + + profile_count operator*= (int64_t den) const + { + return *this * den; + } + + profile_count operator/ (int64_t den) const + { + return apply_scale (1, den); + } + + profile_count operator/= (int64_t den) const + { + return *this / den; + } + /* Return true when value is not zero and can be used for scaling. This is different from *this > 0 because that requires counter to be IPA. */ diff --git a/gcc/profile.cc b/gcc/profile.cc index a67cce5..08af512 100644 --- a/gcc/profile.cc +++ b/gcc/profile.cc @@ -716,7 +716,7 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) FOR_EACH_EDGE (e, ei, bb->succs) if (!(e->flags & (EDGE_COMPLEX | EDGE_FAKE))) e->probability - = profile_probability::guessed_always ().apply_scale (1, total); + = profile_probability::guessed_always () / total; else e->probability = profile_probability::never (); } @@ -724,8 +724,7 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum) { total += EDGE_COUNT (bb->succs); FOR_EACH_EDGE (e, ei, bb->succs) - e->probability - = profile_probability::guessed_always ().apply_scale (1, total); + e->probability = profile_probability::guessed_always () / total; } if (bb->index >= NUM_FIXED_BLOCKS && block_ends_with_condjump_p (bb) diff --git a/gcc/stmt.cc b/gcc/stmt.cc index ea78a50..11cc70f 100644 --- a/gcc/stmt.cc +++ b/gcc/stmt.cc @@ -822,9 +822,8 @@ emit_case_dispatch_table (tree index_expr, tree index_type, through the indirect jump or the direct conditional jump before that. Split the probability of reaching the default label among these two jumps. */ - new_default_prob - = conditional_probability (default_prob.apply_scale (1, 2), base); - default_prob = default_prob.apply_scale (1, 2); + new_default_prob = conditional_probability (default_prob / 2, base); + default_prob /= 2; base -= default_prob; } else diff --git a/gcc/symtab-thunks.cc b/gcc/symtab-thunks.cc index b1d9c5d..b043970 100644 --- a/gcc/symtab-thunks.cc +++ b/gcc/symtab-thunks.cc @@ -579,11 +579,11 @@ expand_thunk (cgraph_node *node, bool output_asm_thunks, adjustment, because that's why we're emitting a thunk. */ then_bb = create_basic_block (NULL, bb); - then_bb->count = cfg_count - cfg_count.apply_scale (1, 16); + then_bb->count = cfg_count - cfg_count / 16; return_bb = create_basic_block (NULL, then_bb); return_bb->count = cfg_count; else_bb = create_basic_block (NULL, else_bb); - else_bb->count = cfg_count.apply_scale (1, 16); + else_bb->count = cfg_count / 16; add_bb_to_loop (then_bb, bb->loop_father); add_bb_to_loop (return_bb, bb->loop_father); add_bb_to_loop (else_bb, bb->loop_father); @@ -594,11 +594,9 @@ expand_thunk (cgraph_node *node, bool output_asm_thunks, NULL_TREE, NULL_TREE); gsi_insert_after (&bsi, stmt, GSI_NEW_STMT); e = make_edge (bb, then_bb, EDGE_TRUE_VALUE); - e->probability = profile_probability::guessed_always () - .apply_scale (1, 16); + e->probability = profile_probability::guessed_always () / 16; e = make_edge (bb, else_bb, EDGE_FALSE_VALUE); - e->probability = profile_probability::guessed_always () - .apply_scale (1, 16); + e->probability = profile_probability::guessed_always () / 16; make_single_succ_edge (return_bb, EXIT_BLOCK_PTR_FOR_FN (cfun), 0); make_single_succ_edge (then_bb, return_bb, EDGE_FALLTHRU); diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc index 6696425..5d43563 100644 --- a/gcc/tree-ssa-loop-manip.cc +++ b/gcc/tree-ssa-loop-manip.cc @@ -1421,8 +1421,8 @@ tree_transform_and_unroll_loop (class loop *loop, unsigned factor, } basic_block rest = new_exit->dest; - new_exit->probability = profile_probability::always () - .apply_scale (1, new_est_niter + 1); + new_exit->probability + = (profile_probability::always () / (new_est_niter + 1)); rest->count += new_exit->count (); @@ -1463,8 +1463,7 @@ tree_transform_and_unroll_loop (class loop *loop, unsigned factor, && TREE_CODE (desc->niter) == INTEGER_CST) { /* The + 1 converts latch counts to iteration counts. */ - profile_count new_header_count - = (in_count.apply_scale (new_est_niter + 1, 1)); + profile_count new_header_count = in_count * (new_est_niter + 1); basic_block *body = get_loop_body (loop); scale_bbs_frequencies_profile_count (body, loop->num_nodes, new_header_count, @@ -1502,8 +1501,8 @@ tree_transform_and_unroll_loop (class loop *loop, unsigned factor, e->dest->count / e->src->count ~= new e->probability for every outgoing edge e of NEW_EXIT->src. */ - profile_probability new_exit_prob = profile_probability::always () - .apply_scale (1, new_est_niter + 1); + profile_probability new_exit_prob + = profile_probability::always () / (new_est_niter + 1); change_edge_frequency (new_exit, new_exit_prob); } diff --git a/gcc/tree-ssa-sink.cc b/gcc/tree-ssa-sink.cc index 8ce4403..bb50cbc 100644 --- a/gcc/tree-ssa-sink.cc +++ b/gcc/tree-ssa-sink.cc @@ -230,8 +230,7 @@ select_best_block (basic_block early_bb, if (bb_loop_depth (best_bb) == bb_loop_depth (early_bb) /* If result of comparsion is unknown, prefer EARLY_BB. Thus use !(...>=..) rather than (...<...) */ - && !(best_bb->count.apply_scale (100, 1) - >= early_bb->count.apply_scale (threshold, 1))) + && !(best_bb->count * 100 >= early_bb->count * threshold)) return best_bb; /* No better block found, so return EARLY_BB, which happens to be the diff --git a/gcc/tree-switch-conversion.cc b/gcc/tree-switch-conversion.cc index 50a1792..990f5e1 100644 --- a/gcc/tree-switch-conversion.cc +++ b/gcc/tree-switch-conversion.cc @@ -1782,7 +1782,7 @@ switch_decision_tree::analyze_switch_statement () tree high = CASE_HIGH (elt); profile_probability p - = case_edge->probability.apply_scale (1, (intptr_t) (case_edge->aux)); + = case_edge->probability / ((intptr_t) (case_edge->aux)); clusters.quick_push (new simple_cluster (low, high, elt, case_edge->dest, p)); m_case_bbs.quick_push (case_edge->dest); @@ -2057,7 +2057,7 @@ switch_decision_tree::balance_case_nodes (case_tree_node **head, /* Split this list if it is long enough for that to help. */ npp = head; left = *npp; - profile_probability pivot_prob = prob.apply_scale (1, 2); + profile_probability pivot_prob = prob / 2; /* Find the place in the list that bisects the list's total cost by probability. */ @@ -2259,12 +2259,11 @@ switch_decision_tree::emit_case_nodes (basic_block bb, tree index, redirect_edge_succ (single_pred_edge (test_bb), single_succ_edge (bb)->dest); - p = ((node->m_right->m_c->m_subtree_prob - + default_prob.apply_scale (1, 2)) + p = ((node->m_right->m_c->m_subtree_prob + default_prob / 2) / (node->m_c->m_subtree_prob + default_prob)); bb = emit_cmp_and_jump_insns (bb, index, node->m_c->get_high (), GT_EXPR, test_bb, p, loc); - default_prob = default_prob.apply_scale (1, 2); + default_prob /= 2; /* Handle the left-hand subtree. */ bb = emit_case_nodes (bb, index, node->m_left, @@ -2293,11 +2292,11 @@ switch_decision_tree::emit_case_nodes (basic_block bb, tree index, if (node->m_right->has_child () || !node->m_right->m_c->is_single_value_p ()) { - p = (default_prob.apply_scale (1, 2) + p = ((default_prob / 2) / (node->m_c->m_subtree_prob + default_prob)); bb = emit_cmp_and_jump_insns (bb, index, node->m_c->get_low (), LT_EXPR, m_default_bb, p, loc); - default_prob = default_prob.apply_scale (1, 2); + default_prob /= 2; bb = emit_case_nodes (bb, index, node->m_right, default_prob, index_type, loc); @@ -2320,11 +2319,11 @@ switch_decision_tree::emit_case_nodes (basic_block bb, tree index, if (node->m_left->has_child () || !node->m_left->m_c->is_single_value_p ()) { - p = (default_prob.apply_scale (1, 2) + p = ((default_prob / 2) / (node->m_c->m_subtree_prob + default_prob)); bb = emit_cmp_and_jump_insns (bb, index, node->m_c->get_high (), GT_EXPR, m_default_bb, p, loc); - default_prob = default_prob.apply_scale (1, 2); + default_prob /= 2; bb = emit_case_nodes (bb, index, node->m_left, default_prob, index_type, loc); @@ -2357,29 +2356,29 @@ switch_decision_tree::emit_case_nodes (basic_block bb, tree index, profile_probability right_prob = profile_probability::never (); if (node->m_right) right_prob = node->m_right->m_c->m_subtree_prob; - p = ((right_prob + default_prob.apply_scale (1, 2)) - / (node->m_c->m_subtree_prob + default_prob)); + p = ((right_prob + default_prob / 2) + / (node->m_c->m_subtree_prob + default_prob)); - bb = emit_cmp_and_jump_insns (bb, index, node->m_c->get_high (), - GT_EXPR, test_bb, p, loc); - default_prob = default_prob.apply_scale (1, 2); + bb = emit_cmp_and_jump_insns (bb, index, node->m_c->get_high (), + GT_EXPR, test_bb, p, loc); + default_prob /= 2; - /* Value belongs to this node or to the left-hand subtree. */ - p = node->m_c->m_prob / (node->m_c->m_subtree_prob + default_prob); - bb = emit_cmp_and_jump_insns (bb, index, node->m_c->get_low (), - GE_EXPR, node->m_c->m_case_bb, p, loc); + /* Value belongs to this node or to the left-hand subtree. */ + p = node->m_c->m_prob / (node->m_c->m_subtree_prob + default_prob); + bb = emit_cmp_and_jump_insns (bb, index, node->m_c->get_low (), + GE_EXPR, node->m_c->m_case_bb, p, loc); - /* Handle the left-hand subtree. */ - bb = emit_case_nodes (bb, index, node->m_left, - default_prob, index_type, loc); + /* Handle the left-hand subtree. */ + bb = emit_case_nodes (bb, index, node->m_left, default_prob, + index_type, loc); - /* If the left-hand subtree fell through, - don't let it fall into the right-hand subtree. */ - if (bb && m_default_bb) - emit_jump (bb, m_default_bb); + /* If the left-hand subtree fell through, + don't let it fall into the right-hand subtree. */ + if (bb && m_default_bb) + emit_jump (bb, m_default_bb); - bb = emit_case_nodes (test_bb, index, node->m_right, - default_prob, index_type, loc); + bb = emit_case_nodes (test_bb, index, node->m_right, default_prob, + index_type, loc); } else { diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index e05f8e8..47e0942 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -9343,13 +9343,12 @@ scale_profile_for_vect_loop (class loop *loop, unsigned vf) in loop's preheader. */ if (!(freq_e == profile_count::zero ())) freq_e = freq_e.force_nonzero (); - p = freq_e.apply_scale (new_est_niter + 1, 1).probability_in (freq_h); + p = (freq_e * (new_est_niter + 1)).probability_in (freq_h); scale_loop_frequencies (loop, p); } edge exit_e = single_exit (loop); - exit_e->probability = profile_probability::always () - .apply_scale (1, new_est_niter + 1); + exit_e->probability = profile_probability::always () / (new_est_niter + 1); edge exit_l = single_pred_edge (loop->latch); profile_probability prob = exit_l->probability; -- cgit v1.1 From 86882d9feb6a534325d7162216696266898e36d0 Mon Sep 17 00:00:00 2001 From: Kewen Lin Date: Mon, 20 Jun 2022 07:44:21 -0500 Subject: vect: Respect slp decision when applying suggested uf [PR105940] This follows Richi's suggestion in PR105940, it aims to avoid inconsistent slp decision between when the suggested unroll factor is worked out and when the suggested unroll factor is applied. If the previous slp decision is true when the suggested unroll factor is worked out, when we are applying unroll factor we don't need to start over with slp off if the analysis with slp on fails. On the other hand, if the previous slp decision is false when the suggested unroll factor is worked out, when we are applying unroll factor we can skip the slp handlings. Function vect_is_simple_reduction saves reduction chains for subsequent slp analyses, we have to disable this early otherwise there is an ICE in vectorizable_reduction for below: if (REDUC_GROUP_FIRST_ELEMENT (stmt_info)) gcc_assert (slp_node && REDUC_GROUP_FIRST_ELEMENT (stmt_info) == stmt_info); PR tree-optimization/105940 gcc/ChangeLog: * tree-vect-loop.cc (vect_analyze_loop_2): Add new parameter slp_done_for_suggested_uf and adjust with it accordingly. (vect_analyze_loop_1): Add new variable slp_done_for_suggested_uf, pass it down to vect_analyze_loop_2 for the initial analysis and applying suggested unroll factor. (vect_is_simple_reduction): Add parameter slp and adjust with it. (vect_analyze_scalar_cycles_1): Add parameter slp and pass down. (vect_analyze_scalar_cycles): Likewise. --- gcc/tree-vect-loop.cc | 101 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 67 insertions(+), 34 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 47e0942..78dfe85 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -157,7 +157,7 @@ along with GCC; see the file COPYING3. If not see static void vect_estimate_min_profitable_iters (loop_vec_info, int *, int *, unsigned *); static stmt_vec_info vect_is_simple_reduction (loop_vec_info, stmt_vec_info, - bool *, bool *); + bool *, bool *, bool); /* Subroutine of vect_determine_vf_for_stmt that handles only one statement. VECTYPE_MAYBE_SET_P is true if STMT_VINFO_VECTYPE @@ -463,10 +463,12 @@ vect_inner_phi_in_double_reduction_p (loop_vec_info loop_vinfo, gphi *phi) Examine the cross iteration def-use cycles of scalar variables in LOOP. LOOP_VINFO represents the loop that is now being considered for vectorization (can be LOOP, or an outer-loop - enclosing LOOP). */ + enclosing LOOP). SLP indicates there will be some subsequent + slp analyses or not. */ static void -vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, class loop *loop) +vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, class loop *loop, + bool slp) { basic_block bb = loop->header; tree init, step; @@ -545,7 +547,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, class loop *loop) stmt_vec_info reduc_stmt_info = vect_is_simple_reduction (loop_vinfo, stmt_vinfo, &double_reduc, - &reduc_chain); + &reduc_chain, slp); if (reduc_stmt_info) { STMT_VINFO_REDUC_DEF (stmt_vinfo) = reduc_stmt_info; @@ -616,11 +618,11 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, class loop *loop) a[i] = i; */ static void -vect_analyze_scalar_cycles (loop_vec_info loop_vinfo) +vect_analyze_scalar_cycles (loop_vec_info loop_vinfo, bool slp) { class loop *loop = LOOP_VINFO_LOOP (loop_vinfo); - vect_analyze_scalar_cycles_1 (loop_vinfo, loop); + vect_analyze_scalar_cycles_1 (loop_vinfo, loop, slp); /* When vectorizing an outer-loop, the inner-loop is executed sequentially. Reductions in such inner-loop therefore have different properties than @@ -632,7 +634,7 @@ vect_analyze_scalar_cycles (loop_vec_info loop_vinfo) current checks are too strict. */ if (loop->inner) - vect_analyze_scalar_cycles_1 (loop_vinfo, loop->inner); + vect_analyze_scalar_cycles_1 (loop_vinfo, loop->inner, slp); } /* Transfer group and reduction information from STMT_INFO to its @@ -2223,12 +2225,18 @@ vect_determine_partial_vectors_and_peeling (loop_vec_info loop_vinfo, /* Function vect_analyze_loop_2. - Apply a set of analyses on LOOP, and create a loop_vec_info struct - for it. The different analyses will record information in the - loop_vec_info struct. */ + Apply a set of analyses on LOOP specified by LOOP_VINFO, the different + analyses will record information in some members of LOOP_VINFO. FATAL + indicates if some analysis meets fatal error. If one non-NULL pointer + SUGGESTED_UNROLL_FACTOR is provided, it's intent to be filled with one + worked out suggested unroll factor, while one NULL pointer shows it's + going to apply the suggested unroll factor. SLP_DONE_FOR_SUGGESTED_UF + is to hold the slp decision when the suggested unroll factor is worked + out. */ static opt_result vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal, - unsigned *suggested_unroll_factor) + unsigned *suggested_unroll_factor, + bool& slp_done_for_suggested_uf) { opt_result ok = opt_result::success (); int res; @@ -2290,9 +2298,18 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal, return ok; } + /* Check if we are applying unroll factor now. */ + bool applying_suggested_uf = loop_vinfo->suggested_unroll_factor > 1; + gcc_assert (!applying_suggested_uf || !suggested_unroll_factor); + + /* If the slp decision is false when suggested unroll factor is worked + out, and we are applying suggested unroll factor, we can simply skip + all slp related analyses this time. */ + bool slp = !applying_suggested_uf || slp_done_for_suggested_uf; + /* Classify all cross-iteration scalar data-flow cycles. Cross-iteration cycles caused by virtual phis are analyzed separately. */ - vect_analyze_scalar_cycles (loop_vinfo); + vect_analyze_scalar_cycles (loop_vinfo, slp); vect_pattern_recog (loop_vinfo); @@ -2359,26 +2376,30 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal, poly_uint64 saved_vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo); - /* Check the SLP opportunities in the loop, analyze and build SLP trees. */ - ok = vect_analyze_slp (loop_vinfo, LOOP_VINFO_N_STMTS (loop_vinfo)); - if (!ok) - return ok; - - /* If there are any SLP instances mark them as pure_slp. */ - bool slp = vect_make_slp_decision (loop_vinfo); if (slp) { - /* Find stmts that need to be both vectorized and SLPed. */ - vect_detect_hybrid_slp (loop_vinfo); + /* Check the SLP opportunities in the loop, analyze and build + SLP trees. */ + ok = vect_analyze_slp (loop_vinfo, LOOP_VINFO_N_STMTS (loop_vinfo)); + if (!ok) + return ok; + + /* If there are any SLP instances mark them as pure_slp. */ + slp = vect_make_slp_decision (loop_vinfo); + if (slp) + { + /* Find stmts that need to be both vectorized and SLPed. */ + vect_detect_hybrid_slp (loop_vinfo); - /* Update the vectorization factor based on the SLP decision. */ - vect_update_vf_for_slp (loop_vinfo); + /* Update the vectorization factor based on the SLP decision. */ + vect_update_vf_for_slp (loop_vinfo); - /* Optimize the SLP graph with the vectorization factor fixed. */ - vect_optimize_slp (loop_vinfo); + /* Optimize the SLP graph with the vectorization factor fixed. */ + vect_optimize_slp (loop_vinfo); - /* Gather the loads reachable from the SLP graph entries. */ - vect_gather_slp_loads (loop_vinfo); + /* Gather the loads reachable from the SLP graph entries. */ + vect_gather_slp_loads (loop_vinfo); + } } bool saved_can_use_partial_vectors_p @@ -2394,7 +2415,7 @@ start_over: /* Apply the suggested unrolling factor, this was determined by the backend during finish_cost the first time we ran the analyzis for this vector mode. */ - if (loop_vinfo->suggested_unroll_factor > 1) + if (applying_suggested_uf) LOOP_VINFO_VECT_FACTOR (loop_vinfo) *= loop_vinfo->suggested_unroll_factor; /* Now the vectorization factor is final. */ @@ -2665,6 +2686,8 @@ start_over: gcc_assert (known_eq (vectorization_factor, LOOP_VINFO_VECT_FACTOR (loop_vinfo))); + slp_done_for_suggested_uf = slp; + /* Ok to vectorize! */ LOOP_VINFO_VECTORIZABLE_P (loop_vinfo) = 1; return opt_result::success (); @@ -2678,6 +2701,12 @@ again: if (!slp) return ok; + /* If the slp decision is true when suggested unroll factor is worked + out, and we are applying suggested unroll factor, we don't need to + re-try any more. */ + if (applying_suggested_uf && slp_done_for_suggested_uf) + return ok; + /* If there are reduction chains re-trying will fail anyway. */ if (! LOOP_VINFO_REDUCTION_CHAINS (loop_vinfo).is_empty ()) return ok; @@ -2864,10 +2893,12 @@ vect_analyze_loop_1 (class loop *loop, vec_info_shared *shared, machine_mode vector_mode = vector_modes[mode_i]; loop_vinfo->vector_mode = vector_mode; unsigned int suggested_unroll_factor = 1; + bool slp_done_for_suggested_uf; /* Run the main analysis. */ opt_result res = vect_analyze_loop_2 (loop_vinfo, fatal, - &suggested_unroll_factor); + &suggested_unroll_factor, + slp_done_for_suggested_uf); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "***** Analysis %s with vector mode %s\n", @@ -2879,13 +2910,15 @@ vect_analyze_loop_1 (class loop *loop, vec_info_shared *shared, if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "***** Re-trying analysis for unrolling" - " with unroll factor %d.\n", - suggested_unroll_factor); + " with unroll factor %d and slp %s.\n", + suggested_unroll_factor, + slp_done_for_suggested_uf ? "on" : "off"); loop_vec_info unroll_vinfo = vect_create_loop_vinfo (loop, shared, loop_form_info, main_loop_vinfo); unroll_vinfo->vector_mode = vector_mode; unroll_vinfo->suggested_unroll_factor = suggested_unroll_factor; - opt_result new_res = vect_analyze_loop_2 (unroll_vinfo, fatal, NULL); + opt_result new_res = vect_analyze_loop_2 (unroll_vinfo, fatal, NULL, + slp_done_for_suggested_uf); if (new_res) { delete loop_vinfo; @@ -3598,7 +3631,7 @@ check_reduction_path (dump_user_location_t loc, loop_p loop, gphi *phi, static stmt_vec_info vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, - bool *double_reduc, bool *reduc_chain_p) + bool *double_reduc, bool *reduc_chain_p, bool slp) { gphi *phi = as_a (phi_info->stmt); gimple *phi_use_stmt = NULL; @@ -3787,7 +3820,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, stmt_vec_info phi_info, continue; reduc_chain.safe_push (stmt_info); } - if (is_slp_reduc && reduc_chain.length () > 1) + if (slp && is_slp_reduc && reduc_chain.length () > 1) { for (unsigned i = 0; i < reduc_chain.length () - 1; ++i) { -- cgit v1.1 From 713f2fd923442b1be620a44240ddf786ae0ab476 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 20 Jun 2022 13:40:50 +0200 Subject: middle-end/106027 - fix types in needle folding The fold_to_nonsharp_ineq_using_bound folding ends up creating invalid typed IL which confuses later foldings. The following fixes that. 2022-06-20 Richard Biener PR middle-end/106027 * fold-const.cc (fold_to_nonsharp_ineq_using_bound): Use the type of the prevailing comparison for the new comparison type. (fold_binary_loc): Use proper types for the A < X && A + 1 > Y to A < X && A >= Y folding. * gcc.dg/pr106027.c: New testcase. --- gcc/fold-const.cc | 10 +++++++--- gcc/testsuite/gcc.dg/pr106027.c | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr106027.c (limited to 'gcc') diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index fbdf3c8..99021a8 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -7530,7 +7530,7 @@ tree_swap_operands_p (const_tree arg0, const_tree arg1) static tree fold_to_nonsharp_ineq_using_bound (location_t loc, tree ineq, tree bound) { - tree a, typea, type = TREE_TYPE (ineq), a1, diff, y; + tree a, typea, type = TREE_TYPE (bound), a1, diff, y; if (TREE_CODE (bound) == LT_EXPR) a = TREE_OPERAND (bound, 0); @@ -12037,11 +12037,15 @@ fold_binary_loc (location_t loc, enum tree_code code, tree type, { tem = fold_to_nonsharp_ineq_using_bound (loc, arg0, arg1); if (tem && !operand_equal_p (tem, arg0, 0)) - return fold_build2_loc (loc, code, type, tem, arg1); + return fold_convert (type, + fold_build2_loc (loc, code, TREE_TYPE (arg1), + tem, arg1)); tem = fold_to_nonsharp_ineq_using_bound (loc, arg1, arg0); if (tem && !operand_equal_p (tem, arg1, 0)) - return fold_build2_loc (loc, code, type, arg0, tem); + return fold_convert (type, + fold_build2_loc (loc, code, TREE_TYPE (arg0), + arg0, tem)); } if ((tem = fold_truth_andor (loc, code, type, arg0, arg1, op0, op1)) diff --git a/gcc/testsuite/gcc.dg/pr106027.c b/gcc/testsuite/gcc.dg/pr106027.c new file mode 100644 index 0000000..735205f --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr106027.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ + +int +foo (unsigned int x, int y) +{ + return x <= (((y != y) < 0) ? y < 1 : 0); +} -- cgit v1.1 From ab5d82c029254c23614c5c0ef616eedd5c19df35 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 19 Jun 2022 10:12:47 +0100 Subject: testsuite: Require init_priority target support in a test. The attr-cdtor-1 test fails on targets without init priority since the diagnostic emitted concerns the absence of support. Disable the test on such targets. Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog: * c-c++-common/attr-cdtor-1.c: Requite init_priority support. --- gcc/testsuite/c-c++-common/attr-cdtor-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/c-c++-common/attr-cdtor-1.c b/gcc/testsuite/c-c++-common/attr-cdtor-1.c index ea61336..a0d069b 100644 --- a/gcc/testsuite/c-c++-common/attr-cdtor-1.c +++ b/gcc/testsuite/c-c++-common/attr-cdtor-1.c @@ -1,5 +1,5 @@ /* PR c/90658 */ -/* { dg-do compile } */ +/* { dg-do compile { target init_priority } } */ void f (); void g1 () __attribute__ ((constructor(f))); /* { dg-error "priorities must be integers" } */ -- cgit v1.1 From a78e5d307c69d4e91cd0e43d84e98be9593e68de Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 19 Jun 2022 10:16:26 +0100 Subject: testsuite: Add a missing USER_LABEL_PREFIX to a regex. Fixes this test on Darwin. Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog: * g++.dg/modules/init-2_b.C: Add a missing USER_LABEL_PREFIX to a regex. --- gcc/testsuite/g++.dg/modules/init-2_b.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/modules/init-2_b.C b/gcc/testsuite/g++.dg/modules/init-2_b.C index a98e676..e30a555 100644 --- a/gcc/testsuite/g++.dg/modules/init-2_b.C +++ b/gcc/testsuite/g++.dg/modules/init-2_b.C @@ -8,4 +8,4 @@ import Foo; // There should be an idempotency check // { dg-final { scan-assembler {_ZZ9_ZGIW3BarE9__in_chrg} } } // { dg-final { scan-assembler {call[ \t]+_?_ZGIW3Foo} { target i?86-*-* x86_64-*-* } } } -// { dg-final { scan-assembler {.(quad|long)[ \t]+_ZGIW3Bar} { target i?86-*-* x86_64-*-* } } } +// { dg-final { scan-assembler {.(quad|long)[ \t]+_?_ZGIW3Bar} { target i?86-*-* x86_64-*-* } } } -- cgit v1.1 From 2eb3adb43eadead0d8666bc9f4dd4feab4bf7875 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Mon, 20 Jun 2022 16:18:36 +0100 Subject: arm: more testsutie fallout for mve move-immediate changes Unfortunately, there is more fall-out in the testsuite for my changes to use MVE move-immediate operations instead of literal pool loads. Fixed as follows: gcc/testsuite/ChangeLog: * gcc.target/arm/simd/mve-vcmp-f32-2.c: Adjust expected output. * gcc.target/arm/simd/pr100757.c: Likewise. * gcc.target/arm/simd/pr100757-2.c: Likewise. * gcc.target/arm/simd/pr100757-3.c: Likewise. * gcc.target/arm/simd/pr100757-4.c: Likewise. --- gcc/testsuite/gcc.target/arm/simd/mve-vcmp-f32-2.c | 6 ++++-- gcc/testsuite/gcc.target/arm/simd/pr100757-2.c | 9 ++++++--- gcc/testsuite/gcc.target/arm/simd/pr100757-3.c | 9 ++++++--- gcc/testsuite/gcc.target/arm/simd/pr100757-4.c | 10 +++++++--- gcc/testsuite/gcc.target/arm/simd/pr100757.c | 9 ++++++--- 5 files changed, 29 insertions(+), 14 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.target/arm/simd/mve-vcmp-f32-2.c b/gcc/testsuite/gcc.target/arm/simd/mve-vcmp-f32-2.c index 917a95b..2440cef 100644 --- a/gcc/testsuite/gcc.target/arm/simd/mve-vcmp-f32-2.c +++ b/gcc/testsuite/gcc.target/arm/simd/mve-vcmp-f32-2.c @@ -28,5 +28,7 @@ FUNC(>=, vcmpge) /* { dg-final { scan-assembler-times {\tvcmp.f32\tle, q[0-9]+, q[0-9]+\n} 1 } } */ /* { dg-final { scan-assembler-times {\tvcmp.f32\tgt, q[0-9]+, q[0-9]+\n} 1 } } */ /* { dg-final { scan-assembler-times {\tvcmp.f32\tge, q[0-9]+, q[0-9]+\n} 1 } } */ -/* { dg-final { scan-assembler-times {\t.word\t1073741824\n} 24 } } */ /* Constant 2.0f. */ -/* { dg-final { scan-assembler-times {\t.word\t1077936128\n} 24 } } */ /* Constant 3.0f. */ +/* { dg-final { scan-assembler-times {\tvmov\.f32\tq[0-7], #2\.0e\+0 @ v4sf} 6 } } */ +/* { dg-final { scan-assembler-not {\t.word\t1073741824\n} } } */ /* Constant 2.0f. */ +/* { dg-final { scan-assembler-times {\tvmov\.f32\tq[0-7], #3\.0e\+0 @ v4sf} 6 } } */ +/* { dg-final { scan-assembler-not {\t.word\t1077936128\n} } } */ /* Constant 3.0f. */ diff --git a/gcc/testsuite/gcc.target/arm/simd/pr100757-2.c b/gcc/testsuite/gcc.target/arm/simd/pr100757-2.c index c2262b4..21426fe 100644 --- a/gcc/testsuite/gcc.target/arm/simd/pr100757-2.c +++ b/gcc/testsuite/gcc.target/arm/simd/pr100757-2.c @@ -13,8 +13,11 @@ int fn1(int d) { return c; } -/* { dg-final { scan-assembler-times {\t.word\t1073741824\n} 4 } } */ /* Constant 2.0f. */ -/* { dg-final { scan-assembler-times {\t.word\t4\n} 4 } } */ /* Initial value for c. */ -/* { dg-final { scan-assembler-times {\t.word\t5\n} 4 } } */ /* Possible value for c. */ +/* { dg-final { scan-assembler-times {\tvmov\.f32\tq[0-7], #2\.0e\+0 @ v4sf} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t1073741824\n} } } */ +/* { dg-final { scan-assembler-times {\tvmov\.i32\tq[0-7], #0x4 @ v4si} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t4\n} } } */ +/* { dg-final { scan-assembler-times {\tvmov\.i32\tq[0-7], #0x5 @ v4si} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t5\n} } } */ /* { dg-final { scan-assembler-not {\t.word\t1\n} } } */ /* 'true' mask. */ /* { dg-final { scan-assembler-not {\t.word\t0\n} } } */ /* 'false' mask. */ diff --git a/gcc/testsuite/gcc.target/arm/simd/pr100757-3.c b/gcc/testsuite/gcc.target/arm/simd/pr100757-3.c index e604555..1640a44 100644 --- a/gcc/testsuite/gcc.target/arm/simd/pr100757-3.c +++ b/gcc/testsuite/gcc.target/arm/simd/pr100757-3.c @@ -13,8 +13,11 @@ float fn1(int d) { return c; } -/* { dg-final { scan-assembler-times {\t.word\t1073741824\n} 4 } } */ /* Constant 2.0f. */ -/* { dg-final { scan-assembler-times {\t.word\t1084227584\n} 4 } } */ /* Initial value for c (4.0). */ -/* { dg-final { scan-assembler-times {\t.word\t1082130432\n} 4 } } */ /* Possible value for c (5.0). */ +/* { dg-final { scan-assembler-times {\tvmov\.f32\tq[0-7], #2\.0e\+0 @ v4sf} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t1073741824\n} } } */ +/* { dg-final { scan-assembler-times {\tvmov\.f32\tq[0-7], #4\.0e\+0 @ v4sf} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t1084227584\n} } } */ +/* { dg-final { scan-assembler-times {\tvmov\.f32\tq[0-7], #5\.0e\+0 @ v4sf} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t1082130432\n} } } */ /* { dg-final { scan-assembler-not {\t.word\t1\n} } } */ /* 'true' mask. */ /* { dg-final { scan-assembler-not {\t.word\t0\n} } } */ /* 'false' mask. */ diff --git a/gcc/testsuite/gcc.target/arm/simd/pr100757-4.c b/gcc/testsuite/gcc.target/arm/simd/pr100757-4.c index c12040c..7431494 100644 --- a/gcc/testsuite/gcc.target/arm/simd/pr100757-4.c +++ b/gcc/testsuite/gcc.target/arm/simd/pr100757-4.c @@ -13,7 +13,11 @@ int fn1(int d) { return c; } -/* { dg-final { scan-assembler-times {\t.word\t0\n} 4 } } */ /* 'false' mask. */ + +/* { dg-final { scan-assembler-times {\tvmov\.i32\tq[0-7], #0 @ v4si} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t0\n} } } */ /* 'false' mask. */ /* { dg-final { scan-assembler-not {\t.word\t1\n} } } */ /* 'true' mask. */ -/* { dg-final { scan-assembler-times {\t.word\t2\n} 4 } } */ /* Initial value for c. */ -/* { dg-final { scan-assembler-times {\t.word\t3\n} 4 } } */ /* Possible value for c. */ +/* { dg-final { scan-assembler-times {vmov\.i32\tq[0-7], #0x2 @ v4si} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t2\n} } } */ /* Initial value for c. */ +/* { dg-final { scan-assembler-times {vmov\.i32\tq[0-7], #0x3 @ v4si} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t3\n} } } */ /* Possible value for c. */ diff --git a/gcc/testsuite/gcc.target/arm/simd/pr100757.c b/gcc/testsuite/gcc.target/arm/simd/pr100757.c index 41d6e4e..f1ef1bd 100644 --- a/gcc/testsuite/gcc.target/arm/simd/pr100757.c +++ b/gcc/testsuite/gcc.target/arm/simd/pr100757.c @@ -13,7 +13,10 @@ int fn1(int d) { return c; } -/* { dg-final { scan-assembler-times {\t.word\t0\n} 4 } } */ /* 'false' mask. */ +/* { dg-final { scan-assembler-times {\tvmov\.i32\tq[0-7], #0 @ v4si} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t0\n} } } */ /* 'false' mask. */ /* { dg-final { scan-assembler-not {\t.word\t1\n} } } */ /* 'true' mask. */ -/* { dg-final { scan-assembler-times {\t.word\t2\n} 4 } } */ /* Initial value for c. */ -/* { dg-final { scan-assembler-times {\t.word\t3\n} 4 } } */ /* Possible value for c. */ +/* { dg-final { scan-assembler-times {\tvmov\.i32\tq[0-7], #0x2 @ v4si} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t2\n} } } */ /* Initial value for c. */ +/* { dg-final { scan-assembler-times {\tvmov\.i32\tq[0-7], #0x3 @ v4si} 1 } } */ +/* { dg-final { scan-assembler-not {\t.word\t3\n} } } */ /* Possible value for c. */ -- cgit v1.1 From 125bf21299ea6ddad03bcace5982a998d1432c54 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 19 Jun 2022 10:21:28 +0100 Subject: testsuite, Darwin: Allow for two CTOR bodies in array61 test. For targets without alias support, we emit two essentially identical function bodies into the gimple (complete and base CTORs). So this test needs to allow for that when the target does not support aliases. The target support alias test does not seem to be usable in the context of a single scan-tree-dump so the fix here uses the target designation. Note that the array has 10 elements, so that if the test were failing (because we were emitting 10 inits instead of a loop) the count would be expected to exceed 2, on Darwin and 1 where there's alias support. Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog: * g++.dg/init/array61.C: Allow for two CTOR bodies on Darwin, where aliases are not currently supported. --- gcc/testsuite/g++.dg/init/array61.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/init/array61.C b/gcc/testsuite/g++.dg/init/array61.C index eaf535c..c8f82b9 100644 --- a/gcc/testsuite/g++.dg/init/array61.C +++ b/gcc/testsuite/g++.dg/init/array61.C @@ -1,7 +1,8 @@ // PR c++/92385 // { dg-do compile { target c++11 } } // { dg-additional-options -fdump-tree-gimple } -// { dg-final { scan-tree-dump-times "item::item" 1 "gimple" } } +// { dg-final { scan-tree-dump-times "item::item" 1 "gimple" { target { ! *-*-darwin* } } } } +// { dg-final { scan-tree-dump-times "item::item" 2 "gimple" { target { *-*-darwin* } } } } struct item { int i; -- cgit v1.1 From 1b238124840a323e70771d88a5b8fae48f26c69b Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 19 Jun 2022 10:28:05 +0100 Subject: testsuite, Darwin: Skip an unsupported test. Darwin does not support patchable function entries, skip the test there. gcc/testsuite/ChangeLog: * g++.dg/modules/pr105169_a.C: Skip the test on Darwin. * g++.dg/modules/pr105169_b.C: Likewise. --- gcc/testsuite/g++.dg/modules/pr105169_a.C | 2 +- gcc/testsuite/g++.dg/modules/pr105169_b.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/modules/pr105169_a.C b/gcc/testsuite/g++.dg/modules/pr105169_a.C index 02660b3..e4ec855 100644 --- a/gcc/testsuite/g++.dg/modules/pr105169_a.C +++ b/gcc/testsuite/g++.dg/modules/pr105169_a.C @@ -1,4 +1,4 @@ -/* { dg-module-do link } */ +/* { dg-module-do link { target { ! *-*-darwin* } } } */ /* { dg-options "-std=c++11 -fpatchable-function-entry=2 -O2" } */ /* { dg-additional-options "-std=c++11 -fpatchable-function-entry=2 -O2" } */ diff --git a/gcc/testsuite/g++.dg/modules/pr105169_b.C b/gcc/testsuite/g++.dg/modules/pr105169_b.C index 7a9c586..afbb129 100644 --- a/gcc/testsuite/g++.dg/modules/pr105169_b.C +++ b/gcc/testsuite/g++.dg/modules/pr105169_b.C @@ -1,4 +1,4 @@ -/* { dg-module-do link } */ +/* { dg-module-do link { target { ! *-*-darwin* } } } */ /* { dg-options "-std=c++11 -fpatchable-function-entry=2 -O2" } */ /* { dg-additional-options "-std=c++11 -fpatchable-function-entry=2 -O2" } */ -- cgit v1.1 From fe9765c0b97e6b4ce2cd226631d329fc05ba2aa5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 14 Jun 2022 08:20:16 -0700 Subject: i386: Disallow sibcall for calling ifunc functions with PIC register Disallow siball when calling ifunc functions with PIC register so that PIC register can be restored. gcc/ PR target/105960 * config/i386/i386.cc (ix86_function_ok_for_sibcall): Return false if PIC register is used when calling ifunc functions. gcc/testsuite/ PR target/105960 * gcc.target/i386/pr105960.c: New test. --- gcc/config/i386/i386.cc | 9 +++++++++ gcc/testsuite/gcc.target/i386/pr105960.c | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr105960.c (limited to 'gcc') diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index f158cc3..b15b489 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -1015,6 +1015,15 @@ ix86_function_ok_for_sibcall (tree decl, tree exp) } } + if (decl && ix86_use_pseudo_pic_reg ()) + { + /* When PIC register is used, it must be restored after ifunc + function returns. */ + cgraph_node *node = cgraph_node::get (decl); + if (node && node->ifunc_resolver) + return false; + } + /* Otherwise okay. That also includes certain types of indirect calls. */ return true; } diff --git a/gcc/testsuite/gcc.target/i386/pr105960.c b/gcc/testsuite/gcc.target/i386/pr105960.c new file mode 100644 index 0000000..db137a1 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr105960.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-require-ifunc "" } */ +/* { dg-options "-O2 -fpic" } */ + +__attribute__((target_clones("default","fma"))) +static inline double +expfull_ref(double x) +{ + return __builtin_pow(x, 0.1234); +} + +double +exp_ref(double x) +{ + return expfull_ref(x); +} + +/* { dg-final { scan-assembler "jmp\[ \t\]*expfull_ref@PLT" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*expfull_ref@PLT" { target ia32 } } } */ -- cgit v1.1 From 607118dfa47a1865dc59f98e7d161da98471d688 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sun, 19 Jun 2022 10:31:01 +0100 Subject: testsuite, asan: Avoid color in asan test output. The presence of the color markers in the some of the asan tests appears to confuse the dg-output matching (possibly a platform TCL or termios bug) on some Darwin platforms. Since the color is not being tested, switch it off (makes the log files easier to read too). This fixes a large number of spurious test fails on AVX512 Darwin19. Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog: * lib/asan-dg.exp: Do not apply color to asan output when under test. --- gcc/testsuite/lib/asan-dg.exp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp index 7e0f85d..87c70d0 100644 --- a/gcc/testsuite/lib/asan-dg.exp +++ b/gcc/testsuite/lib/asan-dg.exp @@ -111,6 +111,8 @@ proc asan_init { args } { global asan_saved_TEST_ALWAYS_FLAGS global asan_saved_ALWAYS_CXXFLAGS + setenv ASAN_OPTIONS "color=never" + set link_flags "" if ![is_remote host] { if [info exists TOOL_OPTIONS] { -- cgit v1.1 From d6ba321135463edff57b94fa0efc6bc0dd314267 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 21 Jun 2022 00:16:27 +0000 Subject: Daily bump. --- gcc/ChangeLog | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/testsuite/ChangeLog | 49 ++++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index eada60b..a53a778 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,74 @@ +2022-06-20 H.J. Lu + + PR target/105960 + * config/i386/i386.cc (ix86_function_ok_for_sibcall): Return + false if PIC register is used when calling ifunc functions. + +2022-06-20 Richard Biener + + PR middle-end/106027 + * fold-const.cc (fold_to_nonsharp_ineq_using_bound): Use the + type of the prevailing comparison for the new comparison type. + (fold_binary_loc): Use proper types for the A < X && A + 1 > Y + to A < X && A >= Y folding. + +2022-06-20 Kewen Lin + + PR tree-optimization/105940 + * tree-vect-loop.cc (vect_analyze_loop_2): Add new parameter + slp_done_for_suggested_uf and adjust with it accordingly. + (vect_analyze_loop_1): Add new variable slp_done_for_suggested_uf, + pass it down to vect_analyze_loop_2 for the initial analysis and + applying suggested unroll factor. + (vect_is_simple_reduction): Add parameter slp and adjust with it. + (vect_analyze_scalar_cycles_1): Add parameter slp and pass down. + (vect_analyze_scalar_cycles): Likewise. + +2022-06-20 Martin Liska + + * bb-reorder.cc (find_traces_1_round): Add operators / and * and + use them. + (better_edge_p): Likewise. + * cfgloop.cc (find_subloop_latch_edge_by_profile): Likewise. + * cfgloopmanip.cc (scale_loop_profile): Likewise. + * cfgrtl.cc (force_nonfallthru_and_redirect): Likewise. + * cgraph.cc (cgraph_edge::maybe_hot_p): Likewise. + * config/sh/sh.cc (expand_cbranchdi4): Likewise. + * dojump.cc (do_compare_rtx_and_jump): Likewise. + * final.cc (compute_alignments): Likewise. + * ipa-cp.cc (update_counts_for_self_gen_clones): Likewise. + (decide_about_value): Likewise. + * ipa-inline-analysis.cc (do_estimate_edge_time): Likewise. + * loop-unroll.cc (unroll_loop_runtime_iterations): Likewise. + * modulo-sched.cc (sms_schedule): Likewise. + * omp-expand.cc (extract_omp_for_update_vars): Likewise. + (expand_omp_ordered_sink): Likewise. + (expand_omp_for_ordered_loops): Likewise. + (expand_omp_for_static_nochunk): Likewise. + * predict.cc (maybe_hot_count_p): Likewise. + (probably_never_executed): Likewise. + (set_even_probabilities): Likewise. + (handle_missing_profiles): Likewise. + (expensive_function_p): Likewise. + * profile-count.h: Likewise. + * profile.cc (compute_branch_probabilities): Likewise. + * stmt.cc (emit_case_dispatch_table): Likewise. + * symtab-thunks.cc (expand_thunk): Likewise. + * tree-ssa-loop-manip.cc (tree_transform_and_unroll_loop): Likewise. + * tree-ssa-sink.cc (select_best_block): Likewise. + * tree-switch-conversion.cc (switch_decision_tree::analyze_switch_statement): Likewise. + (switch_decision_tree::balance_case_nodes): Likewise. + (switch_decision_tree::emit_case_nodes): Likewise. + * tree-vect-loop.cc (scale_profile_for_vect_loop): Likewise. + +2022-06-20 yulong + + * config/riscv/riscv-builtins.cc (RISCV_ATYPE_VOID_PTR): New. + * config/riscv/riscv-cmo.def (RISCV_BUILTIN): Changed the FUNCTION_TYPE + of RISCV_BUILTIN. + * config/riscv/riscv-ftypes.def (0): Remove unused. + (1): New. + 2022-06-19 Takayuki 'January June' Suwa * config/xtensa/xtensa.cc (xtensa_is_insn_L32R_p): diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 02f5d3a..774b032 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220620 +20220621 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d77961e..e1fde82 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,52 @@ +2022-06-20 Iain Sandoe + + * lib/asan-dg.exp: Do not apply color to asan output when + under test. + +2022-06-20 H.J. Lu + + PR target/105960 + * gcc.target/i386/pr105960.c: New test. + +2022-06-20 Iain Sandoe + + * g++.dg/modules/pr105169_a.C: Skip the test on Darwin. + * g++.dg/modules/pr105169_b.C: Likewise. + +2022-06-20 Iain Sandoe + + * g++.dg/init/array61.C: Allow for two CTOR bodies on Darwin, where + aliases are not currently supported. + +2022-06-20 Richard Earnshaw + + * gcc.target/arm/simd/mve-vcmp-f32-2.c: Adjust expected output. + * gcc.target/arm/simd/pr100757.c: Likewise. + * gcc.target/arm/simd/pr100757-2.c: Likewise. + * gcc.target/arm/simd/pr100757-3.c: Likewise. + * gcc.target/arm/simd/pr100757-4.c: Likewise. + +2022-06-20 Iain Sandoe + + * g++.dg/modules/init-2_b.C: Add a missing USER_LABEL_PREFIX + to a regex. + +2022-06-20 Iain Sandoe + + * c-c++-common/attr-cdtor-1.c: Requite init_priority support. + +2022-06-20 Richard Biener + + PR middle-end/106027 + * gcc.dg/pr106027.c: New testcase. + +2022-06-20 yulong + + * gcc.target/riscv/cmo-zicbom-1.c: modified the input parameters. + * gcc.target/riscv/cmo-zicbom-2.c: modified the input parameters. + * gcc.target/riscv/cmo-zicboz-1.c: modified the input parameters. + * gcc.target/riscv/cmo-zicboz-2.c: modified the input parameters. + 2022-06-18 Harald Anlauf PR fortran/105986 -- cgit v1.1 From 70454c50b4592fe6876ecca13268264e395e058f Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Tue, 21 Jun 2022 12:15:07 +0530 Subject: tree-object-size: Don't let error_mark_node escape for ADDR_EXPR [PR105736] The addr_expr computation does not check for error_mark_node before returning the size expression. This used to work in the constant case because the conversion to uhwi would end up causing it to return size_unknown, but that won't work for the dynamic case. Modify the control flow to explicitly return size_unknown if the offset computation returns an error_mark_node. gcc/ChangeLog: PR tree-optimization/105736 * tree-object-size.cc (addr_object_size): Return size_unknown when object offset computation returns an error. gcc/testsuite/ChangeLog: PR tree-optimization/105736 * gcc.dg/builtin-dynamic-object-size-0.c (TV4): New struct. (val3): New variable. (test_pr105736): New test. (main): Call it. Signed-off-by: Siddhesh Poyarekar --- gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c | 18 ++++++++++++++++++ gcc/tree-object-size.cc | 20 +++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c index b5b0b3a..01a280b 100644 --- a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c +++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-0.c @@ -479,6 +479,20 @@ test_loop (int *obj, size_t sz, size_t start, size_t end, int incr) return __builtin_dynamic_object_size (ptr, 0); } +/* Other tests. */ + +struct TV4 +{ + __attribute__((vector_size (sizeof (int) * 4))) int v; +}; + +struct TV4 val3; +int * +test_pr105736 (struct TV4 *a) +{ + return &a->v[0]; +} + unsigned nfails = 0; #define FAIL() ({ \ @@ -633,6 +647,10 @@ main (int argc, char **argv) FAIL (); if (test_loop (arr, 42, 20, 52, 1) != 0) FAIL (); + /* pr105736. */ + int *t = test_pr105736 (&val3); + if (__builtin_dynamic_object_size (t, 0) != -1) + FAIL (); if (nfails > 0) __builtin_abort (); diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc index 5ca87ae..12bc086 100644 --- a/gcc/tree-object-size.cc +++ b/gcc/tree-object-size.cc @@ -695,19 +695,21 @@ addr_object_size (struct object_size_info *osi, const_tree ptr, var_size = pt_var_size; bytes = compute_object_offset (TREE_OPERAND (ptr, 0), var); if (bytes != error_mark_node) - bytes = size_for_offset (var_size, bytes); - if (var != pt_var - && pt_var_size - && TREE_CODE (pt_var) == MEM_REF - && bytes != error_mark_node) { - tree bytes2 = compute_object_offset (TREE_OPERAND (ptr, 0), pt_var); - if (bytes2 != error_mark_node) + bytes = size_for_offset (var_size, bytes); + if (var != pt_var && pt_var_size && TREE_CODE (pt_var) == MEM_REF) { - bytes2 = size_for_offset (pt_var_size, bytes2); - bytes = size_binop (MIN_EXPR, bytes, bytes2); + tree bytes2 = compute_object_offset (TREE_OPERAND (ptr, 0), + pt_var); + if (bytes2 != error_mark_node) + { + bytes2 = size_for_offset (pt_var_size, bytes2); + bytes = size_binop (MIN_EXPR, bytes, bytes2); + } } } + else + bytes = size_unknown (object_size_type); wholebytes = object_size_type & OST_SUBOBJECT ? var_size : pt_var_wholesize; -- cgit v1.1 From 57424087e82db140c06d4ea73f9700d5291c5bc2 Mon Sep 17 00:00:00 2001 From: Xionghu Luo Date: Thu, 9 Jun 2022 15:46:30 +0800 Subject: if-to-switch: Don't skip the first condition bb when find_conditions in if-to-switch [PR105740] The if condition is at last of first bb, so side effect statement in first BB doesn't matter, then the first if condition could also be folded to switch table. gcc/ChangeLog: PR target/105740 * gimple-if-to-switch.cc (find_conditions): Don't skip the first condition bb. gcc/testsuite/ChangeLog: PR target/105740 * gcc.dg/tree-ssa/if-to-switch-11.c: New test. Signed-off-by: Xionghu Luo --- gcc/gimple-if-to-switch.cc | 4 +++- gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-11.c | 28 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-11.c (limited to 'gcc') diff --git a/gcc/gimple-if-to-switch.cc b/gcc/gimple-if-to-switch.cc index 5dcfe5b..ca276d7 100644 --- a/gcc/gimple-if-to-switch.cc +++ b/gcc/gimple-if-to-switch.cc @@ -389,7 +389,9 @@ find_conditions (basic_block bb, if (cond == NULL) return; - if (!no_side_effect_bb (bb)) + /* An empty conditions_in_bbs indicates we are processing the first + basic-block then no need check side effect. */ + if (!conditions_in_bbs->is_empty () && !no_side_effect_bb (bb)) return; tree lhs = gimple_cond_lhs (cond); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-11.c b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-11.c new file mode 100644 index 0000000..3dffee04 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-11.c @@ -0,0 +1,28 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-iftoswitch-optimized" } */ + +struct f { + int len; + int arr[4]; +}; + +int +test (struct f const *const f) +{ + if (f->arr[3] == 1) { + return 12; + } else if (f->arr[3] == 2) { + return 27; + } else if (f->arr[3] == 3) { + return 38; + } else if (f->arr[3] == 4) { + return 18; + } else if (f->arr[3] == 5) { + return 58; + } else if (f->arr[3] == 6) { + return 68; + } + return 0; +} + +/* { dg-final { scan-tree-dump "Canonical GIMPLE case clusters: 1 2 3 4 5 6" "iftoswitch" } } */ -- cgit v1.1 From 2df1df945fac85d7b3d084001414a66a2709d8fe Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 21 Jun 2022 11:38:59 +0200 Subject: expand: Fix up expand_cond_expr_using_cmove [PR106030] If expand_cond_expr_using_cmove can't find a cmove optab for a particular mode, it tries to promote the mode and perform the cmove in the promoted mode. The testcase in the patch ICEs on arm because in that case we pass temp which has the promoted mode (SImode) as target to expand_operands where the operands have the non-promoted mode (QImode). Later on the function uses paradoxical subregs: if (GET_MODE (op1) != mode) op1 = gen_lowpart (mode, op1); if (GET_MODE (op2) != mode) op2 = gen_lowpart (mode, op2); to change the operand modes. The following patch fixes it by passing NULL_RTX as target if it has promoted mode. 2022-06-21 Jakub Jelinek PR middle-end/106030 * expr.cc (expand_cond_expr_using_cmove): Pass NULL_RTX instead of temp to expand_operands if mode has been promoted. * gcc.c-torture/compile/pr106030.c: New test. --- gcc/expr.cc | 3 ++- gcc/testsuite/gcc.c-torture/compile/pr106030.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr106030.c (limited to 'gcc') diff --git a/gcc/expr.cc b/gcc/expr.cc index 78c839a..c90cde3 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -8832,7 +8832,8 @@ expand_cond_expr_using_cmove (tree treeop0 ATTRIBUTE_UNUSED, expanding_cond_expr_using_cmove = true; start_sequence (); expand_operands (treeop1, treeop2, - temp, &op1, &op2, EXPAND_NORMAL); + mode == orig_mode ? temp : NULL_RTX, &op1, &op2, + EXPAND_NORMAL); if (TREE_CODE (treeop0) == SSA_NAME && (srcstmt = get_def_for_expr_class (treeop0, tcc_comparison))) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr106030.c b/gcc/testsuite/gcc.c-torture/compile/pr106030.c new file mode 100644 index 0000000..7514b34 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr106030.c @@ -0,0 +1,16 @@ +/* PR middle-end/106030 */ + +int a, b, c; + +char +foo (int x, int y) +{ + return x * y; +} + +void +bar (void) +{ + char d = (foo <= b) * a; + c = foo (2 != bar, d); +} -- cgit v1.1 From a0c30fe3b888f20215f3e040d21b62b603804ca9 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 21 Jun 2022 11:40:16 +0200 Subject: ifcvt: Don't introduce trapping or faulting reads in noce_try_sign_mask [PR106032] noce_try_sign_mask as documented will optimize if (c < 0) x = t; else x = 0; into x = (c >> bitsm1) & t; The optimization is done if either t is unconditional (e.g. for x = t; if (c >= 0) x = 0; ) or if it is cheap. We already check that t doesn't have side-effects, but if t is conditional, we need to punt also if it may trap or fault, as we make it unconditional. I've briefly skimmed other noce_try* optimizations and didn't find one that would suffer from the same problem. 2022-06-21 Jakub Jelinek PR rtl-optimization/106032 * ifcvt.cc (noce_try_sign_mask): Punt if !t_unconditional, and t may_trap_or_fault_p, even if it is cheap. * gcc.c-torture/execute/pr106032.c: New test. --- gcc/ifcvt.cc | 15 ++++++++------- gcc/testsuite/gcc.c-torture/execute/pr106032.c | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr106032.c (limited to 'gcc') diff --git a/gcc/ifcvt.cc b/gcc/ifcvt.cc index b983e87..e007b17 100644 --- a/gcc/ifcvt.cc +++ b/gcc/ifcvt.cc @@ -2833,18 +2833,19 @@ noce_try_sign_mask (struct noce_if_info *if_info) return FALSE; /* This is only profitable if T is unconditionally executed/evaluated in the - original insn sequence or T is cheap. The former happens if B is the - non-zero (T) value and if INSN_B was taken from TEST_BB, or there was no - INSN_B which can happen for e.g. conditional stores to memory. For the - cost computation use the block TEST_BB where the evaluation will end up - after the transformation. */ + original insn sequence or T is cheap and can't trap or fault. The former + happens if B is the non-zero (T) value and if INSN_B was taken from + TEST_BB, or there was no INSN_B which can happen for e.g. conditional + stores to memory. For the cost computation use the block TEST_BB where + the evaluation will end up after the transformation. */ t_unconditional = (t == if_info->b && (if_info->insn_b == NULL_RTX || BLOCK_FOR_INSN (if_info->insn_b) == if_info->test_bb)); if (!(t_unconditional - || (set_src_cost (t, mode, if_info->speed_p) - < COSTS_N_INSNS (2)))) + || ((set_src_cost (t, mode, if_info->speed_p) + < COSTS_N_INSNS (2)) + && !may_trap_or_fault_p (t)))) return FALSE; if (!noce_can_force_operand (t)) diff --git a/gcc/testsuite/gcc.c-torture/execute/pr106032.c b/gcc/testsuite/gcc.c-torture/execute/pr106032.c new file mode 100644 index 0000000..d2ccf6a5 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr106032.c @@ -0,0 +1,21 @@ +/* PR rtl-optimization/106032 */ + +__attribute__((noipa)) int +foo (int x, int *y) +{ + int a = 0; + if (x < 0) + a = *y; + return a; +} + +int +main () +{ + int a = 42; + if (foo (0, 0) != 0 || foo (1, 0) != 0) + __builtin_abort (); + if (foo (-1, &a) != 42 || foo (-42, &a) != 42) + __builtin_abort (); + return 0; +} -- cgit v1.1 From ab981aab92cbc71918fbaadcf6fa64bdb2b69be7 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Tue, 21 Jun 2022 12:12:11 +0200 Subject: match.pd: Remove "+ 0x80000000" in int comparisons [PR94899] Expressions of the form "X + CST < Y + CST" where: * CST is an unsigned integer constant with only the MSB set, and * X and Y's types have integer conversion ranks <= CST's can be simplified to "(signed) X < (signed) Y". This is because, assuming a 32-bit signed numbers, (unsigned) INT_MIN + 0x80000000 is 0, and (unsigned) INT_MAX + 0x80000000 is UINT_MAX. i.e. the result increases monotonically with signed input. This means: ((signed) X < (signed) Y) iff (X + 0x80000000 < Y + 0x80000000) gcc/ PR tree-optimization/94899 * match.pd (X + C < Y + C -> (signed) X < (signed) Y, if C is 0x80000000): New simplification. gcc/testsuite/ * gcc.dg/pr94899.c: New test. --- gcc/match.pd | 13 +++++++++++ gcc/testsuite/gcc.dg/pr94899.c | 49 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr94899.c (limited to 'gcc') diff --git a/gcc/match.pd b/gcc/match.pd index a63b649..4a57089 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -2089,6 +2089,19 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0)) && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (@0))) (op @0 @1)))) + +/* As a special case, X + C < Y + C is the same as (signed) X < (signed) Y + when C is an unsigned integer constant with only the MSB set, and X and + Y have types of equal or lower integer conversion rank than C's. */ +(for op (lt le ge gt) + (simplify + (op (plus @1 INTEGER_CST@0) (plus @2 @0)) + (if (INTEGRAL_TYPE_P (TREE_TYPE (@0)) + && TYPE_UNSIGNED (TREE_TYPE (@0)) + && wi::only_sign_bit_p (wi::to_wide (@0))) + (with { tree stype = signed_type_for (TREE_TYPE (@0)); } + (op (convert:stype @1) (convert:stype @2)))))) + /* For equality and subtraction, this is also true with wrapping overflow. */ (for op (eq ne minus) (simplify diff --git a/gcc/testsuite/gcc.dg/pr94899.c b/gcc/testsuite/gcc.dg/pr94899.c new file mode 100644 index 0000000..9fad057 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr94899.c @@ -0,0 +1,49 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +typedef __INT16_TYPE__ int16_t; +typedef __INT32_TYPE__ int32_t; +typedef __UINT16_TYPE__ uint16_t; +typedef __UINT32_TYPE__ uint32_t; + +#define MAGIC (~ (uint32_t) 0 / 2 + 1) + +int +f_i16_i16 (int16_t x, int16_t y) +{ + return x + MAGIC < y + MAGIC; +} + +int +f_i16_i32 (int16_t x, int32_t y) +{ + return x + MAGIC < y + MAGIC; +} + +int +f_i32_i32 (int32_t x, int32_t y) +{ + return x + MAGIC < y + MAGIC; +} + +int +f_u32_i32 (uint32_t x, int32_t y) +{ + return x + MAGIC < y + MAGIC; +} + +int +f_u32_u32 (uint32_t x, uint32_t y) +{ + return x + MAGIC < y + MAGIC; +} + +int +f_i32_i32_sub (int32_t x, int32_t y) +{ + return x - MAGIC < y - MAGIC; +} + +/* The addition/subtraction of constants should be optimized away. */ +/* { dg-final { scan-tree-dump-not " \\+ " "optimized"} } */ +/* { dg-final { scan-tree-dump-not " \\- " "optimized"} } */ -- cgit v1.1 From f1fcd6e3ad911945bc3c24a3a5c7ea99b910121e Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 21 Jun 2022 06:23:11 -0700 Subject: doc: Document module language-linkage supported I missed we documented this as unimplemented, when I implemented it. gcc/ * doc/invoke.texi (C++ Modules): Remove language-linkage as missing feature. --- gcc/doc/invoke.texi | 7 ------- 1 file changed, 7 deletions(-) (limited to 'gcc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 50f5787..81d13f4 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -34639,13 +34639,6 @@ Papers p1815 (@uref{https://wg21.link/p1815}) and p2003 exported region may reference (for instance, the entities an exported template definition may reference). These are not fully implemented. -@item Language-linkage module attachment -Declarations with explicit language linkage (@code{extern "C"} or -@code{extern "C++"}) are attached to the global module, even when in -the purview of a named module. This is not implemented. Such -declarations will be attached to the module, if any, in which they are -declared. - @item Standard Library Header Units The Standard Library is not provided as importable header units. If you want to import such units, you must explicitly build them first. -- cgit v1.1 From 7905a9ac26707ed6ac49e40e35a9c8755c6574e3 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 18 Jun 2022 18:19:28 -0700 Subject: libgo: #include when checking for loff_t PR go/106033 Fixes golang/go#53469 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413214 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 4b75dd3..737bc48 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -a409e049737ec9a358a19233e017d957db3d6d2a +77821de1a149c2e6ef9c154ae384c16292173039 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1 From 4306339798b6843937c628c5ece8c234b309b13d Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Wed, 22 Jun 2022 00:08:56 +0100 Subject: PR target/105991: Recognize PLUS and XOR forms of rldimi in rs6000.md. This patch addresses PR target/105991 where a change to prefer representing shifts and adds at the tree-level as multiplications, causes problems for the rldimi patterns in the powerpc backend. The issue is that rs6000.md models this pattern using IOR, and some variants that have the equivalent PLUS or XOR in the RTL fail to match some *rotl4_insert patterns. This is fixed in this patch by adding a define_insn_and_split to locally canonicalize the PLUS and XOR forms to the backend's preferred IOR form. An alternative fix might be for the RTL optimizers to define a canonical form for these plus_xor_ior equivalent expressions, but the logical choice might be plus (which may appear in an addressing mode), and such a change may require a number of tweaks to update various backends (i.e. a more intrusive change than the one proposed here). Many thanks for Marek Polacek for bootstrapping and regression testing this change without problems. 2022-06-22 Roger Sayle Marek Polacek Segher Boessenkool Kewen Lin gcc/ChangeLog PR target/105991 * config/rs6000/rs6000.md (rotl3_insert_3): Check that exact_log2 doesn't return -1 (or zero). (plus_xor): New code iterator. (*rotl3_insert_3_): New define_insn_and_split. gcc/testsuite/ChangeLog PR target/105991 * gcc.target/powerpc/pr105991.c: New test case. --- gcc/config/rs6000/rs6000.md | 21 ++++++++++++++++++++- gcc/testsuite/gcc.target/powerpc/pr105991.c | 11 +++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/powerpc/pr105991.c (limited to 'gcc') diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index c55ee7e..090dbcf 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -4179,7 +4179,8 @@ (match_operand:GPR 4 "const_int_operand" "n")) (ashift:GPR (match_operand:GPR 1 "gpc_reg_operand" "r") (match_operand:SI 2 "const_int_operand" "n"))))] - "INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)" + "INTVAL (operands[2]) > 0 + && INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)" { if (mode == SImode) return "rlwimi %0,%1,%h2,0,31-%h2"; @@ -4188,6 +4189,24 @@ } [(set_attr "type" "insert")]) +; Canonicalize the PLUS and XOR forms to IOR for rotl3_insert_3 +(define_code_iterator plus_xor [plus xor]) + +(define_insn_and_split "*rotl3_insert_3_" + [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") + (plus_xor:GPR + (and:GPR (match_operand:GPR 3 "gpc_reg_operand" "0") + (match_operand:GPR 4 "const_int_operand" "n")) + (ashift:GPR (match_operand:GPR 1 "gpc_reg_operand" "r") + (match_operand:SI 2 "const_int_operand" "n"))))] + "INTVAL (operands[2]) > 0 + && INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)" + "#" + "&& 1" + [(set (match_dup 0) + (ior:GPR (and:GPR (match_dup 3) (match_dup 4)) + (ashift:GPR (match_dup 1) (match_dup 2))))]) + (define_code_iterator plus_ior_xor [plus ior xor]) (define_split diff --git a/gcc/testsuite/gcc.target/powerpc/pr105991.c b/gcc/testsuite/gcc.target/powerpc/pr105991.c new file mode 100644 index 0000000..439d10f --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr105991.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-require-effective-target lp64 } */ +unsigned long long +foo (unsigned long long value) +{ + value &= 0xffffffff; + value |= value << 32; + return value; +} +/* { dg-final { scan-assembler {\mrldimi\M} } } */ -- cgit v1.1 From de89b078e37e5920939893f338f2f45b4640bd48 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 22 Jun 2022 00:16:25 +0000 Subject: Daily bump. --- gcc/ChangeLog | 46 ++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/testsuite/ChangeLog | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a53a778..aee43e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,49 @@ +2022-06-21 Roger Sayle + Marek Polacek + Segher Boessenkool + Kewen Lin + + PR target/105991 + * config/rs6000/rs6000.md (rotl3_insert_3): Check that + exact_log2 doesn't return -1 (or zero). + (plus_xor): New code iterator. + (*rotl3_insert_3_): New define_insn_and_split. + +2022-06-21 Nathan Sidwell + + * doc/invoke.texi (C++ Modules): Remove language-linkage + as missing feature. + +2022-06-21 Arjun Shankar + + PR tree-optimization/94899 + * match.pd (X + C < Y + C -> (signed) X < (signed) Y, if C is + 0x80000000): New simplification. + +2022-06-21 Jakub Jelinek + + PR rtl-optimization/106032 + * ifcvt.cc (noce_try_sign_mask): Punt if !t_unconditional, and + t may_trap_or_fault_p, even if it is cheap. + +2022-06-21 Jakub Jelinek + + PR middle-end/106030 + * expr.cc (expand_cond_expr_using_cmove): Pass NULL_RTX instead of + temp to expand_operands if mode has been promoted. + +2022-06-21 Xionghu Luo + + PR target/105740 + * gimple-if-to-switch.cc (find_conditions): Don't skip the first + condition bb. + +2022-06-21 Siddhesh Poyarekar + + PR tree-optimization/105736 + * tree-object-size.cc (addr_object_size): Return size_unknown + when object offset computation returns an error. + 2022-06-20 H.J. Lu PR target/105960 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 774b032..effad93 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220621 +20220622 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e1fde82..5e1a112 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,38 @@ +2022-06-21 Roger Sayle + Marek Polacek + Segher Boessenkool + Kewen Lin + + PR target/105991 + * gcc.target/powerpc/pr105991.c: New test case. + +2022-06-21 Arjun Shankar + + * gcc.dg/pr94899.c: New test. + +2022-06-21 Jakub Jelinek + + PR rtl-optimization/106032 + * gcc.c-torture/execute/pr106032.c: New test. + +2022-06-21 Jakub Jelinek + + PR middle-end/106030 + * gcc.c-torture/compile/pr106030.c: New test. + +2022-06-21 Xionghu Luo + + PR target/105740 + * gcc.dg/tree-ssa/if-to-switch-11.c: New test. + +2022-06-21 Siddhesh Poyarekar + + PR tree-optimization/105736 + * gcc.dg/builtin-dynamic-object-size-0.c (TV4): New struct. + (val3): New variable. + (test_pr105736): New test. + (main): Call it. + 2022-06-20 Iain Sandoe * lib/asan-dg.exp: Do not apply color to asan output when -- cgit v1.1 From ec532b47f1823e71f822c0da781c531ffff67a52 Mon Sep 17 00:00:00 2001 From: Takayuki 'January June' Suwa Date: Wed, 22 Jun 2022 04:51:32 +0900 Subject: xtensa: Fix buffer overflow Fortify buffer overflow message reported. (see https://github.com/earlephilhower/esp-quick-toolchain/issues/36) gcc/ChangeLog: * config/xtensa/xtensa.md (bswapsi2_internal): Enlarge the buffer that is obviously smaller than the template string given to sprintf(). --- gcc/config/xtensa/xtensa.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md index 84b975c..f31ec33 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -536,7 +536,7 @@ { rtx_insn *prev_insn = prev_nonnote_nondebug_insn (insn); const char *init = "ssai\t8\;"; - static char result[64]; + static char result[128]; if (prev_insn && NONJUMP_INSN_P (prev_insn)) { rtx x = PATTERN (prev_insn); -- cgit v1.1 From 5e377d21f1f345d8b157b9bc306e02bb9bd45e01 Mon Sep 17 00:00:00 2001 From: Haochen Jiang Date: Thu, 16 Jun 2022 00:15:53 -0700 Subject: i386: Add syscall to enable AMX for latest kernels gcc/testsuite/ChangeLog: * gcc.target/i386/amx-check.h (request_perm_xtile_data): New function to check if AMX is usable and enable AMX. (main): Run test if AMX is usable. --- gcc/testsuite/gcc.target/i386/amx-check.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.target/i386/amx-check.h b/gcc/testsuite/gcc.target/i386/amx-check.h index 434b0e5..6fff5ff4 100644 --- a/gcc/testsuite/gcc.target/i386/amx-check.h +++ b/gcc/testsuite/gcc.target/i386/amx-check.h @@ -4,11 +4,24 @@ #include #include #include +#include +#ifdef __linux__ +#include +#endif #ifdef DEBUG #include #endif #include "cpuid.h" +#define XFEATURE_XTILECFG 17 +#define XFEATURE_XTILEDATA 18 +#define XFEATURE_MASK_XTILECFG (1 << XFEATURE_XTILECFG) +#define XFEATURE_MASK_XTILEDATA (1 << XFEATURE_XTILEDATA) +#define XFEATURE_MASK_XTILE (XFEATURE_MASK_XTILECFG | XFEATURE_MASK_XTILEDATA) + +#define ARCH_GET_XCOMP_PERM 0x1022 +#define ARCH_REQ_XCOMP_PERM 0x1023 + /* TODO: The tmm emulation is temporary for current AMX implementation with no tmm regclass, should be changed in the future. */ @@ -44,6 +57,20 @@ typedef struct __tile /* Stride (colum width in byte) used for tileload/store */ #define _STRIDE 64 +#ifdef __linux__ +/* We need syscall to use amx functions */ +int request_perm_xtile_data() +{ + unsigned long bitmask; + + if (syscall (SYS_arch_prctl, ARCH_REQ_XCOMP_PERM, XFEATURE_XTILEDATA) || + syscall (SYS_arch_prctl, ARCH_GET_XCOMP_PERM, &bitmask)) + return 0; + + return (bitmask & XFEATURE_MASK_XTILE) != 0; +} +#endif + /* Initialize tile config by setting all tmm size to 16x64 */ void init_tile_config (__tilecfg_u *dst) { @@ -186,6 +213,9 @@ main () #ifdef AMX_BF16 && __builtin_cpu_supports ("amx-bf16") #endif +#ifdef __linux__ + && request_perm_xtile_data () +#endif ) { DO_TEST (); -- cgit v1.1 From 614db2317e6519db9c77523498f5f14b860818d2 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 21 Jun 2022 23:10:58 -0300 Subject: c++: testsuite: require lto_incremental in pr90990_0.C Other LTO tests that use -r require the lto_incremental effective target. I suppose pr90990_0.C is missing it due to an oversight. This patch arranges for this test to also be skipped on non-lto_incremental targets. for gcc/testsuite/ChangeLog * g++.dg/lto/pr90990_0.C: Require lto_incremental target. --- gcc/testsuite/g++.dg/lto/pr90990_0.C | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/lto/pr90990_0.C b/gcc/testsuite/g++.dg/lto/pr90990_0.C index 22a5e3f..74cc2bb 100644 --- a/gcc/testsuite/g++.dg/lto/pr90990_0.C +++ b/gcc/testsuite/g++.dg/lto/pr90990_0.C @@ -1,5 +1,6 @@ // { dg-lto-do link } /* { dg-extra-ld-options { -r -nostdlib } } */ +// { dg-require-effective-target lto_incremental } class A { public: float m_floats; -- cgit v1.1 From 870f6866c96a38d30503d730ca3e9c3a5c320e32 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 21 Jun 2022 23:10:58 -0300 Subject: testsuite: outputs.exp: test for skip_atsave more thoroughly The presence of -I or -L flags in link command lines changes the driver's, and thus the linker's behavior, WRT naming files with command-line options. With such flags, the driver creates .args.0 and .args.1 files, whereas without them it's the linker (collect2, really) that creates .ld1_args. I've hit some fails on a target system that doesn't have -I or -L flags in the board config file, but it does add some of them implicitly with configured-in driver self specs. Alas, the test in outputs.exp doesn't catch that, so we proceed to run rather than skip_atsave tests. I've reworked the outest procedure to allow dry runs and to return would-have-been pass/fail results as lists, so we can now test whether certain files are created and use that to configure the actual test runs. for gcc/testsuite/ChangeLog * gcc.misc-tests/outputs.exp (outest): Introduce quiet mode, create and return lists of passes and fails. Use it to catch skip_atsave cases where -L flags are implicitly added by driver self specs. --- gcc/testsuite/gcc.misc-tests/outputs.exp | 49 +++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.misc-tests/outputs.exp b/gcc/testsuite/gcc.misc-tests/outputs.exp index afae735..a63ce66 100644 --- a/gcc/testsuite/gcc.misc-tests/outputs.exp +++ b/gcc/testsuite/gcc.misc-tests/outputs.exp @@ -116,8 +116,23 @@ if [info exists env(MAKEFLAGS)] { # it weren't for # https://core.tcl-lang.org/tcl/tktview?name=5bbd044812), but .{i,s,o} # and .[iso] will pass even if only the .o is present. + +# Return a list containing two lists, the first naming the passes, the +# second naming the fails. If test ends with a question mark, the +# test is taken as a preparatory test or cleanup, and no pass or fail +# results will be logged, though the lists will still be built and +# returned. array unset outests * proc outest { test sources opts dirs outputs } { + if { [string index $test end] == "?" } { + set quiet 1 + } else { + set quiet 0 + } + + set passes {} + set fails {} + global b srcdir subdir global outests @@ -182,15 +197,15 @@ proc outest { test sources opts dirs outputs } { set o "$og" } if { [file exists $d$o] } then { - pass "$test: $d$o" + lappend passes "$d$o" file delete $d$o } else { set ogl [glob -nocomplain -path $d -- $o] if { $ogl != {} } { - pass "$test: $d$o" + lappend passes "$d$o" file delete $ogl } else { - fail "$test: $d$o" + lappend fails "$d$o" } } } @@ -219,17 +234,27 @@ proc outest { test sources opts dirs outputs } { } if { [llength $outb] == 0 } then { - pass "$test: extra" + lappend passes "extra" } else { - fail "$test: extra\n$outb" + lappend fails "extra\n$outb" } if { [string equal "$gcc_output" ""] } then { - pass "$test: std out" + lappend passes "std out" } else { - fail "$test: std out\n$gcc_output" + lappend fails "std out\n$gcc_output" } + if !$quiet { + foreach p $passes { + pass "$test: $p" + } + foreach f $fails { + fail "$test: $f" + } + } + + return [list $passes $fails] } set sing {-0.c} @@ -279,6 +304,16 @@ if { "$aout" != "" } then { set oaout "-o $aout" } +# Sometimes the -I or -L flags that cause the compiler driver to save +# .args.[01], instead of leaving it for the linker to save .ld1_args, +# is hiding in driver self specs. +if !$skip_atsave { + set atsave_test_out [outest "$b-skip-atsave?" $sing "@/dev/null -o $b.exe -save-temps" {} {{.args.1}}] + if { [lindex [lindex $atsave_test_out 0] 0] == "$b.args.1" } { + set skip_atsave 1 + } +} + # Driver-chosen outputs. outest "$b-1 asm default 1" $sing "-S" {} {{-0.s}} outest "$b-2 asm default 2" $mult "-S" {} {{-1.s -2.s}} -- cgit v1.1 From 7a1790ac6b475e9848e24200de9a1c44be422f5b Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 21 Jun 2022 23:10:59 -0300 Subject: testsuite: outputs.exp: cleanup before running tests Use the just-added dry-run infrastructure to clean up files that may have been left over by interrupted runs of outputs.exp, which used to lead to spurious non-repeatable (self-fixing) failures. for gcc/testsuite/ChangeLog * gcc.misc-tests/outputs.exp: Clean up left-overs first. --- gcc/testsuite/gcc.misc-tests/outputs.exp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.misc-tests/outputs.exp b/gcc/testsuite/gcc.misc-tests/outputs.exp index a63ce66..ab919db 100644 --- a/gcc/testsuite/gcc.misc-tests/outputs.exp +++ b/gcc/testsuite/gcc.misc-tests/outputs.exp @@ -304,6 +304,9 @@ if { "$aout" != "" } then { set oaout "-o $aout" } +# Clean up any left-overs from an earlier interrupted run. +outest "$b-cleanup?" $sing "$oaout" {alt/ dir/ o/ od/ obj/} {{} {} {} {} {} {$aout}} + # Sometimes the -I or -L flags that cause the compiler driver to save # .args.[01], instead of leaving it for the linker to save .ld1_args, # is hiding in driver self specs. -- cgit v1.1 From 98b6e62cf5e7d477b5797084da59561f6d018668 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Wed, 25 May 2022 19:30:55 -0700 Subject: RISC-V: Add -mtune=thead-c906 to the invoke docs gcc/ChangeLog * doc/invoke.texi (RISC-V): Document -mtune=thead-c906. --- gcc/doc/invoke.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 81d13f4..fb50636 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -28164,7 +28164,7 @@ Permissible values for this option are: @samp{sifive-e20}, @samp{sifive-e21}, Optimize the output for the given processor, specified by microarchitecture or particular CPU name. Permissible values for this option are: @samp{rocket}, @samp{sifive-3-series}, @samp{sifive-5-series}, @samp{sifive-7-series}, -@samp{size}, and all valid options for @option{-mcpu=}. +@samp{thead-c906}, @samp{size}, and all valid options for @option{-mcpu=}. When @option{-mtune=} is not specified, use the setting from @option{-mcpu}, the default is @samp{rocket} if both are not specified. -- cgit v1.1 From 038b077689bb5310386b04d40a2cea234f01e6aa Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 22 Jun 2022 11:27:15 +0100 Subject: data-ref: Improve non-loop disambiguation [PR106019] When dr_may_alias_p is called without a loop context, it tries to use the tree-affine interface to calculate the difference between the two addresses and use that difference to check whether the gap between the accesses is known at compile time. However, as the example in the PR shows, this doesn't expand SSA_NAMEs and so can easily be defeated by things like reassociation. One fix would have been to use aff_combination_expand to expand the SSA_NAMEs, but we'd then need some way of maintaining the associated cache. This patch instead reuses the innermost_loop_behavior fields (which exist even when no loop context is provided). It might still be useful to do the aff_combination_expand thing too, if an example turns out to need it. gcc/ PR tree-optimization/106019 * tree-data-ref.cc (dr_may_alias_p): Try using the innermost_loop_behavior to disambiguate non-loop queries. gcc/testsuite/ PR tree-optimization/106019 * gcc.dg/vect/bb-slp-pr106019.c: New test. --- gcc/testsuite/gcc.dg/vect/bb-slp-pr106019.c | 15 +++++++++++++++ gcc/tree-data-ref.cc | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/vect/bb-slp-pr106019.c (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr106019.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr106019.c new file mode 100644 index 0000000..218d7cc --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr106019.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ + +void f(double *p, long i) +{ + p[i+0] += 1; + p[i+1] += 1; +} +void g(double *p, long i) +{ + double *q = p + i; + q[0] += 1; + q[1] += 1; +} + +/* { dg-final { scan-tree-dump-not "can't determine dependence" slp2 } } */ diff --git a/gcc/tree-data-ref.cc b/gcc/tree-data-ref.cc index ae05fe7..ff9327f 100644 --- a/gcc/tree-data-ref.cc +++ b/gcc/tree-data-ref.cc @@ -2968,6 +2968,25 @@ dr_may_alias_p (const struct data_reference *a, const struct data_reference *b, disambiguation. */ if (!loop_nest) { + tree tree_size_a = TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (a))); + tree tree_size_b = TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (b))); + + if (DR_BASE_ADDRESS (a) + && DR_BASE_ADDRESS (b) + && operand_equal_p (DR_BASE_ADDRESS (a), DR_BASE_ADDRESS (b)) + && operand_equal_p (DR_OFFSET (a), DR_OFFSET (b)) + && poly_int_tree_p (tree_size_a) + && poly_int_tree_p (tree_size_b) + && !ranges_maybe_overlap_p (wi::to_widest (DR_INIT (a)), + wi::to_widest (tree_size_a), + wi::to_widest (DR_INIT (b)), + wi::to_widest (tree_size_b))) + { + gcc_assert (integer_zerop (DR_STEP (a)) + && integer_zerop (DR_STEP (b))); + return false; + } + aff_tree off1, off2; poly_widest_int size1, size2; get_inner_reference_aff (DR_REF (a), &off1, &size1); -- cgit v1.1 From d68d366425369649cb4e25a07752e25a4fff52cf Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 10 Jun 2022 16:35:21 -0400 Subject: ubsan: default to trap on unreachable at -O0 and -Og [PR104642] When not optimizing, we can't do anything useful with unreachability in terms of code performance, so we might as well improve debugging by turning __builtin_unreachable into a trap. I think it also makes sense to do this when we're explicitly optimizing for the debugging experience. In the PR richi suggested introducing an -funreachable-traps flag for this. This functionality is already implemented as -fsanitize=unreachable -fsanitize-trap=unreachable, and we want to share the implementation, but it does seem useful to have a separate flag that isn't affected by the various sanitization controls. -fsanitize=unreachable takes priority over -funreachable-traps if both are enabled. Jakub observed that this would slow down -O0 by default from running the sanopt pass, so this revision avoids the need for sanopt by rewriting calls introduced by the compiler immediately, and calls written by the user at fold time. Many of the calls introduced by the compiler are also rewritten immediately to ubsan calls when not trapping, which fixes ubsan-8b.C; previously the call to f() was optimized away before sanopt. But this early rewriting isn't practical for uses of __builtin_unreachable in devirtualization and such, so sanopt rewriting is still done for non-trapping sanitize. PR c++/104642 gcc/ChangeLog: * common.opt: Add -funreachable-traps. * doc/invoke.texi (-funreachable-traps): Document it. * opts.cc (finish_options): Enable at -O0 or -Og. * tree.cc (build_common_builtin_nodes): Add __builtin_trap. (builtin_decl_unreachable, build_builtin_unreachable): New. * tree.h: Declare them. * ubsan.cc (sanitize_unreachable_fn): Factor out. (ubsan_instrument_unreachable): Use gimple_build_builtin_unreachable. * ubsan.h (sanitize_unreachable_fn): Declare. * gimple.cc (gimple_build_builtin_unreachable): New. * gimple.h: Declare it. * builtins.cc (expand_builtin_unreachable): Add assert. (fold_builtin_0): Call build_builtin_unreachable. * sanopt.cc: Don't run for just SANITIZE_RETURN or SANITIZE_UNREACHABLE when trapping. * cgraphunit.cc (walk_polymorphic_call_targets): Use new unreachable functions. * gimple-fold.cc (gimple_fold_call) (gimple_get_virt_method_for_vtable) * ipa-fnsummary.cc (redirect_to_unreachable) * ipa-prop.cc (ipa_make_edge_direct_to_target) (ipa_impossible_devirt_target) * ipa.cc (walk_polymorphic_call_targets) * tree-cfg.cc (pass_warn_function_return::execute) (execute_fixup_cfg) * tree-ssa-loop-ivcanon.cc (remove_exits_and_undefined_stmts) (unloop_loops) * tree-ssa-sccvn.cc (eliminate_dom_walker::eliminate_stmt): Likewise. gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_builtin_function_call): Handle unreachable/trap earlier. * cp-gimplify.cc (cp_maybe_instrument_return): Use build_builtin_unreachable. gcc/testsuite/ChangeLog: * g++.dg/ubsan/return-8a.C: New test. * g++.dg/ubsan/return-8b.C: New test. * g++.dg/ubsan/return-8d.C: New test. * g++.dg/ubsan/return-8e.C: New test. --- gcc/builtins.cc | 9 +++++++ gcc/cgraphunit.cc | 3 +-- gcc/common.opt | 4 +++ gcc/cp/constexpr.cc | 29 +++++++++++--------- gcc/cp/cp-gimplify.cc | 7 ++--- gcc/doc/invoke.texi | 14 ++++++++++ gcc/gimple-fold.cc | 7 +++-- gcc/gimple.cc | 13 +++++++++ gcc/gimple.h | 1 + gcc/ipa-fnsummary.cc | 4 +-- gcc/ipa-prop.cc | 4 +-- gcc/ipa.cc | 3 +-- gcc/opts.cc | 4 +++ gcc/sanopt.cc | 10 ++++++- gcc/testsuite/g++.dg/ubsan/return-8a.C | 16 ++++++++++++ gcc/testsuite/g++.dg/ubsan/return-8b.C | 17 ++++++++++++ gcc/testsuite/g++.dg/ubsan/return-8d.C | 16 ++++++++++++ gcc/testsuite/g++.dg/ubsan/return-8e.C | 17 ++++++++++++ gcc/tree-cfg.cc | 7 +++-- gcc/tree-ssa-loop-ivcanon.cc | 7 +++-- gcc/tree-ssa-sccvn.cc | 2 +- gcc/tree.cc | 40 ++++++++++++++++++++++++++++ gcc/tree.h | 5 ++++ gcc/ubsan.cc | 48 ++++++++++++++++++++++------------ gcc/ubsan.h | 1 + 25 files changed, 233 insertions(+), 55 deletions(-) create mode 100644 gcc/testsuite/g++.dg/ubsan/return-8a.C create mode 100644 gcc/testsuite/g++.dg/ubsan/return-8b.C create mode 100644 gcc/testsuite/g++.dg/ubsan/return-8d.C create mode 100644 gcc/testsuite/g++.dg/ubsan/return-8e.C (limited to 'gcc') diff --git a/gcc/builtins.cc b/gcc/builtins.cc index 971b18c..e6816d5 100644 --- a/gcc/builtins.cc +++ b/gcc/builtins.cc @@ -5184,6 +5184,9 @@ expand_builtin_trap (void) static void expand_builtin_unreachable (void) { + /* Use gimple_build_builtin_unreachable or builtin_decl_unreachable + to avoid this. */ + gcc_checking_assert (!sanitize_flags_p (SANITIZE_UNREACHABLE)); emit_barrier (); } @@ -9261,6 +9264,12 @@ fold_builtin_0 (location_t loc, tree fndecl) case BUILT_IN_CLASSIFY_TYPE: return fold_builtin_classify_type (NULL_TREE); + case BUILT_IN_UNREACHABLE: + /* Rewrite any explicit calls to __builtin_unreachable. */ + if (sanitize_flags_p (SANITIZE_UNREACHABLE)) + return build_builtin_unreachable (loc); + break; + default: break; } diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc index e77bf97..836e759 100644 --- a/gcc/cgraphunit.cc +++ b/gcc/cgraphunit.cc @@ -1033,8 +1033,7 @@ walk_polymorphic_call_targets (hash_set *reachable_call_targets, if (targets.length () == 1) target = targets[0]; else - target = cgraph_node::create - (builtin_decl_implicit (BUILT_IN_UNREACHABLE)); + target = cgraph_node::create (builtin_decl_unreachable ()); if (symtab->dump_file) { diff --git a/gcc/common.opt b/gcc/common.opt index 32917aa..da5d23d 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3017,6 +3017,10 @@ funit-at-a-time Common Var(flag_unit_at_a_time) Init(1) Compile whole compilation unit at a time. +funreachable-traps +Common Var(flag_unreachable_traps) Optimization +Trap on __builtin_unreachable instead of using it for optimization. + funroll-loops Common Var(flag_unroll_loops) Optimization EnabledBy(funroll-all-loops) Perform loop unrolling when iteration count is known. diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc index fd7f8c0..0dc94d9 100644 --- a/gcc/cp/constexpr.cc +++ b/gcc/cp/constexpr.cc @@ -1438,6 +1438,20 @@ cxx_eval_builtin_function_call (const constexpr_ctx *ctx, tree t, tree fun, /* These builtins shall be ignored during constant expression evaluation. */ return void_node; + case BUILT_IN_UNREACHABLE: + case BUILT_IN_TRAP: + if (!*non_constant_p && !ctx->quiet) + { + /* Do not allow__builtin_unreachable in constexpr function. + The __builtin_unreachable call with BUILTINS_LOCATION + comes from cp_maybe_instrument_return. */ + if (EXPR_LOCATION (t) == BUILTINS_LOCATION) + error ("% call flows off the end of the function"); + else + error ("%q+E is not a constant expression", t); + } + *non_constant_p = true; + return t; default: break; } @@ -1531,18 +1545,9 @@ cxx_eval_builtin_function_call (const constexpr_ctx *ctx, tree t, tree fun, { if (!*non_constant_p && !ctx->quiet) { - /* Do not allow__builtin_unreachable in constexpr function. - The __builtin_unreachable call with BUILTINS_LOCATION - comes from cp_maybe_instrument_return. */ - if (fndecl_built_in_p (fun, BUILT_IN_UNREACHABLE) - && EXPR_LOCATION (t) == BUILTINS_LOCATION) - error ("% call flows off the end of the function"); - else - { - new_call = build_call_array_loc (EXPR_LOCATION (t), TREE_TYPE (t), - CALL_EXPR_FN (t), nargs, args); - error ("%q+E is not a constant expression", new_call); - } + new_call = build_call_array_loc (EXPR_LOCATION (t), TREE_TYPE (t), + CALL_EXPR_FN (t), nargs, args); + error ("%q+E is not a constant expression", new_call); } *non_constant_p = true; return t; diff --git a/gcc/cp/cp-gimplify.cc b/gcc/cp/cp-gimplify.cc index 6f84d15..c05be83 100644 --- a/gcc/cp/cp-gimplify.cc +++ b/gcc/cp/cp-gimplify.cc @@ -1814,7 +1814,7 @@ cp_maybe_instrument_return (tree fndecl) information is provided, while the __builtin_unreachable () below if return sanitization is disabled will just result in hard to understand runtime error without location. */ - && (!optimize + && ((!optimize && !flag_unreachable_traps) || sanitize_flags_p (SANITIZE_UNREACHABLE, fndecl))) return; @@ -1864,10 +1864,7 @@ cp_maybe_instrument_return (tree fndecl) if (sanitize_flags_p (SANITIZE_RETURN, fndecl)) t = ubsan_instrument_return (loc); else - { - tree fndecl = builtin_decl_explicit (BUILT_IN_UNREACHABLE); - t = build_call_expr_loc (BUILTINS_LOCATION, fndecl, 0); - } + t = build_builtin_unreachable (BUILTINS_LOCATION); append_to_statement_list (t, p); } diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index fb50636..e7526c5 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -12939,6 +12939,20 @@ also at @option{-O0} if @option{-fsection-anchors} is explicitly requested. Additionally @option{-fno-toplevel-reorder} implies @option{-fno-section-anchors}. +@item -funreachable-traps +@opindex funreachable-traps +With this option, the compiler turns calls to +@code{__builtin_unreachable} into traps, instead of using them for +optimization. This also affects any such calls implicitly generated +by the compiler. + +This option has the same effect as @option{-fsanitize=unreachable +-fsanitize-trap=unreachable}, but does not affect the values of those +options. If @option{-fsanitize=unreachable} is enabled, that option +takes priority over this one. + +This option is enabled by default at @option{-O0} and @option{-Og}. + @item -fweb @opindex fweb Constructs webs as commonly used for register allocation purposes and assign diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc index f61bc87..a170478 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -5510,9 +5510,8 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace) } else { - tree fndecl = builtin_decl_implicit (BUILT_IN_UNREACHABLE); - gimple *new_stmt = gimple_build_call (fndecl, 0); - gimple_set_location (new_stmt, gimple_location (stmt)); + location_t loc = gimple_location (stmt); + gimple *new_stmt = gimple_build_builtin_unreachable (loc); /* If the call had a SSA name as lhs morph that into an uninitialized value. */ if (lhs && TREE_CODE (lhs) == SSA_NAME) @@ -8396,7 +8395,7 @@ gimple_get_virt_method_for_vtable (HOST_WIDE_INT token, if (!fn || (TREE_CODE (fn) != ADDR_EXPR && TREE_CODE (fn) != FDESC_EXPR) || TREE_CODE (TREE_OPERAND (fn, 0)) != FUNCTION_DECL) - fn = builtin_decl_implicit (BUILT_IN_UNREACHABLE); + fn = builtin_decl_unreachable (); else { fn = TREE_OPERAND (fn, 0); diff --git a/gcc/gimple.cc b/gcc/gimple.cc index b70ab4d..9b15639 100644 --- a/gcc/gimple.cc +++ b/gcc/gimple.cc @@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see #include "stringpool.h" #include "attribs.h" #include "asan.h" +#include "ubsan.h" #include "langhooks.h" #include "attr-fnspec.h" #include "ipa-modref-tree.h" @@ -421,6 +422,18 @@ gimple_build_call_from_tree (tree t, tree fnptrtype) return call; } +/* Build a gcall to __builtin_unreachable as rewritten by + -fsanitize=unreachable. */ + +gcall * +gimple_build_builtin_unreachable (location_t loc) +{ + tree data = NULL_TREE; + tree fn = sanitize_unreachable_fn (&data, loc); + gcall *g = gimple_build_call (fn, data != NULL_TREE, data); + gimple_set_location (g, loc); + return g; +} /* Build a GIMPLE_ASSIGN statement. diff --git a/gcc/gimple.h b/gcc/gimple.h index 870629c..1d15ff9 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1638,6 +1638,7 @@ extern void maybe_remove_unused_call_args (struct function *, gimple *); extern bool gimple_inexpensive_call_p (gcall *); extern bool stmt_can_terminate_bb_p (gimple *); extern location_t gimple_or_expr_nonartificial_location (gimple *, tree); +gcall *gimple_build_builtin_unreachable (location_t); /* Return the disposition for a warning (or all warnings by default) for a statement. */ diff --git a/gcc/ipa-fnsummary.cc b/gcc/ipa-fnsummary.cc index b12e7a1..c956445 100644 --- a/gcc/ipa-fnsummary.cc +++ b/gcc/ipa-fnsummary.cc @@ -250,8 +250,8 @@ static struct cgraph_edge * redirect_to_unreachable (struct cgraph_edge *e) { struct cgraph_node *callee = !e->inline_failed ? e->callee : NULL; - struct cgraph_node *target = cgraph_node::get_create - (builtin_decl_implicit (BUILT_IN_UNREACHABLE)); + struct cgraph_node *target + = cgraph_node::get_create (builtin_decl_unreachable ()); if (e->speculative) e = cgraph_edge::resolve_speculation (e, target->decl); diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc index c037668..e1fc481 100644 --- a/gcc/ipa-prop.cc +++ b/gcc/ipa-prop.cc @@ -3410,7 +3410,7 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target, ie->caller->dump_name ()); } - target = builtin_decl_implicit (BUILT_IN_UNREACHABLE); + target = builtin_decl_unreachable (); callee = cgraph_node::get_create (target); unreachable = true; } @@ -3821,7 +3821,7 @@ ipa_impossible_devirt_target (struct cgraph_edge *ie, tree target) "No devirtualization target in %s\n", ie->caller->dump_name ()); } - tree new_target = builtin_decl_implicit (BUILT_IN_UNREACHABLE); + tree new_target = builtin_decl_unreachable (); cgraph_node::get_create (new_target); return new_target; } diff --git a/gcc/ipa.cc b/gcc/ipa.cc index f53f15f..4d5729f 100644 --- a/gcc/ipa.cc +++ b/gcc/ipa.cc @@ -232,8 +232,7 @@ walk_polymorphic_call_targets (hash_set *reachable_call_targets, if (targets.length () == 1) target = targets[0]; else - target = cgraph_node::get_create - (builtin_decl_implicit (BUILT_IN_UNREACHABLE)); + target = cgraph_node::get_create (builtin_decl_unreachable ()); if (dump_enabled_p ()) { diff --git a/gcc/opts.cc b/gcc/opts.cc index 959d48d..9982974 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -1122,6 +1122,10 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, opts->x_flag_no_inline = 1; } + /* At -O0 or -Og, turn __builtin_unreachable into a trap. */ + if (!opts->x_optimize || opts->x_optimize_debug) + SET_OPTION_IF_UNSET (opts, opts_set, flag_unreachable_traps, true); + /* Pipelining of outer loops is only possible when general pipelining capabilities are requested. */ if (!opts->x_flag_sel_sched_pipelining) diff --git a/gcc/sanopt.cc b/gcc/sanopt.cc index c318763..2b05553 100644 --- a/gcc/sanopt.cc +++ b/gcc/sanopt.cc @@ -942,7 +942,15 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_sanitize; } + virtual bool gate (function *) + { + /* SANITIZE_RETURN is handled in the front-end. When trapping, + SANITIZE_UNREACHABLE is handled by builtin_decl_unreachable. */ + unsigned int mask = SANITIZE_RETURN; + if (flag_sanitize_trap & SANITIZE_UNREACHABLE) + mask |= SANITIZE_UNREACHABLE; + return flag_sanitize & ~mask; + } virtual unsigned int execute (function *); }; // class pass_sanopt diff --git a/gcc/testsuite/g++.dg/ubsan/return-8a.C b/gcc/testsuite/g++.dg/ubsan/return-8a.C new file mode 100644 index 0000000..54f1c7b --- /dev/null +++ b/gcc/testsuite/g++.dg/ubsan/return-8a.C @@ -0,0 +1,16 @@ +// PR c++/104642 + +// At -O0 and -Og we default to -funreachable-traps +// so the below should abort at runtime. + +// { dg-do run } +// { dg-shouldfail { *-*-* } } +// { dg-additional-options "-O0" } + +bool b; + +int f() { + if (b) return 42; +} // { dg-warning "-Wreturn-type" } + +int main() { f(); } diff --git a/gcc/testsuite/g++.dg/ubsan/return-8b.C b/gcc/testsuite/g++.dg/ubsan/return-8b.C new file mode 100644 index 0000000..bdaea60 --- /dev/null +++ b/gcc/testsuite/g++.dg/ubsan/return-8b.C @@ -0,0 +1,17 @@ +// PR c++/104642 + +// With -fsanitize=unreachable we shouldn't optimize away the call to f. + +// { dg-do run } +// { dg-shouldfail { *-*-* } } +// { dg-additional-options "-O -fsanitize=unreachable" } + +bool b; + +int f() { + if (b) return 42; + __builtin_unreachable (); + return 24; +} + +int main() { f(); } diff --git a/gcc/testsuite/g++.dg/ubsan/return-8d.C b/gcc/testsuite/g++.dg/ubsan/return-8d.C new file mode 100644 index 0000000..7eaded0 --- /dev/null +++ b/gcc/testsuite/g++.dg/ubsan/return-8d.C @@ -0,0 +1,16 @@ +// PR c++/104642 + +// At -O0 and -Og we default to -funreachable-traps +// so the below should abort at runtime. + +// { dg-do run } +// { dg-shouldfail { *-*-* } } +// { dg-additional-options "-Og" } + +bool b; + +int f() { + if (b) return 42; +} // { dg-warning "-Wreturn-type" } + +int main() { f(); } diff --git a/gcc/testsuite/g++.dg/ubsan/return-8e.C b/gcc/testsuite/g++.dg/ubsan/return-8e.C new file mode 100644 index 0000000..fba402b --- /dev/null +++ b/gcc/testsuite/g++.dg/ubsan/return-8e.C @@ -0,0 +1,17 @@ +// PR c++/104642 + +// At -O0 and -Og we default to -funreachable-traps +// so the below should abort at runtime. + +// { dg-do run } +// { dg-shouldfail { *-*-* } } +// { dg-additional-options "-O2" } + +bool b; + +__attribute__ ((optimize ("Og"))) +int f() { + if (b) return 42; +} // { dg-warning "-Wreturn-type" } + +int main() { f(); } diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index c67c278..734fddd 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -9503,9 +9503,8 @@ pass_warn_function_return::execute (function *fun) with __builtin_unreachable () call. */ if (optimize && gimple_code (last) == GIMPLE_RETURN) { - tree fndecl = builtin_decl_implicit (BUILT_IN_UNREACHABLE); - gimple *new_stmt = gimple_build_call (fndecl, 0); - gimple_set_location (new_stmt, gimple_location (last)); + location_t loc = gimple_location (last); + gimple *new_stmt = gimple_build_builtin_unreachable (loc); gimple_stmt_iterator gsi = gsi_for_stmt (last); gsi_replace (&gsi, new_stmt, true); remove_edge (e); @@ -9834,7 +9833,7 @@ execute_fixup_cfg (void) { if (stmt && is_gimple_call (stmt)) gimple_call_set_ctrl_altering (stmt, false); - tree fndecl = builtin_decl_implicit (BUILT_IN_UNREACHABLE); + tree fndecl = builtin_decl_unreachable (); stmt = gimple_build_call (fndecl, 0); gimple_stmt_iterator gsi = gsi_last_bb (bb); gsi_insert_after (&gsi, stmt, GSI_NEW_STMT); diff --git a/gcc/tree-ssa-loop-ivcanon.cc b/gcc/tree-ssa-loop-ivcanon.cc index 2ee00a3..6a38b77 100644 --- a/gcc/tree-ssa-loop-ivcanon.cc +++ b/gcc/tree-ssa-loop-ivcanon.cc @@ -505,9 +505,8 @@ remove_exits_and_undefined_stmts (class loop *loop, unsigned int npeeled) && wi::ltu_p (elt->bound, npeeled)) { gimple_stmt_iterator gsi = gsi_for_stmt (elt->stmt); - gcall *stmt = gimple_build_call - (builtin_decl_implicit (BUILT_IN_UNREACHABLE), 0); - gimple_set_location (stmt, gimple_location (elt->stmt)); + location_t loc = gimple_location (elt->stmt); + gcall *stmt = gimple_build_builtin_unreachable (loc); gsi_insert_before (&gsi, stmt, GSI_NEW_STMT); split_block (gimple_bb (stmt), stmt); changed = true; @@ -641,7 +640,7 @@ unloop_loops (bitmap loop_closed_ssa_invalidated, /* Create new basic block for the latch edge destination and wire it in. */ - stmt = gimple_build_call (builtin_decl_implicit (BUILT_IN_UNREACHABLE), 0); + stmt = gimple_build_builtin_unreachable (locus); latch_edge = make_edge (latch, create_basic_block (NULL, NULL, latch), flags); latch_edge->probability = profile_probability::never (); latch_edge->flags |= flags; diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index ed68557..776dccb 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -6807,7 +6807,7 @@ eliminate_dom_walker::eliminate_stmt (basic_block b, gimple_stmt_iterator *gsi) if (targets.length () == 1) fn = targets[0]->decl; else - fn = builtin_decl_implicit (BUILT_IN_UNREACHABLE); + fn = builtin_decl_unreachable (); if (dump_enabled_p ()) { dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, stmt, diff --git a/gcc/tree.cc b/gcc/tree.cc index 2bfb674..84000dd 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -71,6 +71,8 @@ along with GCC; see the file COPYING3. If not see #include "gimple-range.h" #include "gomp-constants.h" #include "dfp.h" +#include "asan.h" +#include "ubsan.h" /* Tree code classes. */ @@ -9649,6 +9651,7 @@ build_common_builtin_nodes (void) } if (!builtin_decl_explicit_p (BUILT_IN_UNREACHABLE) + || !builtin_decl_explicit_p (BUILT_IN_TRAP) || !builtin_decl_explicit_p (BUILT_IN_ABORT)) { ftype = build_function_type (void_type_node, void_list_node); @@ -9662,6 +9665,10 @@ build_common_builtin_nodes (void) local_define_builtin ("__builtin_abort", ftype, BUILT_IN_ABORT, "abort", ECF_LEAF | ECF_NORETURN | ECF_CONST | ECF_COLD); + if (!builtin_decl_explicit_p (BUILT_IN_TRAP)) + local_define_builtin ("__builtin_trap", ftype, BUILT_IN_TRAP, + "__builtin_trap", + ECF_NORETURN | ECF_NOTHROW | ECF_LEAF | ECF_COLD); } if (!builtin_decl_explicit_p (BUILT_IN_MEMCPY) @@ -10779,6 +10786,39 @@ build_alloca_call_expr (tree size, unsigned int align, HOST_WIDE_INT max_size) } } +/* The built-in decl to use to mark code points believed to be unreachable. + Typically __builtin_unreachable, but __builtin_trap if + -fsanitize=unreachable -fsanitize-trap=unreachable. If only + -fsanitize=unreachable, we rely on sanopt to replace calls with the + appropriate ubsan function. When building a call directly, use + {gimple_},build_builtin_unreachable instead. */ + +tree +builtin_decl_unreachable () +{ + enum built_in_function fncode = BUILT_IN_UNREACHABLE; + + if (sanitize_flags_p (SANITIZE_UNREACHABLE) + ? (flag_sanitize_trap & SANITIZE_UNREACHABLE) + : flag_unreachable_traps) + fncode = BUILT_IN_TRAP; + /* For non-trapping sanitize, we will rewrite __builtin_unreachable () later, + in the sanopt pass. */ + + return builtin_decl_explicit (fncode); +} + +/* Build a call to __builtin_unreachable, possibly rewritten by + -fsanitize=unreachable. Use this rather than the above when practical. */ + +tree +build_builtin_unreachable (location_t loc) +{ + tree data = NULL_TREE; + tree fn = sanitize_unreachable_fn (&data, loc); + return build_call_expr_loc (loc, fn, data != NULL_TREE, data); +} + /* Create a new constant string literal of type ELTYPE[SIZE] (or LEN if SIZE == -1) and return a tree node representing char* pointer to it as an ADDR_EXPR (ARRAY_REF (ELTYPE, ...)). When STR is nonnull diff --git a/gcc/tree.h b/gcc/tree.h index 507ea25..6f6ad5a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5858,6 +5858,11 @@ builtin_decl_implicit (enum built_in_function fncode) return builtin_info[uns_fncode].decl; } +/* For BUILTIN_UNREACHABLE, use one of these or + gimple_build_builtin_unreachable instead of one of the above. */ +extern tree builtin_decl_unreachable (); +extern tree build_builtin_unreachable (location_t); + /* Set explicit builtin function nodes and whether it is an implicit function. */ diff --git a/gcc/ubsan.cc b/gcc/ubsan.cc index 3aa25b5..f150268 100644 --- a/gcc/ubsan.cc +++ b/gcc/ubsan.cc @@ -638,27 +638,43 @@ ubsan_create_data (const char *name, int loccnt, const location_t *ploc, ...) return var; } -/* Instrument the __builtin_unreachable call. We just call the libubsan - routine instead. */ +/* Shared between *build_builtin_unreachable. */ -bool -ubsan_instrument_unreachable (gimple_stmt_iterator *gsi) +tree +sanitize_unreachable_fn (tree *data, location_t loc) { - gimple *g; - location_t loc = gimple_location (gsi_stmt (*gsi)); - - if (flag_sanitize_trap & SANITIZE_UNREACHABLE) - g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TRAP), 0); + tree fn = NULL_TREE; + bool san = sanitize_flags_p (SANITIZE_UNREACHABLE); + if (san + ? (flag_sanitize_trap & SANITIZE_UNREACHABLE) + : flag_unreachable_traps) + { + fn = builtin_decl_explicit (BUILT_IN_TRAP); + *data = NULL_TREE; + } + else if (san) + { + fn = builtin_decl_explicit (BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE); + *data = ubsan_create_data ("__ubsan_unreachable_data", 1, &loc, + NULL_TREE, NULL_TREE); + *data = build_fold_addr_expr_loc (loc, *data); + } else { - tree data = ubsan_create_data ("__ubsan_unreachable_data", 1, &loc, - NULL_TREE, NULL_TREE); - data = build_fold_addr_expr_loc (loc, data); - tree fn - = builtin_decl_explicit (BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE); - g = gimple_build_call (fn, 1, data); + fn = builtin_decl_explicit (BUILT_IN_UNREACHABLE); + *data = NULL_TREE; } - gimple_set_location (g, loc); + return fn; +} + +/* Rewrite a gcall to __builtin_unreachable for -fsanitize=unreachable. Called + by the sanopt pass. */ + +bool +ubsan_instrument_unreachable (gimple_stmt_iterator *gsi) +{ + location_t loc = gimple_location (gsi_stmt (*gsi)); + gimple *g = gimple_build_builtin_unreachable (loc); gsi_replace (gsi, g, false); return false; } diff --git a/gcc/ubsan.h b/gcc/ubsan.h index 17c5254..71a40a3 100644 --- a/gcc/ubsan.h +++ b/gcc/ubsan.h @@ -65,5 +65,6 @@ extern tree ubsan_build_overflow_builtin (tree_code, location_t, tree, tree, tree, tree *); extern tree ubsan_instrument_float_cast (location_t, tree, tree); extern tree ubsan_get_source_location_type (void); +extern tree sanitize_unreachable_fn (tree *data, location_t loc); #endif /* GCC_UBSAN_H */ -- cgit v1.1 From d844478ab47a16c8ae65f253fd1cdc685c7951fc Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 22 Jun 2022 07:51:44 -0700 Subject: c++: Remove ifdefed code The only reason I chose to use DECL_UID on this hash table was to make it stable against ASLR and perturbations due to other allocations. It's not required for correctness, as the comment mentions the equality fn uses pointer identity. gcc/cp/ * module.cc (struct duplicate_hash): Remove. (duplicate_hash_map): Adjust. --- gcc/cp/module.cc | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index b3fbd46..d735d7e 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -2829,24 +2829,10 @@ struct merge_key { } }; -struct duplicate_hash : nodel_ptr_hash -{ -#if 0 - /* This breaks variadic bases in the xtreme_header tests. Since ::equal is - the default pointer_hash::equal, let's use the default hash as well. */ - inline static hashval_t hash (value_type decl) - { - if (TREE_CODE (decl) == TREE_BINFO) - decl = TYPE_NAME (BINFO_TYPE (decl)); - return hashval_t (DECL_UID (decl)); - } -#endif -}; - /* Hashmap of merged duplicates. Usually decls, but can contain BINFOs. */ typedef hash_map > + simple_hashmap_traits,uintptr_t> > duplicate_hash_map; /* Tree stream reader. Note that reading a stream doesn't mark the -- cgit v1.1 From 445d8deffb6c9bc1f4a5ed0a8e02d7f31d3caec7 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 22 Jun 2022 17:03:33 +0200 Subject: d: Merge upstream dmd 6203135dc, druntime e150cca1, phobos a4a18d21c. D front-end changes: - Input parameters can now be applied on extern(C++) functions to bind to `const &' when the `-fpreview=in' flag is in effect. D runtime changes: - Run-time flag `--DRT-oncycle=deprecate' has been removed. Phobos changes: - Removed std.experimental.logger's capability to set the minimal LogLevel at compile time. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 6203135dc. * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoStructDeclaration *)): Update for new front-end interface. (SpeculativeTypeVisitor::visit (TypeStruct *)): Likewise. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime e150cca1. * src/MERGE: Merge upstream phobos a4a18d21c. * testsuite/libphobos.cycles/cycles.exp (cycle_test_list): Update expected result of deprecate test. --- gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/aggregate.h | 36 ++++++++++------ gcc/d/dmd/clone.d | 9 +++- gcc/d/dmd/denum.d | 14 ++++-- gcc/d/dmd/dstruct.d | 33 ++++++++------ gcc/d/dmd/dsymbolsem.d | 29 ++++++++++--- gcc/d/dmd/enum.h | 13 ++++-- gcc/d/dmd/escape.d | 40 ++++++++++++----- gcc/d/dmd/expression.d | 2 +- gcc/d/dmd/func.d | 21 ++++++--- gcc/d/dmd/parse.d | 4 +- gcc/d/dmd/statementsem.d | 25 ++++++----- gcc/d/dmd/typesem.d | 31 +++++++++++--- gcc/d/typeinfo.cc | 4 +- gcc/testsuite/gdc.test/compilable/b16360.d | 39 ----------------- gcc/testsuite/gdc.test/compilable/inliner.d | 21 +++++++++ gcc/testsuite/gdc.test/compilable/inliner2.d | 27 ++++++++++++ .../gdc.test/fail_compilation/fail17927.d | 8 ++-- .../gdc.test/fail_compilation/fail20108.d | 2 +- .../gdc.test/fail_compilation/fail_scope.d | 8 ++-- gcc/testsuite/gdc.test/fail_compilation/ice12574.d | 2 +- .../gdc.test/fail_compilation/previewin.d | 2 +- .../gdc.test/fail_compilation/previewin2.d | 18 ++++++++ gcc/testsuite/gdc.test/fail_compilation/retscope.d | 12 +++--- .../gdc.test/fail_compilation/retscope2.d | 4 +- .../gdc.test/fail_compilation/retscope6.d | 12 +++--- .../gdc.test/fail_compilation/test14238.d | 2 +- .../gdc.test/fail_compilation/test17423.d | 2 +- .../gdc.test/fail_compilation/test17450.d | 4 +- .../gdc.test/fail_compilation/test20245.d | 8 ++-- .../gdc.test/fail_compilation/test22818.d | 2 +- .../gdc.test/fail_compilation/typeerrors.d | 2 +- .../gdc.test/fail_compilation/udaparams.d | 4 +- gcc/testsuite/gdc.test/fail_compilation/udatypes.d | 8 ++++ gcc/testsuite/gdc.test/runnable/ice10086b.d | 50 ++++++++++++++++++++++ gcc/testsuite/gdc.test/runnable/inline3.d | 44 +++++++++++++++++++ gcc/testsuite/gdc.test/runnable/staticforeach.d | 29 +++++++++++++ gcc/testsuite/gdc.test/runnable_cxx/cppa.d | 20 ++++++++- .../gdc.test/runnable_cxx/extra-files/cppb.cpp | 30 ++++--------- 39 files changed, 442 insertions(+), 181 deletions(-) delete mode 100644 gcc/testsuite/gdc.test/compilable/b16360.d create mode 100644 gcc/testsuite/gdc.test/compilable/inliner.d create mode 100644 gcc/testsuite/gdc.test/compilable/inliner2.d create mode 100644 gcc/testsuite/gdc.test/fail_compilation/previewin2.d create mode 100644 gcc/testsuite/gdc.test/fail_compilation/udatypes.d create mode 100644 gcc/testsuite/gdc.test/runnable/inline3.d (limited to 'gcc') diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index d39658a..d1e3dc1 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -821ed393d428c7db5a48623e77d43f5647d5c6a2 +6203135dcf0112d3211add0cbfb22fecc5df1af4 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/aggregate.h b/gcc/d/dmd/aggregate.h index f27ca07..d91e35e 100644 --- a/gcc/d/dmd/aggregate.h +++ b/gcc/d/dmd/aggregate.h @@ -159,17 +159,6 @@ struct StructFlags class StructDeclaration : public AggregateDeclaration { public: - bool zeroInit; // !=0 if initialize with 0 fill - bool hasIdentityAssign; // true if has identity opAssign - bool hasBlitAssign; // true if opAssign is a blit - bool hasIdentityEquals; // true if has identity opEquals - bool hasNoFields; // has no fields - bool hasCopyCtor; // copy constructor - // Even if struct is defined as non-root symbol, some built-in operations - // (e.g. TypeidExp, NewExp, ArrayLiteralExp, etc) request its TypeInfo. - // For those, today TypeInfo_Struct is generated in COMDAT. - bool requestTypeInfo; - FuncDeclarations postblits; // Array of postblit functions FuncDeclaration *postblit; // aggregate postblit @@ -179,18 +168,37 @@ public: static FuncDeclaration *xerreq; // object.xopEquals static FuncDeclaration *xerrcmp; // object.xopCmp - structalign_t alignment; // alignment applied outside of the struct - ThreeState ispod; // if struct is POD - // ABI-specific type(s) if the struct can be passed in registers TypeTuple *argTypes; + structalign_t alignment; // alignment applied outside of the struct + ThreeState ispod; // if struct is POD +private: + uint8_t bitFields; +public: static StructDeclaration *create(const Loc &loc, Identifier *id, bool inObject); StructDeclaration *syntaxCopy(Dsymbol *s) override; Dsymbol *search(const Loc &loc, Identifier *ident, int flags = SearchLocalsOnly) override final; const char *kind() const override; void finalizeSize() override final; bool isPOD(); + bool zeroInit() const; // !=0 if initialize with 0 fill + bool zeroInit(bool v); + bool hasIdentityAssign() const; // true if has identity opAssign + bool hasIdentityAssign(bool v); + bool hasBlitAssign() const; // true if opAssign is a blit + bool hasBlitAssign(bool v); + bool hasIdentityEquals() const; // true if has identity opEquals + bool hasIdentityEquals(bool v); + bool hasNoFields() const; // has no fields + bool hasNoFields(bool v); + bool hasCopyCtor() const; // copy constructor + bool hasCopyCtor(bool v); + // Even if struct is defined as non-root symbol, some built-in operations + // (e.g. TypeidExp, NewExp, ArrayLiteralExp, etc) request its TypeInfo. + // For those, today TypeInfo_Struct is generated in COMDAT. + bool requestTypeInfo() const; + bool requestTypeInfo(bool v); StructDeclaration *isStructDeclaration() override final { return this; } void accept(Visitor *v) override { v->visit(this); } diff --git a/gcc/d/dmd/clone.d b/gcc/d/dmd/clone.d index 75a16bd..cf4ccbb 100644 --- a/gcc/d/dmd/clone.d +++ b/gcc/d/dmd/clone.d @@ -404,7 +404,12 @@ bool needOpEquals(StructDeclaration sd) { //printf("StructDeclaration::needOpEquals() %s\n", sd.toChars()); if (sd.isUnionDeclaration()) - goto Ldontneed; + { + /* If a union has only one field, treat it like a struct + */ + if (sd.fields.length != 1) + goto Ldontneed; + } if (sd.hasIdentityEquals) goto Lneed; /* If any of the fields has an opEquals, then we @@ -421,7 +426,7 @@ bool needOpEquals(StructDeclaration sd) if (tvbase.ty == Tstruct) { TypeStruct ts = cast(TypeStruct)tvbase; - if (ts.sym.isUnionDeclaration()) + if (ts.sym.isUnionDeclaration() && ts.sym.fields.length != 1) continue; if (needOpEquals(ts.sym)) goto Lneed; diff --git a/gcc/d/dmd/denum.d b/gcc/d/dmd/denum.d index aba290b..ef322f1 100644 --- a/gcc/d/dmd/denum.d +++ b/gcc/d/dmd/denum.d @@ -54,9 +54,17 @@ extern (C++) final class EnumDeclaration : ScopeDsymbol Expression maxval; Expression minval; Expression defaultval; // default initializer - bool isdeprecated; - bool added; - int inuse; + + // `bool` fields that are compacted into bit fields in a string mixin + private extern (D) static struct BitFields + { + bool isdeprecated; + bool added; + bool inuse; + } + + import dmd.common.bitfields : generateBitFields; + mixin(generateBitFields!(BitFields, ubyte)); extern (D) this(const ref Loc loc, Identifier ident, Type memtype) { diff --git a/gcc/d/dmd/dstruct.d b/gcc/d/dmd/dstruct.d index de5f145..4126a8a 100644 --- a/gcc/d/dmd/dstruct.d +++ b/gcc/d/dmd/dstruct.d @@ -192,17 +192,6 @@ enum StructFlags : int */ extern (C++) class StructDeclaration : AggregateDeclaration { - bool zeroInit; // !=0 if initialize with 0 fill - bool hasIdentityAssign; // true if has identity opAssign - bool hasBlitAssign; // true if opAssign is a blit - bool hasIdentityEquals; // true if has identity opEquals - bool hasNoFields; // has no fields - bool hasCopyCtor; // copy constructor - // Even if struct is defined as non-root symbol, some built-in operations - // (e.g. TypeidExp, NewExp, ArrayLiteralExp, etc) request its TypeInfo. - // For those, today TypeInfo_Struct is generated in COMDAT. - bool requestTypeInfo; - FuncDeclarations postblits; // Array of postblit functions FuncDeclaration postblit; // aggregate postblit @@ -212,11 +201,29 @@ extern (C++) class StructDeclaration : AggregateDeclaration extern (C++) __gshared FuncDeclaration xerreq; // object.xopEquals extern (C++) __gshared FuncDeclaration xerrcmp; // object.xopCmp + // ABI-specific type(s) if the struct can be passed in registers + TypeTuple argTypes; + structalign_t alignment; // alignment applied outside of the struct ThreeState ispod; // if struct is POD - // ABI-specific type(s) if the struct can be passed in registers - TypeTuple argTypes; + // `bool` fields that are compacted into bit fields in a string mixin + private extern (D) static struct BitFields + { + bool zeroInit; // !=0 if initialize with 0 fill + bool hasIdentityAssign; // true if has identity opAssign + bool hasBlitAssign; // true if opAssign is a blit + bool hasIdentityEquals; // true if has identity opEquals + bool hasNoFields; // has no fields + bool hasCopyCtor; // copy constructor + // Even if struct is defined as non-root symbol, some built-in operations + // (e.g. TypeidExp, NewExp, ArrayLiteralExp, etc) request its TypeInfo. + // For those, today TypeInfo_Struct is generated in COMDAT. + bool requestTypeInfo; + } + + import dmd.common.bitfields : generateBitFields; + mixin(generateBitFields!(BitFields, ubyte)); extern (D) this(const ref Loc loc, Identifier id, bool inObject) { diff --git a/gcc/d/dmd/dsymbolsem.d b/gcc/d/dmd/dsymbolsem.d index 6dbc129..7fd4781 100644 --- a/gcc/d/dmd/dsymbolsem.d +++ b/gcc/d/dmd/dsymbolsem.d @@ -49,6 +49,7 @@ import dmd.identifier; import dmd.importc; import dmd.init; import dmd.initsem; +import dmd.intrange; import dmd.hdrgen; import dmd.mtype; import dmd.mustuse; @@ -2177,6 +2178,13 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor assert(ed.memtype); int nextValue = 0; // C11 6.7.2.2-3 first member value defaults to 0 + // C11 6.7.2.2-2 value must be representable as an int. + // The sizemask represents all values that int will fit into, + // from 0..uint.max. We want to cover int.min..uint.max. + const mask = Type.tint32.sizemask(); + IntRange ir = IntRange(SignExtendedNumber(~(mask >> 1), true), + SignExtendedNumber(mask)); + void emSemantic(EnumMember em, ref int nextValue) { static void errorReturn(EnumMember em) @@ -2206,21 +2214,32 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor em.error("enum member must be an integral constant expression, not `%s` of type `%s`", e.toChars(), e.type.toChars()); return errorReturn(em); } - const sinteger_t v = ie.toInteger(); - if (v < int.min || v > uint.max) + if (!ir.contains(getIntRange(ie))) { // C11 6.7.2.2-2 em.error("enum member value `%s` does not fit in an `int`", e.toChars()); return errorReturn(em); } - em.value = new IntegerExp(em.loc, cast(int)v, Type.tint32); - nextValue = cast(int)v; + nextValue = cast(int)ie.toInteger(); + em.value = new IntegerExp(em.loc, nextValue, Type.tint32); } else { + // C11 6.7.2.2-3 add 1 to value of previous enumeration constant + bool first = (em == (*em.ed.members)[0]); + if (!first) + { + import core.checkedint : adds; + bool overflow; + nextValue = adds(nextValue, 1, overflow); + if (overflow) + { + em.error("initialization with `%d+1` causes overflow for type `int`", nextValue - 1); + return errorReturn(em); + } + } em.value = new IntegerExp(em.loc, nextValue, Type.tint32); } - ++nextValue; // C11 6.7.2.2-3 add 1 to value of previous enumeration constant em.semanticRun = PASS.semanticdone; } diff --git a/gcc/d/dmd/enum.h b/gcc/d/dmd/enum.h index 9ec1300..723cebc 100644 --- a/gcc/d/dmd/enum.h +++ b/gcc/d/dmd/enum.h @@ -35,10 +35,15 @@ public: Expression *maxval; Expression *minval; Expression *defaultval; // default initializer - - bool isdeprecated; - bool added; - int inuse; +private: + uint8_t bitFields; +public: + bool isdeprecated() const; + bool isdeprecated(bool v); + bool added() const; + bool added(bool v); + bool inuse() const; + bool inuse(bool v); EnumDeclaration *syntaxCopy(Dsymbol *s) override; void addMember(Scope *sc, ScopeDsymbol *sds) override; diff --git a/gcc/d/dmd/escape.d b/gcc/d/dmd/escape.d index 97a6552..0646f57 100644 --- a/gcc/d/dmd/escape.d +++ b/gcc/d/dmd/escape.d @@ -328,12 +328,12 @@ bool checkParamArgumentEscape(Scope* sc, FuncDeclaration fdc, Parameter par, STC else if (par) { result |= sc.setUnsafeDIP1000(gag, arg.loc, - desc ~ " `%s` assigned to non-scope parameter `%s`", v, par); + desc ~ " `%s` assigned to non-scope parameter `%s` calling `%s`", v, par, fdc); } else { result |= sc.setUnsafeDIP1000(gag, arg.loc, - desc ~ " `%s` assigned to non-scope parameter `this`", v); + desc ~ " `%s` assigned to non-scope parameter `this` calling `%s`", v, fdc); } } @@ -1230,9 +1230,24 @@ private bool checkReturnEscapeImpl(Scope* sc, Expression e, bool refs, bool gag) !(!refs && sc.func.isFuncDeclaration().getLevel(pfunc, sc.intypeof) > 0) ) { - // https://issues.dlang.org/show_bug.cgi?id=17029 - result |= sc.setUnsafeDIP1000(gag, e.loc, "scope variable `%s` may not be returned", v); - continue; + if (v.isParameter() && !(v.storage_class & STC.return_)) + { + // https://issues.dlang.org/show_bug.cgi?id=23191 + if (!gag) + { + previewErrorFunc(sc.isDeprecated(), global.params.useDIP1000)(e.loc, + "scope parameter `%s` may not be returned", v.toChars() + ); + result = true; + continue; + } + } + else + { + // https://issues.dlang.org/show_bug.cgi?id=17029 + result |= sc.setUnsafeDIP1000(gag, e.loc, "scope variable `%s` may not be returned", v); + continue; + } } } else if (v.storage_class & STC.variadic && p == sc.func) @@ -2492,9 +2507,11 @@ private void addMaybe(VarDeclaration va, VarDeclaration v) * fmt = printf-style format string * arg0 = (optional) argument for first %s format specifier * arg1 = (optional) argument for second %s format specifier + * arg2 = (optional) argument for third %s format specifier * Returns: whether an actual safe error (not deprecation) occured */ -private bool setUnsafePreview(Scope* sc, FeatureState fs, bool gag, Loc loc, const(char)* msg, RootObject arg0 = null, RootObject arg1 = null) +private bool setUnsafePreview(Scope* sc, FeatureState fs, bool gag, Loc loc, const(char)* msg, + RootObject arg0 = null, RootObject arg1 = null, RootObject arg2 = null) { if (fs == FeatureState.disabled) { @@ -2502,7 +2519,7 @@ private bool setUnsafePreview(Scope* sc, FeatureState fs, bool gag, Loc loc, con } else if (fs == FeatureState.enabled) { - return sc.setUnsafe(gag, loc, msg, arg0, arg1); + return sc.setUnsafe(gag, loc, msg, arg0, arg1, arg2); } else { @@ -2510,22 +2527,23 @@ private bool setUnsafePreview(Scope* sc, FeatureState fs, bool gag, Loc loc, con { if (!gag) previewErrorFunc(sc.isDeprecated(), fs)( - loc, msg, arg0 ? arg0.toChars() : "", arg1 ? arg1.toChars() : "" + loc, msg, arg0 ? arg0.toChars() : "", arg1 ? arg1.toChars() : "", arg2 ? arg2.toChars() : "" ); } else if (!sc.func.safetyViolation) { import dmd.func : AttributeViolation; - sc.func.safetyViolation = new AttributeViolation(loc, msg, arg0, arg1); + sc.func.safetyViolation = new AttributeViolation(loc, msg, arg0, arg1, arg2); } return false; } } // `setUnsafePreview` partially evaluated for dip1000 -private bool setUnsafeDIP1000(Scope* sc, bool gag, Loc loc, const(char)* msg, RootObject arg0 = null, RootObject arg1 = null) +private bool setUnsafeDIP1000(Scope* sc, bool gag, Loc loc, const(char)* msg, + RootObject arg0 = null, RootObject arg1 = null, RootObject arg2 = null) { - return setUnsafePreview(sc, global.params.useDIP1000, gag, loc, msg, arg0, arg1); + return setUnsafePreview(sc, global.params.useDIP1000, gag, loc, msg, arg0, arg1, arg2); } /*************************************** diff --git a/gcc/d/dmd/expression.d b/gcc/d/dmd/expression.d index 4d17105..ceecf4b 100644 --- a/gcc/d/dmd/expression.d +++ b/gcc/d/dmd/expression.d @@ -1438,7 +1438,7 @@ extern (C++) abstract class Expression : ASTNode else if (!sc.func.safetyViolation) { import dmd.func : AttributeViolation; - sc.func.safetyViolation = new AttributeViolation(this.loc, null, f, null); + sc.func.safetyViolation = new AttributeViolation(this.loc, null, f, null, null); } } return false; diff --git a/gcc/d/dmd/func.d b/gcc/d/dmd/func.d index d429259..83bc2ea 100644 --- a/gcc/d/dmd/func.d +++ b/gcc/d/dmd/func.d @@ -1476,17 +1476,19 @@ extern (C++) class FuncDeclaration : Declaration * fmt = printf-style format string * arg0 = (optional) argument for first %s format specifier * arg1 = (optional) argument for second %s format specifier + * arg2 = (optional) argument for third %s format specifier * Returns: whether there's a safe error */ extern (D) final bool setUnsafe( - bool gag = false, Loc loc = Loc.init, const(char)* fmt = null, RootObject arg0 = null, RootObject arg1 = null) + bool gag = false, Loc loc = Loc.init, const(char)* fmt = null, + RootObject arg0 = null, RootObject arg1 = null, RootObject arg2 = null) { if (flags & FUNCFLAG.safetyInprocess) { flags &= ~FUNCFLAG.safetyInprocess; type.toTypeFunction().trust = TRUST.system; if (fmt || arg0) - safetyViolation = new AttributeViolation(loc, fmt, arg0, arg1); + safetyViolation = new AttributeViolation(loc, fmt, arg0, arg1, arg2); if (fes) fes.func.setUnsafe(); @@ -1494,7 +1496,7 @@ extern (C++) class FuncDeclaration : Declaration else if (isSafe()) { if (!gag && fmt) - .error(loc, fmt, arg0 ? arg0.toChars() : "", arg1 ? arg1.toChars() : ""); + .error(loc, fmt, arg0 ? arg0.toChars() : "", arg1 ? arg1.toChars() : "", arg2 ? arg2.toChars() : ""); return true; } @@ -4370,10 +4372,12 @@ extern (C++) final class NewDeclaration : FuncDeclaration * fmt = printf-style format string * arg0 = (optional) argument for first %s format specifier * arg1 = (optional) argument for second %s format specifier + * arg2 = (optional) argument for third %s format specifier * Returns: whether there's a safe error */ bool setUnsafe(Scope* sc, - bool gag = false, Loc loc = Loc.init, const(char)* fmt = null, RootObject arg0 = null, RootObject arg1 = null) + bool gag = false, Loc loc = Loc.init, const(char)* fmt = null, + RootObject arg0 = null, RootObject arg1 = null, RootObject arg2 = null) { // TODO: // For @system variables, unsafe initializers at global scope should mark @@ -4394,13 +4398,13 @@ bool setUnsafe(Scope* sc, { // Message wil be gagged, but still call error() to update global.errors and for // -verrors=spec - .error(loc, fmt, arg0 ? arg0.toChars() : "", arg1 ? arg1.toChars() : ""); + .error(loc, fmt, arg0 ? arg0.toChars() : "", arg1 ? arg1.toChars() : "", arg2 ? arg2.toChars() : ""); return true; } return false; } - return sc.func.setUnsafe(gag, loc, fmt, arg0, arg1); + return sc.func.setUnsafe(gag, loc, fmt, arg0, arg1, arg2); } /// Stores a reason why a function failed to infer a function attribute like `@safe` or `pure` @@ -4421,6 +4425,8 @@ struct AttributeViolation RootObject arg0 = null; /// ditto RootObject arg1 = null; + /// ditto + RootObject arg2 = null; } /// Print the reason why `fd` was inferred `@system` as a supplemental error @@ -4438,7 +4444,8 @@ void errorSupplementalInferredSafety(FuncDeclaration fd, int maxDepth, bool depr errorFunc(s.loc, deprecation ? "which would be `@system` because of:" : "which was inferred `@system` because of:"); - errorFunc(s.loc, s.fmtStr, s.arg0 ? s.arg0.toChars() : "", s.arg1 ? s.arg1.toChars() : ""); + errorFunc(s.loc, s.fmtStr, + s.arg0 ? s.arg0.toChars() : "", s.arg1 ? s.arg1.toChars() : "", s.arg2 ? s.arg2.toChars() : ""); } else if (FuncDeclaration fd2 = cast(FuncDeclaration) s.arg0) { diff --git a/gcc/d/dmd/parse.d b/gcc/d/dmd/parse.d index 89f8ae3..eb5e694 100644 --- a/gcc/d/dmd/parse.d +++ b/gcc/d/dmd/parse.d @@ -4862,7 +4862,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer if (udas !is null) { if (storage_class != 0) - error("cannot put a storage-class in an alias declaration."); + error("cannot put a storage-class in an `alias` declaration."); // parseAttributes shouldn't have set these variables assert(link == linkage && !setAlignment && ealign is null); auto tpl_ = cast(AST.TemplateDeclaration) s; @@ -4887,7 +4887,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer parseAttributes(); // type if (udas) - error("user-defined attributes not allowed for alias declarations"); + error("user-defined attributes not allowed for `alias` declarations"); auto t = parseType(); diff --git a/gcc/d/dmd/statementsem.d b/gcc/d/dmd/statementsem.d index 06e28a4..f23b988 100644 --- a/gcc/d/dmd/statementsem.d +++ b/gcc/d/dmd/statementsem.d @@ -4401,19 +4401,21 @@ public auto makeTupleForeach(Scope* sc, bool isStatic, bool isDecl, ForeachState Dsymbol ds = null; if (!(storageClass & STC.manifest)) { - if ((isStatic || tb.ty == Tfunction || storageClass&STC.alias_) && e.op == EXP.variable) - ds = (cast(VarExp)e).var; - else if (e.op == EXP.template_) - ds = (cast(TemplateExp)e).td; - else if (e.op == EXP.scope_) - ds = (cast(ScopeExp)e).sds; - else if (e.op == EXP.function_) + if (isStatic || tb.ty == Tfunction || storageClass & STC.alias_) { - auto fe = cast(FuncExp)e; - ds = fe.td ? cast(Dsymbol)fe.td : fe.fd; + if (auto ve = e.isVarExp()) + ds = ve.var; + else if (auto dve = e.isDotVarExp()) + ds = dve.var; } - else if (e.op == EXP.overloadSet) - ds = (cast(OverExp)e).vars; + if (auto te = e.isTemplateExp()) + ds = te.td; + else if (auto se = e.isScopeExp()) + ds = se.sds; + else if (auto fe = e.isFuncExp()) + ds = fe.td ? fe.td : fe.fd; + else if (auto oe = e.isOverExp()) + ds = oe.vars; } else if (storageClass & STC.alias_) { @@ -4530,6 +4532,7 @@ public auto makeTupleForeach(Scope* sc, bool isStatic, bool isDecl, ForeachState auto field = Identifier.idPool(StaticForeach.tupleFieldName.ptr,StaticForeach.tupleFieldName.length); Expression access = new DotIdExp(loc, e, field); access = expressionSemantic(access, sc); + access = access.optimize(WANTvalue); if (!tuple) return returnEarly(); //printf("%s\n",tuple.toChars()); foreach (l; 0 .. dim) diff --git a/gcc/d/dmd/typesem.d b/gcc/d/dmd/typesem.d index 31ecbd2..8cacdb1 100644 --- a/gcc/d/dmd/typesem.d +++ b/gcc/d/dmd/typesem.d @@ -119,7 +119,7 @@ private void resolveTupleIndex(const ref Loc loc, Scope* sc, Dsymbol s, out Expr const(uinteger_t) d = eindex.toUInteger(); if (d >= tup.objects.dim) { - .error(loc, "tuple index `%llu` exceeds length %llu", d, cast(ulong)tup.objects.dim); + .error(loc, "tuple index `%llu` out of bounds `[0 .. %llu]`", d, cast(ulong)tup.objects.dim); pt = Type.terror; return; } @@ -554,7 +554,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc) uinteger_t d = mtype.dim.toUInteger(); if (d >= tup.objects.dim) { - .error(loc, "tuple index %llu exceeds %llu", cast(ulong)d, cast(ulong)tup.objects.dim); + .error(loc, "tuple index `%llu` out of bounds `[0 .. %llu]`", cast(ulong)d, cast(ulong)tup.objects.dim); return error(); } @@ -649,7 +649,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc) uinteger_t d = mtype.dim.toUInteger(); if (d >= tt.arguments.dim) { - .error(loc, "tuple index %llu exceeds %llu", cast(ulong)d, cast(ulong)tt.arguments.dim); + .error(loc, "tuple index `%llu` out of bounds `[0 .. %llu]`", cast(ulong)d, cast(ulong)tt.arguments.dim); return error(); } Type telem = (*tt.arguments)[cast(size_t)d].type; @@ -1224,6 +1224,25 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc) continue; } + // -preview=in: Always add `ref` when used with `extern(C++)` functions + // Done here to allow passing opaque types with `in` + if (global.params.previewIn && (fparam.storageClass & (STC.in_ | STC.ref_)) == STC.in_) + { + switch (tf.linkage) + { + case LINK.cpp: + fparam.storageClass |= STC.ref_; + break; + case LINK.default_, LINK.d: + break; + default: + .error(loc, "cannot use `in` parameters with `extern(%s)` functions", + linkageToChars(tf.linkage)); + .errorSupplemental(loc, "parameter `%s` declared as `in` here", fparam.toChars()); + break; + } + } + if (t.ty == Tfunction) { .error(loc, "cannot have parameter of function type `%s`", fparam.type.toChars()); @@ -2572,7 +2591,7 @@ void resolve(Type mt, const ref Loc loc, Scope* sc, out Expression pe, out Type const d = mt.dim.toUInteger(); if (d >= tup.objects.dim) { - error(loc, "tuple index `%llu` exceeds length %llu", d, cast(ulong) tup.objects.dim); + error(loc, "tuple index `%llu` out of bounds `[0 .. %llu]`", d, cast(ulong) tup.objects.dim); return returnError(); } @@ -4891,9 +4910,9 @@ Expression getMaxMinValue(EnumDeclaration ed, const ref Loc loc, Identifier id) */ Expression e = em.value; Expression ec = new CmpExp(id == Id.max ? EXP.greaterThan : EXP.lessThan, em.loc, e, *pval); - ed.inuse++; + ed.inuse = true; ec = ec.expressionSemantic(em._scope); - ed.inuse--; + ed.inuse = false; ec = ec.ctfeInterpret(); if (ec.op == EXP.error) { diff --git a/gcc/d/typeinfo.cc b/gcc/d/typeinfo.cc index 1f8afdd..d1f0d59 100644 --- a/gcc/d/typeinfo.cc +++ b/gcc/d/typeinfo.cc @@ -1050,7 +1050,7 @@ public: this->layout_string (ti->deco); /* Default initializer for struct. */ - tree ptr = (sd->zeroInit) ? null_pointer_node + tree ptr = (sd->zeroInit ()) ? null_pointer_node : build_address (aggregate_initializer_decl (sd)); this->layout_field (d_array_value (array_type_node, size_int (sd->structsize), ptr)); @@ -1771,7 +1771,7 @@ public: { if (!ti->needsCodegen ()) { - if (ti->minst || sd->requestTypeInfo) + if (ti->minst || sd->requestTypeInfo ()) return; this->result_ |= true; diff --git a/gcc/testsuite/gdc.test/compilable/b16360.d b/gcc/testsuite/gdc.test/compilable/b16360.d deleted file mode 100644 index 1141579..0000000 --- a/gcc/testsuite/gdc.test/compilable/b16360.d +++ /dev/null @@ -1,39 +0,0 @@ -/* -REQUIRED_ARGS: -inline -wi - -TEST_OUTPUT: ---- -compilable/b16360.d(12): Warning: cannot inline function `b16360.foo` -compilable/b16360.d(25): Warning: cannot inline function `b16360.bar` ---- -*/ - -pragma(inline, true) -auto foo() -{ - static struct U - { - int a = 42; - float b; - ~this(){} // __dtor: inline not allowed - } - U u; - return u.a; -} - -pragma(inline, true) -auto bar() -{ - class U // class : inline not allowed - { - int a = 42; - float b; - } - return (new U).a; -} - -void main() -{ - auto f = foo(); - auto b = bar(); -} diff --git a/gcc/testsuite/gdc.test/compilable/inliner.d b/gcc/testsuite/gdc.test/compilable/inliner.d new file mode 100644 index 0000000..1273809 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/inliner.d @@ -0,0 +1,21 @@ +// REQUIRED_ARGS: -inline -O -unittest + +struct Cent +{ + ulong lo; + ulong hi; +} + +Cent add(Cent, Cent); + +Cent sub(Cent c1, Cent c2) +{ + return add(c1, c2); +} + +Cent udivmod(Cent c3, Cent c4) +{ + Cent quotient; + Cent rem = sub(c3, c4); + return quotient; +} diff --git a/gcc/testsuite/gdc.test/compilable/inliner2.d b/gcc/testsuite/gdc.test/compilable/inliner2.d new file mode 100644 index 0000000..7ffa5cc --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/inliner2.d @@ -0,0 +1,27 @@ +// REQUIRED_ARGS: -O -inline + +struct Cent +{ + ulong lo; // low 64 bits + ulong hi; // high 64 bits +} + +pure bool tst(Cent c) +{ + return c.hi || c.lo; +} + +pure Cent dec(Cent c); +pure Cent shl(Cent c, uint n); + +pure Cent udivmod(Cent c1, Cent c2, out Cent modulus) +{ + ulong v1 = shl(c2, 3).hi; + + Cent quotient; + + if (tst(quotient)) + quotient = dec(quotient); + + return quotient; +} diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail17927.d b/gcc/testsuite/gdc.test/fail_compilation/fail17927.d index 410f307..cf610ff 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail17927.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail17927.d @@ -1,10 +1,10 @@ /* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- -fail_compilation/fail17927.d(13): Error: scope variable `this` may not be returned -fail_compilation/fail17927.d(15): Error: scope variable `this` may not be returned -fail_compilation/fail17927.d(21): Error: scope variable `ptr` may not be returned -fail_compilation/fail17927.d(23): Error: scope variable `ptr` may not be returned +fail_compilation/fail17927.d(13): Error: scope parameter `this` may not be returned +fail_compilation/fail17927.d(15): Error: scope parameter `this` may not be returned +fail_compilation/fail17927.d(21): Error: scope parameter `ptr` may not be returned +fail_compilation/fail17927.d(23): Error: scope parameter `ptr` may not be returned --- */ // https://issues.dlang.org/show_bug.cgi?id=17927 diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail20108.d b/gcc/testsuite/gdc.test/fail_compilation/fail20108.d index f768b89..15845e1 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail20108.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail20108.d @@ -3,7 +3,7 @@ TEST_OUTPUT: --- fail_compilation/fail20108.d(15): Error: address of variable `y` assigned to `x` with longer lifetime -fail_compilation/fail20108.d(16): Error: scope variable `x` may not be returned +fail_compilation/fail20108.d(16): Error: scope parameter `x` may not be returned fail_compilation/fail20108.d(23): Error: address of variable `y` assigned to `x` with longer lifetime fail_compilation/fail20108.d(24): Error: scope variable `x` may not be returned --- diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail_scope.d b/gcc/testsuite/gdc.test/fail_compilation/fail_scope.d index 3e7637f..3fac167 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail_scope.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail_scope.d @@ -2,7 +2,10 @@ REQUIRED_ARGS: TEST_OUTPUT: --- -fail_compilation/fail_scope.d(40): Deprecation: scope variable `p` may not be returned +fail_compilation/fail_scope.d(30): Deprecation: scope parameter `da` may not be returned +fail_compilation/fail_scope.d(32): Deprecation: scope parameter `o` may not be returned +fail_compilation/fail_scope.d(33): Deprecation: scope parameter `dg` may not be returned +fail_compilation/fail_scope.d(40): Deprecation: scope parameter `p` may not be returned fail_compilation/fail_scope.d(45): Error: returning `cast(char[])string` escapes a reference to local variable `string` fail_compilation/fail_scope.d(63): Error: returning `s.bar()` escapes a reference to local variable `s` fail_compilation/fail_scope.d(74): Error: `fail_scope.foo8` called with argument types `(int)` matches both: @@ -16,9 +19,6 @@ fail_compilation/fail_scope.d(108): Deprecation: escaping reference to outer loc fail_compilation/fail_scope.d(127): Deprecation: returning `s.bar()` escapes a reference to local variable `s` fail_compilation/fail_scope.d(137): Error: returning `foo16226(i)` escapes a reference to local variable `i` --- -//fail_compilation/fail_scope.d(30): Error: scope variable `da` may not be returned -//fail_compilation/fail_scope.d(32): Error: scope variable `o` may not be returned -//fail_compilation/fail_scope.d(33): Error: scope variable `dg` may not be returned //fail_compilation/fail_scope.d(35): Error: scope variable `da` may not be returned //fail_compilation/fail_scope.d(37): Error: scope variable `o` may not be returned //fail_compilation/fail_scope.d(38): Error: scope variable `dg` may not be returned diff --git a/gcc/testsuite/gdc.test/fail_compilation/ice12574.d b/gcc/testsuite/gdc.test/fail_compilation/ice12574.d index 420b6b7..93e5f1d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/ice12574.d +++ b/gcc/testsuite/gdc.test/fail_compilation/ice12574.d @@ -1,7 +1,7 @@ /* TEST_OUTPUT: --- -fail_compilation/ice12574.d(40): Error: tuple index `2` exceeds length 2 +fail_compilation/ice12574.d(40): Error: tuple index `2` out of bounds `[0 .. 2]` fail_compilation/ice12574.d(53): Error: template instance `ice12574.reduce!("a", "a").reduce!(Tuple!(int, int, int))` error instantiating --- */ diff --git a/gcc/testsuite/gdc.test/fail_compilation/previewin.d b/gcc/testsuite/gdc.test/fail_compilation/previewin.d index b3beaf4..ce0cf92 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/previewin.d +++ b/gcc/testsuite/gdc.test/fail_compilation/previewin.d @@ -10,7 +10,7 @@ fail_compilation/previewin.d(6): Error: function `previewin.takeFunction(void fu fail_compilation/previewin.d(6): cannot pass argument `__lambda3` of type `void function(ref const(real) x) pure nothrow @nogc @safe` to parameter `void function(in real) f` fail_compilation/previewin.d(15): Error: scope variable `arg` assigned to non-scope `myGlobal` fail_compilation/previewin.d(16): Error: scope variable `arg` assigned to non-scope `myGlobal` -fail_compilation/previewin.d(17): Error: scope variable `arg` may not be returned +fail_compilation/previewin.d(17): Error: scope parameter `arg` may not be returned fail_compilation/previewin.d(18): Error: scope variable `arg` assigned to `escape` with longer lifetime fail_compilation/previewin.d(22): Error: returning `arg` escapes a reference to parameter `arg` fail_compilation/previewin.d(22): perhaps annotate the parameter with `return` diff --git a/gcc/testsuite/gdc.test/fail_compilation/previewin2.d b/gcc/testsuite/gdc.test/fail_compilation/previewin2.d new file mode 100644 index 0000000..e9fe6a1 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/previewin2.d @@ -0,0 +1,18 @@ +/* +REQUIRED_ARGS: -preview=in -preview=dip1000 +TEST_OUTPUT: +--- +fail_compilation/previewin2.d(1): Error: cannot use `in` parameters with `extern(C)` functions +fail_compilation/previewin2.d(1): parameter `a` declared as `in` here +fail_compilation/previewin2.d(2): Error: cannot use `in` parameters with `extern(Windows)` functions +fail_compilation/previewin2.d(2): parameter `a` declared as `in` here +fail_compilation/previewin2.d(4): Error: cannot use `in` parameters with `extern(C)` functions +fail_compilation/previewin2.d(4): parameter `__anonymous_param` declared as `in` here +--- +*/ + +#line 1 +extern(C) void wrongLink1 (in int a); +extern(Windows) void wrongLink2 (in void* a); +struct Large { ulong[64] data; } +extern(C) void wrongLink3 (in Large); diff --git a/gcc/testsuite/gdc.test/fail_compilation/retscope.d b/gcc/testsuite/gdc.test/fail_compilation/retscope.d index 27d5663..9394404 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/retscope.d +++ b/gcc/testsuite/gdc.test/fail_compilation/retscope.d @@ -2,7 +2,7 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/retscope.d(22): Error: scope variable `p` may not be returned +fail_compilation/retscope.d(22): Error: scope parameter `p` may not be returned fail_compilation/retscope.d(32): Error: returning `b ? nested1(& i) : nested2(& j)` escapes a reference to local variable `j` fail_compilation/retscope.d(45): Error: scope variable `p` assigned to non-scope `q` fail_compilation/retscope.d(47): Error: address of variable `i` assigned to `q` with longer lifetime @@ -85,7 +85,7 @@ struct HTTP /* TEST_OUTPUT: --- -fail_compilation/retscope.d(96): Error: reference to local variable `sa` assigned to non-scope parameter `a` +fail_compilation/retscope.d(96): Error: reference to local variable `sa` assigned to non-scope parameter `a` calling `bar8` --- */ // https://issues.dlang.org/show_bug.cgi?id=8838 @@ -149,7 +149,7 @@ S10* test10() /* TEST_OUTPUT: --- -fail_compilation/retscope.d(158): Error: scope variable `this` may not be returned +fail_compilation/retscope.d(158): Error: scope parameter `this` may not be returned --- */ @@ -218,7 +218,7 @@ void* escape3 (scope void* p) @safe { /* TEST_OUTPUT: --- -fail_compilation/retscope.d(229): Error: scope variable `ptr` may not be returned +fail_compilation/retscope.d(229): Error: scope parameter `ptr` may not be returned --- */ @@ -403,7 +403,7 @@ class Foo13 /* TEST_OUTPUT: --- -fail_compilation/retscope.d(1205): Error: scope variable `f14` assigned to non-scope parameter `this` +fail_compilation/retscope.d(1205): Error: scope variable `f14` assigned to non-scope parameter `this` calling `foo` --- */ @@ -454,7 +454,7 @@ fail_compilation/retscope.d(1311): Error: scope variable `u2` assigned to `ek` w /* TEST_OUTPUT: --- -fail_compilation/retscope.d(1405): Error: reference to local variable `buf` assigned to non-scope parameter `__anonymous_param` +fail_compilation/retscope.d(1405): Error: reference to local variable `buf` assigned to non-scope parameter `__anonymous_param` calling `myprintf` --- */ diff --git a/gcc/testsuite/gdc.test/fail_compilation/retscope2.d b/gcc/testsuite/gdc.test/fail_compilation/retscope2.d index 17d2182..9f1e13d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/retscope2.d +++ b/gcc/testsuite/gdc.test/fail_compilation/retscope2.d @@ -86,8 +86,8 @@ fail_compilation/retscope2.d(504): Error: scope variable `c` may not be returned /* TEST_OUTPUT: --- -fail_compilation/retscope2.d(604): Error: scope variable `_param_0` assigned to non-scope parameter `__anonymous_param` -fail_compilation/retscope2.d(604): Error: scope variable `_param_1` assigned to non-scope parameter `__anonymous_param` +fail_compilation/retscope2.d(604): Error: scope variable `_param_0` assigned to non-scope parameter `__anonymous_param` calling `foo600` +fail_compilation/retscope2.d(604): Error: scope variable `_param_1` assigned to non-scope parameter `__anonymous_param` calling `foo600` fail_compilation/retscope2.d(614): Error: template instance `retscope2.test600!(int*, int*)` error instantiating --- */ diff --git a/gcc/testsuite/gdc.test/fail_compilation/retscope6.d b/gcc/testsuite/gdc.test/fail_compilation/retscope6.d index b9a85ae..a8e5de5 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/retscope6.d +++ b/gcc/testsuite/gdc.test/fail_compilation/retscope6.d @@ -76,9 +76,9 @@ void foo() @safe /* TEST_OUTPUT: --- fail_compilation/retscope6.d(8016): Error: address of variable `i` assigned to `p` with longer lifetime -fail_compilation/retscope6.d(8031): Error: reference to local variable `i` assigned to non-scope parameter `p` -fail_compilation/retscope6.d(8031): Error: reference to local variable `j` assigned to non-scope parameter `q` -fail_compilation/retscope6.d(8048): Error: reference to local variable `j` assigned to non-scope parameter `q` +fail_compilation/retscope6.d(8031): Error: reference to local variable `i` assigned to non-scope parameter `p` calling `betty` +fail_compilation/retscope6.d(8031): Error: reference to local variable `j` assigned to non-scope parameter `q` calling `betty` +fail_compilation/retscope6.d(8048): Error: reference to local variable `j` assigned to non-scope parameter `q` calling `archie` --- */ @@ -172,7 +172,7 @@ T9 testfred() /* TEST_OUTPUT: --- -fail_compilation/retscope6.d(10003): Error: scope variable `values` assigned to non-scope parameter `values` +fail_compilation/retscope6.d(10003): Error: scope variable `values` assigned to non-scope parameter `values` calling `escape` --- */ @@ -234,7 +234,7 @@ const(int)* f_c_20150() @safe nothrow /* TEST_OUTPUT: --- -fail_compilation/retscope6.d(13010): Error: reference to local variable `str` assigned to non-scope parameter `x` +fail_compilation/retscope6.d(13010): Error: reference to local variable `str` assigned to non-scope parameter `x` calling `f_throw` --- */ @@ -254,7 +254,7 @@ void escape_throw_20150() @safe /* TEST_OUTPUT: --- -fail_compilation/retscope6.d(14019): Error: scope variable `scopePtr` assigned to non-scope parameter `x` +fail_compilation/retscope6.d(14019): Error: scope variable `scopePtr` assigned to non-scope parameter `x` calling `noInfer23021` fail_compilation/retscope6.d(14022): Error: scope variable `scopePtr` may not be returned --- */ diff --git a/gcc/testsuite/gdc.test/fail_compilation/test14238.d b/gcc/testsuite/gdc.test/fail_compilation/test14238.d index e0d0b35..a0e4d69 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test14238.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test14238.d @@ -1,7 +1,7 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test14238.d(20): Error: scope variable `fn` may not be returned +fail_compilation/test14238.d(20): Error: scope parameter `fn` may not be returned fail_compilation/test14238.d(28): Error: escaping reference to stack allocated value returned by `&baz` --- */ diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17423.d b/gcc/testsuite/gdc.test/fail_compilation/test17423.d index ec86646..3afb63b 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test17423.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test17423.d @@ -1,7 +1,7 @@ /* REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test17423.d(26): Error: reference to local `this` assigned to non-scope parameter `dlg` +fail_compilation/test17423.d(26): Error: reference to local `this` assigned to non-scope parameter `dlg` calling `opApply` --- */ diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17450.d b/gcc/testsuite/gdc.test/fail_compilation/test17450.d index 098adaa..ddf3f46 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test17450.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test17450.d @@ -33,8 +33,8 @@ struct S { /* TEST_OUTPUT: --- -fail_compilation/test17450.d(103): Error: scope variable `c` may not be returned -fail_compilation/test17450.d(106): Error: scope variable `this` may not be returned +fail_compilation/test17450.d(103): Error: scope parameter `c` may not be returned +fail_compilation/test17450.d(106): Error: scope parameter `this` may not be returned --- */ // https://issues.dlang.org/show_bug.cgi?id=17450 diff --git a/gcc/testsuite/gdc.test/fail_compilation/test20245.d b/gcc/testsuite/gdc.test/fail_compilation/test20245.d index daa0697..1713c9d 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test20245.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test20245.d @@ -2,15 +2,15 @@ REQUIRED_ARGS: -preview=dip1000 TEST_OUTPUT: --- -fail_compilation/test20245.d(20): Error: reference to local variable `x` assigned to non-scope parameter `ptr` +fail_compilation/test20245.d(20): Error: reference to local variable `x` assigned to non-scope parameter `ptr` calling `escape` fail_compilation/test20245.d(21): Error: copying `&x` into allocated memory escapes a reference to parameter `x` fail_compilation/test20245.d(22): Error: scope variable `a` may not be returned fail_compilation/test20245.d(26): Error: cannot take address of `scope` variable `x` since `scope` applies to first indirection only -fail_compilation/test20245.d(32): Error: reference to local variable `x` assigned to non-scope parameter `ptr` +fail_compilation/test20245.d(32): Error: reference to local variable `x` assigned to non-scope parameter `ptr` calling `escape` fail_compilation/test20245.d(33): Error: copying `&x` into allocated memory escapes a reference to parameter `x` fail_compilation/test20245.d(49): Error: reference to local variable `price` assigned to non-scope `this.minPrice` -fail_compilation/test20245.d(68): Error: reference to local variable `this` assigned to non-scope parameter `msg` -fail_compilation/test20245.d(88): Error: reference to local variable `this` assigned to non-scope parameter `content` +fail_compilation/test20245.d(68): Error: reference to local variable `this` assigned to non-scope parameter `msg` calling `this` +fail_compilation/test20245.d(88): Error: reference to local variable `this` assigned to non-scope parameter `content` calling `listUp` --- */ diff --git a/gcc/testsuite/gdc.test/fail_compilation/test22818.d b/gcc/testsuite/gdc.test/fail_compilation/test22818.d index ae96b3b..5759415 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/test22818.d +++ b/gcc/testsuite/gdc.test/fail_compilation/test22818.d @@ -1,7 +1,7 @@ /* REQUIRED_ARGS: -preview=dip1000 * TEST_OUTPUT: --- -fail_compilation/test22818.d(104): Error: scope variable `c` may not be returned +fail_compilation/test22818.d(104): Error: scope parameter `c` may not be returned --- */ diff --git a/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d b/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d index 37395d4..9d527b7 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d +++ b/gcc/testsuite/gdc.test/fail_compilation/typeerrors.d @@ -2,7 +2,7 @@ TEST_OUTPUT: --- fail_compilation/typeerrors.d(32): Deprecation: `scope` as a type constraint is deprecated. Use `scope` at the usage site. -fail_compilation/typeerrors.d(37): Error: tuple index 4 exceeds 4 +fail_compilation/typeerrors.d(37): Error: tuple index `4` out of bounds `[0 .. 4]` fail_compilation/typeerrors.d(39): Error: variable `x` cannot be read at compile time fail_compilation/typeerrors.d(40): Error: cannot have array of `void()` fail_compilation/typeerrors.d(41): Error: cannot have array of scope `typeerrors.C` diff --git a/gcc/testsuite/gdc.test/fail_compilation/udaparams.d b/gcc/testsuite/gdc.test/fail_compilation/udaparams.d index 5d0390f..ec47967 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/udaparams.d +++ b/gcc/testsuite/gdc.test/fail_compilation/udaparams.d @@ -12,8 +12,8 @@ fail_compilation/udaparams.d(40): Error: `@safe` attribute for function paramete fail_compilation/udaparams.d(43): Error: `@system` attribute for function parameter is not supported fail_compilation/udaparams.d(44): Error: `@trusted` attribute for function parameter is not supported fail_compilation/udaparams.d(45): Error: `@nogc` attribute for function parameter is not supported -fail_compilation/udaparams.d(51): Error: cannot put a storage-class in an alias declaration. -fail_compilation/udaparams.d(52): Error: cannot put a storage-class in an alias declaration. +fail_compilation/udaparams.d(51): Error: cannot put a storage-class in an `alias` declaration. +fail_compilation/udaparams.d(52): Error: cannot put a storage-class in an `alias` declaration. fail_compilation/udaparams.d(53): Error: semicolon expected to close `alias` declaration fail_compilation/udaparams.d(53): Error: declaration expected, not `=>` fail_compilation/udaparams.d(54): Error: semicolon expected to close `alias` declaration diff --git a/gcc/testsuite/gdc.test/fail_compilation/udatypes.d b/gcc/testsuite/gdc.test/fail_compilation/udatypes.d new file mode 100644 index 0000000..a7f2bfc --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/udatypes.d @@ -0,0 +1,8 @@ +/* +TEST_OUTPUT: +--- +fail_compilation/udatypes.d(8): Error: user-defined attributes not allowed for `alias` declarations +--- +*/ + +alias c_typedef = extern(C) @(1) void* function(size_t); diff --git a/gcc/testsuite/gdc.test/runnable/ice10086b.d b/gcc/testsuite/gdc.test/runnable/ice10086b.d index abb6f78..910c5c4 100644 --- a/gcc/testsuite/gdc.test/runnable/ice10086b.d +++ b/gcc/testsuite/gdc.test/runnable/ice10086b.d @@ -5,3 +5,53 @@ import imports.ice10086y; import imports.ice10086x; void main() { test(); } + +static if (0) +{ +/* this is a reduced one-file version that triggers a seg fault +because the use of OPframeptr gets inlined, and the offests +to it are not updated. +Compile with: -O -inline +*/ + +pragma(inline, false) +auto bind(alias f, bindValues...)() +{ + pragma(inline, false) + auto bind(Types...)(Types values) + { + return f(bindValues, values); + } + return bind(); +} + + +struct SS +{ + int a1 = 123; +} + +pragma(inline, false) +@safe auto ff(SS rr) +{ + return rr; +} + +// pragma(inline, false) +@safe auto gg(SS ss) // this getting inlined triggers the problem +{ + return bind!(ff, ss); +} + +pragma(inline, false) +void test() +{ + SS s1; + + auto zb = bind!(gg, s1)(); + assert(zb.a1 == 123); +} + + +void main() { test(); } +} diff --git a/gcc/testsuite/gdc.test/runnable/inline3.d b/gcc/testsuite/gdc.test/runnable/inline3.d new file mode 100644 index 0000000..01af5c8 --- /dev/null +++ b/gcc/testsuite/gdc.test/runnable/inline3.d @@ -0,0 +1,44 @@ +// REQUIRED_ARGS: -inline -O + +// Test operator overloading + +extern (C) int printf(const(char*) fmt, ...); + +struct Tuple6798(T...) +{ + T field; + alias field this; + + bool opEquals(Tuple6798 rxx) + { + foreach (i, _; T) + { + if (!__equals(this[i], rxx[i])) + assert(0); + //return false; + } + return true; + } +} + +auto tuple(T...)(T args) +{ + return Tuple6798!T(args); +} + +int zzzz() +{ + if (!__equals("mno", "mno")) + assert(0); + + assert(tuple("abcd", "x") == tuple("abcd", "x")); + return 0; +} + +int main() +{ + zzzz(); + + printf("Success\n"); + return 0; +} diff --git a/gcc/testsuite/gdc.test/runnable/staticforeach.d b/gcc/testsuite/gdc.test/runnable/staticforeach.d index bf6dc98..6a9ac5d 100644 --- a/gcc/testsuite/gdc.test/runnable/staticforeach.d +++ b/gcc/testsuite/gdc.test/runnable/staticforeach.d @@ -39,7 +39,36 @@ void test19479() } } +/**********************************/ +// https://issues.dlang.org/show_bug.cgi?id=23192 + +alias AliasSeq(Args...) = Args; + +struct S23192 +{ + int x; + int y; + + int fun() + { + static foreach (sym; AliasSeq!(S23192.x)) + int i = sym; + + static foreach (sym; AliasSeq!(this.y)) + int j = sym; + + return i + j; + } +} + +void test23192() +{ + assert(S23192(1, 2).fun() == 3); + static assert(S23192(1, 2).fun() == 3); +} + void main() { test19479(); + test23192(); } diff --git a/gcc/testsuite/gdc.test/runnable_cxx/cppa.d b/gcc/testsuite/gdc.test/runnable_cxx/cppa.d index e315889..cd91dd5 100644 --- a/gcc/testsuite/gdc.test/runnable_cxx/cppa.d +++ b/gcc/testsuite/gdc.test/runnable_cxx/cppa.d @@ -1,3 +1,4 @@ +// REQUIRED_ARGS: -preview=in // PERMUTE_ARGS: -g // EXTRA_CPP_SOURCES: cppb.cpp // EXTRA_FILES: extra-files/cppb.h @@ -1637,7 +1638,13 @@ void test19134() } // https://issues.dlang.org/show_bug.cgi?id=18955 -alias std_string = std.basic_string!(char); +version (linux) + alias std_string = std.basic_string!(char); +else +{ + import core.stdcpp.string : core_basic_string = basic_string; + alias std_string = core_basic_string!(char); +} extern(C++) void callback18955(ref const(std_string) str) { @@ -1646,6 +1653,16 @@ extern(C++) void test18955(); /****************************************/ +extern(C++) void testPreviewIn(); + +extern(C++) void previewInFunction(in int a, in std_string b, ref const(std_string) c) +{ + assert(a == 42); + assert(&b is &c); +} + +/****************************************/ + void main() { test1(); @@ -1695,6 +1712,7 @@ void main() test18966(); test19134(); test18955(); + testPreviewIn(); printf("Success\n"); } diff --git a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp index 4fa87ef..83667cb 100644 --- a/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp +++ b/gcc/testsuite/gdc.test/runnable_cxx/extra-files/cppb.cpp @@ -4,30 +4,8 @@ #include #include -#if _WIN32 // otherwise defined in C header files! -// https://issues.dlang.org/show_bug.cgi?id=18955 -namespace std -{ - template - struct char_traits - { - }; - template - class allocator - { - }; - template - class basic_string - { - }; - typedef basic_string, allocator > string; -} -#else // if POSIX - #include -#endif // _WIN32 - #include "cppb.h" /**************************************/ @@ -936,3 +914,11 @@ void test18955() callback18955(s); #endif } + +void previewInFunction(const int& a, const std::string& b, const std::string& c); + +void testPreviewIn() +{ + std::string s = "Hello World"; + previewInFunction(42, s, s); +} -- cgit v1.1 From 349a39f061407ce2339d2ba25da97005f2030c88 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 22 Jun 2022 14:57:21 -0400 Subject: c++: class scope function lookup [PR105908] In r12-1273 for PR91706, I removed the code in get_class_binding that stripped BASELINK. This testcase demonstrates that we still need to strip it in outer_binding before putting the overload set in IDENTIFIER_BINDING, for compatibility with bindings added directly for declarations. PR c++/105908 gcc/cp/ChangeLog: * name-lookup.cc (outer_binding): Strip BASELINK. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/trailing16.C: New test. --- gcc/cp/name-lookup.cc | 4 ++++ gcc/testsuite/g++.dg/cpp0x/trailing16.C | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/trailing16.C (limited to 'gcc') diff --git a/gcc/cp/name-lookup.cc b/gcc/cp/name-lookup.cc index 421bf2e..ce62276 100644 --- a/gcc/cp/name-lookup.cc +++ b/gcc/cp/name-lookup.cc @@ -7629,6 +7629,10 @@ outer_binding (tree name, /* Thread this new class-scope binding onto the IDENTIFIER_BINDING list so that future lookups find it quickly. */ + if (BASELINK_P (class_binding->value)) + /* Don't put a BASELINK in IDENTIFIER_BINDING. */ + class_binding->value + = BASELINK_FUNCTIONS (class_binding->value); class_binding->previous = outer; if (binding) binding->previous = class_binding; diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing16.C b/gcc/testsuite/g++.dg/cpp0x/trailing16.C new file mode 100644 index 0000000..4feb3f81 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/trailing16.C @@ -0,0 +1,17 @@ +// PR c++/105908 +// { dg-do compile { target c++11 } } + +struct test +{ + template + int templated_func(); + + template + auto call_templated_func() -> decltype(templated_func()); +}; + +template +auto test::call_templated_func() -> decltype(templated_func()) +{ + return templated_func(); +} -- cgit v1.1 From 5d0cf158229acc8e3ebd9a12fa2a670d3c34f513 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 23 Jun 2022 00:16:40 +0000 Subject: Daily bump. --- gcc/ChangeLog | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/cp/ChangeLog | 18 ++++++++++++++++++ gcc/d/ChangeLog | 7 +++++++ gcc/testsuite/ChangeLog | 39 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 115 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aee43e4..0a8718f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,53 @@ +2022-06-22 Jason Merrill + + PR c++/104642 + * common.opt: Add -funreachable-traps. + * doc/invoke.texi (-funreachable-traps): Document it. + * opts.cc (finish_options): Enable at -O0 or -Og. + * tree.cc (build_common_builtin_nodes): Add __builtin_trap. + (builtin_decl_unreachable, build_builtin_unreachable): New. + * tree.h: Declare them. + * ubsan.cc (sanitize_unreachable_fn): Factor out. + (ubsan_instrument_unreachable): Use + gimple_build_builtin_unreachable. + * ubsan.h (sanitize_unreachable_fn): Declare. + * gimple.cc (gimple_build_builtin_unreachable): New. + * gimple.h: Declare it. + * builtins.cc (expand_builtin_unreachable): Add assert. + (fold_builtin_0): Call build_builtin_unreachable. + * sanopt.cc: Don't run for just SANITIZE_RETURN + or SANITIZE_UNREACHABLE when trapping. + * cgraphunit.cc (walk_polymorphic_call_targets): Use new + unreachable functions. + * gimple-fold.cc (gimple_fold_call) + (gimple_get_virt_method_for_vtable) + * ipa-fnsummary.cc (redirect_to_unreachable) + * ipa-prop.cc (ipa_make_edge_direct_to_target) + (ipa_impossible_devirt_target) + * ipa.cc (walk_polymorphic_call_targets) + * tree-cfg.cc (pass_warn_function_return::execute) + (execute_fixup_cfg) + * tree-ssa-loop-ivcanon.cc (remove_exits_and_undefined_stmts) + (unloop_loops) + * tree-ssa-sccvn.cc (eliminate_dom_walker::eliminate_stmt): + Likewise. + +2022-06-22 Richard Sandiford + + PR tree-optimization/106019 + * tree-data-ref.cc (dr_may_alias_p): Try using the + innermost_loop_behavior to disambiguate non-loop queries. + +2022-06-22 Palmer Dabbelt + + * doc/invoke.texi (RISC-V): Document -mtune=thead-c906. + +2022-06-22 Takayuki 'January June' Suwa + + * config/xtensa/xtensa.md (bswapsi2_internal): + Enlarge the buffer that is obviously smaller than the template + string given to sprintf(). + 2022-06-21 Roger Sayle Marek Polacek Segher Boessenkool diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index effad93..559031e 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220622 +20220623 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5c1c306..4fb9fd5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,21 @@ +2022-06-22 Jason Merrill + + PR c++/105908 + * name-lookup.cc (outer_binding): Strip BASELINK. + +2022-06-22 Nathan Sidwell + + * module.cc (struct duplicate_hash): Remove. + (duplicate_hash_map): Adjust. + +2022-06-22 Jason Merrill + + PR c++/104642 + * constexpr.cc (cxx_eval_builtin_function_call): Handle + unreachable/trap earlier. + * cp-gimplify.cc (cp_maybe_instrument_return): Use + build_builtin_unreachable. + 2022-06-18 Jakub Jelinek * cp-ubsan.cc (cp_ubsan_instrument_vptr_p): Use diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 537ae39..618e987 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,10 @@ +2022-06-22 Iain Buclaw + + * dmd/MERGE: Merge upstream dmd 6203135dc. + * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoStructDeclaration *)): + Update for new front-end interface. + (SpeculativeTypeVisitor::visit (TypeStruct *)): Likewise. + 2022-06-15 Iain Buclaw * d-attribs.cc (d_langhook_attribute_table): Add no_sanitize. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5e1a112..c99c66e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,42 @@ +2022-06-22 Jason Merrill + + PR c++/105908 + * g++.dg/cpp0x/trailing16.C: New test. + +2022-06-22 Jason Merrill + + PR c++/104642 + * g++.dg/ubsan/return-8a.C: New test. + * g++.dg/ubsan/return-8b.C: New test. + * g++.dg/ubsan/return-8d.C: New test. + * g++.dg/ubsan/return-8e.C: New test. + +2022-06-22 Richard Sandiford + + PR tree-optimization/106019 + * gcc.dg/vect/bb-slp-pr106019.c: New test. + +2022-06-22 Alexandre Oliva + + * gcc.misc-tests/outputs.exp: Clean up left-overs first. + +2022-06-22 Alexandre Oliva + + * gcc.misc-tests/outputs.exp (outest): Introduce quiet mode, + create and return lists of passes and fails. Use it to catch + skip_atsave cases where -L flags are implicitly added by + driver self specs. + +2022-06-22 Alexandre Oliva + + * g++.dg/lto/pr90990_0.C: Require lto_incremental target. + +2022-06-22 Haochen Jiang + + * gcc.target/i386/amx-check.h (request_perm_xtile_data): + New function to check if AMX is usable and enable AMX. + (main): Run test if AMX is usable. + 2022-06-21 Roger Sayle Marek Polacek Segher Boessenkool -- cgit v1.1 From 3104a9fa7e704d859cec46afba8b51cb1a233b40 Mon Sep 17 00:00:00 2001 From: Xionghu Luo Date: Wed, 22 Jun 2022 15:18:39 +0800 Subject: Fix typo Fix typo and commit as obvious. Signed-off-by: Xionghu Luo gcc/ChangeLog: * cgraph.cc (cgraph_edge::redirect_call_stmt_to_callee): Fix typo. * tree-ssa-loop-ivopts.cc (struct iv_cand): Likewise. * tree-switch-conversion.h: Likewise. --- gcc/cgraph.cc | 2 +- gcc/tree-ssa-loop-ivopts.cc | 2 +- gcc/tree-switch-conversion.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc index 7eeda53..8d6ed38 100644 --- a/gcc/cgraph.cc +++ b/gcc/cgraph.cc @@ -1423,7 +1423,7 @@ cgraph_edge::redirect_call_stmt_to_callee (cgraph_edge *e) else { /* Be sure we redirect all speculative targets before poking - abou tindirect edge. */ + about indirect edge. */ gcc_checking_assert (e->callee); cgraph_edge *indirect = e->speculative_call_indirect_edge (); gcall *new_stmt; diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc index 549168a..a6f926a 100644 --- a/gcc/tree-ssa-loop-ivopts.cc +++ b/gcc/tree-ssa-loop-ivopts.cc @@ -469,7 +469,7 @@ struct iv_cand bitmap inv_vars; /* The list of invariant ssa_vars used in step of the iv_cand. */ bitmap inv_exprs; /* If step is more complicated than a single ssa_var, - hanlde it as a new invariant expression which will + handle it as a new invariant expression which will be hoisted out of loop. */ struct iv *orig_iv; /* The original iv if this cand is added from biv with smaller type. */ diff --git a/gcc/tree-switch-conversion.h b/gcc/tree-switch-conversion.h index 2b677d9..4063a6c 100644 --- a/gcc/tree-switch-conversion.h +++ b/gcc/tree-switch-conversion.h @@ -249,7 +249,7 @@ public: /* Concrete subclass of group_cluster representing a collection of cases to be implemented as a jump table. - The "emit" vfunc gernerates a nested switch statement which + The "emit" vfunc generates a nested switch statement which is later lowered to a jump table. */ class jump_table_cluster: public group_cluster -- cgit v1.1 From d29f61a3291a8c4cff0bd754fa3bb8e9399589bc Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 22 Jun 2022 18:19:11 -0400 Subject: c++: dependence of baselink [PR105964] helper::c isn't dependent just because we haven't deduced its return type yet. type_dependent_expression_p already knows how to deal with that for bare FUNCTION_DECL, but needs to learn to look through a BASELINK. PR c++/105964 gcc/cp/ChangeLog: * pt.cc (type_dependent_expression_p): Look through BASELINK. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/nontype-auto21.C: New test. --- gcc/cp/pt.cc | 9 +++++++++ gcc/testsuite/g++.dg/cpp1z/nontype-auto21.C | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1z/nontype-auto21.C (limited to 'gcc') diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 28edc6a..4d1c325 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -27960,6 +27960,15 @@ type_dependent_expression_p (tree expression) && DECL_INITIAL (expression)) return true; + /* Pull a FUNCTION_DECL out of a BASELINK if we can. */ + if (BASELINK_P (expression)) + { + if (BASELINK_OPTYPE (expression) + && dependent_type_p (BASELINK_OPTYPE (expression))) + return true; + expression = BASELINK_FUNCTIONS (expression); + } + /* A function or variable template-id is type-dependent if it has any dependent template arguments. */ if (VAR_OR_FUNCTION_DECL_P (expression) diff --git a/gcc/testsuite/g++.dg/cpp1z/nontype-auto21.C b/gcc/testsuite/g++.dg/cpp1z/nontype-auto21.C new file mode 100644 index 0000000..376d632 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/nontype-auto21.C @@ -0,0 +1,20 @@ +// PR c++/105964 +// { dg-do compile { target c++17 } } + +struct token {}; + +struct example {}; + +template< typename > +struct helper +{ + static constexpr auto c() { return 42; } +}; + +struct impostor_c +{ + template< typename T, auto= helper< T >::c > + static example func(); +}; + +example c= impostor_c::func< token >(); -- cgit v1.1 From 27e9bd911626b6ae336fc62c86da5ff710de39ab Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 22 Jun 2022 21:29:16 -0400 Subject: c++: tweak deduction with auto template parms While looking at PR105964 I noticed that we were unnecessarily repeating the deduction loop because of seeing a non-type parameter with type 'auto'. It is indeed dependent, but not on any other deductions. gcc/cp/ChangeLog: * pt.cc (type_unification_real): An auto tparm can't be affected by other deductions. --- gcc/cp/pt.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc') diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 4d1c325..80d2bec 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -22982,6 +22982,7 @@ type_unification_real (tree tparms, deduced from a later argument than the one from which this parameter can be deduced. */ if (TREE_CODE (tparm) == PARM_DECL + && !is_auto (TREE_TYPE (tparm)) && uses_template_parms (TREE_TYPE (tparm)) && saw_undeduced < 2) { @@ -23042,6 +23043,7 @@ type_unification_real (tree tparms, if (saw_undeduced == 1 && TREE_CODE (parm) == PARM_DECL + && !is_auto (TREE_TYPE (parm)) && uses_template_parms (TREE_TYPE (parm))) { /* The type of this non-type parameter depends on undeduced -- cgit v1.1 From 7f52df186de41284b9976ea461381e168da5749f Mon Sep 17 00:00:00 2001 From: liuhongt Date: Wed, 22 Jun 2022 14:08:42 +0800 Subject: Replace REGNO with reg_or_subregno in pre_reload splitter. gcc/ChangeLog: * config/i386/sse.md:(sse4_2_pcmpestr): Replace REGNO with reg_or_subregno. (sse4_2_pcmpistr): Ditto. --- gcc/config/i386/sse.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 64ac490..8cd0f61 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -23250,8 +23250,10 @@ "&& 1" [(const_int 0)] { - int ecx = !find_regno_note (curr_insn, REG_UNUSED, REGNO (operands[0])); - int xmm0 = !find_regno_note (curr_insn, REG_UNUSED, REGNO (operands[1])); + int ecx = !find_regno_note (curr_insn, REG_UNUSED, + reg_or_subregno (operands[0])); + int xmm0 = !find_regno_note (curr_insn, REG_UNUSED, + reg_or_subregno (operands[1])); int flags = !find_regno_note (curr_insn, REG_UNUSED, FLAGS_REG); if (ecx) @@ -23386,8 +23388,10 @@ "&& 1" [(const_int 0)] { - int ecx = !find_regno_note (curr_insn, REG_UNUSED, REGNO (operands[0])); - int xmm0 = !find_regno_note (curr_insn, REG_UNUSED, REGNO (operands[1])); + int ecx = !find_regno_note (curr_insn, REG_UNUSED, + reg_or_subregno (operands[0])); + int xmm0 = !find_regno_note (curr_insn, REG_UNUSED, + reg_or_subregno (operands[1])); int flags = !find_regno_note (curr_insn, REG_UNUSED, FLAGS_REG); if (ecx) -- cgit v1.1 From 31ce821a790caec8a2849dd67a9847e78a33d14c Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 18 May 2022 15:07:53 +0200 Subject: ipa-icf: skip variables with body_removed Similarly to cgraph_nodes, it may happen that body_removed is set during merging of symbols. PR ipa/105600 gcc/ChangeLog: * ipa-icf.cc (sem_item_optimizer::filter_removed_items): Skip variables with body_removed. --- gcc/ipa-icf.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ipa-icf.cc b/gcc/ipa-icf.cc index 765ae74..6528a7a 100644 --- a/gcc/ipa-icf.cc +++ b/gcc/ipa-icf.cc @@ -2411,10 +2411,11 @@ sem_item_optimizer::filter_removed_items (void) { /* Filter out non-readonly variables. */ tree decl = item->decl; - if (TREE_READONLY (decl)) - filtered.safe_push (item); - else + varpool_node *vnode = static_cast (item)->get_node (); + if (!TREE_READONLY (decl) || vnode->body_removed) remove_item (item); + else + filtered.safe_push (item); } } } -- cgit v1.1 From 509cdb441614eab2a0fe90a970a927538b832bcd Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 23 Jun 2022 12:54:10 +0100 Subject: testsuite: Compile slsr-39.c without vectorisation The fix for PR106019 regressed slsr-39.c for -m32 -march=cascadelake because we are now able to vectorise the code. (Whether the code model should be allowing that is a different question -- the vectorised code looked worse to me.) The test runs at -O2 and predates vectorisation being enabled at -O2, so this patch just adds -fno-tree-vectorize. gcc/testsuite/ * gcc.dg/tree-ssa/slsr-39.c: Force vectorization off. --- gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c index 4a27ede..33e34fa 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c @@ -6,7 +6,7 @@ *PINDEX: C1 + (C2 * C3) + C4 */ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-slsr-details" } */ +/* { dg-options "-O2 -fno-tree-vectorize -fdump-tree-slsr-details" } */ typedef int arr_2[50][50]; -- cgit v1.1 From c01fe6729e607fd064eb27db2a9420aedb75ffd4 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 22 Jun 2022 05:54:30 -0700 Subject: c++: Prune unneeded macro locations This implements garbage collection on locations within macro expansions, when streaming out a CMI. When doing the reachability walks, we now note which macro locations we need and then only write those locations. The complication here is that every macro expansion location has an independently calculated offset. This complicates writing, but reading remains the same -- the macro locations of a CMI continue to form a contiguous block. For std headers this reduced the number of macro maps by 40% and the number of locations by 16%. For a GMF including iostream, it reduced it by 80% and 60% respectively. Ordinary locations are still transformed en-mass. They are somewhat more complicated to apply a similar optimization to. gcc/cp/ * module.cc (struct macro_info): New. (struct macro_traits): New. (macro_remap, macro_table): New globals. (depset::hash::find_dependencies): Note namespace location. (module_for_macro_loc): Adjust. (module_state::note_location): New. (module_state::Write_location): Note location when not streaming. Adjust macro location streaming. (module_state::read_location): Adjust macro location streaming. (module_state::write_init_maps): New. (module_state::write_prepare_maps): Reimplement macro map preparation. (module_state::write_macro_maps): Reimplement. (module_state::read_macro_maps): Likewise. (module_state::write_begin): Adjust. gcc/testsuite/ * g++.dg/modules/loc-prune-1.C: New. * g++.dg/modules/loc-prune-2.C: New. * g++.dg/modules/loc-prune-3.C: New. * g++.dg/modules/pr98718_a.C: Adjust. * g++.dg/modules/pr98718_b.C: Adjust. --- gcc/cp/module.cc | 351 +++++++++++++++++++---------- gcc/testsuite/g++.dg/modules/loc-prune-1.C | 19 ++ gcc/testsuite/g++.dg/modules/loc-prune-2.C | 14 ++ gcc/testsuite/g++.dg/modules/loc-prune-3.C | 16 ++ gcc/testsuite/g++.dg/modules/pr98718_a.C | 4 +- gcc/testsuite/g++.dg/modules/pr98718_b.C | 6 +- 6 files changed, 291 insertions(+), 119 deletions(-) create mode 100644 gcc/testsuite/g++.dg/modules/loc-prune-1.C create mode 100644 gcc/testsuite/g++.dg/modules/loc-prune-2.C create mode 100644 gcc/testsuite/g++.dg/modules/loc-prune-3.C (limited to 'gcc') diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index d735d7e..7ee779d 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -3238,6 +3238,65 @@ public: }; static loc_spans spans; + +/* Information about macro locations we stream out. */ +struct macro_info +{ + const line_map_macro *src; // original expansion + unsigned remap; // serialization + + static int compare (const void *a_, const void *b_) + { + auto *a = static_cast (a_); + auto *b = static_cast (b_); + + gcc_checking_assert (MAP_START_LOCATION (a->src) + != MAP_START_LOCATION (b->src)); + if (MAP_START_LOCATION (a->src) < MAP_START_LOCATION (b->src)) + return -1; + else + return +1; + } +}; +struct macro_traits +{ + typedef macro_info value_type; + typedef const line_map_macro *compare_type; + + static const bool empty_zero_p = false; + + static hashval_t hash (compare_type p) + { + return pointer_hash::hash (p); + } + static hashval_t hash (const value_type &v) + { + return hash (v.src); + } + static bool equal (const value_type &v, const compare_type p) + { + return v.src == p; + } + + static void mark_empty (value_type &v) + { + v.src = nullptr; + } + static bool is_empty (value_type &v) + { + return !v.src; + } + + static bool is_deleted (value_type &) { return false; } + static void mark_deleted (value_type &) { gcc_unreachable (); } + + static void remove (value_type &) {} +}; +/* Table keyed by line_map_macro, used for noting. */ +static hash_table *macro_table; +/* Sorted vector, used for writing. */ +static vec *macro_remap; + /* Indirection to allow bsearching imports by ordinary location. */ static vec *ool; @@ -3398,7 +3457,7 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state { /* Location ranges for this module. adhoc-locs are decomposed, so don't have a range. */ loc_range_t GTY((skip)) ordinary_locs; - loc_range_t GTY((skip)) macro_locs; + loc_range_t GTY((skip)) macro_locs; // [lwm,num) /* LOC is first set too the importing location. When initially loaded it refers to a module loc whose parent is the importing @@ -3591,6 +3650,7 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state { bool read_entities (unsigned count, unsigned lwm, unsigned hwm); private: + void write_init_maps (); location_map_info write_prepare_maps (module_state_config *); bool read_prepare_maps (const module_state_config *); @@ -3599,7 +3659,7 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state { bool read_ordinary_maps (); void write_macro_maps (elf_out *to, location_map_info &, module_state_config *, unsigned *crc_ptr); - bool read_macro_maps (); + bool read_macro_maps (unsigned); private: void write_define (bytes_out &, const cpp_macro *, bool located = true); @@ -3616,6 +3676,7 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state { static cpp_macro *deferred_macro (cpp_reader *, location_t, cpp_hashnode *); public: + static void note_location (location_t); static void write_location (bytes_out &, location_t); location_t read_location (bytes_in &) const; @@ -13106,7 +13167,10 @@ depset::hash::find_dependencies (module_state *module) else if (TREE_VISITED (decl)) /* A global tree. */; else if (item->get_entity_kind () == EK_NAMESPACE) - add_namespace_context (current, CP_DECL_CONTEXT (decl)); + { + module->note_location (DECL_SOURCE_LOCATION (decl)); + add_namespace_context (current, CP_DECL_CONTEXT (decl)); + } else { walker.mark_declaration (decl, current->has_defn ()); @@ -15518,15 +15582,15 @@ module_for_macro_loc (location_t loc) { unsigned half = len / 2; module_state *probe = (*modules)[pos + half]; - if (loc >= probe->macro_locs.second) - len = half; - else if (loc >= probe->macro_locs.first) - return probe; - else + if (loc < probe->macro_locs.first) { pos += half + 1; len = len - (half + 1); } + else if (loc >= (probe->macro_locs.first + probe->macro_locs.second)) + len = half; + else + return probe; } return NULL; @@ -15545,6 +15609,62 @@ module_state::imported_from () const return from; } +/* Note that LOC will need writing. This allows us to prune locations + that are not needed. */ + +void +module_state::note_location (location_t loc) +{ + if (!macro_table) + ; + else if (loc < RESERVED_LOCATION_COUNT) + ; + else if (IS_ADHOC_LOC (loc)) + { + location_t locus = get_location_from_adhoc_loc (line_table, loc); + note_location (locus); + source_range range = get_range_from_loc (line_table, loc); + if (range.m_start != locus) + note_location (range.m_start); + note_location (range.m_finish); + } + else if (loc >= LINEMAPS_MACRO_LOWEST_LOCATION (line_table)) + { + if (spans.macro (loc)) + { + const line_map *map = linemap_lookup (line_table, loc); + const line_map_macro *mac_map = linemap_check_macro (map); + hashval_t hv = macro_traits::hash (mac_map); + macro_info *slot + = macro_table->find_slot_with_hash (mac_map, hv, INSERT); + if (!slot->src) + { + slot->src = mac_map; + slot->remap = 0; + // Expansion locations could themselves be from a + // macro, we need to note them all. + note_location (mac_map->expansion); + gcc_checking_assert (mac_map->n_tokens); + location_t tloc = UNKNOWN_LOCATION; + for (unsigned ix = mac_map->n_tokens * 2; ix--;) + if (mac_map->macro_locations[ix] != tloc) + { + tloc = mac_map->macro_locations[ix]; + note_location (tloc); + } + } + } + } + else if (IS_ORDINARY_LOC (loc)) + { + /* This is where we should note we use this location. See comment + about write_ordinary_maps. */ + } + else + gcc_unreachable (); + return; +} + /* If we're not streaming, record that we need location LOC. Otherwise stream it. */ @@ -15552,9 +15672,10 @@ void module_state::write_location (bytes_out &sec, location_t loc) { if (!sec.streaming_p ()) - /* This is where we should note we use this location. See comment - about write_ordinary_maps. */ - return; + { + note_location (loc); + return; + } if (loc < RESERVED_LOCATION_COUNT) { @@ -15576,20 +15697,40 @@ module_state::write_location (bytes_out &sec, location_t loc) } else if (loc >= LINEMAPS_MACRO_LOWEST_LOCATION (line_table)) { - if (const loc_spans::span *span = spans.macro (loc)) + const macro_info *info = nullptr; + unsigned offset = 0; + if (unsigned hwm = macro_remap->length ()) { - unsigned off = MAX_LOCATION_T - loc; + info = macro_remap->begin (); + while (hwm != 1) + { + unsigned mid = hwm / 2; + if (MAP_START_LOCATION (info[mid].src) <= loc) + { + info += mid; + hwm -= mid; + } + else + hwm = mid; + } + offset = loc - MAP_START_LOCATION (info->src); + if (offset > info->src->n_tokens) + info = nullptr; + } - off -= span->macro_delta; + gcc_checking_assert (bool (info) == bool (spans.macro (loc))); + if (info) + { + offset += info->remap; sec.u (LK_MACRO); - sec.u (off); + sec.u (offset); dump (dumper::LOCATION) - && dump ("Macro location %u output %u", loc, off); + && dump ("Macro location %u output %u", loc, offset); } else if (const module_state *import = module_for_macro_loc (loc)) { - unsigned off = import->macro_locs.second - loc - 1; + unsigned off = loc - import->macro_locs.first; sec.u (LK_IMPORT_MACRO); sec.u (import->remap); sec.u (off); @@ -15668,12 +15809,8 @@ module_state::read_location (bytes_in &sec) const if (macro_locs.first) { - location_t adjusted = MAX_LOCATION_T - off; - adjusted -= slurp->loc_deltas.second; - if (adjusted < macro_locs.first) - sec.set_overrun (); - else if (adjusted < macro_locs.second) - locus = adjusted; + if (off < macro_locs.second) + locus = off + macro_locs.first; else sec.set_overrun (); } @@ -15733,8 +15870,8 @@ module_state::read_location (bytes_in &sec) const { if (!import->macro_locs.first) locus = import->loc; - else if (off < import->macro_locs.second - macro_locs.first) - locus = import->macro_locs.second - off - 1; + else if (off < import->macro_locs.second) + locus = off + import->macro_locs.first; else sec.set_overrun (); } @@ -15768,8 +15905,14 @@ module_state::read_location (bytes_in &sec) const // should decompose locations so that we can have a more graceful // degradation upon running out? +void +module_state::write_init_maps () +{ + macro_table = new hash_table (EXPERIMENT (1, 400)); +} + location_map_info -module_state::write_prepare_maps (module_state_config *) +module_state::write_prepare_maps (module_state_config *cfg) { dump () && dump ("Preparing locations"); dump.indent (); @@ -15840,7 +15983,6 @@ module_state::write_prepare_maps (module_state_config *) /* Adjust the maps. Ordinary ones ascend, and we must maintain alignment. Macro ones descend, but are unaligned. */ location_t ord_off = spans[loc_spans::SPAN_FIRST].ordinary.first; - location_t mac_off = spans[loc_spans::SPAN_FIRST].macro.second; location_t range_mask = (1u << max_range) - 1; dump () && dump ("Ordinary maps range bits:%u, preserve:%x, zero:%u", @@ -15850,16 +15992,9 @@ module_state::write_prepare_maps (module_state_config *) { loc_spans::span &span = spans[ix]; - span.macro_delta = mac_off - span.macro.second; - mac_off -= span.macro.second - span.macro.first; - dump () && dump ("Macro span:%u [%u,%u):%u->%d(%u)", ix, - span.macro.first, span.macro.second, - span.macro.second - span.macro.first, - span.macro_delta, span.macro.first + span.macro_delta); - line_map_ordinary const *omap = linemap_check_ordinary (linemap_lookup (line_table, - span.ordinary.first)); + span.ordinary.first)); location_t base = MAP_START_LOCATION (omap); /* Preserve the low MAX_RANGE bits of base by incrementing ORD_OFF. */ @@ -15888,14 +16023,33 @@ module_state::write_prepare_maps (module_state_config *) ord_off = span.ordinary.second + span.ordinary_delta; } - dump () && dump ("Ordinary:%u maps hwm:%u macro:%u maps lwm:%u ", + vec_alloc (macro_remap, macro_table->size ()); + for (auto iter = macro_table->begin (), end = macro_table->end (); + iter != end; ++iter) + macro_remap->quick_push (*iter); + delete macro_table; + macro_table = nullptr; + + macro_remap->qsort (¯o_info::compare); + unsigned offset = 0; + for (auto iter = macro_remap->begin (), end = macro_remap->end (); + iter != end; ++iter) + { + auto mac = iter->src; + iter->remap = offset; + offset += mac->n_tokens; + } + info.num_maps.second = macro_remap->length (); + cfg->macro_locs = offset; + + dump () && dump ("Ordinary:%u maps hwm:%u macro:%u maps %u locs", info.num_maps.first, ord_off, - info.num_maps.second, mac_off); + info.num_maps.second, cfg->macro_locs); dump.outdent (); info.max_range = max_range; - + return info; } @@ -16077,7 +16231,7 @@ module_state::write_ordinary_maps (elf_out *to, location_map_info &info, void module_state::write_macro_maps (elf_out *to, location_map_info &info, - module_state_config *cfg, unsigned *crc_p) + module_state_config *, unsigned *crc_p) { dump () && dump ("Writing macro location maps"); dump.indent (); @@ -16088,74 +16242,46 @@ module_state::write_macro_maps (elf_out *to, location_map_info &info, dump () && dump ("Macro maps:%u", info.num_maps.second); sec.u (info.num_maps.second); - location_t offset = spans[loc_spans::SPAN_FIRST].macro.second; - sec.u (offset); - unsigned macro_num = 0; - for (unsigned ix = loc_spans::SPAN_FIRST; ix != spans.length (); ix++) - { - loc_spans::span &span = spans[ix]; - if (span.macro.first == span.macro.second) - /* Empty span. */ - continue; - - for (unsigned macro - = linemap_lookup_macro_index (line_table, span.macro.second - 1); - macro < LINEMAPS_MACRO_USED (line_table); - macro++) + for (auto iter = macro_remap->end (), begin = macro_remap->begin (); + iter-- != begin;) + { + auto mac = iter->src; + sec.u (iter->remap); + sec.u (mac->n_tokens); + sec.cpp_node (mac->macro); + write_location (sec, mac->expansion); + const location_t *locs = mac->macro_locations; + /* There are lots of identical runs. */ + location_t prev = UNKNOWN_LOCATION; + unsigned count = 0; + unsigned runs = 0; + for (unsigned jx = mac->n_tokens * 2; jx--;) { - line_map_macro const *mmap - = LINEMAPS_MACRO_MAP_AT (line_table, macro); - location_t start_loc = MAP_START_LOCATION (mmap); - if (start_loc < span.macro.first) - /* Fallen out of the span. */ - break; - - if (!mmap->n_tokens) - /* Empty expansion. */ - continue; - - sec.u (offset); - sec.u (mmap->n_tokens); - sec.cpp_node (mmap->macro); - write_location (sec, mmap->expansion); - const location_t *locs = mmap->macro_locations; - /* There are lots of identical runs. */ - location_t prev = UNKNOWN_LOCATION; - unsigned count = 0; - unsigned runs = 0; - for (unsigned jx = mmap->n_tokens * 2; jx--;) + location_t tok_loc = locs[jx]; + if (tok_loc == prev) { - location_t tok_loc = locs[jx]; - if (tok_loc == prev) - { - count++; - continue; - } - runs++; - sec.u (count); - count = 1; - prev = tok_loc; - write_location (sec, tok_loc); + count++; + continue; } + runs++; sec.u (count); - dump (dumper::LOCATION) - && dump ("Span:%u macro:%u %I %u/%u*2 locations [%u,%u)->%u", - ix, macro_num, identifier (mmap->macro), - runs, mmap->n_tokens, - start_loc, start_loc + mmap->n_tokens, - start_loc + span.macro_delta); - macro_num++; - offset -= mmap->n_tokens; - gcc_checking_assert (offset == start_loc + span.macro_delta); + count = 1; + prev = tok_loc; + write_location (sec, tok_loc); } + sec.u (count); + dump (dumper::LOCATION) + && dump ("Macro:%u %I %u/%u*2 locations [%u,%u)->%u", + macro_num, identifier (mac->macro), + runs, mac->n_tokens, + MAP_START_LOCATION (mac), + MAP_START_LOCATION (mac) + mac->n_tokens, + iter->remap); + macro_num++; } - dump () && dump ("Macro location lwm:%u", offset); - sec.u (offset); gcc_assert (macro_num == info.num_maps.second); - cfg->macro_locs = MAX_LOCATION_T + 1 - offset; - sec.end (to, to->name (MOD_SNAME_PFX ".mlm"), crc_p); dump.outdent (); } @@ -16265,7 +16391,7 @@ module_state::read_ordinary_maps () } bool -module_state::read_macro_maps () +module_state::read_macro_maps (unsigned num_macro_locs) { bytes_in sec; @@ -16275,24 +16401,22 @@ module_state::read_macro_maps () dump.indent (); unsigned num_macros = sec.u (); - location_t zero = sec.u (); - dump () && dump ("Macro maps:%u zero:%u", num_macros, zero); + dump () && dump ("Macro maps:%u locs:%u", num_macros, num_macro_locs); bool propagated = spans.maybe_propagate (this, line_table->highest_location + 1); location_t offset = LINEMAPS_MACRO_LOWEST_LOCATION (line_table); - slurp->loc_deltas.second = zero - offset; - macro_locs.second = zero - slurp->loc_deltas.second; - dump () && dump ("Macro loc delta %d", slurp->loc_deltas.second); + macro_locs.second = num_macro_locs; + macro_locs.first = offset - num_macro_locs; + + dump () && dump ("Macro loc delta %d", offset); + dump () && dump ("Macro locations [%u,%u)", + macro_locs.first, macro_locs.second); for (unsigned ix = 0; ix != num_macros && !sec.get_overrun (); ix++) { - unsigned lwm = sec.u (); - /* Record the current LWM so that the below read_location is - ok. */ - macro_locs.first = lwm - slurp->loc_deltas.second; - + unsigned offset = sec.u (); unsigned n_tokens = sec.u (); cpp_hashnode *node = sec.cpp_node (); location_t exp_loc = read_location (sec); @@ -16303,6 +16427,8 @@ module_state::read_macro_maps () /* We shouldn't run out of locations, as we checked that we had enough before starting. */ break; + gcc_checking_assert (MAP_START_LOCATION (macro) + == offset + macro_locs.first); location_t *locs = macro->macro_locations; location_t tok_loc = UNKNOWN_LOCATION; @@ -16326,11 +16452,8 @@ module_state::read_macro_maps () MAP_START_LOCATION (macro), MAP_START_LOCATION (macro) + n_tokens); } - location_t lwm = sec.u (); - macro_locs.first = lwm - slurp->loc_deltas.second; dump () && dump ("Macro location lwm:%u", macro_locs.first); - if (propagated) spans.close (); @@ -17604,6 +17727,8 @@ module_state::write_begin (elf_out *to, cpp_reader *reader, /* No partitions present. */ partitions = nullptr; + write_init_maps (); + /* Find the set of decls we must write out. */ depset::hash table (DECL_NAMESPACE_BINDINGS (global_namespace)->size () * 8); /* Add the specializations before the writables, so that we can @@ -17911,7 +18036,7 @@ module_state::read_initial (cpp_reader *reader) gcc_assert (!from ()->is_frozen ()); /* Macro maps after the imports. */ - if (ok && have_locs && !read_macro_maps ()) + if (ok && have_locs && !read_macro_maps (config.macro_locs)) ok = false; /* Note whether there's an active initializer. */ diff --git a/gcc/testsuite/g++.dg/modules/loc-prune-1.C b/gcc/testsuite/g++.dg/modules/loc-prune-1.C new file mode 100644 index 0000000..6978e49 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/loc-prune-1.C @@ -0,0 +1,19 @@ +// { dg-additional-options {-fmodules-ts -fdump-lang-module-lineno} } + +export module foo; +// { dg-module-cmi foo } +#define NOT 1 +#define YES 1 +#define AGAIN_NO (1 + 2) +#if NOT +int foo (int = YES) +{ + return AGAIN_NO; +} +#endif + +// { dg-final { scan-lang-dump { Macro maps:1} module } } +// { dg-final { scan-lang-dump { Macro:0 YES 1/1.2 locations } module } } +// { dg-final { scan-lang-dump { Ordinary:[0-9]* maps hwm:[0-9]* macro:1 maps 1 locs} module } } +// { dg-final { scan-lang-dump-not {Macro:. NOT } module } } +// { dg-final { scan-lang-dump-not {Macro:. AGAIN_NO } module } } diff --git a/gcc/testsuite/g++.dg/modules/loc-prune-2.C b/gcc/testsuite/g++.dg/modules/loc-prune-2.C new file mode 100644 index 0000000..fc4ed78 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/loc-prune-2.C @@ -0,0 +1,14 @@ +// { dg-additional-options {-fmodules-ts -fdump-lang-module-lineno} } + +export module Eve; +// { dg-module-cmi Eve } + +#define BEGIN_NAMESPACE(X) inline namespace X { +#define END_NAMESPACE(X) } + +BEGIN_NAMESPACE (BOB) +void Alice (); +END_NAMESPACE (BOB) + +// { dg-final { scan-lang-dump { Macro maps:1} module } } +// { dg-final { scan-lang-dump { Macro:0 BEGIN_NAMESPACE 5/6.2 locations } module } } diff --git a/gcc/testsuite/g++.dg/modules/loc-prune-3.C b/gcc/testsuite/g++.dg/modules/loc-prune-3.C new file mode 100644 index 0000000..40e8aa6 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/loc-prune-3.C @@ -0,0 +1,16 @@ +// { dg-additional-options {-fmodules-ts -fdump-lang-module-lineno} } + +export module Eve; +// { dg-module-cmi Eve } + +#define BEGIN_NAMESPACE(X) inline namespace X { +#define END_NAMESPACE(X) } + +BEGIN_NAMESPACE (BOB) +namespace inner { +void Alice (); +} +END_NAMESPACE (BOB) + +// { dg-final { scan-lang-dump { Macro maps:1} module } } +// { dg-final { scan-lang-dump { Macro:0 BEGIN_NAMESPACE 5/6.2 locations } module } } diff --git a/gcc/testsuite/g++.dg/modules/pr98718_a.C b/gcc/testsuite/g++.dg/modules/pr98718_a.C index 0be5f90..ebd95ea 100644 --- a/gcc/testsuite/g++.dg/modules/pr98718_a.C +++ b/gcc/testsuite/g++.dg/modules/pr98718_a.C @@ -14,5 +14,5 @@ namespace std _GLIBCXX_VISIBILITY(default) export module hello:format; // { dg-module-cmi hello:format } -// { dg-final { scan-lang-dump { Ordinary:4 maps hwm:[0-9]* macro:1 maps lwm:214[0-9]*} module } } -// { dg-final { scan-lang-dump { Span:2 macro:0 _GLIBCXX_VISIBILITY 10/11\*2 locations } module } } +// { dg-final { scan-lang-dump { Ordinary:4 maps hwm:[0-9]* macro:0 maps 0 locs} module } } +// { dg-final { scan-lang-dump-not { Macro:. _GLIBCXX_VISIBILITY} module } } diff --git a/gcc/testsuite/g++.dg/modules/pr98718_b.C b/gcc/testsuite/g++.dg/modules/pr98718_b.C index 50679c8..6cb4698 100644 --- a/gcc/testsuite/g++.dg/modules/pr98718_b.C +++ b/gcc/testsuite/g++.dg/modules/pr98718_b.C @@ -14,7 +14,5 @@ export module hello; export import :format; // { dg-module-cmi hello } -// { dg-final { scan-lang-dump {Macro:0 _GLIBCXX_VISIBILITY 10/11\*2 locations } module } } -// { dg-final { scan-lang-dump { Ordinary:8 maps hwm:[0-9]* macro:2 maps lwm:214[0-9]*} module } } -// { dg-final { scan-lang-dump { Span:2 macro:0 _GLIBCXX_VISIBILITY 10/11\*2 locations } module } } -// { dg-final { scan-lang-dump { Span:4 macro:1 _GLIBCXX_VISIBILITY 10/11\*2 locations } module } } +// { dg-final { scan-lang-dump { Ordinary:8 maps hwm:[0-9]* macro:0 maps 0 locs} module } } +// { dg-final { scan-lang-dump-not { Macro:. _GLIBCXX_VISIBILITY} module } } -- cgit v1.1 From 8a15cd3396aa08dc2633982481fe392af0aa9e78 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 23 Jun 2022 14:43:50 +0200 Subject: c++: properly initialize UBSAN built-ins PR c++/106062 gcc/ChangeLog: * ubsan.cc (sanitize_unreachable_fn): Change order of calls in order to initialize UBSAN built-ins. gcc/testsuite/ChangeLog: * gfortran.dg/ubsan/pr106062.f90: New test. --- gcc/testsuite/gfortran.dg/ubsan/pr106062.f90 | 11 +++++++++++ gcc/ubsan.cc | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/ubsan/pr106062.f90 (limited to 'gcc') diff --git a/gcc/testsuite/gfortran.dg/ubsan/pr106062.f90 b/gcc/testsuite/gfortran.dg/ubsan/pr106062.f90 new file mode 100644 index 0000000..879a67e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/ubsan/pr106062.f90 @@ -0,0 +1,11 @@ +! PR c++/106062 +! { dg-do compile } +! { dg-options "-O2 -fsanitize=undefined" } + +call test (reshape ((/ 'a', 'b', 'c', 'd' /), (/ 2, 2 /))) +contains + subroutine test (a) + character (*), dimension (:, :) :: a + if (len (a) .ne. 1) STOP + end +end diff --git a/gcc/ubsan.cc b/gcc/ubsan.cc index f150268..b6c4301 100644 --- a/gcc/ubsan.cc +++ b/gcc/ubsan.cc @@ -654,9 +654,10 @@ sanitize_unreachable_fn (tree *data, location_t loc) } else if (san) { - fn = builtin_decl_explicit (BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE); + /* Call ubsan_create_data first as it initializes SANITIZER built-ins. */ *data = ubsan_create_data ("__ubsan_unreachable_data", 1, &loc, NULL_TREE, NULL_TREE); + fn = builtin_decl_explicit (BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE); *data = build_fold_addr_expr_loc (loc, *data); } else -- cgit v1.1 From 6e4d5300c1f62c3f0cd1bf859b0ee6bb4e31e434 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 22 Jun 2022 23:50:23 -0400 Subject: c++: -Waddress and value-dependent expr [PR105885] We already suppress various warnings for code that would be tautological if written directly, but not when it's the result of template substitution. It seems we need to do this for -Waddress as well. PR c++/105885 gcc/cp/ChangeLog: * pt.cc (tsubst_copy_and_build): Also suppress -Waddress for comparison of dependent operands. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/constexpr-if37.C: New test. --- gcc/cp/pt.cc | 1 + gcc/testsuite/g++.dg/cpp1z/constexpr-if37.C | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1z/constexpr-if37.C (limited to 'gcc') diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 80d2bec..4535c14 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -20438,6 +20438,7 @@ tsubst_copy_and_build (tree t, warning_sentinel s2(warn_div_by_zero, was_dep); warning_sentinel s3(warn_logical_op, was_dep); warning_sentinel s4(warn_tautological_compare, was_dep); + warning_sentinel s5(warn_address, was_dep); tree r = build_x_binary_op (input_location, TREE_CODE (t), diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-if37.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-if37.C new file mode 100644 index 0000000..e11e02c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-if37.C @@ -0,0 +1,21 @@ +// PR c++/105885 +// { dg-do compile { target c++17 } } +// { dg-additional-options -Wall } + +int i; + +template +void test() { + if constexpr(ARG == nullptr) { + ++i; + } else { + --i; + } +} + +const char CONSTSTR[] = {'\n', '\t', ' ', '\0'}; + +int main() { + test(); + test(); +} -- cgit v1.1 From 124a9e08b7a83795bd4d09001955f0eef68ecd00 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 23 Jun 2022 00:24:22 -0400 Subject: c++: -Waddress and if constexpr [PR94554] Like we avoid various warnings for seemingly tautological expressions when substituting a template, we should avoid warning for the implicit conversion to bool in an if statement. I considered also doing this for the conditions in loop expressions, but that seems unnecessary, as a loop condition is unlikely to be a constant. The change to finish_if_stmt_cond isn't necessary since dependent_operand_p looks through IMPLICIT_CONV_EXPR, but makes it more constent with e.g. build_x_binary_op that determines the type of an expression and then builds it using the original operands. PR c++/94554 gcc/cp/ChangeLog: * pt.cc (dependent_operand_p): Split out from... (tsubst_copy_and_build): ...here. (tsubst_expr) [IF_STMT]: Use it. * semantics.cc (finish_if_stmt_cond): Keep the pre-conversion condition in the template tree. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/constexpr-if38.C: New test. --- gcc/cp/pt.cc | 43 +++++++++++++++++++++-------- gcc/cp/semantics.cc | 10 +++++-- gcc/testsuite/g++.dg/cpp1z/constexpr-if38.C | 16 +++++++++++ 3 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp1z/constexpr-if38.C (limited to 'gcc') diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 4535c14..12a2b57 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -18547,6 +18547,29 @@ lookup_init_capture_pack (tree decl) return r; } +/* T is an operand of a template tree being substituted. Return whether + T is dependent such that we should suppress some warnings that would + make sense if the substituted expression were written directly, like + template bool f() { return I == 2; } + We don't want to warn when instantiating f that comparing two constants + always has the same value. + + This is a more limited concept of dependence than instantiation-dependent; + here we don't care whether substitution could fail. */ + +static bool +dependent_operand_p (tree t) +{ + while (TREE_CODE (t) == IMPLICIT_CONV_EXPR) + t = TREE_OPERAND (t, 0); + ++processing_template_decl; + bool r = (potential_constant_expression (t) + ? value_dependent_expression_p (t) + : type_dependent_expression_p (t)); + --processing_template_decl; + return r; +} + /* Like tsubst_copy for expressions, etc. but also does semantic processing. */ @@ -18872,8 +18895,13 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl, IF_STMT_CONSTEVAL_P (stmt) = IF_STMT_CONSTEVAL_P (t); if (IF_STMT_CONSTEXPR_P (t)) args = add_extra_args (IF_STMT_EXTRA_ARGS (t), args, complain, in_decl); - tmp = RECUR (IF_COND (t)); - tmp = finish_if_stmt_cond (tmp, stmt); + { + tree cond = IF_COND (t); + bool was_dep = dependent_operand_p (cond); + cond = RECUR (cond); + warning_sentinel s1(warn_address, was_dep); + tmp = finish_if_stmt_cond (cond, stmt); + } if (IF_STMT_CONSTEXPR_P (t) && instantiation_dependent_expression_p (tmp)) { @@ -20422,15 +20450,8 @@ tsubst_copy_and_build (tree t, warnings that depend on the range of the types involved. */ tree op0 = TREE_OPERAND (t, 0); tree op1 = TREE_OPERAND (t, 1); - auto dep_p = [](tree t) { - ++processing_template_decl; - bool r = (potential_constant_expression (t) - ? value_dependent_expression_p (t) - : type_dependent_expression_p (t)); - --processing_template_decl; - return r; - }; - const bool was_dep = dep_p (op0) || dep_p (op1); + const bool was_dep = (dependent_operand_p (op0) + || dependent_operand_p (op1)); op0 = RECUR (op0); op1 = RECUR (op1); diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc index 24cca99..2344b5e 100644 --- a/gcc/cp/semantics.cc +++ b/gcc/cp/semantics.cc @@ -1029,9 +1029,9 @@ maybe_warn_for_constant_evaluated (tree cond, bool constexpr_if) IF_STMT. */ tree -finish_if_stmt_cond (tree cond, tree if_stmt) +finish_if_stmt_cond (tree orig_cond, tree if_stmt) { - cond = maybe_convert_cond (cond); + tree cond = maybe_convert_cond (orig_cond); if (IF_STMT_CONSTEXPR_P (if_stmt) && !type_dependent_expression_p (cond) && require_constant_expression (cond) @@ -1045,7 +1045,11 @@ finish_if_stmt_cond (tree cond, tree if_stmt) cond = cxx_constant_value (cond, NULL_TREE); } else - maybe_warn_for_constant_evaluated (cond, /*constexpr_if=*/false); + { + maybe_warn_for_constant_evaluated (cond, /*constexpr_if=*/false); + if (processing_template_decl) + cond = orig_cond; + } finish_cond (&IF_COND (if_stmt), cond); add_stmt (if_stmt); THEN_CLAUSE (if_stmt) = push_stmt_list (); diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-if38.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-if38.C new file mode 100644 index 0000000..3e4fd44 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-if38.C @@ -0,0 +1,16 @@ +// PR c++/94554 +// { dg-do compile { target c++17 } } +// { dg-additional-options -Wall } + +int meow() { return 1; } +void kitty(int); +template +void test() { + if constexpr (F) { + kitty(F()); + } else { + kitty(2); + } +} +template void test(); +template void test(); -- cgit v1.1 From 0b14f590e3e9d95b8211b77d992589d5ab4c25f0 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 23 Jun 2022 14:59:24 -0400 Subject: diagnostics: add ability to associate diagnostics with rules from coding standards gcc/ChangeLog: * common.opt (fdiagnostics-show-rules): New option. * diagnostic-format-json.cc (diagnostic_output_format_init_json): Fix up context->show_rules. * diagnostic-format-sarif.cc (diagnostic_output_format_init_sarif): Likewise. * diagnostic-metadata.h (diagnostic_metadata::rule): New class. (diagnostic_metadata::precanned_rule): New class. (diagnostic_metadata::add_rule): New. (diagnostic_metadata::get_num_rules): New. (diagnostic_metadata::get_rule): New. (diagnostic_metadata::m_rules): New field. * diagnostic.cc (diagnostic_initialize): Initialize show_rules. (print_any_rules): New. (diagnostic_report_diagnostic): Call it. * diagnostic.h (diagnostic_context::show_rules): New field. * doc/invoke.texi (-fno-diagnostics-show-rules): New option. * opts.cc (common_handle_option): Handle OPT_fdiagnostics_show_rules. * toplev.cc (general_init): Set up global_dc->show_rules. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic-test-metadata.c: Expect " [STR34-C]" to be emitted at the "gets" call. * gcc.dg/plugin/diagnostic_plugin_test_metadata.c (pass_test_metadata::execute): Associate the "gets" diagnostic with a rule named "STR34-C". Signed-off-by: David Malcolm --- gcc/common.opt | 4 ++ gcc/diagnostic-format-json.cc | 1 + gcc/diagnostic-format-sarif.cc | 1 + gcc/diagnostic-metadata.h | 47 ++++++++++++++++++++- gcc/diagnostic.cc | 48 ++++++++++++++++++++++ gcc/diagnostic.h | 3 ++ gcc/doc/invoke.texi | 10 +++++ gcc/opts.cc | 4 ++ .../gcc.dg/plugin/diagnostic-test-metadata.c | 2 +- .../plugin/diagnostic_plugin_test_metadata.c | 9 +++- gcc/toplev.cc | 2 + 11 files changed, 127 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/common.opt b/gcc/common.opt index da5d23d..ed50f77 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1466,6 +1466,10 @@ fdiagnostics-show-cwe Common Var(flag_diagnostics_show_cwe) Init(1) Print CWE identifiers for diagnostic messages, where available. +fdiagnostics-show-rules +Common Var(flag_diagnostics_show_rules) Init(1) +Print any rules associated with diagnostic messages. + fdiagnostics-path-format= Common Joined RejectNegative Var(flag_diagnostics_path_format) Enum(diagnostic_path_format) Init(DPF_INLINE_EVENTS) Specify how to print any control-flow path associated with a diagnostic. diff --git a/gcc/diagnostic-format-json.cc b/gcc/diagnostic-format-json.cc index 051fa6c..d1d8d3f 100644 --- a/gcc/diagnostic-format-json.cc +++ b/gcc/diagnostic-format-json.cc @@ -345,6 +345,7 @@ diagnostic_output_format_init_json (diagnostic_context *context) /* The metadata is handled in JSON format, rather than as text. */ context->show_cwe = false; + context->show_rules = false; /* The option is handled in JSON format, rather than as text. */ context->show_option_requested = false; diff --git a/gcc/diagnostic-format-sarif.cc b/gcc/diagnostic-format-sarif.cc index 0c33179..a7bb9fb 100644 --- a/gcc/diagnostic-format-sarif.cc +++ b/gcc/diagnostic-format-sarif.cc @@ -1556,6 +1556,7 @@ diagnostic_output_format_init_sarif (diagnostic_context *context) /* The metadata is handled in SARIF format, rather than as text. */ context->show_cwe = false; + context->show_rules = false; /* The option is handled in SARIF format, rather than as text. */ context->show_option_requested = false; diff --git a/gcc/diagnostic-metadata.h b/gcc/diagnostic-metadata.h index ae59942..80017d3 100644 --- a/gcc/diagnostic-metadata.h +++ b/gcc/diagnostic-metadata.h @@ -24,19 +24,62 @@ along with GCC; see the file COPYING3. If not see /* A bundle of additional metadata that can be associated with a diagnostic. - Currently this only supports associating a CWE identifier with a - diagnostic. */ + This supports an optional CWE identifier, and zero or more + "rules". */ class diagnostic_metadata { public: + /* Abstract base class for referencing a rule that has been violated, + such as within a coding standard, or within a specification. */ + class rule + { + public: + virtual char *make_description () const = 0; + virtual char *make_url () const = 0; + }; + + /* Concrete subclass. */ + class precanned_rule : public rule + { + public: + precanned_rule (const char *desc, const char *url) + : m_desc (desc), m_url (url) + {} + + char *make_description () const final override + { + return m_desc ? xstrdup (m_desc) : NULL; + } + + char *make_url () const final override + { + return m_url ? xstrdup (m_url) : NULL; + } + + private: + const char *m_desc; + const char *m_url; + }; + diagnostic_metadata () : m_cwe (0) {} void add_cwe (int cwe) { m_cwe = cwe; } int get_cwe () const { return m_cwe; } + /* Associate R with the diagnostic. R must outlive + the metadata. */ + void add_rule (const rule &r) + { + m_rules.safe_push (&r); + } + + unsigned get_num_rules () const { return m_rules.length (); } + const rule &get_rule (unsigned idx) const { return *(m_rules[idx]); } + private: int m_cwe; + auto_vec m_rules; }; #endif /* ! GCC_DIAGNOSTIC_METADATA_H */ diff --git a/gcc/diagnostic.cc b/gcc/diagnostic.cc index f2a82ff..22f7b0b 100644 --- a/gcc/diagnostic.cc +++ b/gcc/diagnostic.cc @@ -190,6 +190,7 @@ diagnostic_initialize (diagnostic_context *context, int n_opts) for (i = 0; i < rich_location::STATICALLY_ALLOCATED_RANGES; i++) context->caret_chars[i] = '^'; context->show_cwe = false; + context->show_rules = false; context->path_format = DPF_NONE; context->show_path_depths = false; context->show_option_requested = false; @@ -1291,6 +1292,51 @@ print_any_cwe (diagnostic_context *context, } } +/* If DIAGNOSTIC has any rules associated with it, print them. + + For example, if the diagnostic metadata associates it with a rule + named "STR34-C", then " [STR34-C]" will be printed, suitably colorized, + with any URL provided by the rule. */ + +static void +print_any_rules (diagnostic_context *context, + const diagnostic_info *diagnostic) +{ + if (diagnostic->metadata == NULL) + return; + + for (unsigned idx = 0; idx < diagnostic->metadata->get_num_rules (); idx++) + { + const diagnostic_metadata::rule &rule + = diagnostic->metadata->get_rule (idx); + if (char *desc = rule.make_description ()) + { + pretty_printer *pp = context->printer; + char *saved_prefix = pp_take_prefix (context->printer); + pp_string (pp, " ["); + pp_string (pp, + colorize_start (pp_show_color (pp), + diagnostic_kind_color[diagnostic->kind])); + char *url = NULL; + if (pp->url_format != URL_FORMAT_NONE) + { + url = rule.make_url (); + if (url) + pp_begin_url (pp, url); + } + pp_string (pp, desc); + pp_set_prefix (context->printer, saved_prefix); + if (pp->url_format != URL_FORMAT_NONE) + if (url) + pp_end_url (pp); + free (url); + pp_string (pp, colorize_stop (pp_show_color (pp))); + pp_character (pp, ']'); + free (desc); + } + } +} + /* Print any metadata about the option used to control DIAGNOSTIC to CONTEXT's printer, e.g. " [-Werror=uninitialized]". Subroutine of diagnostic_report_diagnostic. */ @@ -1504,6 +1550,8 @@ diagnostic_report_diagnostic (diagnostic_context *context, pp_output_formatted_text (context->printer); if (context->show_cwe) print_any_cwe (context, diagnostic); + if (context->show_rules) + print_any_rules (context, diagnostic); if (context->show_option_requested) print_option_information (context, diagnostic, orig_diag_kind); (*diagnostic_finalizer (context)) (context, diagnostic, orig_diag_kind); diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 96c9a72..ae6f2df 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -227,6 +227,9 @@ struct diagnostic_context diagnostics. */ bool show_cwe; + /* True if we should print any rules associated with diagnostics. */ + bool show_rules; + /* How should diagnostic_path objects be printed. */ enum diagnostic_path_format path_format; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index e7526c5..07a1bf4 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -305,6 +305,7 @@ Objective-C and Objective-C++ Dialects}. -fno-diagnostics-show-option -fno-diagnostics-show-caret @gol -fno-diagnostics-show-labels -fno-diagnostics-show-line-numbers @gol -fno-diagnostics-show-cwe @gol +-fno-diagnostics-show-rule @gol -fdiagnostics-minimum-margin-width=@var{width} @gol -fdiagnostics-parseable-fixits -fdiagnostics-generate-patch @gol -fdiagnostics-show-template-tree -fno-elide-type @gol @@ -5028,6 +5029,15 @@ diagnostics. GCC plugins may also provide diagnostics with such metadata. By default, if this information is present, it will be printed with the diagnostic. This option suppresses the printing of this metadata. +@item -fno-diagnostics-show-rules +@opindex fno-diagnostics-show-rules +@opindex fdiagnostics-show-rules +Diagnostic messages can optionally have rules associated with them, such +as from a coding standard, or a specification. +GCC itself does not do this for any of its diagnostics, but plugins may do so. +By default, if this information is present, it will be printed with +the diagnostic. This option suppresses the printing of this metadata. + @item -fno-diagnostics-show-line-numbers @opindex fno-diagnostics-show-line-numbers @opindex fdiagnostics-show-line-numbers diff --git a/gcc/opts.cc b/gcc/opts.cc index 9982974..fe0293e 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -2876,6 +2876,10 @@ common_handle_option (struct gcc_options *opts, dc->show_cwe = value; break; + case OPT_fdiagnostics_show_rules: + dc->show_rules = value; + break; + case OPT_fdiagnostics_path_format_: dc->path_format = (enum diagnostic_path_format)value; break; diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata.c index d2babd3..38ecf0a 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata.c +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata.c @@ -5,5 +5,5 @@ extern char *gets (char *s); void test_cwe (void) { char buf[1024]; - gets (buf); /* { dg-warning "never use 'gets' \\\[CWE-242\\\]" } */ + gets (buf); /* { dg-warning "never use 'gets' \\\[CWE-242\\\] \\\[STR34-C\\\]" } */ } diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_metadata.c b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_metadata.c index 4b13afc..b86a8b3 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_metadata.c +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_metadata.c @@ -106,9 +106,16 @@ pass_test_metadata::execute (function *fun) if (gcall *call = check_for_named_call (stmt, "gets", 1)) { gcc_rich_location richloc (gimple_location (call)); - /* CWE-242: Use of Inherently Dangerous Function. */ diagnostic_metadata m; + + /* CWE-242: Use of Inherently Dangerous Function. */ m.add_cwe (242); + + /* Example of a diagnostic_metadata::rule. */ + diagnostic_metadata::precanned_rule + test_rule ("STR34-C", "https://example.com/"); + m.add_rule (test_rule); + warning_meta (&richloc, m, 0, "never use %qs", "gets"); } diff --git a/gcc/toplev.cc b/gcc/toplev.cc index 055e064..a24ad5d 100644 --- a/gcc/toplev.cc +++ b/gcc/toplev.cc @@ -1038,6 +1038,8 @@ general_init (const char *argv0, bool init_signals) = global_options_init.x_flag_diagnostics_show_line_numbers; global_dc->show_cwe = global_options_init.x_flag_diagnostics_show_cwe; + global_dc->show_rules + = global_options_init.x_flag_diagnostics_show_rules; global_dc->path_format = (enum diagnostic_path_format)global_options_init.x_flag_diagnostics_path_format; global_dc->show_path_depths -- cgit v1.1 From 038a7150ec07770174907b93bc93caaa1e019f92 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 22 Jun 2022 16:40:24 -0700 Subject: compiler: unalias types for hash/equality functions Test case is https://go.dev/cl/413694. Fixes golang/go#52846 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413660 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/gogo.cc | 2 +- gcc/go/gofrontend/types.cc | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 737bc48..629bc66 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -77821de1a149c2e6ef9c154ae384c16292173039 +6c3752315dc9b82d0f3f3ac646a1e7376818f84a The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index d35c6ba..e13df0d 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -2811,7 +2811,7 @@ Specific_type_functions::type(Type* t) case Type::TYPE_MAP: { - Type* key_type = t->map_type()->key_type(); + Type* key_type = t->map_type()->key_type()->unalias(); if (key_type->needs_specific_type_functions(this->gogo_)) key_type->hash_function(this->gogo_, NULL); } diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index eb3afd9..39aea76 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -1764,6 +1764,9 @@ Type::needs_specific_type_functions(Gogo* gogo) Named_object* Type::hash_function(Gogo* gogo, Function_type* hash_fntype) { + if (this->named_type() != NULL) + go_assert(!this->named_type()->is_alias()); + if (!this->is_comparable()) return NULL; @@ -2067,6 +2070,9 @@ Type::write_identity_hash(Gogo* gogo, int64_t size) Named_object* Type::equal_function(Gogo* gogo, Named_type* name, Function_type* equal_fntype) { + if (this->named_type() != NULL) + go_assert(!this->named_type()->is_alias()); + // If the unaliased type is not a named type, then the type does not // have a name after all. if (name != NULL) @@ -6700,7 +6706,8 @@ Struct_type::write_hash_function(Gogo* gogo, Function_type* hash_fntype) subkey = Expression::make_cast(key_arg_type, subkey, bloc); // Get the hash function to use for the type of this field. - Named_object* hash_fn = pf->type()->hash_function(gogo, hash_fntype); + Named_object* hash_fn = + pf->type()->unalias()->hash_function(gogo, hash_fntype); // Call the hash function for the field, passing retval as the seed. ref = Expression::make_temporary_reference(retval, bloc); @@ -7553,8 +7560,8 @@ Array_type::write_hash_function(Gogo* gogo, Function_type* hash_fntype) gogo->start_block(bloc); // Get the hash function for the element type. - Named_object* hash_fn = this->element_type_->hash_function(gogo, - hash_fntype); + Named_object* hash_fn = + this->element_type_->unalias()->hash_function(gogo, hash_fntype); // Get a pointer to this element in the loop. Expression* subkey = Expression::make_temporary_reference(key, bloc); @@ -8441,8 +8448,8 @@ Map_type::do_type_descriptor(Gogo* gogo, Named_type* name) ++p; go_assert(p->is_field_name("hasher")); Function_type* hasher_fntype = p->type()->function_type(); - Named_object* hasher_fn = this->key_type_->hash_function(gogo, - hasher_fntype); + Named_object* hasher_fn = + this->key_type_->unalias()->hash_function(gogo, hasher_fntype); if (hasher_fn == NULL) vals->push_back(Expression::make_cast(hasher_fntype, Expression::make_nil(bloc), -- cgit v1.1 From 5ee8e1d1b0c0d9f6310d27a37a6162e0be80e413 Mon Sep 17 00:00:00 2001 From: zhangjian Date: Tue, 21 Jun 2022 16:08:47 +0000 Subject: compiler: in Sort_bindings return false if comparing value to itself Some versions of std::sort may pass elements at the same iterator location. Fixes golang/go#53483 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413434 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/export.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 629bc66..f882812 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -6c3752315dc9b82d0f3f3ac646a1e7376818f84a +6b314f7947b4b31a86c09d166fe6664cd9968824 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/export.cc b/gcc/go/gofrontend/export.cc index a30b11a..7373dee 100644 --- a/gcc/go/gofrontend/export.cc +++ b/gcc/go/gofrontend/export.cc @@ -530,6 +530,9 @@ struct Sort_bindings bool operator()(const Named_object* n1, const Named_object* n2) const { + if (n1 == n2) + return false; + if (n1->package() != n2->package()) { if (n1->package() == NULL) -- cgit v1.1 From 01aff2ba18a654324957af446a3065db489c0f14 Mon Sep 17 00:00:00 2001 From: Patrick Palka Date: Thu, 23 Jun 2022 16:18:55 -0400 Subject: c++: context completion in lookup_template_class [PR105982] The below testcase demonstrates that completion of the substituted context during lookup_template_class can end up registering the desired specialization for us in more cases than r13-1045-gcb7fd1ea85feea anticipated. In particular this can happen for a non-dependent specialization of a nested class as well. For this testcase, during overload resolution with A's guides, we substitute the deduced argument T=int into the TYPENAME_TYPE B::C, during which we call lookup_template_class for A::B with T=int, which completes A for the first time, which recursively registers the desired specialization of B already. The parent call to lookup_template_class then tries to register the same specialization, triggering an ICE. This patch fixes this by making lookup_template_class determine more directly whether we need to recheck the specializations table after completion of the context -- when and only when the call to complete_type had an effect. PR c++/105982 gcc/cp/ChangeLog: * pt.cc (lookup_template_class): After calling complete_type for the substituted context, check the table again iff the type was previously incomplete and complete_type made it complete. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/class-deduction111.C: New test. --- gcc/cp/pt.cc | 21 ++++++++++++--------- gcc/testsuite/g++.dg/cpp1z/class-deduction111.C | 10 ++++++++++ 2 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp1z/class-deduction111.C (limited to 'gcc') diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 12a2b57..8672da1 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -10089,16 +10089,19 @@ lookup_template_class (tree d1, tree arglist, tree in_decl, tree context, { context = tsubst_aggr_type (context, arglist, complain, in_decl, true); - context = complete_type (context); - if (is_dependent_type && arg_depth > 1) + /* Try completing the enclosing context if it's not already so. */ + if (context != error_mark_node + && !COMPLETE_TYPE_P (context)) { - /* If this is a dependent nested specialization such as - A::B [with T=int, U=U], then completion of A - could have caused to register the desired specialization - of B already, so check the table again (33959). */ - entry = type_specializations->find_with_hash (&elt, hash); - if (entry) - return entry->spec; + context = complete_type (context); + if (COMPLETE_TYPE_P (context)) + { + /* Completion could have caused us to register the desired + specialization already, so check the table again. */ + entry = type_specializations->find_with_hash (&elt, hash); + if (entry) + return entry->spec; + } } } } diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction111.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction111.C new file mode 100644 index 0000000..2406529 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction111.C @@ -0,0 +1,10 @@ +// PR c++/105982 +// { dg-do compile { target c++17 } } + +template +struct A { + struct B { struct C { }; }; + A(T, typename B::C); +}; + +A a(0, {}); -- cgit v1.1 From b00b95198e6720eb23a2618870d67800f6180fdd Mon Sep 17 00:00:00 2001 From: Patrick Palka Date: Thu, 23 Jun 2022 16:36:43 -0400 Subject: c++: constexpr folding in unevaluated context [PR105931] Changing the type of N from int to unsigned in decltype82.C (from r13-986-g0ecb6b906f215e) reveals another spot where we perform constexpr evaluation in an unevaluated context for sake of warnings, this time from the call to shorten_compare in cp_build_binary_op, which calls fold_for_warn. We could (and probably should) suppress the shorten_compare warnings when in an unevaluated context, but there's probably other callers of fold_for_warn that are similarly affected. So this patch takes the approach of directly suppressing fold_for_warn when in an unevaluated context. PR c++/105931 gcc/cp/ChangeLog: * expr.cc (fold_for_warn): Don't fold when in an unevaluated context. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/decltype82a.C: New test. --- gcc/cp/expr.cc | 5 +++++ gcc/testsuite/g++.dg/cpp0x/decltype82a.C | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/decltype82a.C (limited to 'gcc') diff --git a/gcc/cp/expr.cc b/gcc/cp/expr.cc index 31fe098..56fc11f 100644 --- a/gcc/cp/expr.cc +++ b/gcc/cp/expr.cc @@ -397,6 +397,11 @@ fold_for_warn (tree x) { /* C++ implementation. */ + if (cp_unevaluated_operand) + /* In an unevaluated context we don't care about the reduced value + of an expression, so neither should any warnings. */ + return x; + /* Prevent warning-dependent constexpr evaluation from changing DECL_UID (which breaks -fcompare-debug) and from instantiating templates. */ diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype82a.C b/gcc/testsuite/g++.dg/cpp0x/decltype82a.C new file mode 100644 index 0000000..cbbcdfd --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype82a.C @@ -0,0 +1,11 @@ +// PR c++/105931 +// { dg-do compile { target c++11 } } +// A version of decltype82.C where N is unsigned. + +template +void f() { + using ty1 = decltype((5 % N) == 0); + using ty2 = decltype((5 / N) == 0); +} + +template void f<0>(); -- cgit v1.1 From d610ae121e8ecd738de4dc01e6ac11ecf7c2327e Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 23 Jun 2022 16:04:02 -0400 Subject: c++: anon union designated init [PR105925] This testcase was failing because CONSTRUCTOR_IS_DESIGNATED_INIT wasn't getting set on the introduced CONSTRUCTOR for the anonymous union, and build_aggr_conv uses that flag to decide whether to pay attention to the indexes of the CONSTRUCTOR. So set the flag when we see a designator rather than relying on copying it from another CONSTRUCTOR. This avoids some redundant errors on desig4.C because we stop setting CONSTRUCTOR_IS_DESIGNATED_INIT on _Complex CONSTRUCTORs where it's nonsense. PR c++/105925 gcc/cp/ChangeLog: * decl.cc (reshape_init_array_1): Set CONSTRUCTOR_IS_DESIGNATED_INIT here. (reshape_init_class): And here. (reshape_init): Not here. gcc/testsuite/ChangeLog: * g++.dg/ext/desig4.C: Remove extra errors. * g++.dg/cpp2a/desig26.C: New test. --- gcc/cp/decl.cc | 6 +++++- gcc/testsuite/g++.dg/cpp2a/desig26.C | 22 ++++++++++++++++++++++ gcc/testsuite/g++.dg/ext/desig4.C | 4 ---- 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp2a/desig26.C (limited to 'gcc') diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc index 29fc365..aa6cf3c 100644 --- a/gcc/cp/decl.cc +++ b/gcc/cp/decl.cc @@ -6505,6 +6505,8 @@ reshape_init_array_1 (tree elt_type, tree max_index, reshape_iter *d, tree elt_init; constructor_elt *old_cur = d->cur; + if (d->cur->index) + CONSTRUCTOR_IS_DESIGNATED_INIT (new_init) = true; check_array_designated_initializer (d->cur, index); elt_init = reshape_init_r (elt_type, d, /*first_initializer_p=*/NULL_TREE, @@ -6674,6 +6676,7 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p, } else if (TREE_CODE (d->cur->index) == IDENTIFIER_NODE) { + CONSTRUCTOR_IS_DESIGNATED_INIT (new_init) = true; field = get_class_binding (type, d->cur->index); direct_desig = true; } @@ -7158,7 +7161,8 @@ reshape_init (tree type, tree init, tsubst_flags_t complain) CONSTRUCTOR_IS_DIRECT_INIT (new_init) = true; if (CONSTRUCTOR_IS_DESIGNATED_INIT (init) && BRACE_ENCLOSED_INITIALIZER_P (new_init)) - CONSTRUCTOR_IS_DESIGNATED_INIT (new_init) = true; + gcc_checking_assert (CONSTRUCTOR_IS_DESIGNATED_INIT (new_init) + || seen_error ()); return new_init; } diff --git a/gcc/testsuite/g++.dg/cpp2a/desig26.C b/gcc/testsuite/g++.dg/cpp2a/desig26.C new file mode 100644 index 0000000..443fa3d --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/desig26.C @@ -0,0 +1,22 @@ +// PR c++/105925 +// { dg-do compile { target c++20 } } + +struct V +{ + int i; + double d; +}; + +struct X +{ + union + { + int x; + V y; + }; +}; + +X foo() +{ + return {.y = {0, 0.0}}; +} diff --git a/gcc/testsuite/g++.dg/ext/desig4.C b/gcc/testsuite/g++.dg/ext/desig4.C index 902bd1f..9b92a6d 100644 --- a/gcc/testsuite/g++.dg/ext/desig4.C +++ b/gcc/testsuite/g++.dg/ext/desig4.C @@ -6,13 +6,9 @@ int a = { .foo = 6 }; // { dg-error "designator" } int b = { [0] = 1 }; // { dg-error "12:designator .0." } _Complex float c = { .foo = 0, 1 }; // { dg-error "designator" } // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } .-1 } - // { dg-error "cannot convert" "" { target *-*-* } .-2 } _Complex float d = { [0] = 0, 1 }; // { dg-error "23:designator .0." } // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } .-1 } - // { dg-error "cannot convert" "" { target *-*-* } .-2 } _Complex float e = { 0, .foo = 1 }; // { dg-error "designator" } // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } .-1 } - // { dg-error "cannot convert" "" { target *-*-* } .-2 } _Complex float f = { 0, [0] = 1 }; // { dg-error "26:designator .0." } // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } .-1 } - // { dg-error "cannot convert" "" { target *-*-* } .-2 } -- cgit v1.1 From 6c72f1bfc3469422460d86314a081353632d4bcb Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 23 Jun 2022 14:41:19 -0400 Subject: c++: designated init cleanup [PR105925] build_aggr_conv expects to run after reshape_init, which will usually have filled out all the CONSTRUCTOR indexes; there's no reason to limit using those to the case where the user gave an explicit designator. PR c++/105925 gcc/cp/ChangeLog: * call.cc (build_aggr_conv): Don't depend on CONSTRUCTOR_IS_DESIGNATED_INIT. --- gcc/cp/call.cc | 58 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/call.cc b/gcc/cp/call.cc index 4710c37..f1dd837 100644 --- a/gcc/cp/call.cc +++ b/gcc/cp/call.cc @@ -969,7 +969,8 @@ build_aggr_conv (tree type, tree ctor, int flags, tsubst_flags_t complain) tree empty_ctor = NULL_TREE; hash_set pset; - /* We already called reshape_init in implicit_conversion. */ + /* We already called reshape_init in implicit_conversion, but it might not + have done anything in the case of parenthesized aggr init. */ /* The conversions within the init-list aren't affected by the enclosing context; they're always simple copy-initialization. */ @@ -979,49 +980,48 @@ build_aggr_conv (tree type, tree ctor, int flags, tsubst_flags_t complain) to corresponding TREE_TYPE (ce->index) and mark those FIELD_DECLs as visited. In the following loop then ignore already visited FIELD_DECLs. */ - if (CONSTRUCTOR_IS_DESIGNATED_INIT (ctor)) + tree idx, val; + FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (ctor), i, idx, val) { - tree idx, val; - FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (ctor), i, idx, val) - { - if (idx && TREE_CODE (idx) == FIELD_DECL) - { - tree ftype = TREE_TYPE (idx); - bool ok; + if (!idx) + break; - if (TREE_CODE (ftype) == ARRAY_TYPE) - ok = can_convert_array (ftype, val, flags, complain); - else - ok = can_convert_arg (ftype, TREE_TYPE (val), val, flags, - complain); + gcc_checking_assert (TREE_CODE (idx) == FIELD_DECL); - if (!ok) - return NULL; - /* For unions, there should be just one initializer. */ - if (TREE_CODE (type) == UNION_TYPE) - { - field = NULL_TREE; - i = 1; - break; - } - pset.add (idx); - } - else - return NULL; + tree ftype = TREE_TYPE (idx); + bool ok; + + if (TREE_CODE (ftype) == ARRAY_TYPE) + ok = can_convert_array (ftype, val, flags, complain); + else + ok = can_convert_arg (ftype, TREE_TYPE (val), val, flags, + complain); + + if (!ok) + return NULL; + + /* For unions, there should be just one initializer. */ + if (TREE_CODE (type) == UNION_TYPE) + { + field = NULL_TREE; + i = 1; + break; } + pset.add (idx); } for (; field; field = next_aggregate_field (DECL_CHAIN (field))) { tree ftype = TREE_TYPE (field); - tree val; bool ok; if (!pset.is_empty () && field_in_pset (pset, field)) continue; if (i < CONSTRUCTOR_NELTS (ctor)) { - val = CONSTRUCTOR_ELT (ctor, i)->value; + constructor_elt *ce = CONSTRUCTOR_ELT (ctor, i); + gcc_checking_assert (!ce->index); + val = ce->value; ++i; } else if (DECL_INITIAL (field)) -- cgit v1.1 From df724ec773d63b2efc4010a7e31280eeb51ee2ce Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 24 Jun 2022 00:16:41 +0000 Subject: Daily bump. --- gcc/ChangeLog | 47 ++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/cp/ChangeLog | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/testsuite/ChangeLog | 56 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 175 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a8718f..b94bb62 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,50 @@ +2022-06-23 David Malcolm + + * common.opt (fdiagnostics-show-rules): New option. + * diagnostic-format-json.cc (diagnostic_output_format_init_json): + Fix up context->show_rules. + * diagnostic-format-sarif.cc + (diagnostic_output_format_init_sarif): Likewise. + * diagnostic-metadata.h (diagnostic_metadata::rule): New class. + (diagnostic_metadata::precanned_rule): New class. + (diagnostic_metadata::add_rule): New. + (diagnostic_metadata::get_num_rules): New. + (diagnostic_metadata::get_rule): New. + (diagnostic_metadata::m_rules): New field. + * diagnostic.cc (diagnostic_initialize): Initialize show_rules. + (print_any_rules): New. + (diagnostic_report_diagnostic): Call it. + * diagnostic.h (diagnostic_context::show_rules): New field. + * doc/invoke.texi (-fno-diagnostics-show-rules): New option. + * opts.cc (common_handle_option): Handle + OPT_fdiagnostics_show_rules. + * toplev.cc (general_init): Set up global_dc->show_rules. + +2022-06-23 Martin Liska + + PR c++/106062 + * ubsan.cc (sanitize_unreachable_fn): Change order of calls + in order to initialize UBSAN built-ins. + +2022-06-23 Martin Liska + + PR ipa/105600 + * ipa-icf.cc (sem_item_optimizer::filter_removed_items): + Skip variables with body_removed. + +2022-06-23 liuhongt + + * config/i386/sse.md:(sse4_2_pcmpestr): Replace REGNO with + reg_or_subregno. + (sse4_2_pcmpistr): Ditto. + +2022-06-23 Xionghu Luo + + * cgraph.cc (cgraph_edge::redirect_call_stmt_to_callee): Fix + typo. + * tree-ssa-loop-ivopts.cc (struct iv_cand): Likewise. + * tree-switch-conversion.h: Likewise. + 2022-06-22 Jason Merrill PR c++/104642 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 559031e..4956361 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220623 +20220624 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 4fb9fd5..7f5e29a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,74 @@ +2022-06-23 Jason Merrill + + PR c++/105925 + * call.cc (build_aggr_conv): Don't depend on + CONSTRUCTOR_IS_DESIGNATED_INIT. + +2022-06-23 Jason Merrill + + PR c++/105925 + * decl.cc (reshape_init_array_1): Set + CONSTRUCTOR_IS_DESIGNATED_INIT here. + (reshape_init_class): And here. + (reshape_init): Not here. + +2022-06-23 Patrick Palka + + PR c++/105931 + * expr.cc (fold_for_warn): Don't fold when in an unevaluated + context. + +2022-06-23 Patrick Palka + + PR c++/105982 + * pt.cc (lookup_template_class): After calling complete_type for + the substituted context, check the table again iff the type was + previously incomplete and complete_type made it complete. + +2022-06-23 Jason Merrill + + PR c++/94554 + * pt.cc (dependent_operand_p): Split out from... + (tsubst_copy_and_build): ...here. + (tsubst_expr) [IF_STMT]: Use it. + * semantics.cc (finish_if_stmt_cond): Keep the pre-conversion + condition in the template tree. + +2022-06-23 Jason Merrill + + PR c++/105885 + * pt.cc (tsubst_copy_and_build): Also suppress -Waddress for + comparison of dependent operands. + +2022-06-23 Nathan Sidwell + + * module.cc (struct macro_info): New. + (struct macro_traits): New. + (macro_remap, macro_table): New globals. + (depset::hash::find_dependencies): Note namespace location. + (module_for_macro_loc): Adjust. + (module_state::note_location): New. + (module_state::Write_location): Note location when not + streaming. Adjust macro location streaming. + (module_state::read_location): Adjust macro location + streaming. + (module_state::write_init_maps): New. + (module_state::write_prepare_maps): Reimplement macro map + preparation. + (module_state::write_macro_maps): Reimplement. + (module_state::read_macro_maps): Likewise. + (module_state::write_begin): Adjust. + +2022-06-23 Jason Merrill + + * pt.cc (type_unification_real): An auto tparm can't + be affected by other deductions. + +2022-06-23 Jason Merrill + + PR c++/105964 + * pt.cc (type_dependent_expression_p): Look through BASELINK. + 2022-06-22 Jason Merrill PR c++/105908 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c99c66e..2704581 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,59 @@ +2022-06-23 Jason Merrill + + PR c++/105925 + * g++.dg/ext/desig4.C: Remove extra errors. + * g++.dg/cpp2a/desig26.C: New test. + +2022-06-23 Patrick Palka + + PR c++/105931 + * g++.dg/cpp0x/decltype82a.C: New test. + +2022-06-23 Patrick Palka + + PR c++/105982 + * g++.dg/cpp1z/class-deduction111.C: New test. + +2022-06-23 David Malcolm + + * gcc.dg/plugin/diagnostic-test-metadata.c: Expect " [STR34-C]" to + be emitted at the "gets" call. + * gcc.dg/plugin/diagnostic_plugin_test_metadata.c + (pass_test_metadata::execute): Associate the "gets" diagnostic + with a rule named "STR34-C". + +2022-06-23 Jason Merrill + + PR c++/94554 + * g++.dg/cpp1z/constexpr-if38.C: New test. + +2022-06-23 Jason Merrill + + PR c++/105885 + * g++.dg/cpp1z/constexpr-if37.C: New test. + +2022-06-23 Martin Liska + + PR c++/106062 + * gfortran.dg/ubsan/pr106062.f90: New test. + +2022-06-23 Nathan Sidwell + + * g++.dg/modules/loc-prune-1.C: New. + * g++.dg/modules/loc-prune-2.C: New. + * g++.dg/modules/loc-prune-3.C: New. + * g++.dg/modules/pr98718_a.C: Adjust. + * g++.dg/modules/pr98718_b.C: Adjust. + +2022-06-23 Richard Sandiford + + * gcc.dg/tree-ssa/slsr-39.c: Force vectorization off. + +2022-06-23 Jason Merrill + + PR c++/105964 + * g++.dg/cpp1z/nontype-auto21.C: New test. + 2022-06-22 Jason Merrill PR c++/105908 -- cgit v1.1 From c655ff35eda02dc53cf8dc9a98208ce8a4604a1f Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 23 Jun 2022 23:20:45 -0300 Subject: aarch64: testsuite: symbol-range fallback to compile On some of our embedded aarch64 targets, RAM size is too small for this test to fit. It doesn't look like this test requires linking, and if it does, the -tiny version may presumably get most of the coverage without going overboard in target system requirements. Still, linking may be useful, so introduce a two_plus_gigs effective target, that checks for the ability to link a program with 2GiB of sbss, and use that to select whether to link or just compile symbol-range.c. for gcc/ChangeLog * doc/sourcebuild.texi (Environment attributes): Document two_plus_gigs. for gcc/testsuite/ChangeLog * lib/target-supports.exp (check_effective_target_two_plus_gigs): New. * gcc.target/aarch64/symbol-range.c: Link only on two_plus_gigs targets, compile otherwise. --- gcc/doc/sourcebuild.texi | 3 +++ gcc/testsuite/gcc.target/aarch64/symbol-range.c | 3 ++- gcc/testsuite/lib/target-supports.exp | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 606ab85..3696a58 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2681,6 +2681,9 @@ Target supports @code{sysconf}. @item trampolines Target supports trampolines. +@item two_plus_gigs +Target supports linking programs with 2+GiB of data. + @item uclibc Target supports uClibc. diff --git a/gcc/testsuite/gcc.target/aarch64/symbol-range.c b/gcc/testsuite/gcc.target/aarch64/symbol-range.c index d8e82fa..6b15f08 100644 --- a/gcc/testsuite/gcc.target/aarch64/symbol-range.c +++ b/gcc/testsuite/gcc.target/aarch64/symbol-range.c @@ -1,4 +1,5 @@ -/* { dg-do link } */ +/* { dg-do link { target two_plus_gigs } } */ +/* { dg-do compile { target { ! two_plus_gigs } } } */ /* { dg-options "-O3 -save-temps -mcmodel=small" } */ char fixed_regs[0x80000000]; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index d1f4eb7..20171f9 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2906,6 +2906,15 @@ proc check_effective_target_le { } { }] } +# Return 1 if we can link a program with 2+GB of data. + +proc check_effective_target_two_plus_gigs { } { + return [check_no_compiler_messages two_plus_gigs executable { + int dummy[0x80000000]; + int main () { return 0; } + }] +} + # Return 1 if we're generating 32-bit code using default options, 0 # otherwise. -- cgit v1.1 From fc2fb4fd547fb39d76237a3a1a50f5c4f3646936 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 23 Jun 2022 23:20:48 -0300 Subject: Introduce -nostdlib++ option Using g++ to link without libstdc++, as in g++.dg/abi/pure-virtual1.C, is error prone, because there's no way to tell g++ to drop libstdc++ without also dropping libc and any other libraries that the target implicitly links in. This has often led to the need for manual adjustments to this testcase. I figured adding support for -nostdlib++, even though redundant, makes some sense. One could presumably use gcc rather than g++ for linking, for the same effect, but sometimes changing the link command is harder than adding an option, as in our testsuite. Since clang already had an option with this effect, we've adopted the same spelling. for gcc/ChangeLog * common.opt (nostdlib++): New. * doc/invoke.texi (-nostdlib++): Document it. for gcc/cp/ChangeLog * g++spec.cc (lang_specific_driver): Implement -nostdlib++. for gcc/testsuite/ChangeLog * g++.dg/abi/pure-virtual1.C: Use -nostdlib++. --- gcc/common.opt | 3 +++ gcc/cp/g++spec.cc | 1 + gcc/doc/invoke.texi | 6 +++++- gcc/testsuite/g++.dg/abi/pure-virtual1.C | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/common.opt b/gcc/common.opt index ed50f77..e7a51e8 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3467,6 +3467,9 @@ Driver nostdlib Driver +nostdlib++ +Driver + o Common Driver Joined Separate Var(asm_file_name) MissingArgError(missing filename after %qs) -o Place output into . diff --git a/gcc/cp/g++spec.cc b/gcc/cp/g++spec.cc index 8174d65..b63d835 100644 --- a/gcc/cp/g++spec.cc +++ b/gcc/cp/g++spec.cc @@ -159,6 +159,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, switch (decoded_options[i].opt_index) { case OPT_nostdlib: + case OPT_nostdlib__: case OPT_nodefaultlibs: library = -1; break; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 07a1bf4..f794edd 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -653,7 +653,7 @@ Objective-C and Objective-C++ Dialects}. @item Linker Options @xref{Link Options,,Options for Linking}. @gccoptlist{@var{object-file-name} -fuse-ld=@var{linker} -l@var{library} @gol --nostartfiles -nodefaultlibs -nolibc -nostdlib @gol +-nostartfiles -nodefaultlibs -nolibc -nostdlib -nostdlib++ @gol -e @var{entry} --entry=@var{entry} @gol -pie -pthread -r -rdynamic @gol -s -static -static-pie -static-libgcc -static-libstdc++ @gol @@ -16846,6 +16846,10 @@ library subroutines. constructors are called; @pxref{Collect2,,@code{collect2}, gccint, GNU Compiler Collection (GCC) Internals}.) +@item -nostdlib++ +@opindex nostdlib++ +Do not implicitly link with standard C++ libraries. + @item -e @var{entry} @itemx --entry=@var{entry} @opindex e diff --git a/gcc/testsuite/g++.dg/abi/pure-virtual1.C b/gcc/testsuite/g++.dg/abi/pure-virtual1.C index 538e2cb..59eaf22 100644 --- a/gcc/testsuite/g++.dg/abi/pure-virtual1.C +++ b/gcc/testsuite/g++.dg/abi/pure-virtual1.C @@ -1,7 +1,7 @@ // Test that we don't need libsupc++ just for __cxa_pure_virtual. // { dg-do link } // { dg-require-weak } -// { dg-additional-options "-fno-rtti -nodefaultlibs -lc" } +// { dg-additional-options "-fno-rtti -nostdlib++" } // { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } // { dg-xfail-if "AIX weak" { powerpc-ibm-aix* } } -- cgit v1.1 From 3b8794302b52a819ca3ea78238e9b5025d1c56dd Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Fri, 24 Jun 2022 07:15:08 +0100 Subject: PR target/105930: Split *xordi3_doubleword after reload on x86. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch addresses PR target/105930 which is an ia32 stack frame size regression in high-register pressure XOR-rich cryptography functions reported by Linus Torvalds. The underlying problem is once the limited number of registers on the x86 are exhausted, the register allocator has to decide which to spill, where some eviction choices lead to much poorer code, but these consequences are difficult to predict in advance. The patch below, which splits xordi3_doubleword and iordi3_doubleword after reload (instead of before), significantly reduces the amount of spill code and stack frame size, in what might appear to be an arbitrary choice. My explanation of this behaviour is that the mixing of pre-reload split SImode instructions and post-reload split DImode instructions is confusing some of the heuristics used by reload. One might think that splitting early gives the register allocator more freedom to use available registers, but in practice the constraint that double word values occupy consecutive registers (when ultimately used as a DImode value) is the greater constraint. Instead, I believe in this case, the pseudo registers used in memory addressing, appear to be double counted for split SImode instructions compared to unsplit DImode instructions. For the reduced test case in comment #13, this leads to %eax being used to hold the long-lived argument pointer "v", blocking the use of the ax:dx pair for processing double word values. The important lines are at the very top of the assembly output: GCC 11 [use %ecx to address memory, require a 24-byte stack frame] sub esp, 24 mov ecx, DWORD PTR [esp+40] GCC 12 [use %eax to address memory, require a 44-byte stack frame] sub esp, 44 mov eax, DWORD PTR [esp+64] 2022-06-24 Roger Sayle Uroš Bizjak gcc/ChangeLog PR target/105930 * config/i386/i386.md (*di3_doubleword): Split after reload. Use rtx_equal_p to avoid creating memory-to-memory moves, and emit NOTE_INSN_DELETED if operand[2] is zero (i.e. with -O0). --- gcc/config/i386/i386.md | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 3093cb5..dd173f7 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -10539,22 +10539,30 @@ "ix86_expand_binary_operator (, mode, operands); DONE;") (define_insn_and_split "*di3_doubleword" - [(set (match_operand:DI 0 "nonimmediate_operand") + [(set (match_operand:DI 0 "nonimmediate_operand" "=ro,r") (any_or:DI - (match_operand:DI 1 "nonimmediate_operand") - (match_operand:DI 2 "x86_64_szext_general_operand"))) + (match_operand:DI 1 "nonimmediate_operand" "0,0") + (match_operand:DI 2 "x86_64_szext_general_operand" "re,o"))) (clobber (reg:CC FLAGS_REG))] "!TARGET_64BIT - && ix86_binary_operator_ok (, DImode, operands) - && ix86_pre_reload_split ()" + && ix86_binary_operator_ok (, DImode, operands)" "#" - "&& 1" + "&& reload_completed" [(const_int 0)] { + /* This insn may disappear completely when operands[2] == const0_rtx + and operands[0] == operands[1], which requires a NOTE_INSN_DELETED. */ + bool emit_insn_deleted_note_p = false; + split_double_mode (DImode, &operands[0], 3, &operands[0], &operands[3]); if (operands[2] == const0_rtx) - emit_move_insn (operands[0], operands[1]); + { + if (!rtx_equal_p (operands[0], operands[1])) + emit_move_insn (operands[0], operands[1]); + else + emit_insn_deleted_note_p = true; + } else if (operands[2] == constm1_rtx) { if ( == IOR) @@ -10566,7 +10574,12 @@ ix86_expand_binary_operator (, SImode, &operands[0]); if (operands[5] == const0_rtx) - emit_move_insn (operands[3], operands[4]); + { + if (!rtx_equal_p (operands[3], operands[4])) + emit_move_insn (operands[3], operands[4]); + else if (emit_insn_deleted_note_p) + emit_note (NOTE_INSN_DELETED); + } else if (operands[5] == constm1_rtx) { if ( == IOR) -- cgit v1.1 From 268b5c81e93ac3ff44fc8ace22ce504d8faa4b07 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 23 Jun 2022 22:59:11 +0200 Subject: profile-count: fix /= and *= operators PR middle-end/106059 gcc/ChangeLog: * profile-count.h: *= and /= operators need to modify this object. --- gcc/profile-count.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/profile-count.h b/gcc/profile-count.h index be6e2d5..141a882 100644 --- a/gcc/profile-count.h +++ b/gcc/profile-count.h @@ -605,9 +605,10 @@ public: return apply_scale (num, 1); } - profile_probability operator*= (int64_t den) const + profile_probability operator*= (int64_t num) { - return *this * den; + *this = apply_scale (num, 1); + return *this; } profile_probability operator/ (int64_t den) const @@ -615,9 +616,10 @@ public: return apply_scale (1, den); } - profile_probability operator/= (int64_t den) const + profile_probability operator/= (int64_t den) { - return *this / den; + *this = apply_scale (1, den); + return *this; } /* Get the value of the count. */ @@ -1017,9 +1019,10 @@ public: return apply_scale (num, 1); } - profile_count operator*= (int64_t den) const + profile_count operator*= (int64_t num) { - return *this * den; + *this = apply_scale (num, 1); + return *this; } profile_count operator/ (int64_t den) const @@ -1027,9 +1030,10 @@ public: return apply_scale (1, den); } - profile_count operator/= (int64_t den) const + profile_count operator/= (int64_t den) { - return *this / den; + *this = apply_scale (1, den); + return *this; } /* Return true when value is not zero and can be used for scaling. -- cgit v1.1 From 7fd34782b95bbe1b4dc9936b8923f86d4aaee379 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 24 Jun 2022 13:52:44 +0200 Subject: Fix stmt_kills_ref_p WRT external throws Add missing check to stmt_kills_ref_p for case that function is terminated by EH before call return value kills the ref. In the PR I tried to construct testcase but I don't know how to do that until I annotate EH code with fnspec attributes which I will do in separate patch and add a testcase. PR ipa/106057 * tree-ssa-alias.cc (stmt_kills_ref_p): Check for external throw. --- gcc/tree-ssa-alias.cc | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc index b1e7a2d..782266b 100644 --- a/gcc/tree-ssa-alias.cc +++ b/gcc/tree-ssa-alias.cc @@ -87,10 +87,11 @@ along with GCC; see the file COPYING3. If not see This function tries to disambiguate two reference trees. - bool ptr_deref_may_alias_global_p (tree) + bool ptr_deref_may_alias_global_p (tree, bool) This function queries if dereferencing a pointer variable may - alias global memory. + alias global memory. If bool argument is true, global memory + is considered to also include function local memory that escaped. More low-level disambiguators are available and documented in this file. Low-level disambiguators dealing with points-to @@ -3333,11 +3334,18 @@ stmt_kills_ref_p (gimple *stmt, ao_ref *ref) && TREE_CODE (gimple_get_lhs (stmt)) != SSA_NAME /* The assignment is not necessarily carried out if it can throw and we can catch it in the current function where we could inspect - the previous value. + the previous value. Similarly if the function can throw externally + and the ref does not die on the function return. ??? We only need to care about the RHS throwing. For aggregate assignments or similar calls and non-call exceptions the LHS - might throw as well. */ - && !stmt_can_throw_internal (cfun, stmt)) + might throw as well. + ??? We also should care about possible longjmp, but since we + do not understand that longjmp is not using global memory we will + not consider a kill here since the function call will be considered + as possibly using REF. */ + && !stmt_can_throw_internal (cfun, stmt) + && (!stmt_can_throw_external (cfun, stmt) + || !ref_may_alias_global_p (ref, false))) { tree lhs = gimple_get_lhs (stmt); /* If LHS is literally a base of the access we are done. */ @@ -3434,8 +3442,12 @@ stmt_kills_ref_p (gimple *stmt, ao_ref *ref) && node->binds_to_current_def_p () && (summary = get_modref_function_summary (node)) != NULL && summary->kills.length () + /* Check that we can not trap while evaulating function + parameters. This check is overly conservative. */ && (!cfun->can_throw_non_call_exceptions - || !stmt_can_throw_internal (cfun, stmt))) + || (!stmt_can_throw_internal (cfun, stmt) + && (!stmt_can_throw_external (cfun, stmt) + || !ref_may_alias_global_p (ref, false))))) { for (auto kill : summary->kills) { -- cgit v1.1 From b36a1c964f99758de1f3b169628965d3c3af812b Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 24 Jun 2022 13:37:22 +0200 Subject: middle-end/106070 - bogus cond-expr folding The following fixes up r13-469-g9a53101caadae1b5 by properly implementing what operand_equal_for_comparison_p did. 2022-06-24 Richard Biener PR middle-end/106070 * match.pd (a != b ? a : b): Fix translation of operand_equal_for_comparison_p. * gcc.dg/torture/pr106070.c: New testcase. --- gcc/match.pd | 11 +++++++---- gcc/testsuite/gcc.dg/torture/pr106070.c | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr106070.c (limited to 'gcc') diff --git a/gcc/match.pd b/gcc/match.pd index 4a57089..e486b4b 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -4574,12 +4574,15 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (cond (cmp:c (nop_convert1?@c0 @0) (nop_convert2?@c1 @1)) (convert3? @0) (convert4? @1)) (if (!HONOR_SIGNED_ZEROS (type) - && ((INTEGRAL_TYPE_P (type) - /* Allow widening conversions of the data. */ + && (/* Allow widening conversions of the compare operands as data. */ + (INTEGRAL_TYPE_P (type) + && types_match (TREE_TYPE (@c0), TREE_TYPE (@0)) + && types_match (TREE_TYPE (@c1), TREE_TYPE (@1)) && TYPE_PRECISION (TREE_TYPE (@0)) <= TYPE_PRECISION (type) && TYPE_PRECISION (TREE_TYPE (@1)) <= TYPE_PRECISION (type)) - || (tree_nop_conversion_p (type, TREE_TYPE (@0)) - && tree_nop_conversion_p (type, TREE_TYPE (@1))))) + /* Or sign conversions for the comparison. */ + || (types_match (type, TREE_TYPE (@0)) + && types_match (type, TREE_TYPE (@1))))) (switch (if (cmp == EQ_EXPR) (if (VECTOR_TYPE_P (type)) diff --git a/gcc/testsuite/gcc.dg/torture/pr106070.c b/gcc/testsuite/gcc.dg/torture/pr106070.c new file mode 100644 index 0000000..c36534f --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr106070.c @@ -0,0 +1,20 @@ +/* { dg-do run } */ + +unsigned int var_2 = 1; +int var_4 = -1; +int var_10 = 4; +unsigned long arr_252; +void __attribute__((noipa)) test() { + for (int a = 0; a < var_10; a += 2) + arr_252 = var_2 != (int)var_4 ? (unsigned long)var_4 : (unsigned long)var_2; +} + +void test(); + +int main() +{ + test(); + if (arr_252 != 0xffffffffffffffff) + __builtin_abort(); + return 0; +} -- cgit v1.1 From 124580b00f83a6b84bdedee3486e03ce181dd179 Mon Sep 17 00:00:00 2001 From: Will Schmidt Date: Thu, 23 Jun 2022 15:45:15 -0500 Subject: [PATCH,RS6000 1/5] Clean-up MASK_ and RS6000_BTM_ definitions. This patch removes the defines that are no longer used, and updates the comment for the set of MASK_ defines. This patch removes the defines for MASK_REGNAMES, MASK_PROTOTYPE, RS6000_BTM_ALWAYS, RS6000_BTM_COMMON. gcc/ * config/rs6000/rs6000.h (RS6000_BTM_COMMON, RS6000_BTM_ALWAYS, MASK_REGNAMES, OPTION_MASK_REGNAMES, MASK_PROTOTYPE, OPTION_MASK_PROTOTYPE, MASK_UPDATE, OPTION_MASK_UPDATE): Remove. --- gcc/config/rs6000/rs6000.h | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) (limited to 'gcc') diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 3b8941a..2ff17a1 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -505,8 +505,9 @@ extern int rs6000_vector_align[]; && (TARGET_P9_MINMAX || !flag_trapping_math)) /* In switching from using target_flags to using rs6000_isa_flags, the options - machinery creates OPTION_MASK_ instead of MASK_. For now map - OPTION_MASK_ back into MASK_. */ + machinery creates OPTION_MASK_ instead of MASK_. The MASK_ + options that have not yet been replaced by their OPTION_MASK_ + equivalents are defined here. */ #define MASK_ALTIVEC OPTION_MASK_ALTIVEC #define MASK_CMPB OPTION_MASK_CMPB #define MASK_CRYPTO OPTION_MASK_CRYPTO @@ -536,7 +537,6 @@ extern int rs6000_vector_align[]; #define MASK_RECIP_PRECISION OPTION_MASK_RECIP_PRECISION #define MASK_SOFT_FLOAT OPTION_MASK_SOFT_FLOAT #define MASK_STRICT_ALIGN OPTION_MASK_STRICT_ALIGN -#define MASK_UPDATE OPTION_MASK_UPDATE #define MASK_VSX OPTION_MASK_VSX #define MASK_POWER10 OPTION_MASK_POWER10 #define MASK_P10_FUSION OPTION_MASK_P10_FUSION @@ -553,14 +553,6 @@ extern int rs6000_vector_align[]; #define MASK_LITTLE_ENDIAN OPTION_MASK_LITTLE_ENDIAN #endif -#ifdef TARGET_REGNAMES -#define MASK_REGNAMES OPTION_MASK_REGNAMES -#endif - -#ifdef TARGET_PROTOTYPE -#define MASK_PROTOTYPE OPTION_MASK_PROTOTYPE -#endif - #ifdef TARGET_MODULO #define RS6000_BTM_MODULO OPTION_MASK_MODULO #endif @@ -2252,7 +2244,6 @@ extern int frame_pointer_needed; /* Builtin targets. For now, we reuse the masks for those options that are in target flags, and pick a random bit for ldbl128, which isn't in target_flags. */ -#define RS6000_BTM_ALWAYS 0 /* Always enabled. */ #define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */ #define RS6000_BTM_CMPB MASK_CMPB /* ISA 2.05: compare bytes. */ #define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */ @@ -2277,28 +2268,6 @@ extern int frame_pointer_needed; #define RS6000_BTM_MMA MASK_MMA /* ISA 3.1 MMA. */ #define RS6000_BTM_P10 MASK_POWER10 -#define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \ - | RS6000_BTM_VSX \ - | RS6000_BTM_P8_VECTOR \ - | RS6000_BTM_P9_VECTOR \ - | RS6000_BTM_P9_MISC \ - | RS6000_BTM_MODULO \ - | RS6000_BTM_CRYPTO \ - | RS6000_BTM_FRE \ - | RS6000_BTM_FRES \ - | RS6000_BTM_FRSQRTE \ - | RS6000_BTM_FRSQRTES \ - | RS6000_BTM_HTM \ - | RS6000_BTM_POPCNTD \ - | RS6000_BTM_CELL \ - | RS6000_BTM_DFP \ - | RS6000_BTM_HARD_FLOAT \ - | RS6000_BTM_LDBL128 \ - | RS6000_BTM_POWERPC64 \ - | RS6000_BTM_FLOAT128 \ - | RS6000_BTM_FLOAT128_HW \ - | RS6000_BTM_MMA \ - | RS6000_BTM_P10) enum rs6000_builtin_type_index { -- cgit v1.1 From 0c0d2b63a706d5282948c18246b10e7c2ffd62fd Mon Sep 17 00:00:00 2001 From: Will Schmidt Date: Thu, 23 Jun 2022 15:48:21 -0500 Subject: [PATCH,RS6000 2/5] Rework the RS6000_BTM defines. The RS6000_BTM_ definitions are mostly unused after the rs6000 builtin code was reworked. The remaining references can be replaced with the OPTION_MASK_ and MASK_ equivalents. This patch remvoes the defines: RS6000_BTM_FRES, RS6000_BTM_FRSQRTE, RS6000_BTM_FRSQRTES, RS6000_BTM_POPCNTD, RS6000_BTM_CELL, RS6000_BTM_DFP, RS6000_BTM_HARD_FLOAT, RS6000_BTM_LDBL128, RS6000_BTM_64BIT, RS6000_BTM_POWERPC64, RS6000_BTM_FLOAT128, RS6000_BTM_FLOAT128_HW RS6000_BTM_MMA, RS6000_BTM_P10. I note that the BTM -> OPTION_MASK mappings are not always 1-to-1. in particular the BTM_FRES and BTM_FRSQRTE values were both mapped to OPTION_MASK_PPC_GFXOPT, while the BTM_FRE and BTM_FRSQRTES both mapped to OPTION_MASK_POPCNTB. In total I spent quite a bit of time double-checking these since it looked like copy/paste errors. I split some of these changes out into a subsequent patch to limit the amount of potential confusion in any particular patch. gcc/ * config/rs6000/rs6000-c.cc: Update comments. * config/rs6000/rs6000.cc (RS6000_BTM_FRES, RS6000_BTM_FRSQRTE, RS6000_BTM_FRSQRTES, RS6000_BTM_POPCNTD, RS6000_BTM_CELL, RS6000_BTM_64BIT, RS6000_BTM_POWERPC64, RS6000_BTM_DFP, RS6000_BTM_HARD_FLOAT,RS6000_BTM_LDBL128, RS6000_BTM_FLOAT128, RS6000_BTM_FLOAT128_HW, RS6000_BTM_MMA, RS6000_BTM_P10): Replace with OPTION_MASK_PPC_GFXOPT, OPTION_MASK_PPC_GFXOPT, OPTION_MASK_POPCNTB, OPTION_MASK_POPCNTD, OPTION_MASK_FPRND, MASK_64BIT, MASK_POWERPC64, OPTION_MASK_DFP, OPTION_MASK_SOFT_FLOAT, OPTION_MASK_MULTIPLE, OPTION_MASK_FLOAT128_KEYWORD, OPTION_MASK_FLOAT128_HW, OPTION_MASK_MMA, OPTION_MASK_POWER10. * config/rs6000/rs6000.h (RS6000_BTM_FRES, RS6000_BTM_FRSQRTE, RS6000_BTM_FRSQRTES, RS6000_BTM_POPCNTD, RS6000_BTM_CELL, RS6000_BTM_DFP, RS6000_BTM_HARD_FLOAT, RS6000_BTM_LDBL128, RS6000_BTM_64BIT, RS6000_BTM_POWERPC64, RS6000_BTM_FLOAT128, RS6000_BTM_FLOAT128_HW, RS6000_BTM_MMA, RS6000_BTM_P10): Delete. --- gcc/config/rs6000/rs6000-c.cc | 6 ++--- gcc/config/rs6000/rs6000.cc | 54 +++++++++++++++++++++---------------------- gcc/config/rs6000/rs6000.h | 14 ----------- 3 files changed, 30 insertions(+), 44 deletions(-) (limited to 'gcc') diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc index 9c8cbd7..4c99afc 100644 --- a/gcc/config/rs6000/rs6000-c.cc +++ b/gcc/config/rs6000/rs6000-c.cc @@ -596,9 +596,9 @@ rs6000_target_modify_macros (bool define_p, HOST_WIDE_INT flags, rs6000_define_or_undefine_macro (define_p, "__FLOAT128_HARDWARE__"); /* options from the builtin masks. */ - /* Note that RS6000_BTM_CELL is enabled only if (rs6000_cpu == - PROCESSOR_CELL) (e.g. -mcpu=cell). */ - if ((bu_mask & RS6000_BTM_CELL) != 0) + /* Note that OPTION_MASK_FPRND is enabled only if + (rs6000_cpu == PROCESSOR_CELL) (e.g. -mcpu=cell). */ + if ((bu_mask & OPTION_MASK_FPRND) != 0) rs6000_define_or_undefine_macro (define_p, "__PPU__"); /* Tell the user if we support the MMA instructions. */ diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 3d1f895..092d8e6 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -3383,28 +3383,28 @@ rs6000_builtin_mask_calculate (void) | ((TARGET_CMPB) ? RS6000_BTM_CMPB : 0) | ((TARGET_VSX) ? RS6000_BTM_VSX : 0) | ((TARGET_FRE) ? RS6000_BTM_FRE : 0) - | ((TARGET_FRES) ? RS6000_BTM_FRES : 0) - | ((TARGET_FRSQRTE) ? RS6000_BTM_FRSQRTE : 0) - | ((TARGET_FRSQRTES) ? RS6000_BTM_FRSQRTES : 0) - | ((TARGET_POPCNTD) ? RS6000_BTM_POPCNTD : 0) - | ((rs6000_cpu == PROCESSOR_CELL) ? RS6000_BTM_CELL : 0) + | ((TARGET_FRES) ? OPTION_MASK_PPC_GFXOPT : 0) + | ((TARGET_FRSQRTE) ? OPTION_MASK_PPC_GFXOPT : 0) + | ((TARGET_FRSQRTES) ? OPTION_MASK_POPCNTB : 0) + | ((TARGET_POPCNTD) ? OPTION_MASK_POPCNTD : 0) + | ((rs6000_cpu == PROCESSOR_CELL) ? OPTION_MASK_FPRND : 0) | ((TARGET_P8_VECTOR) ? RS6000_BTM_P8_VECTOR : 0) | ((TARGET_P9_VECTOR) ? RS6000_BTM_P9_VECTOR : 0) | ((TARGET_P9_MISC) ? RS6000_BTM_P9_MISC : 0) | ((TARGET_MODULO) ? RS6000_BTM_MODULO : 0) - | ((TARGET_64BIT) ? RS6000_BTM_64BIT : 0) - | ((TARGET_POWERPC64) ? RS6000_BTM_POWERPC64 : 0) + | ((TARGET_64BIT) ? MASK_64BIT : 0) + | ((TARGET_POWERPC64) ? MASK_POWERPC64 : 0) | ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0) | ((TARGET_HTM) ? RS6000_BTM_HTM : 0) - | ((TARGET_DFP) ? RS6000_BTM_DFP : 0) - | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0) + | ((TARGET_DFP) ? OPTION_MASK_DFP : 0) + | ((TARGET_HARD_FLOAT) ? OPTION_MASK_SOFT_FLOAT : 0) | ((TARGET_LONG_DOUBLE_128 && TARGET_HARD_FLOAT - && !TARGET_IEEEQUAD) ? RS6000_BTM_LDBL128 : 0) - | ((TARGET_FLOAT128_TYPE) ? RS6000_BTM_FLOAT128 : 0) - | ((TARGET_FLOAT128_HW) ? RS6000_BTM_FLOAT128_HW : 0) - | ((TARGET_MMA) ? RS6000_BTM_MMA : 0) - | ((TARGET_POWER10) ? RS6000_BTM_P10 : 0)); + && !TARGET_IEEEQUAD) ? OPTION_MASK_MULTIPLE : 0) + | ((TARGET_FLOAT128_TYPE) ? OPTION_MASK_FLOAT128_KEYWORD : 0) + | ((TARGET_FLOAT128_HW) ? OPTION_MASK_FLOAT128_HW : 0) + | ((TARGET_MMA) ? OPTION_MASK_MMA : 0) + | ((TARGET_POWER10) ? OPTION_MASK_POWER10 : 0)); } /* Implement TARGET_MD_ASM_ADJUST. All asm statements are considered @@ -24056,24 +24056,24 @@ static struct rs6000_opt_mask const rs6000_builtin_mask_names[] = { "altivec", RS6000_BTM_ALTIVEC, false, false }, { "vsx", RS6000_BTM_VSX, false, false }, { "fre", RS6000_BTM_FRE, false, false }, - { "fres", RS6000_BTM_FRES, false, false }, - { "frsqrte", RS6000_BTM_FRSQRTE, false, false }, - { "frsqrtes", RS6000_BTM_FRSQRTES, false, false }, - { "popcntd", RS6000_BTM_POPCNTD, false, false }, - { "cell", RS6000_BTM_CELL, false, false }, + { "fres", OPTION_MASK_PPC_GFXOPT, false, false }, + { "frsqrte", OPTION_MASK_PPC_GFXOPT, false, false }, + { "frsqrtes", OPTION_MASK_POPCNTB, false, false }, + { "popcntd", OPTION_MASK_POPCNTD, false, false }, + { "cell", OPTION_MASK_FPRND, false, false }, { "power8-vector", RS6000_BTM_P8_VECTOR, false, false }, { "power9-vector", RS6000_BTM_P9_VECTOR, false, false }, { "power9-misc", RS6000_BTM_P9_MISC, false, false }, { "crypto", RS6000_BTM_CRYPTO, false, false }, { "htm", RS6000_BTM_HTM, false, false }, - { "hard-dfp", RS6000_BTM_DFP, false, false }, - { "hard-float", RS6000_BTM_HARD_FLOAT, false, false }, - { "long-double-128", RS6000_BTM_LDBL128, false, false }, - { "powerpc64", RS6000_BTM_POWERPC64, false, false }, - { "float128", RS6000_BTM_FLOAT128, false, false }, - { "float128-hw", RS6000_BTM_FLOAT128_HW,false, false }, - { "mma", RS6000_BTM_MMA, false, false }, - { "power10", RS6000_BTM_P10, false, false }, + { "hard-dfp", OPTION_MASK_DFP, false, false }, + { "hard-float", OPTION_MASK_SOFT_FLOAT, false, false }, + { "long-double-128", OPTION_MASK_MULTIPLE, false, false }, + { "powerpc64", MASK_POWERPC64, false, false }, + { "float128", OPTION_MASK_FLOAT128_KEYWORD, false, false }, + { "float128-hw", OPTION_MASK_FLOAT128_HW,false, false }, + { "mma", OPTION_MASK_MMA, false, false }, + { "power10", OPTION_MASK_POWER10, false, false }, }; /* Option variables that we want to support inside attribute((target)) and diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 2ff17a1..384c5f1 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -2253,20 +2253,6 @@ extern int frame_pointer_needed; #define RS6000_BTM_CRYPTO MASK_CRYPTO /* crypto funcs. */ #define RS6000_BTM_HTM MASK_HTM /* hardware TM funcs. */ #define RS6000_BTM_FRE MASK_POPCNTB /* FRE instruction. */ -#define RS6000_BTM_FRES MASK_PPC_GFXOPT /* FRES instruction. */ -#define RS6000_BTM_FRSQRTE MASK_PPC_GFXOPT /* FRSQRTE instruction. */ -#define RS6000_BTM_FRSQRTES MASK_POPCNTB /* FRSQRTES instruction. */ -#define RS6000_BTM_POPCNTD MASK_POPCNTD /* Target supports ISA 2.06. */ -#define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */ -#define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */ -#define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */ -#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */ -#define RS6000_BTM_64BIT MASK_64BIT /* 64-bit addressing. */ -#define RS6000_BTM_POWERPC64 MASK_POWERPC64 /* 64-bit registers. */ -#define RS6000_BTM_FLOAT128 MASK_FLOAT128_KEYWORD /* IEEE 128-bit float. */ -#define RS6000_BTM_FLOAT128_HW MASK_FLOAT128_HW /* IEEE 128-bit float h/w. */ -#define RS6000_BTM_MMA MASK_MMA /* ISA 3.1 MMA. */ -#define RS6000_BTM_P10 MASK_POWER10 enum rs6000_builtin_type_index -- cgit v1.1 From a5c117e9f38d5f147a31f137706afbc55b12828f Mon Sep 17 00:00:00 2001 From: Will Schmidt Date: Thu, 23 Jun 2022 15:50:57 -0500 Subject: [PATCH,RS6000 3/5] Rework the RS6000_BTM defines, continued. The RS6000_BTM_ definitions are mostly unused after the rs6000 builtin code was reworked. This cleans up the remaining RS6000_BTM_ references by replacing them with their OPTION_MASK_ equivalents. This patch removes the defines RS6000_BTM_MODULO, RS6000_BTM_ALTIVEC, RS6000_BTM_CMPB, RS6000_BTM_VSX, RS6000_BTM_P8_VECTOR, RS6000_BTM_P9_VECTOR, RS6000_BTM_P9_MISC, RS6000_BTM_CRYPTO, RS6000_BTM_HTM, RS6000_BTM_FRE. gcc/ * config/rs6000/rs6000.cc (RS6000_BTM_ALTIVEC, RS6000_BTM_CMPB, RS6000_BTM_VSX, RS6000_BTM_FRE, RS6000_BTM_P8_VECTOR, RS6000_BTM_P9_VECTOR, RS6000_BTM_P9_MISC, RS6000_BTM_MODULO, RS6000_BTM_CRYPTO, RS6000_BTM_HTM): Replace with OPTION_MASK_ALTIVEC, OPTION_MASK_CMPB, OPTION_MASK_VSX, OPTION_MASK_POPCNTB, OPTION_MASK_P8_VECTOR, OPTION_MASK_P9_VECTOR, OPTION_MASK_P9_MISC, OPTION_MASK_MODULO, OPTION_MASK_CRYPTO, OPTION_MASK_HTM. * config/rs6000/rs6000.h (RS6000_BTM_MODULO, RS6000_BTM_ALTIVEC, RS6000_BTM_CMPB, RS6000_BTM_VSX, RS6000_BTM_P8_VECTOR, RS6000_BTM_P9_VECTOR, RS6000_BTM_P9_MISC, RS6000_BTM_CRYPTO, RS6000_BTM_HTM, RS6000_BTM_FRE): Remove. --- gcc/config/rs6000/rs6000.cc | 36 ++++++++++++++++++------------------ gcc/config/rs6000/rs6000.h | 20 -------------------- 2 files changed, 18 insertions(+), 38 deletions(-) (limited to 'gcc') diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 092d8e6..2178056 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -3379,23 +3379,23 @@ darwin_rs6000_override_options (void) HOST_WIDE_INT rs6000_builtin_mask_calculate (void) { - return (((TARGET_ALTIVEC) ? RS6000_BTM_ALTIVEC : 0) - | ((TARGET_CMPB) ? RS6000_BTM_CMPB : 0) - | ((TARGET_VSX) ? RS6000_BTM_VSX : 0) - | ((TARGET_FRE) ? RS6000_BTM_FRE : 0) + return (((TARGET_ALTIVEC) ? OPTION_MASK_ALTIVEC : 0) + | ((TARGET_CMPB) ? OPTION_MASK_CMPB : 0) + | ((TARGET_VSX) ? OPTION_MASK_VSX : 0) + | ((TARGET_FRE) ? OPTION_MASK_POPCNTB : 0) | ((TARGET_FRES) ? OPTION_MASK_PPC_GFXOPT : 0) | ((TARGET_FRSQRTE) ? OPTION_MASK_PPC_GFXOPT : 0) | ((TARGET_FRSQRTES) ? OPTION_MASK_POPCNTB : 0) | ((TARGET_POPCNTD) ? OPTION_MASK_POPCNTD : 0) | ((rs6000_cpu == PROCESSOR_CELL) ? OPTION_MASK_FPRND : 0) - | ((TARGET_P8_VECTOR) ? RS6000_BTM_P8_VECTOR : 0) - | ((TARGET_P9_VECTOR) ? RS6000_BTM_P9_VECTOR : 0) - | ((TARGET_P9_MISC) ? RS6000_BTM_P9_MISC : 0) - | ((TARGET_MODULO) ? RS6000_BTM_MODULO : 0) + | ((TARGET_P8_VECTOR) ? OPTION_MASK_P8_VECTOR : 0) + | ((TARGET_P9_VECTOR) ? OPTION_MASK_P9_VECTOR : 0) + | ((TARGET_P9_MISC) ? OPTION_MASK_P9_MISC : 0) + | ((TARGET_MODULO) ? OPTION_MASK_MODULO : 0) | ((TARGET_64BIT) ? MASK_64BIT : 0) | ((TARGET_POWERPC64) ? MASK_POWERPC64 : 0) - | ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0) - | ((TARGET_HTM) ? RS6000_BTM_HTM : 0) + | ((TARGET_CRYPTO) ? OPTION_MASK_CRYPTO : 0) + | ((TARGET_HTM) ? OPTION_MASK_HTM : 0) | ((TARGET_DFP) ? OPTION_MASK_DFP : 0) | ((TARGET_HARD_FLOAT) ? OPTION_MASK_SOFT_FLOAT : 0) | ((TARGET_LONG_DOUBLE_128 @@ -24053,19 +24053,19 @@ static struct rs6000_opt_mask const rs6000_opt_masks[] = /* Builtin mask mapping for printing the flags. */ static struct rs6000_opt_mask const rs6000_builtin_mask_names[] = { - { "altivec", RS6000_BTM_ALTIVEC, false, false }, - { "vsx", RS6000_BTM_VSX, false, false }, - { "fre", RS6000_BTM_FRE, false, false }, + { "altivec", OPTION_MASK_ALTIVEC, false, false }, + { "vsx", OPTION_MASK_VSX, false, false }, + { "fre", OPTION_MASK_POPCNTB, false, false }, { "fres", OPTION_MASK_PPC_GFXOPT, false, false }, { "frsqrte", OPTION_MASK_PPC_GFXOPT, false, false }, { "frsqrtes", OPTION_MASK_POPCNTB, false, false }, { "popcntd", OPTION_MASK_POPCNTD, false, false }, { "cell", OPTION_MASK_FPRND, false, false }, - { "power8-vector", RS6000_BTM_P8_VECTOR, false, false }, - { "power9-vector", RS6000_BTM_P9_VECTOR, false, false }, - { "power9-misc", RS6000_BTM_P9_MISC, false, false }, - { "crypto", RS6000_BTM_CRYPTO, false, false }, - { "htm", RS6000_BTM_HTM, false, false }, + { "power8-vector", OPTION_MASK_P8_VECTOR, false, false }, + { "power9-vector", OPTION_MASK_P9_VECTOR, false, false }, + { "power9-misc", OPTION_MASK_P9_MISC, false, false }, + { "crypto", OPTION_MASK_CRYPTO, false, false }, + { "htm", OPTION_MASK_HTM, false, false }, { "hard-dfp", OPTION_MASK_DFP, false, false }, { "hard-float", OPTION_MASK_SOFT_FLOAT, false, false }, { "long-double-128", OPTION_MASK_MULTIPLE, false, false }, diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 384c5f1..72eb473 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -553,11 +553,6 @@ extern int rs6000_vector_align[]; #define MASK_LITTLE_ENDIAN OPTION_MASK_LITTLE_ENDIAN #endif -#ifdef TARGET_MODULO -#define RS6000_BTM_MODULO OPTION_MASK_MODULO -#endif - - /* For power systems, we want to enable Altivec and VSX builtins even if the user did not use -maltivec or -mvsx to allow the builtins to be used inside of #pragma GCC target or the target attribute to change the code level for a @@ -2240,21 +2235,6 @@ extern char rs6000_reg_names[][8]; /* register names (0 vs. %r0). */ /* General flags. */ extern int frame_pointer_needed; - -/* Builtin targets. For now, we reuse the masks for those options that are in - target flags, and pick a random bit for ldbl128, which isn't in - target_flags. */ -#define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */ -#define RS6000_BTM_CMPB MASK_CMPB /* ISA 2.05: compare bytes. */ -#define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */ -#define RS6000_BTM_P8_VECTOR MASK_P8_VECTOR /* ISA 2.07 vector. */ -#define RS6000_BTM_P9_VECTOR MASK_P9_VECTOR /* ISA 3.0 vector. */ -#define RS6000_BTM_P9_MISC MASK_P9_MISC /* ISA 3.0 misc. non-vector */ -#define RS6000_BTM_CRYPTO MASK_CRYPTO /* crypto funcs. */ -#define RS6000_BTM_HTM MASK_HTM /* hardware TM funcs. */ -#define RS6000_BTM_FRE MASK_POPCNTB /* FRE instruction. */ - - enum rs6000_builtin_type_index { RS6000_BTI_NOT_OPAQUE, -- cgit v1.1 From 9ccc75eba98848e5bc00b55ee9d1a70d57f1e39d Mon Sep 17 00:00:00 2001 From: Will Schmidt Date: Thu, 23 Jun 2022 15:52:33 -0500 Subject: [PATCH,RS6000 4/5] Replace MASK_ with OPTION_MASK_ This replaces the MASK_ references with OPTION_MASK_ and removes the now unused defines. This patch removes the defines for MASK_ALTIVEC, MASK_CMPB, MASK_CRYPTO, MASK_DFP, MASK_DIRECT_MOVE, MASK_DLMZB, MASK_EABI, MASK_FLOAT128_KEYWORD, MASK_FLOAT128_HW, MASK_FPRND, MASK_P8_FUSION, MASK_HARD_FLOAT, MASK_HTM, MASK_MFCRF, MASK_MMA, MASK_MULHW, MASK_MULTIPLE, MASK_NO_UPDATE. gcc/ * config/rs6000/aix71.h (TARGET_DEFAULT): Replace MASK_MFCRF with OPTION_MASK_MFCRF. * config/rs6000/darwin.h (TARGET_DEFAULT): Replace MASK_MULTIPLE with OPTION_MASK_MULTIPLE. * config/rs6000/darwin64-biarch.h (TARGET_DEFAULT): Same. * config/rs6000/default64.h (TARGET_DEFAULT): Replace MASK_MFCRF with OPTION_MASK_MFCRF. * config/rs6000/eabi.h (TARGET_DEFAULT): Replace MASK_EABI with OPTION_MASK_EABI. * config/rs6000/eabialtivec.h (TARGET_DEFAULT): Same. * config/rs6000/linuxaltivec.h (TARGET_DEFAULT): Replace MASK_ALTIVEC with OPTION_MASK_ALTIVEC. * config/rs6000/rs6000-cpus.def (MASK_ALTIVEC, MASK_CMPB, MASK_CRYPTO, MASK_DFP, MASK_DIRECT_MOVE, MASK_DLMZB, MASK_EABI, MASK_FLOAT128_KEYWORD, MASK_FLOAT128_HW, MASK_FPRND, MASK_P8_FUSION, MASK_HARD_FLOAT, MASK_HTM, MASK_ISEL, MASK_MFCRF, MASK_MMA, MASK_MULHW, MASK_MULTIPLE, MASK_NO_UPDATE): Replace with OPTION_MASK_ALTIVEC, OPTION_MASK_CMPB, OPTION_MASK_CRYPTO, OPTION_MASK_DFP, OPTION_MASK_DIRECT_MOVE, OPTION_MASK_DLMZB, OPTION_MASK_EABI, OPTION_MASK_FLOAT128_KEYWORD, OPTION_MASK_FLOAT128_HW, OPTION_MASK_FPRND, OPTION_MASK_P8_FUSION, OPTION_MASK_HARD_FLOAT, OPTION_MASK_HTM, OPTION_MASK_ISEL, OPTION_MASK_MFCRF, OPTION_MASK_MMA, OPTION_MASK_MULHW, OPTION_MASK_MULTIPLE, OPTION_MASK_NO_UPDATE. * config/rs6000/rs6000.cc (rs6000_darwin_file_start): Replace MASK_MFCRF, MASK_ALTIVEC with OPTION_MASK_MFCRF, OPTION_MASK_ALTIVEC. * config/rs6000/rs6000.h (TARGET_DEFAULT): Replace MASK_MULTIPLE with OPTION_MASK_MULTIPLE. (MASK_ALTIVEC, MASK_CMPB, MASK_CRYPTO, MASK_DFP, MASK_DIRECT_MOVE, MASK_DLMZB, MASK_EABI, MASK_FLOAT128_KEYWORD, MASK_FLOAT128_HW, MASK_FPRND, MASK_P8_FUSION, MASK_HARD_FLOAT, MASK_HTM, MASK_ISEL, MASK_MFCRF, MASK_MMA, MASK_MULHW, MASK_MULTIPLE, MASK_NO_UPDATE): Delete. * config/rs6000/vxworks.h (TARGET_DEFAULT): Replace MASK_EABI with OPTION_MASK_EABI. --- gcc/config/rs6000/aix71.h | 5 ++- gcc/config/rs6000/darwin.h | 2 +- gcc/config/rs6000/darwin64-biarch.h | 2 +- gcc/config/rs6000/default64.h | 6 ++- gcc/config/rs6000/eabi.h | 2 +- gcc/config/rs6000/eabialtivec.h | 2 +- gcc/config/rs6000/linuxaltivec.h | 4 +- gcc/config/rs6000/rs6000-cpus.def | 76 ++++++++++++++++++++----------------- gcc/config/rs6000/rs6000.cc | 4 +- gcc/config/rs6000/rs6000.h | 21 +--------- gcc/config/rs6000/vxworks.h | 2 +- 11 files changed, 59 insertions(+), 67 deletions(-) (limited to 'gcc') diff --git a/gcc/config/rs6000/aix71.h b/gcc/config/rs6000/aix71.h index 57e07bc..3f7e6e3 100644 --- a/gcc/config/rs6000/aix71.h +++ b/gcc/config/rs6000/aix71.h @@ -137,9 +137,10 @@ do { \ #undef TARGET_DEFAULT #ifdef RS6000_BI_ARCH -#define TARGET_DEFAULT (MASK_PPC_GPOPT | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT) +#define TARGET_DEFAULT (MASK_PPC_GPOPT | MASK_PPC_GFXOPT \ + | OPTION_MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT) #else -#define TARGET_DEFAULT (MASK_PPC_GPOPT | MASK_PPC_GFXOPT | MASK_MFCRF) +#define TARGET_DEFAULT (MASK_PPC_GPOPT | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF) #endif #undef PROCESSOR_DEFAULT diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index b5cef42..ec02022 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -367,7 +367,7 @@ default as well. */ #undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_MULTIPLE | MASK_PPC_GFXOPT) +#define TARGET_DEFAULT (OPTION_MASK_MULTIPLE | MASK_PPC_GFXOPT) /* Darwin always uses IBM long double, never IEEE long double. */ #undef TARGET_IEEEQUAD diff --git a/gcc/config/rs6000/darwin64-biarch.h b/gcc/config/rs6000/darwin64-biarch.h index 57b0fab..a53e567 100644 --- a/gcc/config/rs6000/darwin64-biarch.h +++ b/gcc/config/rs6000/darwin64-biarch.h @@ -21,7 +21,7 @@ #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_POWERPC64 | MASK_64BIT \ - | MASK_MULTIPLE | MASK_PPC_GFXOPT) + | OPTION_MASK_MULTIPLE | MASK_PPC_GFXOPT) #undef DARWIN_ARCH_SPEC #define DARWIN_ARCH_SPEC "%{m32:ppc;:ppc64}" diff --git a/gcc/config/rs6000/default64.h b/gcc/config/rs6000/default64.h index 4bf0fee..f3a8140 100644 --- a/gcc/config/rs6000/default64.h +++ b/gcc/config/rs6000/default64.h @@ -24,12 +24,14 @@ along with GCC; see the file COPYING3. If not see #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) #undef TARGET_DEFAULT -#define TARGET_DEFAULT (ISA_2_7_MASKS_SERVER | MASK_POWERPC64 | MASK_64BIT | MASK_LITTLE_ENDIAN) +#define TARGET_DEFAULT (ISA_2_7_MASKS_SERVER | MASK_POWERPC64 | MASK_64BIT \ + | MASK_LITTLE_ENDIAN) #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mpower8" #else #undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT) +#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_PPC_GPOPT \ + | OPTION_MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT) #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mpower4" #endif diff --git a/gcc/config/rs6000/eabi.h b/gcc/config/rs6000/eabi.h index e58283f..367de7b 100644 --- a/gcc/config/rs6000/eabi.h +++ b/gcc/config/rs6000/eabi.h @@ -21,7 +21,7 @@ /* Add -meabi to target flags. */ #undef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_EABI +#define TARGET_DEFAULT OPTION_MASK_EABI /* Invoke an initializer function to set up the GOT. */ #define NAME__MAIN "__eabi" diff --git a/gcc/config/rs6000/eabialtivec.h b/gcc/config/rs6000/eabialtivec.h index 63cb00f..23cef79 100644 --- a/gcc/config/rs6000/eabialtivec.h +++ b/gcc/config/rs6000/eabialtivec.h @@ -21,7 +21,7 @@ /* Add -meabi and -maltivec to target flags. */ #undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_EABI | MASK_ALTIVEC) +#define TARGET_DEFAULT (OPTION_MASK_EABI | OPTION_MASK_ALTIVEC) #undef ASM_DEFAULT_EXTRA #define ASM_DEFAULT_EXTRA " %{!mvsx:%{!maltivec:%{!no-maltivec:-maltivec}}}" diff --git a/gcc/config/rs6000/linuxaltivec.h b/gcc/config/rs6000/linuxaltivec.h index d2557ca..55bae11 100644 --- a/gcc/config/rs6000/linuxaltivec.h +++ b/gcc/config/rs6000/linuxaltivec.h @@ -22,10 +22,10 @@ /* Override rs6000.h and sysv4.h definition. */ #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) #undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_ALTIVEC | MASK_LITTLE_ENDIAN) +#define TARGET_DEFAULT (OPTION_MASK_ALTIVEC | MASK_LITTLE_ENDIAN) #else #undef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_ALTIVEC +#define TARGET_DEFAULT OPTION_MASK_ALTIVEC #endif #undef ASM_DEFAULT_EXTRA diff --git a/gcc/config/rs6000/rs6000-cpus.def b/gcc/config/rs6000/rs6000-cpus.def index 963947f..7d22649 100644 --- a/gcc/config/rs6000/rs6000-cpus.def +++ b/gcc/config/rs6000/rs6000-cpus.def @@ -178,20 +178,25 @@ RS6000_CPU ("401", PROCESSOR_PPC403, MASK_SOFT_FLOAT) RS6000_CPU ("403", PROCESSOR_PPC403, MASK_SOFT_FLOAT | MASK_STRICT_ALIGN) -RS6000_CPU ("405", PROCESSOR_PPC405, MASK_SOFT_FLOAT | MASK_MULHW | MASK_DLMZB) -RS6000_CPU ("405fp", PROCESSOR_PPC405, MASK_MULHW | MASK_DLMZB) -RS6000_CPU ("440", PROCESSOR_PPC440, MASK_SOFT_FLOAT | MASK_MULHW | MASK_DLMZB) -RS6000_CPU ("440fp", PROCESSOR_PPC440, MASK_MULHW | MASK_DLMZB) -RS6000_CPU ("464", PROCESSOR_PPC440, MASK_SOFT_FLOAT | MASK_MULHW | MASK_DLMZB) -RS6000_CPU ("464fp", PROCESSOR_PPC440, MASK_MULHW | MASK_DLMZB) -RS6000_CPU ("476", PROCESSOR_PPC476, - MASK_SOFT_FLOAT | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB - | MASK_FPRND | MASK_CMPB | MASK_MULHW | MASK_DLMZB) +RS6000_CPU ("405", PROCESSOR_PPC405, MASK_SOFT_FLOAT | OPTION_MASK_MULHW + | OPTION_MASK_DLMZB) +RS6000_CPU ("405fp", PROCESSOR_PPC405, OPTION_MASK_MULHW | OPTION_MASK_DLMZB) +RS6000_CPU ("440", PROCESSOR_PPC440, MASK_SOFT_FLOAT | OPTION_MASK_MULHW + | OPTION_MASK_DLMZB) +RS6000_CPU ("440fp", PROCESSOR_PPC440, OPTION_MASK_MULHW | OPTION_MASK_DLMZB) +RS6000_CPU ("464", PROCESSOR_PPC440, MASK_SOFT_FLOAT | OPTION_MASK_MULHW + | OPTION_MASK_DLMZB) +RS6000_CPU ("464fp", PROCESSOR_PPC440, OPTION_MASK_MULHW | OPTION_MASK_DLMZB) +RS6000_CPU ("476", PROCESSOR_PPC476, MASK_SOFT_FLOAT | MASK_PPC_GFXOPT + | OPTION_MASK_MFCRF | MASK_POPCNTB + | OPTION_MASK_FPRND | OPTION_MASK_CMPB | OPTION_MASK_MULHW + | OPTION_MASK_DLMZB) RS6000_CPU ("476fp", PROCESSOR_PPC476, - MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND - | MASK_CMPB | MASK_MULHW | MASK_DLMZB) + MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB + | OPTION_MASK_FPRND + | OPTION_MASK_CMPB | OPTION_MASK_MULHW | OPTION_MASK_DLMZB) RS6000_CPU ("505", PROCESSOR_MPCCORE, 0) -RS6000_CPU ("601", PROCESSOR_PPC601, MASK_MULTIPLE) +RS6000_CPU ("601", PROCESSOR_PPC601, OPTION_MASK_MULTIPLE) RS6000_CPU ("602", PROCESSOR_PPC603, MASK_PPC_GFXOPT) RS6000_CPU ("603", PROCESSOR_PPC603, MASK_PPC_GFXOPT) RS6000_CPU ("603e", PROCESSOR_PPC603, MASK_PPC_GFXOPT) @@ -206,44 +211,47 @@ RS6000_CPU ("750", PROCESSOR_PPC750, MASK_PPC_GFXOPT) RS6000_CPU ("801", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT) RS6000_CPU ("821", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT) RS6000_CPU ("823", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT) -RS6000_CPU ("8540", PROCESSOR_PPC8540, MASK_STRICT_ALIGN | MASK_ISEL) -RS6000_CPU ("8548", PROCESSOR_PPC8548, MASK_STRICT_ALIGN | MASK_ISEL) +RS6000_CPU ("8540", PROCESSOR_PPC8540, MASK_STRICT_ALIGN | OPTION_MASK_ISEL) +RS6000_CPU ("8548", PROCESSOR_PPC8548, MASK_STRICT_ALIGN | OPTION_MASK_ISEL) RS6000_CPU ("a2", PROCESSOR_PPCA2, - MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_POPCNTB | MASK_CMPB - | MASK_NO_UPDATE) + MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_POPCNTB | OPTION_MASK_CMPB + | OPTION_MASK_NO_UPDATE) RS6000_CPU ("e300c2", PROCESSOR_PPCE300C2, MASK_SOFT_FLOAT) RS6000_CPU ("e300c3", PROCESSOR_PPCE300C3, 0) -RS6000_CPU ("e500mc", PROCESSOR_PPCE500MC, MASK_PPC_GFXOPT | MASK_ISEL) +RS6000_CPU ("e500mc", PROCESSOR_PPCE500MC, MASK_PPC_GFXOPT | OPTION_MASK_ISEL) RS6000_CPU ("e500mc64", PROCESSOR_PPCE500MC64, - MASK_POWERPC64 | MASK_PPC_GFXOPT | MASK_ISEL) + MASK_POWERPC64 | MASK_PPC_GFXOPT | OPTION_MASK_ISEL) RS6000_CPU ("e5500", PROCESSOR_PPCE5500, - MASK_POWERPC64 | MASK_PPC_GFXOPT | MASK_ISEL) + MASK_POWERPC64 | MASK_PPC_GFXOPT | OPTION_MASK_ISEL) RS6000_CPU ("e6500", PROCESSOR_PPCE6500, POWERPC_7400_MASK | MASK_POWERPC64 - | MASK_MFCRF | MASK_ISEL) + | OPTION_MASK_MFCRF | OPTION_MASK_ISEL) RS6000_CPU ("860", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT) -RS6000_CPU ("970", PROCESSOR_POWER4, - POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64) -RS6000_CPU ("cell", PROCESSOR_CELL, - POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64) +RS6000_CPU ("970", PROCESSOR_POWER4, POWERPC_7400_MASK | MASK_PPC_GPOPT + | OPTION_MASK_MFCRF | MASK_POWERPC64) +RS6000_CPU ("cell", PROCESSOR_CELL, POWERPC_7400_MASK | MASK_PPC_GPOPT + | OPTION_MASK_MFCRF | MASK_POWERPC64) RS6000_CPU ("ec603e", PROCESSOR_PPC603, MASK_SOFT_FLOAT) RS6000_CPU ("G3", PROCESSOR_PPC750, MASK_PPC_GFXOPT) RS6000_CPU ("G4", PROCESSOR_PPC7450, POWERPC_7400_MASK) -RS6000_CPU ("G5", PROCESSOR_POWER4, - POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64) -RS6000_CPU ("titan", PROCESSOR_TITAN, MASK_MULHW | MASK_DLMZB) +RS6000_CPU ("G5", PROCESSOR_POWER4, POWERPC_7400_MASK | MASK_PPC_GPOPT + | OPTION_MASK_MFCRF | MASK_POWERPC64) +RS6000_CPU ("titan", PROCESSOR_TITAN, OPTION_MASK_MULHW | OPTION_MASK_DLMZB) RS6000_CPU ("power3", PROCESSOR_PPC630, MASK_PPC_GFXOPT | MASK_POWERPC64) RS6000_CPU ("power4", PROCESSOR_POWER4, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | MASK_MFCRF) + | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF) RS6000_CPU ("power5", PROCESSOR_POWER5, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB) + | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB) RS6000_CPU ("power5+", PROCESSOR_POWER5, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND) + | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB + | OPTION_MASK_FPRND) RS6000_CPU ("power6", PROCESSOR_POWER6, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND - | MASK_CMPB | MASK_DFP | MASK_RECIP_PRECISION) + | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB + | OPTION_MASK_FPRND | OPTION_MASK_CMPB | OPTION_MASK_DFP + | MASK_RECIP_PRECISION) RS6000_CPU ("power6x", PROCESSOR_POWER6, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND - | MASK_CMPB | MASK_DFP | MASK_RECIP_PRECISION) + | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB + | OPTION_MASK_FPRND | OPTION_MASK_CMPB | OPTION_MASK_DFP + | MASK_RECIP_PRECISION) RS6000_CPU ("power7", PROCESSOR_POWER7, MASK_POWERPC64 | ISA_2_6_MASKS_SERVER) RS6000_CPU ("power8", PROCESSOR_POWER8, MASK_POWERPC64 | ISA_2_7_MASKS_SERVER | OPTION_MASK_HTM) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 2178056..bf99348 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -20732,11 +20732,11 @@ rs6000_darwin_file_start (void) HOST_WIDE_INT if_set; } mapping[] = { { "ppc64", "ppc64", MASK_64BIT }, - { "970", "ppc970", MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64 }, + { "970", "ppc970", MASK_PPC_GPOPT | OPTION_MASK_MFCRF | MASK_POWERPC64 }, { "power4", "ppc970", 0 }, { "G5", "ppc970", 0 }, { "7450", "ppc7450", 0 }, - { "7400", "ppc7400", MASK_ALTIVEC }, + { "7400", "ppc7400", OPTION_MASK_ALTIVEC }, { "G4", "ppc7400", 0 }, { "750", "ppc750", 0 }, { "740", "ppc750", 0 }, diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 72eb473..4d180bd 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -279,7 +279,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); /* The option machinery will define this. */ #endif -#define TARGET_DEFAULT (MASK_MULTIPLE) +#define TARGET_DEFAULT (OPTION_MASK_MULTIPLE) /* Define generic processor types based upon current deployment. */ #define PROCESSOR_COMMON PROCESSOR_PPC601 @@ -508,25 +508,6 @@ extern int rs6000_vector_align[]; machinery creates OPTION_MASK_ instead of MASK_. The MASK_ options that have not yet been replaced by their OPTION_MASK_ equivalents are defined here. */ -#define MASK_ALTIVEC OPTION_MASK_ALTIVEC -#define MASK_CMPB OPTION_MASK_CMPB -#define MASK_CRYPTO OPTION_MASK_CRYPTO -#define MASK_DFP OPTION_MASK_DFP -#define MASK_DIRECT_MOVE OPTION_MASK_DIRECT_MOVE -#define MASK_DLMZB OPTION_MASK_DLMZB -#define MASK_EABI OPTION_MASK_EABI -#define MASK_FLOAT128_KEYWORD OPTION_MASK_FLOAT128_KEYWORD -#define MASK_FLOAT128_HW OPTION_MASK_FLOAT128_HW -#define MASK_FPRND OPTION_MASK_FPRND -#define MASK_P8_FUSION OPTION_MASK_P8_FUSION -#define MASK_HARD_FLOAT OPTION_MASK_HARD_FLOAT -#define MASK_HTM OPTION_MASK_HTM -#define MASK_ISEL OPTION_MASK_ISEL -#define MASK_MFCRF OPTION_MASK_MFCRF -#define MASK_MMA OPTION_MASK_MMA -#define MASK_MULHW OPTION_MASK_MULHW -#define MASK_MULTIPLE OPTION_MASK_MULTIPLE -#define MASK_NO_UPDATE OPTION_MASK_NO_UPDATE #define MASK_P8_VECTOR OPTION_MASK_P8_VECTOR #define MASK_P9_VECTOR OPTION_MASK_P9_VECTOR #define MASK_P9_MISC OPTION_MASK_P9_MISC diff --git a/gcc/config/rs6000/vxworks.h b/gcc/config/rs6000/vxworks.h index 4f6d116..6f11de6 100644 --- a/gcc/config/rs6000/vxworks.h +++ b/gcc/config/rs6000/vxworks.h @@ -227,7 +227,7 @@ along with GCC; see the file COPYING3. If not see #define LINK_SPEC VXWORKS_LINK_SPEC " " VXWORKS_RELAX_LINK_SPEC #undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_EABI | MASK_STRICT_ALIGN) +#define TARGET_DEFAULT (OPTION_MASK_EABI | MASK_STRICT_ALIGN) #undef PROCESSOR_DEFAULT #define PROCESSOR_DEFAULT PROCESSOR_PPC604 -- cgit v1.1 From eb2887a19fee305b6d052d30dcfd321704f2ef09 Mon Sep 17 00:00:00 2001 From: Will Schmidt Date: Thu, 23 Jun 2022 15:54:19 -0500 Subject: [PATCH,RS6000 5/5] Replace MASK_ usage with OPTION_MASK_ This continues the changes of replacing the MASK_ defines with their OPTION_MASK_ equivalents. This patch removes the defines for MASK_P8_VECTOR, MASK_P9_VECTOR, MASK_P9_MISC, MASK_POPCNTB, MASK_POPCNTD, MASK_PPC_GFXOPT, MASK_PPC_GPOPT, MASK_RECIP_PRECISION, MASK_SOFT_FLOAT, MASK_VSX, MASK_POWER10, MASK_P10_FUSION. gcc/ * config/rs6000/aix71.h (MASK_PPC_GPOPT, MASK_PPC_GFXOPT): Replace with OPTION_MASK_PPC_GPOPT, OPTION_MASK_PPC_GFXOPT. * config/rs6000/darwin.h (MASK_PPC_GFXOPT): Replace with OPTION_MASK_PPC_GFXOPT. * config/rs6000/darwin64-biarch.h (MASK_PPC_GFXOPT): Same. * config/rs6000/default64.h (MASK_PPC_GPOPT, MASK_PPC_GFXOPT): Replace with OPTION_MASK_PPC_GPOPT, OPTION_MASK_PPC_GFXOPT. * config/rs6000/rs6000-c.cc: Update comment. * config/rs6000/rs6000-cpus.def: Update RS6000_CPU macro calls. * config/rs6000/rs6000.cc (rs6000_darwin_file_start): Replace MASK_PPC_GPOPT with OPTION_MASK_PPC_GPOPT. (rs6000_builtin_mask_names): Replace MASK_PPC_GFXOPT, MASK_POPCNTB with OPTION_MASK_PPC_GFXOPT, OPTION_MASK_POPCNTB. * config/rs6000/rs6000.h: (MASK_P8_VECTOR, MASK_P9_VECTOR, MASK_P9_MISC, MASK_POPCNTB, MASK_POPCNTD, MASK_PPC_GFXOPT, MASK_PPC_GPOPT, MASK_RECIP_PRECISION, MASK_SOFT_FLOAT, MASK_VSX, MASK_POWER10, MASK_P10_FUSION): Delete. --- gcc/config/rs6000/aix71.h | 5 +- gcc/config/rs6000/darwin.h | 2 +- gcc/config/rs6000/darwin64-biarch.h | 2 +- gcc/config/rs6000/default64.h | 2 +- gcc/config/rs6000/rs6000-c.cc | 2 +- gcc/config/rs6000/rs6000-cpus.def | 109 ++++++++++++++++++------------------ gcc/config/rs6000/rs6000.cc | 7 ++- gcc/config/rs6000/rs6000.h | 13 +---- 8 files changed, 67 insertions(+), 75 deletions(-) (limited to 'gcc') diff --git a/gcc/config/rs6000/aix71.h b/gcc/config/rs6000/aix71.h index 3f7e6e3..323d7c8 100644 --- a/gcc/config/rs6000/aix71.h +++ b/gcc/config/rs6000/aix71.h @@ -137,10 +137,11 @@ do { \ #undef TARGET_DEFAULT #ifdef RS6000_BI_ARCH -#define TARGET_DEFAULT (MASK_PPC_GPOPT | MASK_PPC_GFXOPT \ +#define TARGET_DEFAULT (OPTION_MASK_PPC_GPOPT | OPTION_MASK_PPC_GFXOPT \ | OPTION_MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT) #else -#define TARGET_DEFAULT (MASK_PPC_GPOPT | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF) +#define TARGET_DEFAULT (OPTION_MASK_PPC_GPOPT | OPTION_MASK_PPC_GFXOPT \ + | OPTION_MASK_MFCRF) #endif #undef PROCESSOR_DEFAULT diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index ec02022..6a8845e 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -367,7 +367,7 @@ default as well. */ #undef TARGET_DEFAULT -#define TARGET_DEFAULT (OPTION_MASK_MULTIPLE | MASK_PPC_GFXOPT) +#define TARGET_DEFAULT (OPTION_MASK_MULTIPLE | OPTION_MASK_PPC_GFXOPT) /* Darwin always uses IBM long double, never IEEE long double. */ #undef TARGET_IEEEQUAD diff --git a/gcc/config/rs6000/darwin64-biarch.h b/gcc/config/rs6000/darwin64-biarch.h index a53e567..6515bcc 100644 --- a/gcc/config/rs6000/darwin64-biarch.h +++ b/gcc/config/rs6000/darwin64-biarch.h @@ -21,7 +21,7 @@ #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_POWERPC64 | MASK_64BIT \ - | OPTION_MASK_MULTIPLE | MASK_PPC_GFXOPT) + | OPTION_MASK_MULTIPLE | OPTION_MASK_PPC_GFXOPT) #undef DARWIN_ARCH_SPEC #define DARWIN_ARCH_SPEC "%{m32:ppc;:ppc64}" diff --git a/gcc/config/rs6000/default64.h b/gcc/config/rs6000/default64.h index f3a8140..0bec9493 100644 --- a/gcc/config/rs6000/default64.h +++ b/gcc/config/rs6000/default64.h @@ -30,7 +30,7 @@ along with GCC; see the file COPYING3. If not see #define ASM_DEFAULT_SPEC "-mpower8" #else #undef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_PPC_GFXOPT | MASK_PPC_GPOPT \ +#define TARGET_DEFAULT (OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT \ | OPTION_MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT) #undef ASM_DEFAULT_SPEC #define ASM_DEFAULT_SPEC "-mpower4" diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc index 4c99afc..0d13645 100644 --- a/gcc/config/rs6000/rs6000-c.cc +++ b/gcc/config/rs6000/rs6000-c.cc @@ -384,7 +384,7 @@ rs6000_target_modify_macros (bool define_p, HOST_WIDE_INT flags, TARGET_DEFAULT macro is defined to equal zero, and TARGET_POWERPC64 and a) BYTES_BIG_ENDIAN and the flag to be enabled is either - MASK_PPC_GFXOPT or MASK_POWERPC64 (flags for "powerpc64" + OPTION_MASK_PPC_GFXOPT or MASK_POWERPC64 (flags for "powerpc64" target), or b) !BYTES_BIG_ENDIAN and the flag to be enabled is either MASK_POWERPC64 or it is one of the flags included in diff --git a/gcc/config/rs6000/rs6000-cpus.def b/gcc/config/rs6000/rs6000-cpus.def index 7d22649..c3825bc 100644 --- a/gcc/config/rs6000/rs6000-cpus.def +++ b/gcc/config/rs6000/rs6000-cpus.def @@ -176,82 +176,82 @@ where the arguments are the fields of struct rs6000_ptt. */ -RS6000_CPU ("401", PROCESSOR_PPC403, MASK_SOFT_FLOAT) -RS6000_CPU ("403", PROCESSOR_PPC403, MASK_SOFT_FLOAT | MASK_STRICT_ALIGN) -RS6000_CPU ("405", PROCESSOR_PPC405, MASK_SOFT_FLOAT | OPTION_MASK_MULHW - | OPTION_MASK_DLMZB) +RS6000_CPU ("401", PROCESSOR_PPC403, OPTION_MASK_SOFT_FLOAT) +RS6000_CPU ("403", PROCESSOR_PPC403, OPTION_MASK_SOFT_FLOAT | MASK_STRICT_ALIGN) +RS6000_CPU ("405", PROCESSOR_PPC405, OPTION_MASK_SOFT_FLOAT + | OPTION_MASK_MULHW | OPTION_MASK_DLMZB) RS6000_CPU ("405fp", PROCESSOR_PPC405, OPTION_MASK_MULHW | OPTION_MASK_DLMZB) -RS6000_CPU ("440", PROCESSOR_PPC440, MASK_SOFT_FLOAT | OPTION_MASK_MULHW - | OPTION_MASK_DLMZB) +RS6000_CPU ("440", PROCESSOR_PPC440, OPTION_MASK_SOFT_FLOAT + | OPTION_MASK_MULHW | OPTION_MASK_DLMZB) RS6000_CPU ("440fp", PROCESSOR_PPC440, OPTION_MASK_MULHW | OPTION_MASK_DLMZB) -RS6000_CPU ("464", PROCESSOR_PPC440, MASK_SOFT_FLOAT | OPTION_MASK_MULHW - | OPTION_MASK_DLMZB) +RS6000_CPU ("464", PROCESSOR_PPC440, OPTION_MASK_SOFT_FLOAT + | OPTION_MASK_MULHW | OPTION_MASK_DLMZB) RS6000_CPU ("464fp", PROCESSOR_PPC440, OPTION_MASK_MULHW | OPTION_MASK_DLMZB) -RS6000_CPU ("476", PROCESSOR_PPC476, MASK_SOFT_FLOAT | MASK_PPC_GFXOPT - | OPTION_MASK_MFCRF | MASK_POPCNTB +RS6000_CPU ("476", PROCESSOR_PPC476, OPTION_MASK_SOFT_FLOAT + | OPTION_MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | OPTION_MASK_POPCNTB | OPTION_MASK_FPRND | OPTION_MASK_CMPB | OPTION_MASK_MULHW | OPTION_MASK_DLMZB) -RS6000_CPU ("476fp", PROCESSOR_PPC476, - MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB - | OPTION_MASK_FPRND +RS6000_CPU ("476fp", PROCESSOR_PPC476, OPTION_MASK_PPC_GFXOPT + | OPTION_MASK_MFCRF | OPTION_MASK_POPCNTB | OPTION_MASK_FPRND | OPTION_MASK_CMPB | OPTION_MASK_MULHW | OPTION_MASK_DLMZB) RS6000_CPU ("505", PROCESSOR_MPCCORE, 0) RS6000_CPU ("601", PROCESSOR_PPC601, OPTION_MASK_MULTIPLE) -RS6000_CPU ("602", PROCESSOR_PPC603, MASK_PPC_GFXOPT) -RS6000_CPU ("603", PROCESSOR_PPC603, MASK_PPC_GFXOPT) -RS6000_CPU ("603e", PROCESSOR_PPC603, MASK_PPC_GFXOPT) -RS6000_CPU ("604", PROCESSOR_PPC604, MASK_PPC_GFXOPT) -RS6000_CPU ("604e", PROCESSOR_PPC604e, MASK_PPC_GFXOPT) -RS6000_CPU ("620", PROCESSOR_PPC620, MASK_PPC_GFXOPT | MASK_POWERPC64) -RS6000_CPU ("630", PROCESSOR_PPC630, MASK_PPC_GFXOPT | MASK_POWERPC64) -RS6000_CPU ("740", PROCESSOR_PPC750, MASK_PPC_GFXOPT) +RS6000_CPU ("602", PROCESSOR_PPC603, OPTION_MASK_PPC_GFXOPT) +RS6000_CPU ("603", PROCESSOR_PPC603, OPTION_MASK_PPC_GFXOPT) +RS6000_CPU ("603e", PROCESSOR_PPC603, OPTION_MASK_PPC_GFXOPT) +RS6000_CPU ("604", PROCESSOR_PPC604, OPTION_MASK_PPC_GFXOPT) +RS6000_CPU ("604e", PROCESSOR_PPC604e, OPTION_MASK_PPC_GFXOPT) +RS6000_CPU ("620", PROCESSOR_PPC620, OPTION_MASK_PPC_GFXOPT | MASK_POWERPC64) +RS6000_CPU ("630", PROCESSOR_PPC630, OPTION_MASK_PPC_GFXOPT | MASK_POWERPC64) +RS6000_CPU ("740", PROCESSOR_PPC750, OPTION_MASK_PPC_GFXOPT) RS6000_CPU ("7400", PROCESSOR_PPC7400, POWERPC_7400_MASK) RS6000_CPU ("7450", PROCESSOR_PPC7450, POWERPC_7400_MASK) -RS6000_CPU ("750", PROCESSOR_PPC750, MASK_PPC_GFXOPT) -RS6000_CPU ("801", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT) -RS6000_CPU ("821", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT) -RS6000_CPU ("823", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT) +RS6000_CPU ("750", PROCESSOR_PPC750, OPTION_MASK_PPC_GFXOPT) +RS6000_CPU ("801", PROCESSOR_MPCCORE, OPTION_MASK_SOFT_FLOAT) +RS6000_CPU ("821", PROCESSOR_MPCCORE, OPTION_MASK_SOFT_FLOAT) +RS6000_CPU ("823", PROCESSOR_MPCCORE, OPTION_MASK_SOFT_FLOAT) RS6000_CPU ("8540", PROCESSOR_PPC8540, MASK_STRICT_ALIGN | OPTION_MASK_ISEL) RS6000_CPU ("8548", PROCESSOR_PPC8548, MASK_STRICT_ALIGN | OPTION_MASK_ISEL) -RS6000_CPU ("a2", PROCESSOR_PPCA2, - MASK_PPC_GFXOPT | MASK_POWERPC64 | MASK_POPCNTB | OPTION_MASK_CMPB +RS6000_CPU ("a2", PROCESSOR_PPCA2, OPTION_MASK_PPC_GFXOPT | MASK_POWERPC64 + | OPTION_MASK_POPCNTB | OPTION_MASK_CMPB | OPTION_MASK_NO_UPDATE) -RS6000_CPU ("e300c2", PROCESSOR_PPCE300C2, MASK_SOFT_FLOAT) +RS6000_CPU ("e300c2", PROCESSOR_PPCE300C2, OPTION_MASK_SOFT_FLOAT) RS6000_CPU ("e300c3", PROCESSOR_PPCE300C3, 0) -RS6000_CPU ("e500mc", PROCESSOR_PPCE500MC, MASK_PPC_GFXOPT | OPTION_MASK_ISEL) +RS6000_CPU ("e500mc", PROCESSOR_PPCE500MC, OPTION_MASK_PPC_GFXOPT + | OPTION_MASK_ISEL) RS6000_CPU ("e500mc64", PROCESSOR_PPCE500MC64, - MASK_POWERPC64 | MASK_PPC_GFXOPT | OPTION_MASK_ISEL) + MASK_POWERPC64 | OPTION_MASK_PPC_GFXOPT | OPTION_MASK_ISEL) RS6000_CPU ("e5500", PROCESSOR_PPCE5500, - MASK_POWERPC64 | MASK_PPC_GFXOPT | OPTION_MASK_ISEL) + MASK_POWERPC64 | OPTION_MASK_PPC_GFXOPT | OPTION_MASK_ISEL) RS6000_CPU ("e6500", PROCESSOR_PPCE6500, POWERPC_7400_MASK | MASK_POWERPC64 | OPTION_MASK_MFCRF | OPTION_MASK_ISEL) -RS6000_CPU ("860", PROCESSOR_MPCCORE, MASK_SOFT_FLOAT) -RS6000_CPU ("970", PROCESSOR_POWER4, POWERPC_7400_MASK | MASK_PPC_GPOPT +RS6000_CPU ("860", PROCESSOR_MPCCORE, OPTION_MASK_SOFT_FLOAT) +RS6000_CPU ("970", PROCESSOR_POWER4, POWERPC_7400_MASK | OPTION_MASK_PPC_GPOPT | OPTION_MASK_MFCRF | MASK_POWERPC64) -RS6000_CPU ("cell", PROCESSOR_CELL, POWERPC_7400_MASK | MASK_PPC_GPOPT +RS6000_CPU ("cell", PROCESSOR_CELL, POWERPC_7400_MASK | OPTION_MASK_PPC_GPOPT | OPTION_MASK_MFCRF | MASK_POWERPC64) -RS6000_CPU ("ec603e", PROCESSOR_PPC603, MASK_SOFT_FLOAT) -RS6000_CPU ("G3", PROCESSOR_PPC750, MASK_PPC_GFXOPT) +RS6000_CPU ("ec603e", PROCESSOR_PPC603, OPTION_MASK_SOFT_FLOAT) +RS6000_CPU ("G3", PROCESSOR_PPC750, OPTION_MASK_PPC_GFXOPT) RS6000_CPU ("G4", PROCESSOR_PPC7450, POWERPC_7400_MASK) -RS6000_CPU ("G5", PROCESSOR_POWER4, POWERPC_7400_MASK | MASK_PPC_GPOPT +RS6000_CPU ("G5", PROCESSOR_POWER4, POWERPC_7400_MASK | OPTION_MASK_PPC_GPOPT | OPTION_MASK_MFCRF | MASK_POWERPC64) RS6000_CPU ("titan", PROCESSOR_TITAN, OPTION_MASK_MULHW | OPTION_MASK_DLMZB) -RS6000_CPU ("power3", PROCESSOR_PPC630, MASK_PPC_GFXOPT | MASK_POWERPC64) -RS6000_CPU ("power4", PROCESSOR_POWER4, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF) -RS6000_CPU ("power5", PROCESSOR_POWER5, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB) -RS6000_CPU ("power5+", PROCESSOR_POWER5, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB +RS6000_CPU ("power3", PROCESSOR_PPC630, OPTION_MASK_PPC_GFXOPT | MASK_POWERPC64) +RS6000_CPU ("power4", PROCESSOR_POWER4, MASK_POWERPC64 | OPTION_MASK_PPC_GPOPT + | OPTION_MASK_PPC_GFXOPT | OPTION_MASK_MFCRF) +RS6000_CPU ("power5", PROCESSOR_POWER5, MASK_POWERPC64 | OPTION_MASK_PPC_GPOPT + | OPTION_MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | OPTION_MASK_POPCNTB) +RS6000_CPU ("power5+", PROCESSOR_POWER5, MASK_POWERPC64 | OPTION_MASK_PPC_GPOPT + | OPTION_MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | OPTION_MASK_POPCNTB | OPTION_MASK_FPRND) -RS6000_CPU ("power6", PROCESSOR_POWER6, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB +RS6000_CPU ("power6", PROCESSOR_POWER6, MASK_POWERPC64 | OPTION_MASK_PPC_GPOPT + | OPTION_MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | OPTION_MASK_POPCNTB | OPTION_MASK_FPRND | OPTION_MASK_CMPB | OPTION_MASK_DFP - | MASK_RECIP_PRECISION) -RS6000_CPU ("power6x", PROCESSOR_POWER6, MASK_POWERPC64 | MASK_PPC_GPOPT - | MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | MASK_POPCNTB + | OPTION_MASK_RECIP_PRECISION) +RS6000_CPU ("power6x", PROCESSOR_POWER6, MASK_POWERPC64 | OPTION_MASK_PPC_GPOPT + | OPTION_MASK_PPC_GFXOPT | OPTION_MASK_MFCRF | OPTION_MASK_POPCNTB | OPTION_MASK_FPRND | OPTION_MASK_CMPB | OPTION_MASK_DFP - | MASK_RECIP_PRECISION) + | OPTION_MASK_RECIP_PRECISION) RS6000_CPU ("power7", PROCESSOR_POWER7, MASK_POWERPC64 | ISA_2_6_MASKS_SERVER) RS6000_CPU ("power8", PROCESSOR_POWER8, MASK_POWERPC64 | ISA_2_7_MASKS_SERVER | OPTION_MASK_HTM) @@ -259,7 +259,8 @@ RS6000_CPU ("power9", PROCESSOR_POWER9, MASK_POWERPC64 | ISA_3_0_MASKS_SERVER | OPTION_MASK_HTM) RS6000_CPU ("power10", PROCESSOR_POWER10, MASK_POWERPC64 | ISA_3_1_MASKS_SERVER) RS6000_CPU ("powerpc", PROCESSOR_POWERPC, 0) -RS6000_CPU ("powerpc64", PROCESSOR_POWERPC64, MASK_PPC_GFXOPT | MASK_POWERPC64) -RS6000_CPU ("powerpc64le", PROCESSOR_POWER8, MASK_POWERPC64 | ISA_2_7_MASKS_SERVER - | OPTION_MASK_HTM) -RS6000_CPU ("rs64", PROCESSOR_RS64A, MASK_PPC_GFXOPT | MASK_POWERPC64) +RS6000_CPU ("powerpc64", PROCESSOR_POWERPC64, OPTION_MASK_PPC_GFXOPT + | MASK_POWERPC64) +RS6000_CPU ("powerpc64le", PROCESSOR_POWER8, MASK_POWERPC64 + | ISA_2_7_MASKS_SERVER | OPTION_MASK_HTM) +RS6000_CPU ("rs64", PROCESSOR_RS64A, OPTION_MASK_PPC_GFXOPT | MASK_POWERPC64) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index bf99348..3ff16b8 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -20732,7 +20732,8 @@ rs6000_darwin_file_start (void) HOST_WIDE_INT if_set; } mapping[] = { { "ppc64", "ppc64", MASK_64BIT }, - { "970", "ppc970", MASK_PPC_GPOPT | OPTION_MASK_MFCRF | MASK_POWERPC64 }, + { "970", "ppc970", OPTION_MASK_PPC_GPOPT | OPTION_MASK_MFCRF \ + | MASK_POWERPC64 }, { "power4", "ppc970", 0 }, { "G5", "ppc970", 0 }, { "7450", "ppc7450", 0 }, @@ -24069,8 +24070,8 @@ static struct rs6000_opt_mask const rs6000_builtin_mask_names[] = { "hard-dfp", OPTION_MASK_DFP, false, false }, { "hard-float", OPTION_MASK_SOFT_FLOAT, false, false }, { "long-double-128", OPTION_MASK_MULTIPLE, false, false }, - { "powerpc64", MASK_POWERPC64, false, false }, - { "float128", OPTION_MASK_FLOAT128_KEYWORD, false, false }, + { "powerpc64", MASK_POWERPC64, false, false }, + { "float128", OPTION_MASK_FLOAT128_KEYWORD, false, false }, { "float128-hw", OPTION_MASK_FLOAT128_HW,false, false }, { "mma", OPTION_MASK_MMA, false, false }, { "power10", OPTION_MASK_POWER10, false, false }, diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 4d180bd..7d04556 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -508,19 +508,8 @@ extern int rs6000_vector_align[]; machinery creates OPTION_MASK_ instead of MASK_. The MASK_ options that have not yet been replaced by their OPTION_MASK_ equivalents are defined here. */ -#define MASK_P8_VECTOR OPTION_MASK_P8_VECTOR -#define MASK_P9_VECTOR OPTION_MASK_P9_VECTOR -#define MASK_P9_MISC OPTION_MASK_P9_MISC -#define MASK_POPCNTB OPTION_MASK_POPCNTB -#define MASK_POPCNTD OPTION_MASK_POPCNTD -#define MASK_PPC_GFXOPT OPTION_MASK_PPC_GFXOPT -#define MASK_PPC_GPOPT OPTION_MASK_PPC_GPOPT -#define MASK_RECIP_PRECISION OPTION_MASK_RECIP_PRECISION -#define MASK_SOFT_FLOAT OPTION_MASK_SOFT_FLOAT + #define MASK_STRICT_ALIGN OPTION_MASK_STRICT_ALIGN -#define MASK_VSX OPTION_MASK_VSX -#define MASK_POWER10 OPTION_MASK_POWER10 -#define MASK_P10_FUSION OPTION_MASK_P10_FUSION #ifndef IN_LIBGCC2 #define MASK_POWERPC64 OPTION_MASK_POWERPC64 -- cgit v1.1 From 3752e21d8c180b197e33006b048eff812adfb4e1 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 24 Jun 2022 13:43:01 -0400 Subject: analyzer: whitespace cleanups Clean up whitespace in preparation for a follow-up patch. No functional change intended. gcc/analyzer/ChangeLog: * call-string.cc (call_string::calc_recursion_depth): Whitespace cleanups. (call_string::cmp): Likewise. (call_string::get_caller_node): Likewise. (call_string::validate): Likewise. * engine.cc (dynamic_call_info_t::add_events_to_path): Likewise. (exploded_graph::get_per_function_data): Likewise. (exploded_graph::maybe_create_dynamic_call): Likewise. (exploded_graph::maybe_create_dynamic_call): Likewise. (exploded_graph::process_node): Likewise. Signed-off-by: David Malcolm --- gcc/analyzer/call-string.cc | 18 ++-- gcc/analyzer/engine.cc | 253 ++++++++++++++++++++++---------------------- 2 files changed, 135 insertions(+), 136 deletions(-) (limited to 'gcc') diff --git a/gcc/analyzer/call-string.cc b/gcc/analyzer/call-string.cc index df55e03..2ccd3cc 100644 --- a/gcc/analyzer/call-string.cc +++ b/gcc/analyzer/call-string.cc @@ -206,7 +206,7 @@ call_string::calc_recursion_depth () const { if (m_elements.is_empty ()) return 0; - const call_string::element_t top_return_sedge + const call_string::element_t top_return_sedge = m_elements[m_elements.length () - 1]; int result = 0; @@ -247,12 +247,12 @@ call_string::cmp (const call_string &a, /* Otherwise, compare the node pairs. */ const call_string::element_t a_node_pair = a[i]; const call_string::element_t b_node_pair = b[i]; - int src_cmp - = a_node_pair.m_callee->m_index - b_node_pair.m_callee->m_index; + int src_cmp + = a_node_pair.m_callee->m_index - b_node_pair.m_callee->m_index; if (src_cmp) return src_cmp; - int dest_cmp - = a_node_pair.m_caller->m_index - b_node_pair.m_caller->m_index; + int dest_cmp + = a_node_pair.m_caller->m_index - b_node_pair.m_caller->m_index; if (dest_cmp) return dest_cmp; i++; @@ -272,7 +272,7 @@ call_string::get_callee_node () const /* Return the pointer to caller of the topmost call in the stack, or NULL if stack is empty. */ -const supernode * +const supernode * call_string::get_caller_node () const { if(m_elements.is_empty ()) @@ -295,10 +295,8 @@ call_string::validate () const int i; FOR_EACH_VEC_ELT (m_elements, i, e) if (i > 0) - { - gcc_assert (e->get_caller_function () == - m_elements[i - 1].get_callee_function ()); - } + gcc_assert (e->get_caller_function () == + m_elements[i - 1].get_callee_function ()); } #endif /* #if ENABLE_ANALYZER */ diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index 7237cc1..51dfe29 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -1853,18 +1853,19 @@ dynamic_call_info_t::add_events_to_path (checker_path *emission_path, const int dest_stack_depth = dest_point.get_stack_depth (); if (m_is_returning_call) - emission_path->add_event (new return_event (eedge, (m_dynamic_call - ? m_dynamic_call->location - : UNKNOWN_LOCATION), - dest_point.get_fndecl (), - dest_stack_depth)); + emission_path->add_event (new return_event (eedge, + (m_dynamic_call + ? m_dynamic_call->location + : UNKNOWN_LOCATION), + dest_point.get_fndecl (), + dest_stack_depth)); else - emission_path->add_event (new call_event (eedge, (m_dynamic_call - ? m_dynamic_call->location - : UNKNOWN_LOCATION), - src_point.get_fndecl (), - src_stack_depth)); - + emission_path->add_event (new call_event (eedge, + (m_dynamic_call + ? m_dynamic_call->location + : UNKNOWN_LOCATION), + src_point.get_fndecl (), + src_stack_depth)); } /* class rewind_info_t : public custom_edge_info. */ @@ -2825,7 +2826,7 @@ per_function_data * exploded_graph::get_per_function_data (function *fun) const { if (per_function_data **slot - = const_cast (m_per_function_data).get (fun)) + = const_cast (m_per_function_data).get (fun)) return *slot; return NULL; @@ -3537,7 +3538,7 @@ state_change_requires_new_enode_p (const program_state &old_state, return false; } -/* Create enodes and eedges for the function calls that doesn't have an +/* Create enodes and eedges for the function calls that doesn't have an underlying call superedge. Such case occurs when GCC's middle end didn't know which function to @@ -3548,12 +3549,12 @@ state_change_requires_new_enode_p (const program_state &old_state, bool exploded_graph::maybe_create_dynamic_call (const gcall *call, - tree fn_decl, - exploded_node *node, - program_state next_state, - program_point &next_point, - uncertainty_t *uncertainty, - logger *logger) + tree fn_decl, + exploded_node *node, + program_state next_state, + program_point &next_point, + uncertainty_t *uncertainty, + logger *logger) { LOG_FUNC (logger); @@ -3566,44 +3567,44 @@ exploded_graph::maybe_create_dynamic_call (const gcall *call, supernode *sn_exit = sg.get_node_for_function_exit (fun); program_point new_point - = program_point::before_supernode (sn_entry, - NULL, - this_point->get_call_string ()); + = program_point::before_supernode (sn_entry, + NULL, + this_point->get_call_string ()); new_point.push_to_call_stack (sn_exit, - next_point.get_supernode()); + next_point.get_supernode()); /* Impose a maximum recursion depth and don't analyze paths - that exceed it further. - This is something of a blunt workaround, but it only - applies to recursion (and mutual recursion), not to - general call stacks. */ + that exceed it further. + This is something of a blunt workaround, but it only + applies to recursion (and mutual recursion), not to + general call stacks. */ if (new_point.get_call_string ().calc_recursion_depth () - > param_analyzer_max_recursion_depth) + > param_analyzer_max_recursion_depth) { - if (logger) - logger->log ("rejecting call edge: recursion limit exceeded"); - return false; + if (logger) + logger->log ("rejecting call edge: recursion limit exceeded"); + return false; } next_state.push_call (*this, node, call, uncertainty); if (next_state.m_valid) - { - if (logger) - logger->log ("Discovered call to %s [SN: %i -> SN: %i]", - function_name(fun), - this_point->get_supernode ()->m_index, - sn_entry->m_index); - - exploded_node *enode = get_or_create_node (new_point, - next_state, - node); - if (enode) - add_edge (node,enode, NULL, - new dynamic_call_info_t (call)); - return true; - } + { + if (logger) + logger->log ("Discovered call to %s [SN: %i -> SN: %i]", + function_name(fun), + this_point->get_supernode ()->m_index, + sn_entry->m_index); + + exploded_node *enode = get_or_create_node (new_point, + next_state, + node); + if (enode) + add_edge (node,enode, NULL, + new dynamic_call_info_t (call)); + return true; + } } return false; } @@ -3933,8 +3934,8 @@ exploded_graph::process_node (exploded_node *node) break; case PK_AFTER_SUPERNODE: { - bool found_a_superedge = false; - bool is_an_exit_block = false; + bool found_a_superedge = false; + bool is_an_exit_block = false; /* If this is an EXIT BB, detect leaks, and potentially create a function summary. */ if (point.get_supernode ()->return_p ()) @@ -3978,54 +3979,54 @@ exploded_graph::process_node (exploded_node *node) program_state next_state (state); uncertainty_t uncertainty; - /* Make use the current state and try to discover and analyse - indirect function calls (a call that doesn't have an underlying - cgraph edge representing call). - - Some examples of such calls are virtual function calls - and calls that happen via a function pointer. */ - if (succ->m_kind == SUPEREDGE_INTRAPROCEDURAL_CALL - && !(succ->get_any_callgraph_edge ())) - { - const gcall *call - = point.get_supernode ()->get_final_call (); - - impl_region_model_context ctxt (*this, - node, - &state, - &next_state, - &uncertainty, + /* Make use the current state and try to discover and analyse + indirect function calls (a call that doesn't have an underlying + cgraph edge representing call). + + Some examples of such calls are virtual function calls + and calls that happen via a function pointer. */ + if (succ->m_kind == SUPEREDGE_INTRAPROCEDURAL_CALL + && !(succ->get_any_callgraph_edge ())) + { + const gcall *call + = point.get_supernode ()->get_final_call (); + + impl_region_model_context ctxt (*this, + node, + &state, + &next_state, + &uncertainty, NULL, - point.get_stmt()); - - region_model *model = state.m_region_model; - bool call_discovered = false; - - if (tree fn_decl = model->get_fndecl_for_call(call,&ctxt)) - call_discovered = maybe_create_dynamic_call (call, - fn_decl, - node, - next_state, - next_point, - &uncertainty, - logger); - if (!call_discovered) - { - /* An unknown function or a special function was called - at this point, in such case, don't terminate the - analysis of the current function. - - The analyzer handles calls to such functions while - analysing the stmt itself, so the function call - must have been handled by the anlyzer till now. */ - exploded_node *next - = get_or_create_node (next_point, - next_state, - node); - if (next) - add_edge (node, next, succ); - } - } + point.get_stmt()); + + region_model *model = state.m_region_model; + bool call_discovered = false; + + if (tree fn_decl = model->get_fndecl_for_call (call, &ctxt)) + call_discovered = maybe_create_dynamic_call (call, + fn_decl, + node, + next_state, + next_point, + &uncertainty, + logger); + if (!call_discovered) + { + /* An unknown function or a special function was called + at this point, in such case, don't terminate the + analysis of the current function. + + The analyzer handles calls to such functions while + analysing the stmt itself, so the function call + must have been handled by the anlyzer till now. */ + exploded_node *next + = get_or_create_node (next_point, + next_state, + node); + if (next) + add_edge (node, next, succ); + } + } if (!node->on_edge (*this, succ, &next_point, &next_state, &uncertainty)) @@ -4041,37 +4042,37 @@ exploded_graph::process_node (exploded_node *node) add_edge (node, next, succ); } - /* Return from the calls which doesn't have a return superedge. - Such case occurs when GCC's middle end didn't knew which function to - call but analyzer did. */ - if((is_an_exit_block && !found_a_superedge) - && (!point.get_call_string ().empty_p ())) - { - const call_string cs = point.get_call_string (); - program_point next_point - = program_point::before_supernode (cs.get_caller_node (), - NULL, - cs); - program_state next_state (state); - uncertainty_t uncertainty; - - const gcall *call - = next_point.get_supernode ()->get_returning_call (); - - if(call) - next_state.returning_call (*this, node, call, &uncertainty); - - if (next_state.m_valid) - { - next_point.pop_from_call_stack (); - exploded_node *enode = get_or_create_node (next_point, - next_state, - node); - if (enode) - add_edge (node, enode, NULL, - new dynamic_call_info_t (call, true)); - } - } + /* Return from the calls which doesn't have a return superedge. + Such case occurs when GCC's middle end didn't knew which function to + call but analyzer did. */ + if ((is_an_exit_block && !found_a_superedge) + && (!point.get_call_string ().empty_p ())) + { + const call_string cs = point.get_call_string (); + program_point next_point + = program_point::before_supernode (cs.get_caller_node (), + NULL, + cs); + program_state next_state (state); + uncertainty_t uncertainty; + + const gcall *call + = next_point.get_supernode ()->get_returning_call (); + + if (call) + next_state.returning_call (*this, node, call, &uncertainty); + + if (next_state.m_valid) + { + next_point.pop_from_call_stack (); + exploded_node *enode = get_or_create_node (next_point, + next_state, + node); + if (enode) + add_edge (node, enode, NULL, + new dynamic_call_info_t (call, true)); + } + } } break; } -- cgit v1.1 From bb8e93eb1acae30a5fbe7e13149493ce4ccd301a Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 24 Jun 2022 13:44:48 -0400 Subject: analyzer: consolidate call_string instances ana::call_string is a wrapper around an auto_vec of callsites, leading to non-trivial copying when copying around call_string instances, e.g. in ana::program_point. This patch consolidates call_string instances within the region_model_manager: it now owns the root/empty call_string, and each call_string instance tracks its children, lazily creating them on demand, so that the call_string instances form a tree-like hierarchy in memory. Doing this requires passing the region_model_manager to the various program_point factory methods, so that they can get at the root call_string. Instances of call_string become immutable (apart from their internal cache for looking up their children); operations that previously modified them now return the call_string for the result of the operation. I wasn't able to observe any performance impact of this, but it simplifies call_string and program_point management, and thus I hope will make it easier to improve call summarization. In particular, region_model_manager::log_stats will now print a hierarchical dump of all the call_string instances used in the analysis (in -fdump-analyzer and -fdump-analyzer-stderr). gcc/analyzer/ChangeLog: * call-string.cc: Add includes of "analyzer/analyzer.h" and "analyzer/analyzer-logging.h". (call_string::call_string): Delete copy ctor. (call_string::operator=): Delete. (call_string::operator==): Delete. (call_string::hash): Delete. (call_string::push_call): Make const, returning the resulting call_string. (call_string::pop): Delete. (call_string::cmp_ptr_ptr): New. (call_string::validate): Assert that m_parent is non-NULL, or m_elements is empty. (call_string::call_string): Move default ctor here from call-string.h and reimplement. Add ctor taking a parent and an element. (call_string::~call_string): New. (call_string::recursive_log): New. * call-string.h (call_string::call_string): Move default ctor's defn to call-string.cc. Delete copy ctor. Add ctor taking a parent and an element. (call_string::operator=): Delete. (call_string::operator==): Delete. (call_string::hash): Delete. (call_string::push_call): Make const, returning the resulting call_string. (call_string::pop): Delete decl. (call_string::get_parent): New. (call_string::cmp_ptr_ptr): New decl. (call_string::get_top_of_stack): New. (struct call_string::hashmap_traits_t): New. (class call_string): Add friend class region_model_manager. Add DISABLE_COPY_AND_ASSIGN. (call_string::~call_string): New decl. (call_string::recursive_log): New decl. (call_string::m_parent): New field. (call_string::m_children): New field. * constraint-manager.cc (selftest::test_many_constants): Pass model manager to program_point::origin. * engine.cc (exploded_graph::exploded_graph): Likewise. (exploded_graph::add_function_entry): Likewise for program_point::from_function_entry. (add_tainted_args_callback): Likewise. (exploded_graph::maybe_process_run_of_before_supernode_enodes): Update for change to program_point.get_call_string. (exploded_graph::process_node): Likewise. (class function_call_string_cluster): Convert m_cs from a call_string to a const call_string &. (struct function_call_string): Likewise. (pod_hash_traits::hash): Use pointer_hash for m_cs. (pod_hash_traits::equal): Update for change to m_cs. (root_cluster::add_node): Update for change to function_call_string. (viz_callgraph_node::dump_dot): Update for change to call_string. * exploded-graph.h (per_call_string_data::m_key): Convert to a reference. (struct eg_call_string_hash_map_traits): Delete. (exploded_graph::call_string_data_map_t): Remove traits class. * program-point.cc: Move include of "analyzer/call-string.h" to after "analyzer/analyzer-logging.h". (program_point::print): Update for conversion of m_call_string to a pointer. (program_point::to_json): Likewise. (program_point::push_to_call_stack): Update for immutability of call strings. (program_point::pop_from_call_stack): Likewise. (program_point::hash): Use pointer hashing for m_call_string. (program_point::get_function_at_depth): Update for change to m_call_string. (program_point::validate): Update for changes to call_string. (program_point::on_edge): Likewise. (program_point::origin): Move here from call-string.h. Add region_model_manager param and use it to get empty call string. (program_point::from_function_entry): Likewise. (selftest::test_function_point_ordering): Likewise. (selftest::test_function_point_ordering): Likewise. * program-point.h (program_point::program_point): Update for change to m_call_string. (program_point::get_call_string): Likewise. (program_point::get_stack_depth): Likewise. (program_point::origin): Add region_model_manager param, and move defn to call-string.cc. (program_point::from_function_entry): Likewise. (program_point::empty): Drop call_string. (program_point::deleted): Likewise. (program_point::program_point): New private ctor. (program_point::m_call_string): Convert from call_string to const call_string *. * program-state.cc (selftest::test_program_state_merging): Update for call_string changes. (selftest::test_program_state_merging_2): Likewise. * region-model-manager.cc (region_model_manager::region_model_manager): Construct m_empty_call_string. (region_model_manager::log_stats): Log the call strings. * region-model.cc (assert_region_models_merge): Pass the region_model_manager when creating program_point instances. (selftest::test_state_merging): Likewise. (selftest::test_constraint_merging): Likewise. (selftest::test_widening_constraints): Likewise. (selftest::test_iteration_1): Likewise. * region-model.h (region_model_manager::get_empty_call_string): New. (region_model_manager::m_empty_call_string): New. * sm-signal.cc (register_signal_handler::impl_transition): Update for changes to call_string. Signed-off-by: David Malcolm --- gcc/analyzer/call-string.cc | 160 +++++++++++++++++++++-------------- gcc/analyzer/call-string.h | 90 ++++++++++++++++---- gcc/analyzer/constraint-manager.cc | 4 +- gcc/analyzer/engine.cc | 39 ++++----- gcc/analyzer/exploded-graph.h | 61 +------------ gcc/analyzer/program-point.cc | 63 +++++++++----- gcc/analyzer/program-point.h | 35 ++++---- gcc/analyzer/program-state.cc | 11 +-- gcc/analyzer/region-model-manager.cc | 3 + gcc/analyzer/region-model.cc | 16 ++-- gcc/analyzer/region-model.h | 8 ++ gcc/analyzer/sm-signal.cc | 6 +- 12 files changed, 282 insertions(+), 214 deletions(-) (limited to 'gcc') diff --git a/gcc/analyzer/call-string.cc b/gcc/analyzer/call-string.cc index 2ccd3cc..a09f569 100644 --- a/gcc/analyzer/call-string.cc +++ b/gcc/analyzer/call-string.cc @@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "options.h" #include "json.h" -#include "analyzer/call-string.h" #include "ordered-hash-map.h" #include "options.h" #include "cgraph.h" @@ -35,6 +34,9 @@ along with GCC; see the file COPYING3. If not see #include "gimple.h" #include "gimple-iterator.h" #include "digraph.h" +#include "analyzer/analyzer.h" +#include "analyzer/analyzer-logging.h" +#include "analyzer/call-string.h" #include "analyzer/supergraph.h" #if ENABLE_ANALYZER @@ -74,45 +76,6 @@ call_string::element_t::get_callee_function () const return m_callee->get_function (); } -/* call_string's copy ctor. */ - -call_string::call_string (const call_string &other) -: m_elements (other.m_elements.length ()) -{ - for (const call_string::element_t &e : other.m_elements) - m_elements.quick_push (e); -} - -/* call_string's assignment operator. */ - -call_string& -call_string::operator= (const call_string &other) -{ - // would be much simpler if we could rely on vec<> assignment op - m_elements.truncate (0); - m_elements.reserve (other.m_elements.length (), true); - call_string::element_t *e; - int i; - FOR_EACH_VEC_ELT (other.m_elements, i, e) - m_elements.quick_push (*e); - return *this; -} - -/* call_string's equality operator. */ - -bool -call_string::operator== (const call_string &other) const -{ - if (m_elements.length () != other.m_elements.length ()) - return false; - call_string::element_t *e; - int i; - FOR_EACH_VEC_ELT (m_elements, i, e) - if (*e != other.m_elements[i]) - return false; - return true; -} - /* Print this to PP. */ void @@ -160,43 +123,34 @@ call_string::to_json () const return arr; } -/* Generate a hash value for this call_string. */ +/* Get or create the call_string resulting from pushing the return + superedge for CALL_SEDGE onto the end of this call_string. */ -hashval_t -call_string::hash () const -{ - inchash::hash hstate; - for (const call_string::element_t &e : m_elements) - hstate.add_ptr (e.m_caller); - return hstate.end (); -} - -/* Push the return superedge for CALL_SEDGE onto the end of this - call_string. */ - -void +const call_string * call_string::push_call (const supergraph &sg, - const call_superedge *call_sedge) + const call_superedge *call_sedge) const { gcc_assert (call_sedge); const return_superedge *return_sedge = call_sedge->get_edge_for_return (sg); gcc_assert (return_sedge); - call_string::element_t e (return_sedge->m_dest, return_sedge->m_src); - m_elements.safe_push (e); + return push_call (return_sedge->m_dest, return_sedge->m_src); } -void +/* Get or create the call_string resulting from pushing the call + (caller, callee) onto the end of this call_string. */ + +const call_string * call_string::push_call (const supernode *caller, - const supernode *callee) + const supernode *callee) const { call_string::element_t e (caller, callee); - m_elements.safe_push (e); -} -call_string::element_t -call_string::pop () -{ - return m_elements.pop(); + if (const call_string **slot = m_children.get (e)) + return *slot; + + call_string *result = new call_string (*this, e); + m_children.put (e, result); + return result; } /* Count the number of times the top-most call site appears in the @@ -260,6 +214,16 @@ call_string::cmp (const call_string &a, } } +/* Comparator for use by vec::qsort. */ + +int +call_string::cmp_ptr_ptr (const void *pa, const void *pb) +{ + const call_string *cs_a = *static_cast (pa); + const call_string *cs_b = *static_cast (pb); + return cmp (*cs_a, *cs_b); +} + /* Return the pointer to callee of the topmost call in the stack, or NULL if stack is empty. */ const supernode * @@ -290,6 +254,8 @@ call_string::validate () const return; #endif + gcc_assert (m_parent || m_elements.length () == 0); + /* Each entry's "caller" should be the "callee" of the previous entry. */ call_string::element_t *e; int i; @@ -299,4 +265,68 @@ call_string::validate () const m_elements[i - 1].get_callee_function ()); } +/* ctor for the root/empty call_string. */ + +call_string::call_string () +: m_parent (NULL), m_elements () +{ +} + +/* ctor for a child call_string. */ + +call_string::call_string (const call_string &parent, const element_t &to_push) +: m_parent (&parent), + m_elements (parent.m_elements.length () + 1) +{ + m_elements.splice (parent.m_elements); + m_elements.quick_push (to_push); +} + +/* dtor for call_string: recursively delete children. */ + +call_string::~call_string () +{ + for (auto child_iter : m_children) + delete child_iter.second; +} + +/* Log this call_string and all its descendents recursively to LOGGER, + using indentation and elision to highlight the hierarchy. */ + +void +call_string::recursive_log (logger *logger) const +{ + logger->start_log_line (); + pretty_printer *pp = logger->get_printer (); + for (unsigned i = 0; i < length (); i++) + pp_string (pp, " "); + if (length () > 0) + { + pp_string (pp, "["); + /* Elide all but the final element, since they are shared with + the parent call_string. */ + for (unsigned i = 0; i < length (); i++) + pp_string (pp, "..., "); + /* Log the final element in detail. */ + const element_t *e = &m_elements[m_elements.length () - 1]; + pp_printf (pp, "(SN: %i -> SN: %i in %s)]", + e->m_callee->m_index, e->m_caller->m_index, + function_name (e->m_caller->m_fun)); + } + else + pp_string (pp, "[]"); + logger->end_log_line (); + + /* Recurse into children. */ + { + auto_vec children (m_children.elements ()); + for (auto iter : m_children) + children.safe_push (iter.second); + children.qsort (call_string::cmp_ptr_ptr); + + for (auto iter : children) + iter->recursive_log (logger); + } +} + #endif /* #if ENABLE_ANALYZER */ diff --git a/gcc/analyzer/call-string.h b/gcc/analyzer/call-string.h index 87d04a1..c3cea90 100644 --- a/gcc/analyzer/call-string.h +++ b/gcc/analyzer/call-string.h @@ -36,8 +36,13 @@ class return_superedge; i.e. that we return to the same callsite that called us. The class stores returning calls ( which may be represented by a - returning superedge ). We do so because this is what we need to compare - against. */ + returning superedge ). We do so because this is what we need to compare + against. + + Instances of call_string are consolidated by the region_model_manager, + which effectively owns them: it owns the root/empty call_string, and each + call_string instance tracks its children, lazily creating them on demand, + so that the call_string instances form a tree-like hierarchy in memory. */ class call_string { @@ -60,38 +65,31 @@ public: /* Accessors */ function *get_caller_function () const; function *get_callee_function () const; - + const supernode *m_caller; const supernode *m_callee; }; - call_string () : m_elements () {} - call_string (const call_string &other); - call_string& operator= (const call_string &other); - - bool operator== (const call_string &other) const; - void print (pretty_printer *pp) const; json::value *to_json () const; - hashval_t hash () const; - bool empty_p () const { return m_elements.is_empty (); } - void push_call (const supergraph &sg, - const call_superedge *sedge); - - void push_call (const supernode *src, - const supernode *dest); + const call_string *push_call (const supergraph &sg, + const call_superedge *sedge) const; - element_t pop (); + const call_string *push_call (const supernode *src, + const supernode *dest) const; + const call_string *get_parent () const { return m_parent; } int calc_recursion_depth () const; static int cmp (const call_string &a, const call_string &b); + static int cmp_ptr_ptr (const void *, const void *); + /* Accessors */ const supernode *get_callee_node () const; @@ -101,11 +99,69 @@ public: { return m_elements[idx]; } + const element_t &get_top_of_stack () const + { + gcc_assert (m_elements.length () > 0); + return m_elements[m_elements.length () - 1]; + } void validate () const; private: + struct hashmap_traits_t + { + typedef element_t key_type; + typedef const call_string *value_type; + + static const bool maybe_mx = false; + static inline hashval_t hash (const key_type &k) + { + inchash::hash hstate; + hstate.add_ptr (k.m_caller); + hstate.add_ptr (k.m_callee); + return hstate.end (); + } + static inline bool equal_keys (const key_type &k1, const key_type &k2) + { + return k1 == k2; + } + template static inline void remove (T &entry) + { + entry.m_key = element_t (NULL, NULL); + } + static const bool empty_zero_p = true; + template static inline bool is_empty (const T &entry) + { + return entry.m_key.m_caller == NULL; + } + template static inline bool is_deleted (const T &entry) + { + return entry.m_key.m_caller == reinterpret_cast (1); + } + template static inline void mark_empty (T &entry) + { + entry.m_key = element_t (NULL, NULL); + entry.m_value = NULL; + } + template static inline void mark_deleted (T &entry) + { + entry.m_key.m_caller = reinterpret_cast (1); + } + }; + + friend class region_model_manager; + + DISABLE_COPY_AND_ASSIGN (call_string); + + call_string (); + call_string (const call_string &parent, const element_t &to_push); + ~call_string (); + + void recursive_log (logger *logger) const; + + const call_string *m_parent; auto_vec m_elements; + mutable hash_map m_children; }; } // namespace ana diff --git a/gcc/analyzer/constraint-manager.cc b/gcc/analyzer/constraint-manager.cc index 02e8ce9..4133a13 100644 --- a/gcc/analyzer/constraint-manager.cc +++ b/gcc/analyzer/constraint-manager.cc @@ -3923,10 +3923,10 @@ test_equality () static void test_many_constants () { - program_point point (program_point::origin ()); + region_model_manager mgr; + program_point point (program_point::origin (mgr)); tree a = build_global_decl ("a", integer_type_node); - region_model_manager mgr; region_model model (&mgr); auto_vec constants; for (int i = 0; i < 20; i++) diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index 51dfe29..0674c8b 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -2374,8 +2374,9 @@ exploded_graph::exploded_graph (const supergraph &sg, logger *logger, m_functionless_stats (m_sg.num_nodes ()), m_PK_AFTER_SUPERNODE_per_snode (m_sg.num_nodes ()) { - m_origin = get_or_create_node (program_point::origin (), - program_state (ext_state), NULL); + m_origin = get_or_create_node + (program_point::origin (*ext_state.get_model_manager ()), + program_state (ext_state), NULL); for (int i = 0; i < m_sg.num_nodes (); i++) m_PK_AFTER_SUPERNODE_per_snode.quick_push (i); } @@ -2526,7 +2527,9 @@ exploded_graph::add_function_entry (function *fun) return NULL; } - program_point point = program_point::from_function_entry (m_sg, fun); + program_point point + = program_point::from_function_entry (*m_ext_state.get_model_manager (), + m_sg, fun); program_state state (m_ext_state); state.push_frame (m_ext_state, fun); @@ -2979,7 +2982,8 @@ add_tainted_args_callback (exploded_graph *eg, tree field, tree fndecl, gcc_assert (fun); program_point point - = program_point::from_function_entry (eg->get_supergraph (), fun); + = program_point::from_function_entry (*ext_state.get_model_manager (), + eg->get_supergraph (), fun); program_state state (ext_state); state.push_frame (ext_state, fun); @@ -3341,7 +3345,7 @@ maybe_process_run_of_before_supernode_enodes (exploded_node *enode) if (point_2.get_kind () == PK_BEFORE_SUPERNODE && point_2.get_supernode () == snode - && point_2.get_call_string () == point.get_call_string ()) + && &point_2.get_call_string () == &point.get_call_string ()) { enodes.safe_push (enode_2); m_worklist.take_next (); @@ -4048,7 +4052,7 @@ exploded_graph::process_node (exploded_node *node) if ((is_an_exit_block && !found_a_superedge) && (!point.get_call_string ().empty_p ())) { - const call_string cs = point.get_call_string (); + const call_string &cs = point.get_call_string (); program_point next_point = program_point::before_supernode (cs.get_caller_node (), NULL, @@ -4736,7 +4740,7 @@ private: class function_call_string_cluster : public exploded_cluster { public: - function_call_string_cluster (function *fun, call_string cs) + function_call_string_cluster (function *fun, const call_string &cs) : m_fun (fun), m_cs (cs) {} ~function_call_string_cluster () @@ -4811,7 +4815,7 @@ public: private: function *m_fun; - call_string m_cs; + const call_string &m_cs; typedef ordered_hash_map map_t; map_t m_map; }; @@ -4820,14 +4824,15 @@ private: struct function_call_string { - function_call_string (function *fun, call_string cs) + function_call_string (function *fun, const call_string *cs) : m_fun (fun), m_cs (cs) { gcc_assert (fun); + gcc_assert (cs); } function *m_fun; - call_string m_cs; + const call_string *m_cs; }; } // namespace ana @@ -4842,7 +4847,8 @@ template <> inline hashval_t pod_hash_traits::hash (value_type v) { - return pointer_hash ::hash (v.m_fun) ^ v.m_cs.hash (); + return (pointer_hash ::hash (v.m_fun) + ^ pointer_hash ::hash (v.m_cs)); } template <> @@ -4850,7 +4856,7 @@ inline bool pod_hash_traits::equal (const value_type &existing, const value_type &candidate) { - return existing.m_fun == candidate.m_fun && existing.m_cs == candidate.m_cs; + return existing.m_fun == candidate.m_fun && &existing.m_cs == &candidate.m_cs; } template <> inline void @@ -4925,7 +4931,7 @@ public: } const call_string &cs = en->get_point ().get_call_string (); - function_call_string key (fun, cs); + function_call_string key (fun, &cs); function_call_string_cluster **slot = m_map.get (key); if (slot) (*slot)->add_node (en); @@ -4939,11 +4945,6 @@ public: } private: - /* This can't be an ordered_hash_map, as we can't store vec, - since it's not a POD; vec<>::quick_push has: - *slot = obj; - and the slot isn't initialized, so the assignment op dies when cleaning up - un-inited *slot (within the truncate call). */ typedef hash_map map_t; map_t m_map; @@ -5319,7 +5320,7 @@ public: FOR_EACH_VEC_ELT (args.m_eg->m_nodes, i, enode) { if (enode->get_point ().get_function () == m_fun - && enode->get_point ().get_call_string () == *cs) + && &enode->get_point ().get_call_string () == cs) num_enodes++; } if (num_enodes > 0) diff --git a/gcc/analyzer/exploded-graph.h b/gcc/analyzer/exploded-graph.h index 101f4f9..0613f55 100644 --- a/gcc/analyzer/exploded-graph.h +++ b/gcc/analyzer/exploded-graph.h @@ -599,65 +599,10 @@ struct per_call_string_data : m_key (key), m_stats (num_supernodes) {} - const call_string m_key; + const call_string &m_key; stats m_stats; }; -/* Traits class for storing per-call_string data within - an exploded_graph. */ - -struct eg_call_string_hash_map_traits -{ - typedef const call_string *key_type; - typedef per_call_string_data *value_type; - typedef per_call_string_data *compare_type; - - static inline hashval_t hash (const key_type &k) - { - gcc_assert (k != NULL); - gcc_assert (k != reinterpret_cast (1)); - return k->hash (); - } - static inline bool equal_keys (const key_type &k1, const key_type &k2) - { - gcc_assert (k1 != NULL); - gcc_assert (k2 != NULL); - gcc_assert (k1 != reinterpret_cast (1)); - gcc_assert (k2 != reinterpret_cast (1)); - if (k1 && k2) - return *k1 == *k2; - else - /* Otherwise they must both be non-NULL. */ - return k1 == k2; - } - template - static inline void remove (T &) - { - /* empty; the nodes are handled elsewhere. */ - } - template - static inline void mark_deleted (T &entry) - { - entry.m_key = reinterpret_cast (1); - } - template - static inline void mark_empty (T &entry) - { - entry.m_key = NULL; - } - template - static inline bool is_deleted (const T &entry) - { - return entry.m_key == reinterpret_cast (1); - } - template - static inline bool is_empty (const T &entry) - { - return entry.m_key == NULL; - } - static const bool empty_zero_p = false; -}; - /* Data about a particular function within an exploded_graph. */ struct per_function_data @@ -791,8 +736,8 @@ private: class exploded_graph : public digraph { public: - typedef hash_map call_string_data_map_t; + typedef hash_map call_string_data_map_t; exploded_graph (const supergraph &sg, logger *logger, const extrinsic_state &ext_state, diff --git a/gcc/analyzer/program-point.cc b/gcc/analyzer/program-point.cc index 8fa7066..6c296d5 100644 --- a/gcc/analyzer/program-point.cc +++ b/gcc/analyzer/program-point.cc @@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. If not see #include "gimple-pretty-print.h" #include "gcc-rich-location.h" #include "json.h" -#include "analyzer/call-string.h" #include "ordered-hash-map.h" #include "options.h" #include "cgraph.h" @@ -37,6 +36,7 @@ along with GCC; see the file COPYING3. If not see #include "digraph.h" #include "analyzer/analyzer.h" #include "analyzer/analyzer-logging.h" +#include "analyzer/call-string.h" #include "analyzer/supergraph.h" #include "analyzer/program-point.h" #include "sbitmap.h" @@ -290,7 +290,7 @@ void program_point::print (pretty_printer *pp, const format &f) const { pp_string (pp, "callstring: "); - m_call_string.print (pp); + m_call_string->print (pp); f.spacer (pp); m_function_point.print (pp, f); @@ -340,7 +340,7 @@ program_point::to_json () const break; } - point_obj->set ("call_string", m_call_string.to_json ()); + point_obj->set ("call_string", m_call_string->to_json ()); return point_obj; } @@ -353,14 +353,15 @@ void program_point::push_to_call_stack (const supernode *caller, const supernode *callee) { - m_call_string.push_call (callee, caller); + m_call_string = m_call_string->push_call (callee, caller); } /* Pop the topmost call from the current callstack. */ void program_point::pop_from_call_stack () { - m_call_string.pop (); + m_call_string = m_call_string->get_parent (); + gcc_assert (m_call_string); } /* Generate a hash value for this program_point. */ @@ -370,7 +371,7 @@ program_point::hash () const { inchash::hash hstate; hstate.merge_hash (m_function_point.hash ()); - hstate.merge_hash (m_call_string.hash ()); + hstate.add_ptr (m_call_string); return hstate.end (); } @@ -379,11 +380,11 @@ program_point::hash () const function * program_point::get_function_at_depth (unsigned depth) const { - gcc_assert (depth <= m_call_string.length ()); - if (depth == m_call_string.length ()) + gcc_assert (depth <= m_call_string->length ()); + if (depth == m_call_string->length ()) return m_function_point.get_function (); else - return m_call_string[depth].get_caller_function (); + return get_call_string ()[depth].get_caller_function (); } /* Assert that this object is sane. */ @@ -396,12 +397,13 @@ program_point::validate () const return; #endif - m_call_string.validate (); + m_call_string->validate (); /* The "callee" of the final entry in the callstring should be the function of the m_function_point. */ - if (m_call_string.length () > 0) - gcc_assert (m_call_string[m_call_string.length () - 1].get_callee_function () - == get_function ()); + if (m_call_string->length () > 0) + gcc_assert + ((*m_call_string)[m_call_string->length () - 1].get_callee_function () + == get_function ()); } /* Check to see if SUCC is a valid edge to take (ensuring that we have @@ -444,14 +446,15 @@ program_point::on_edge (exploded_graph &eg, } /* Add the callsite to the call string. */ - m_call_string.push_call (eg.get_supergraph (), call_sedge); + m_call_string = m_call_string->push_call (eg.get_supergraph (), + call_sedge); /* Impose a maximum recursion depth and don't analyze paths that exceed it further. This is something of a blunt workaround, but it only applies to recursion (and mutual recursion), not to general call stacks. */ - if (m_call_string.calc_recursion_depth () + if (m_call_string->calc_recursion_depth () > param_analyzer_max_recursion_depth) { if (logger) @@ -465,13 +468,15 @@ program_point::on_edge (exploded_graph &eg, case SUPEREDGE_RETURN: { /* Require that we return to the call site in the call string. */ - if (m_call_string.empty_p ()) + if (m_call_string->empty_p ()) { if (logger) logger->log ("rejecting return edge: empty call string"); return false; } - const call_string::element_t top_of_stack = m_call_string.pop (); + const call_string::element_t &top_of_stack + = m_call_string->get_top_of_stack (); + m_call_string = m_call_string->get_parent (); call_string::element_t current_call_string_element (succ->m_dest, succ->m_src); if (top_of_stack != current_call_string_element) @@ -669,6 +674,25 @@ function_point::get_next () const } } +/* class program_point. */ + +program_point +program_point::origin (const region_model_manager &mgr) +{ + return program_point (function_point (NULL, NULL, + 0, PK_ORIGIN), + mgr.get_empty_call_string ()); +} + +program_point +program_point::from_function_entry (const region_model_manager &mgr, + const supergraph &sg, + function *fun) +{ + return program_point (function_point::from_function_entry (sg, fun), + mgr.get_empty_call_string ()); +} + /* For those program points for which there is a uniquely-defined successor, return it. */ @@ -721,7 +745,6 @@ static void test_function_point_ordering () { const supernode *snode = NULL; - const call_string call_string; /* Populate an array with various points within the same snode, in order. */ @@ -756,9 +779,11 @@ test_function_point_ordering () static void test_program_point_equality () { + region_model_manager mgr; + const supernode *snode = NULL; - const call_string cs; + const call_string &cs = mgr.get_empty_call_string (); program_point a = program_point::before_supernode (snode, NULL, cs); diff --git a/gcc/analyzer/program-point.h b/gcc/analyzer/program-point.h index 6084c9e..63f7224 100644 --- a/gcc/analyzer/program-point.h +++ b/gcc/analyzer/program-point.h @@ -174,7 +174,7 @@ public: program_point (const function_point &fn_point, const call_string &call_string) : m_function_point (fn_point), - m_call_string (call_string) + m_call_string (&call_string) { } @@ -197,7 +197,7 @@ public: /* Accessors. */ const function_point &get_function_point () const { return m_function_point; } - const call_string &get_call_string () const { return m_call_string; } + const call_string &get_call_string () const { return *m_call_string; } const supernode *get_supernode () const { @@ -242,23 +242,14 @@ public: { if (get_kind () == PK_ORIGIN) return 0; - return m_call_string.length () + 1; + return get_call_string ().length () + 1; } /* Factory functions for making various kinds of program_point. */ - static program_point origin () - { - return program_point (function_point (NULL, NULL, - 0, PK_ORIGIN), - call_string ()); - } - - static program_point from_function_entry (const supergraph &sg, - function *fun) - { - return program_point (function_point::from_function_entry (sg, fun), - call_string ()); - } + static program_point origin (const region_model_manager &mgr); + static program_point from_function_entry (const region_model_manager &mgr, + const supergraph &sg, + function *fun); static program_point before_supernode (const supernode *supernode, const superedge *from_edge, @@ -288,11 +279,11 @@ public: static program_point empty () { - return program_point (function_point::empty (), call_string ()); + return program_point (function_point::empty ()); } static program_point deleted () { - return program_point (function_point::deleted (), call_string ()); + return program_point (function_point::deleted ()); } bool on_edge (exploded_graph &eg, const superedge *succ); @@ -306,8 +297,14 @@ public: program_point get_next () const; private: + program_point (const function_point &fn_point) + : m_function_point (fn_point), + m_call_string (NULL) + { + } + function_point m_function_point; - call_string m_call_string; + const call_string *m_call_string; }; } // namespace ana diff --git a/gcc/analyzer/program-state.cc b/gcc/analyzer/program-state.cc index 7ad581c..295c6ae 100644 --- a/gcc/analyzer/program-state.cc +++ b/gcc/analyzer/program-state.cc @@ -1668,12 +1668,12 @@ test_program_state_merging () malloc sm-state, pointing to a region on the heap. */ tree p = build_global_decl ("p", ptr_type_node); - program_point point (program_point::origin ()); + engine eng; + region_model_manager *mgr = eng.get_model_manager (); + program_point point (program_point::origin (*mgr)); auto_delete_vec checkers; checkers.safe_push (make_malloc_state_machine (NULL)); - engine eng; extrinsic_state ext_state (checkers, &eng); - region_model_manager *mgr = eng.get_model_manager (); program_state s0 (ext_state); uncertainty_t uncertainty; @@ -1736,10 +1736,11 @@ test_program_state_merging () static void test_program_state_merging_2 () { - program_point point (program_point::origin ()); + engine eng; + region_model_manager *mgr = eng.get_model_manager (); + program_point point (program_point::origin (*mgr)); auto_delete_vec checkers; checkers.safe_push (make_signal_state_machine (NULL)); - engine eng; extrinsic_state ext_state (checkers, &eng); const state_machine::state test_state_0 ("test state 0", 0); diff --git a/gcc/analyzer/region-model-manager.cc b/gcc/analyzer/region-model-manager.cc index 3377f15..17713b0 100644 --- a/gcc/analyzer/region-model-manager.cc +++ b/gcc/analyzer/region-model-manager.cc @@ -68,6 +68,7 @@ namespace ana { region_model_manager::region_model_manager (logger *logger) : m_logger (logger), + m_empty_call_string (), m_next_region_id (0), m_root_region (alloc_region_id ()), m_stack_region (alloc_region_id (), &m_root_region), @@ -1748,6 +1749,8 @@ void region_model_manager::log_stats (logger *logger, bool show_objs) const { LOG_SCOPE (logger); + logger->log ("call string consolidation"); + m_empty_call_string.recursive_log (logger); logger->log ("svalue consolidation"); log_uniq_map (logger, show_objs, "constant_svalue", m_constants_map); log_uniq_map (logger, show_objs, "unknown_svalue", m_unknowns_map); diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc index 6b49719..5bd5dc7 100644 --- a/gcc/analyzer/region-model.cc +++ b/gcc/analyzer/region-model.cc @@ -5460,9 +5460,9 @@ assert_region_models_merge (tree expr, tree val_a, tree val_b, region_model *out_merged_model, const svalue **out_merged_svalue) { - program_point point (program_point::origin ()); - test_region_model_context ctxt; region_model_manager *mgr = out_merged_model->get_manager (); + program_point point (program_point::origin (*mgr)); + test_region_model_context ctxt; region_model model0 (mgr); region_model model1 (mgr); if (val_a) @@ -5511,8 +5511,8 @@ test_state_merging () ptr_type_node); DECL_CONTEXT (q) = test_fndecl; - program_point point (program_point::origin ()); region_model_manager mgr; + program_point point (program_point::origin (mgr)); { region_model model0 (&mgr); @@ -5852,7 +5852,7 @@ test_constraint_merging () /* They should be mergeable; the merged constraints should be: (0 <= x < n). */ - program_point point (program_point::origin ()); + program_point point (program_point::origin (mgr)); region_model merged (&mgr); ASSERT_TRUE (model0.can_merge_with_p (model1, point, &merged)); @@ -5873,12 +5873,12 @@ test_constraint_merging () static void test_widening_constraints () { - program_point point (program_point::origin ()); + region_model_manager mgr; + program_point point (program_point::origin (mgr)); tree int_0 = build_int_cst (integer_type_node, 0); tree int_m1 = build_int_cst (integer_type_node, -1); tree int_1 = build_int_cst (integer_type_node, 1); tree int_256 = build_int_cst (integer_type_node, 256); - region_model_manager mgr; test_region_model_context ctxt; const svalue *int_0_sval = mgr.get_or_create_constant_svalue (int_0); const svalue *int_1_sval = mgr.get_or_create_constant_svalue (int_1); @@ -5988,7 +5988,8 @@ test_widening_constraints () static void test_iteration_1 () { - program_point point (program_point::origin ()); + region_model_manager mgr; + program_point point (program_point::origin (mgr)); tree int_0 = build_int_cst (integer_type_node, 0); tree int_1 = build_int_cst (integer_type_node, 1); @@ -5996,7 +5997,6 @@ test_iteration_1 () tree int_257 = build_int_cst (integer_type_node, 257); tree i = build_global_decl ("i", integer_type_node); - region_model_manager mgr; test_region_model_context ctxt; /* model0: i: 0. */ diff --git a/gcc/analyzer/region-model.h b/gcc/analyzer/region-model.h index 1bfa56a..129aad2 100644 --- a/gcc/analyzer/region-model.h +++ b/gcc/analyzer/region-model.h @@ -244,6 +244,12 @@ public: region_model_manager (logger *logger = NULL); ~region_model_manager (); + /* call_string consolidation. */ + const call_string &get_empty_call_string () const + { + return m_empty_call_string; + } + /* svalue consolidation. */ const svalue *get_or_create_constant_svalue (tree cst_expr); const svalue *get_or_create_int_cst (tree type, poly_int64); @@ -381,6 +387,8 @@ private: logger *m_logger; + const call_string m_empty_call_string; + unsigned m_next_region_id; root_region m_root_region; stack_region m_stack_region; diff --git a/gcc/analyzer/sm-signal.cc b/gcc/analyzer/sm-signal.cc index 1f48a09..b601f45 100644 --- a/gcc/analyzer/sm-signal.cc +++ b/gcc/analyzer/sm-signal.cc @@ -266,11 +266,13 @@ public: function *handler_fun = DECL_STRUCT_FUNCTION (m_fndecl); if (!handler_fun) return; + const extrinsic_state &ext_state = eg->get_ext_state (); program_point entering_handler - = program_point::from_function_entry (eg->get_supergraph (), + = program_point::from_function_entry (*ext_state.get_model_manager (), + eg->get_supergraph (), handler_fun); - program_state state_entering_handler (eg->get_ext_state ()); + program_state state_entering_handler (ext_state); update_model_for_signal_handler (state_entering_handler.m_region_model, handler_fun); state_entering_handler.m_checker_states[sm_idx]->set_global_state -- cgit v1.1 From bb403de36aa29e5398119e78a2c96794bdd6bad8 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 23 Jun 2022 17:11:05 -0700 Subject: compiler: use bool for comma-ok if not already boolean If a comma-ok variable already has a type, and that type is not a boolean type, then set the type of the temporary variable to bool. Otherwise we may try to convert an unnamed bool type to an interface type, which will fail. But we don't want to always use bool, because the type of the comma-ok variable may be a named bool type, in which case the assignment would fail (or need an explicit conversion). The test case is https://go.dev/cl/404496. Fixes golang/go#52535 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413894 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/statements.cc | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index f882812..e20212e 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -6b314f7947b4b31a86c09d166fe6664cd9968824 +6a7ba754e5d98efe0875f1f41f40098e976e7958 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/statements.cc b/gcc/go/gofrontend/statements.cc index b3db843..b442830 100644 --- a/gcc/go/gofrontend/statements.cc +++ b/gcc/go/gofrontend/statements.cc @@ -1594,9 +1594,9 @@ Tuple_map_assignment_statement::do_lower(Gogo* gogo, Named_object*, // var present_temp bool Temporary_statement* present_temp = - Statement::make_temporary((this->present_->type()->is_sink_type()) - ? Type::make_boolean_type() - : this->present_->type(), + Statement::make_temporary((this->present_->type()->is_boolean_type() + ? this->present_->type() + : Type::lookup_bool_type()), NULL, loc); b->add_statement(present_temp); @@ -1789,9 +1789,9 @@ Tuple_receive_assignment_statement::do_lower(Gogo*, Named_object*, // var closed_temp bool Temporary_statement* closed_temp = - Statement::make_temporary((this->closed_->type()->is_sink_type()) - ? Type::make_boolean_type() - : this->closed_->type(), + Statement::make_temporary((this->closed_->type()->is_boolean_type() + ? this->closed_->type() + : Type::lookup_bool_type()), NULL, loc); b->add_statement(closed_temp); @@ -1965,6 +1965,8 @@ Tuple_type_guard_assignment_statement::do_lower(Gogo*, Named_object*, b->add_statement(s); res = Expression::make_call_result(call, 1); + if (!this->ok_->type()->is_boolean_type()) + res = Expression::make_cast(Type::lookup_bool_type(), res, loc); s = Statement::make_assignment(this->ok_, res, loc); b->add_statement(s); } @@ -2001,7 +2003,9 @@ Tuple_type_guard_assignment_statement::lower_to_object_type( Temporary_statement* ok_temp = NULL; if (!this->ok_->is_sink_expression()) { - ok_temp = Statement::make_temporary(this->ok_->type(), + ok_temp = Statement::make_temporary((this->ok_->type()->is_boolean_type() + ? this->ok_->type() + : Type::lookup_bool_type()), NULL, loc); b->add_statement(ok_temp); } -- cgit v1.1 From c0ad48527c314a1e9354b7c26718b56ed4abc92c Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 22 Jun 2022 19:11:20 +0200 Subject: tilegx: Fix infinite loop in gen-mul-tables generator Since around GCC 10, the condition `j < (INTMAX_MAX / 10)' will get optimized into `j != 922337203685477580', which will result in an infinite loop for certain inputs of `j'. Copy the condition already used by the -DTILEPRO generator code, which doesn't fall into this trap. gcc/ChangeLog: * config/tilepro/gen-mul-tables.cc (tilegx_emit): Adjust loop condition to avoid overflow. --- gcc/config/tilepro/gen-mul-tables.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/config/tilepro/gen-mul-tables.cc b/gcc/config/tilepro/gen-mul-tables.cc index 5218398..c125748 100644 --- a/gcc/config/tilepro/gen-mul-tables.cc +++ b/gcc/config/tilepro/gen-mul-tables.cc @@ -1192,11 +1192,11 @@ tilegx_emit (long long multiplier, int num_ops) long long next_pow10; while (((j * 10) < abs_multiplier) - && (j < (INTMAX_MAX / 10))) + && (j < (j * 10))) j = j * 10; prev_pow10 = j; - next_pow10 = (j > (INTMAX_MAX / 10)) ? 0 : j * 10; + next_pow10 = j * 10; if ((abs_multiplier - prev_pow10 <= 100) || (next_pow10 -- cgit v1.1 From d97f3bca6eec50ac4ec007d731d345db3e560c52 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Fri, 24 Jun 2022 19:41:41 +0200 Subject: d: Merge upstream dmd 529110f66, druntime 148608b7. D front-end changes: - Import latest bug fixes to mainline. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 529110f66. * decl.cc (DeclVisitor::visit (TupleDeclaration *)): Update for new front-end interface. * types.cc (layout_aggregate_members): Likewise. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 148608b7. --- gcc/d/decl.cc | 6 +- gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/canthrow.d | 13 +-- gcc/d/dmd/cparse.d | 34 +++++- gcc/d/dmd/declaration.d | 63 ++++++---- gcc/d/dmd/dinterpret.d | 17 ++- gcc/d/dmd/dmangle.d | 18 ++- gcc/d/dmd/dsymbolsem.d | 33 ++++-- gcc/d/dmd/dtoh.d | 128 +++++++++++---------- gcc/d/dmd/expression.d | 8 +- gcc/d/dmd/expressionsem.d | 104 +++++++++++++---- gcc/d/dmd/foreachvar.d | 14 +-- gcc/d/dmd/importc.d | 4 + gcc/d/dmd/ob.d | 22 +--- gcc/d/dmd/parse.d | 11 +- gcc/d/dmd/root/filename.d | 27 +++-- gcc/d/dmd/semantic2.d | 5 + gcc/d/dmd/semantic3.d | 2 +- gcc/d/types.cc | 6 +- .../gdc.test/compilable/dtoh_AnonDeclaration.d | 14 ++- .../gdc.test/compilable/dtoh_StructDeclaration.d | 18 ++- .../gdc.test/compilable/dtoh_TemplateDeclaration.d | 6 +- gcc/testsuite/gdc.test/compilable/dtoh_mangling.d | 8 +- .../gdc.test/compilable/dtoh_protection.d | 28 ++++- gcc/testsuite/gdc.test/compilable/test23168.d | 30 +++++ gcc/testsuite/gdc.test/compilable/test23169.d | 14 +++ gcc/testsuite/gdc.test/compilable/testparse.d | 10 ++ gcc/testsuite/gdc.test/runnable/test23010.d | 43 +++++++ 28 files changed, 463 insertions(+), 225 deletions(-) create mode 100644 gcc/testsuite/gdc.test/compilable/test23168.d create mode 100644 gcc/testsuite/gdc.test/compilable/test23169.d create mode 100644 gcc/testsuite/gdc.test/runnable/test23010.d (limited to 'gcc') diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc index 8676a1b..b82e2d5 100644 --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -225,9 +225,9 @@ public: RootObject *o = (*d->objects)[i]; if (o->dyncast () == DYNCAST_EXPRESSION) { - DsymbolExp *de = ((Expression *) o)->isDsymbolExp (); - if (de != NULL && de->s->isDeclaration ()) - this->build_dsymbol (de->s); + VarExp *ve = ((Expression *) o)->isVarExp (); + if (ve) + this->build_dsymbol (ve->var); } } } diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index d1e3dc1..f5c42f0 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -6203135dcf0112d3211add0cbfb22fecc5df1af4 +529110f66d7d301d62d943a4e4482edaddeb46ea The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/canthrow.d b/gcc/d/dmd/canthrow.d index a38cbb1..fe6e1e3 100644 --- a/gcc/d/dmd/canthrow.d +++ b/gcc/d/dmd/canthrow.d @@ -270,18 +270,7 @@ private CT Dsymbol_canThrow(Dsymbol s, FuncDeclaration func, bool mustNotThrow) } else if (auto td = s.isTupleDeclaration()) { - for (size_t i = 0; i < td.objects.dim; i++) - { - RootObject o = (*td.objects)[i]; - if (o.dyncast() == DYNCAST.expression) - { - Expression eo = cast(Expression)o; - if (auto se = eo.isDsymbolExp()) - { - result |= Dsymbol_canThrow(se.s, func, mustNotThrow); - } - } - } + td.foreachVar(&symbolDg); } return result; } diff --git a/gcc/d/dmd/cparse.d b/gcc/d/dmd/cparse.d index 62ba889..dff7634 100644 --- a/gcc/d/dmd/cparse.d +++ b/gcc/d/dmd/cparse.d @@ -2413,11 +2413,19 @@ final class CParser(AST) : Parser!AST if (scw & scwx) error("duplicate storage class"); scw |= scwx; + // C11 6.7.1-2 At most one storage-class may be given, except that + // _Thread_local may appear with static or extern. const scw2 = scw & (SCW.xstatic | SCW.xextern | SCW.xauto | SCW.xregister | SCW.xtypedef); if (scw2 & (scw2 - 1) || - scw & (SCW.xauto | SCW.xregister) && scw & (SCW.xinline | SCW.x_Noreturn)) + scw & (SCW.x_Thread_local) && scw & (SCW.xauto | SCW.xregister | SCW.xtypedef)) { - error("conflicting storage class"); + error("multiple storage classes in declaration specifiers"); + scw &= ~scwx; + } + if (level == LVL.local && + scw & (SCW.x_Thread_local) && scw & (SCW.xinline | SCW.x_Noreturn)) + { + error("`inline` and `_Noreturn` function specifiers not allowed for `_Thread_local`"); scw &= ~scwx; } if (level & (LVL.parameter | LVL.prototype) && @@ -2964,7 +2972,8 @@ final class CParser(AST) : Parser!AST cparseGnuAttributes(specifier); if (specifier.mod & MOD.xconst) t = toConst(t); - auto param = new AST.Parameter(STC.parameter, t, id, null, null); + auto param = new AST.Parameter(specifiersToSTC(LVL.parameter, specifier), + t, id, null, null); parameters.push(param); if (token.value == TOK.rightParenthesis) break; @@ -4630,6 +4639,15 @@ final class CParser(AST) : Parser!AST stc = AST.STC.extern_ | AST.STC.gshared; else if (specifier.scw & SCW.xstatic) stc = AST.STC.gshared; + else if (specifier.scw & SCW.xregister) + stc = AST.STC.register; + } + else if (level == LVL.parameter) + { + if (specifier.scw & SCW.xregister) + stc = AST.STC.register | AST.STC.parameter; + else + stc = AST.STC.parameter; } else if (level == LVL.member) { @@ -5138,6 +5156,7 @@ final class CParser(AST) : Parser!AST if (!defines || defines.length < 10) // minimum length of a #define line return; const length = defines.length; + defines.writeByte(0); auto slice = defines.peekChars()[0 .. length]; resetDefineLines(slice); // reset lexer @@ -5234,12 +5253,15 @@ final class CParser(AST) : Parser!AST } skipToNextLine(); } - else if (n.value != TOK.endOfLine) + else { - skipToNextLine(); + scan(&n); + if (n.value != TOK.endOfLine) + { + skipToNextLine(); + } } nextDefineLine(); - assert(p - slice.ptr <= length); } } diff --git a/gcc/d/dmd/declaration.d b/gcc/d/dmd/declaration.d index bb0feb6..ffb33d3 100644 --- a/gcc/d/dmd/declaration.d +++ b/gcc/d/dmd/declaration.d @@ -656,23 +656,46 @@ extern (C++) final class TupleDeclaration : Declaration override bool needThis() { //printf("TupleDeclaration::needThis(%s)\n", toChars()); - for (size_t i = 0; i < objects.dim; i++) + return isexp ? foreachVar((s) { return s.needThis(); }) != 0 : false; + } + + /*********************************************************** + * Calls dg(Dsymbol) for each Dsymbol, which should be a VarDeclaration + * inside VarExp (isexp == true). + * Params: + * dg = delegate to call for each Dsymbol + */ + extern (D) void foreachVar(scope void delegate(Dsymbol) dg) + { + assert(isexp); + foreach (o; *objects) { - RootObject o = (*objects)[i]; - if (o.dyncast() == DYNCAST.expression) - { - Expression e = cast(Expression)o; - if (DsymbolExp ve = e.isDsymbolExp()) - { - Declaration d = ve.s.isDeclaration(); - if (d && d.needThis()) - { - return true; - } - } - } + if (auto e = o.isExpression()) + if (auto ve = e.isVarExp()) + dg(ve.var); } - return false; + } + + /*********************************************************** + * Calls dg(Dsymbol) for each Dsymbol, which should be a VarDeclaration + * inside VarExp (isexp == true). + * If dg returns !=0, stops and returns that value else returns 0. + * Params: + * dg = delegate to call for each Dsymbol + * Returns: + * last value returned by dg() + */ + extern (D) int foreachVar(scope int delegate(Dsymbol) dg) + { + assert(isexp); + foreach (o; *objects) + { + if (auto e = o.isExpression()) + if (auto ve = e.isVarExp()) + if(auto ret = dg(ve.var)) + return ret; + } + return 0; } override inout(TupleDeclaration) isTupleDeclaration() inout @@ -1142,15 +1165,7 @@ extern (C++) class VarDeclaration : Declaration // If this variable was really a tuple, set the offsets for the tuple fields TupleDeclaration v2 = aliassym.isTupleDeclaration(); assert(v2); - for (size_t i = 0; i < v2.objects.dim; i++) - { - RootObject o = (*v2.objects)[i]; - assert(o.dyncast() == DYNCAST.expression); - Expression e = cast(Expression)o; - assert(e.op == EXP.dSymbol); - DsymbolExp se = e.isDsymbolExp(); - se.s.setFieldOffset(ad, fieldState, isunion); - } + v2.foreachVar((s) { s.setFieldOffset(ad, fieldState, isunion); }); return; } diff --git a/gcc/d/dmd/dinterpret.d b/gcc/d/dmd/dinterpret.d index bb25210..5841a25 100644 --- a/gcc/d/dmd/dinterpret.d +++ b/gcc/d/dmd/dinterpret.d @@ -2306,16 +2306,12 @@ public: result = null; // Reserve stack space for all tuple members - if (!td.objects) - return; - foreach (o; *td.objects) + td.foreachVar((s) { - Expression ex = isExpression(o); - DsymbolExp ds = ex ? ex.isDsymbolExp() : null; - VarDeclaration v2 = ds ? ds.s.isVarDeclaration() : null; + VarDeclaration v2 = s.isVarDeclaration(); assert(v2); if (v2.isDataseg() && !v2.isCTFE()) - continue; + return 0; ctfeGlobals.stack.push(v2); if (v2._init) @@ -2325,7 +2321,7 @@ public: { einit = interpretRegion(ie.exp, istate, goal); if (exceptionOrCant(einit)) - return; + return 1; } else if (v2._init.isVoidInitializer()) { @@ -2335,11 +2331,12 @@ public: { e.error("declaration `%s` is not yet implemented in CTFE", e.toChars()); result = CTFEExp.cantexp; - return; + return 1; } setValue(v2, einit); } - } + return 0; + }); return; } if (v.isStatic()) diff --git a/gcc/d/dmd/dmangle.d b/gcc/d/dmd/dmangle.d index 7604296..25794e2 100644 --- a/gcc/d/dmd/dmangle.d +++ b/gcc/d/dmd/dmangle.d @@ -371,10 +371,20 @@ public: if (ta.isnogc) buf.writestring("Ni"); - if (ta.isreturn && !ta.isreturninferred) - buf.writestring("Nj"); - else if (ta.isScopeQual && !ta.isscopeinferred) - buf.writestring("Nl"); + // `return scope` must be in that order + if (ta.isreturnscope && !ta.isreturninferred) + { + buf.writestring("NjNl"); + } + else + { + // when return ref, the order is `scope return` + if (ta.isScopeQual && !ta.isscopeinferred) + buf.writestring("Nl"); + + if (ta.isreturn && !ta.isreturninferred) + buf.writestring("Nj"); + } if (ta.islive) buf.writestring("Nm"); diff --git a/gcc/d/dmd/dsymbolsem.d b/gcc/d/dmd/dsymbolsem.d index 7fd4781..11a51f1 100644 --- a/gcc/d/dmd/dsymbolsem.d +++ b/gcc/d/dmd/dsymbolsem.d @@ -647,7 +647,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor else ti = dsym._init ? dsym._init.syntaxCopy() : null; - StorageClass storage_class = STC.temp | STC.local | dsym.storage_class; + StorageClass storage_class = STC.temp | dsym.storage_class; if ((dsym.storage_class & STC.parameter) && (arg.storageClass & STC.parameter)) storage_class |= arg.storageClass; auto v = new VarDeclaration(dsym.loc, arg.type, id, ti, storage_class); @@ -656,15 +656,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor v.dsymbolSemantic(sc); - if (sc.scopesym) - { - //printf("adding %s to %s\n", v.toChars(), sc.scopesym.toChars()); - if (sc.scopesym.members) - // Note this prevents using foreach() over members, because the limits can change - sc.scopesym.members.push(v); - } - - Expression e = new DsymbolExp(dsym.loc, v); + Expression e = new VarExp(dsym.loc, v); (*exps)[i] = e; } auto v2 = new TupleDeclaration(dsym.loc, dsym.ident, exps); @@ -728,6 +720,11 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor else if (!dsym.type.hasPointers()) { dsym.storage_class &= ~STC.scope_; // silently ignore; may occur in generic code + // https://issues.dlang.org/show_bug.cgi?id=23168 + if (dsym.storage_class & STC.returnScope) + { + dsym.storage_class &= ~(STC.return_ | STC.returnScope); + } } } @@ -3208,10 +3205,19 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor sc.stc |= STC.scope_; // If 'this' has no pointers, remove 'scope' as it has no meaning + // Note: this is already covered by semantic of `VarDeclaration` and `TypeFunction`, + // but existing code relies on `hasPointers()` being called here to resolve forward references: + // https://github.com/dlang/dmd/pull/14232#issuecomment-1162906573 if (sc.stc & STC.scope_ && ad && ad.isStructDeclaration() && !ad.type.hasPointers()) { sc.stc &= ~STC.scope_; tf.isScopeQual = false; + if (tf.isreturnscope) + { + sc.stc &= ~(STC.return_ | STC.returnScope); + tf.isreturn = false; + tf.isreturnscope = false; + } } sc.linkage = funcdecl._linkage; @@ -6840,7 +6846,12 @@ bool determineFields(AggregateDeclaration ad) return 1; if (v.aliassym) - return 0; // If this variable was really a tuple, skip it. + { + // If this variable was really a tuple, process each element. + if (auto tup = v.aliassym.isTupleDeclaration()) + return tup.foreachVar(tv => tv.apply(&func, ad)); + return 0; + } if (v.storage_class & (STC.static_ | STC.extern_ | STC.tls | STC.gshared | STC.manifest | STC.ctfe | STC.templateparameter)) return 0; diff --git a/gcc/d/dmd/dtoh.d b/gcc/d/dmd/dtoh.d index 9afcc7f..c570068 100644 --- a/gcc/d/dmd/dtoh.d +++ b/gcc/d/dmd/dtoh.d @@ -873,7 +873,11 @@ public: // Tuple field are expanded into multiple VarDeclarations // (we'll visit them later) if (vd.type && vd.type.isTypeTuple()) + { + assert(vd.aliassym); + vd.toAlias().accept(this); return; + } if (vd.originalType && vd.type == AST.Type.tsize_t) origType = vd.originalType; @@ -1263,41 +1267,38 @@ public: size_t varCount; bool first = true; buf.level++; - foreach (m; *sd.members) + foreach (vd; sd.fields) { - if (auto vd = m.isVarDeclaration()) - { - if (!memberField(vd)) - continue; - varCount++; + if (!memberField(vd) || vd.overlapped) + continue; + varCount++; - if (!vd._init && !vd.type.isTypeBasic() && !vd.type.isTypePointer && !vd.type.isTypeStruct && - !vd.type.isTypeClass && !vd.type.isTypeDArray && !vd.type.isTypeSArray) - { - continue; - } - if (vd._init && vd._init.isVoidInitializer()) - continue; + if (!vd._init && !vd.type.isTypeBasic() && !vd.type.isTypePointer && !vd.type.isTypeStruct && + !vd.type.isTypeClass && !vd.type.isTypeDArray && !vd.type.isTypeSArray) + { + continue; + } + if (vd._init && vd._init.isVoidInitializer()) + continue; - if (first) - { - buf.writestringln(" :"); - first = false; - } - else - { - buf.writestringln(","); - } - writeIdentifier(vd, true); - buf.writeByte('('); + if (first) + { + buf.writestringln(" :"); + first = false; + } + else + { + buf.writestringln(","); + } + writeIdentifier(vd, true); + buf.writeByte('('); - if (vd._init) - { - auto e = AST.initializerToExpression(vd._init); - printExpressionFor(vd.type, e, true); - } - buf.printf(")"); + if (vd._init) + { + auto e = AST.initializerToExpression(vd._init); + printExpressionFor(vd.type, e, true); } + buf.printf(")"); } buf.level--; buf.writenl(); @@ -1308,49 +1309,43 @@ public: { buf.printf("%s(", sd.ident.toChars()); first = true; - foreach (m; *sd.members) + foreach (vd; sd.fields) { - if (auto vd = m.isVarDeclaration()) + if (!memberField(vd) || vd.overlapped) + continue; + if (!first) + buf.writestring(", "); + assert(vd.type); + assert(vd.ident); + typeToBuffer(vd.type, vd, true); + // Don't print default value for first parameter to not clash + // with the default ctor defined above + if (!first) { - if (!memberField(vd)) - continue; - if (!first) - buf.writestring(", "); - assert(vd.type); - assert(vd.ident); - typeToBuffer(vd.type, vd, true); - // Don't print default value for first parameter to not clash - // with the default ctor defined above - if (!first) - { - buf.writestring(" = "); - printExpressionFor(vd.type, findDefaultInitializer(vd)); - } - first = false; + buf.writestring(" = "); + printExpressionFor(vd.type, findDefaultInitializer(vd)); } + first = false; } buf.writestring(") :"); buf.level++; buf.writenl(); first = true; - foreach (m; *sd.members) + foreach (vd; sd.fields) { - if (auto vd = m.isVarDeclaration()) - { - if (!memberField(vd)) - continue; - - if (first) - first = false; - else - buf.writestringln(","); - - writeIdentifier(vd, true); - buf.writeByte('('); - writeIdentifier(vd, true); - buf.writeByte(')'); - } + if (!memberField(vd) || vd.overlapped) + continue; + + if (first) + first = false; + else + buf.writestringln(","); + + writeIdentifier(vd, true); + buf.writeByte('('); + writeIdentifier(vd, true); + buf.writeByte(')'); } buf.writenl(); buf.writestringln("{}"); @@ -1663,6 +1658,13 @@ public: assert(false, "This node type should be handled in the EnumDeclaration"); } + override void visit(AST.TupleDeclaration tup) + { + debug (Debug_DtoH) mixin(traceVisit!tup); + + tup.foreachVar((s) { s.accept(this); }); + } + /** * Prints a member/parameter/variable declaration into `buf`. * diff --git a/gcc/d/dmd/expression.d b/gcc/d/dmd/expression.d index ceecf4b..397a41b 100644 --- a/gcc/d/dmd/expression.d +++ b/gcc/d/dmd/expression.d @@ -348,14 +348,16 @@ int expandAliasThisTuples(Expressions* exps, size_t starti = 0) if (TupleDeclaration td = exp.isAliasThisTuple) { exps.remove(u); - foreach (i, o; *td.objects) + size_t i; + td.foreachVar((s) { - auto d = o.isExpression().isDsymbolExp().s.isDeclaration(); + auto d = s.isDeclaration(); auto e = new DotVarExp(exp.loc, exp, d); assert(d.type); e.type = d.type; exps.insert(u + i, e); - } + ++i; + }); version (none) { printf("expansion ->\n"); diff --git a/gcc/d/dmd/expressionsem.d b/gcc/d/dmd/expressionsem.d index dcc5b50..99e003b 100644 --- a/gcc/d/dmd/expressionsem.d +++ b/gcc/d/dmd/expressionsem.d @@ -6004,10 +6004,10 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor return setError(); se = se.toUTF8(sc); - auto namez = se.toStringz().ptr; + auto namez = se.toStringz(); if (!global.filePath) { - e.error("need `-J` switch to import text file `%s`", namez); + e.error("need `-J` switch to import text file `%s`", namez.ptr); return setError(); } @@ -6036,8 +6036,8 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor return setError(); } - auto name = FileName.searchPath(global.filePath, namez, false); - if (!name) + auto resolvedNamez = FileName.searchPath(global.filePath, namez, false); + if (!resolvedNamez) { e.error("file `%s` cannot be found or not in a path specified with `-J`", se.toChars()); e.errorSupplemental("Path(s) searched (as provided by `-J`):"); @@ -6051,11 +6051,11 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor return setError(); } - sc._module.contentImportedFiles.push(name); + sc._module.contentImportedFiles.push(resolvedNamez.ptr); if (global.params.verbose) { const slice = se.peekString(); - message("file %.*s\t(%s)", cast(int)slice.length, slice.ptr, name); + message("file %.*s\t(%s)", cast(int)slice.length, slice.ptr, resolvedNamez.ptr); } if (global.params.moduleDeps.buffer !is null) { @@ -6072,27 +6072,27 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor ob.writestring("string : "); ob.write(se.peekString()); ob.writestring(" ("); - escapePath(ob, name); + escapePath(ob, resolvedNamez.ptr); ob.writestring(")"); ob.writenl(); } if (global.params.makeDeps.doOutput) { - global.params.makeDeps.files.push(name); + global.params.makeDeps.files.push(resolvedNamez.ptr); } { - auto fileName = FileName(name.toDString); + auto fileName = FileName(resolvedNamez); if (auto fmResult = global.fileManager.lookup(fileName)) { se = new StringExp(e.loc, fmResult); } else { - auto readResult = File.read(name.toDString); + auto readResult = File.read(resolvedNamez); if (!readResult.success) { - e.error("cannot read file `%s`", name); + e.error("cannot read file `%s`", resolvedNamez.ptr); return setError(); } else @@ -6963,18 +6963,8 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor exp.error("cannot take address of `%s`", exp.e1.toChars()); return setError(); } - if (auto dve = exp.e1.isDotVarExp()) - { - /* https://issues.dlang.org/show_bug.cgi?id=22749 - * Error about taking address of any bit-field, regardless of - * whether SCOPE.Cfile is set. - */ - if (auto bf = dve.var.isBitFieldDeclaration()) - { - exp.error("cannot take address of bit-field `%s`", bf.toChars()); - return setError(); - } - } + if (!checkAddressable(exp, sc)) + return setError(); bool hasOverloads; if (auto f = isFuncAddress(exp, &hasOverloads)) @@ -8323,6 +8313,11 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor t1b = t1b.castMod(tv1.mod); exp.e1.type = t1b; } + if (t1b.ty == Tsarray || t1b.ty == Tarray) + { + if (!checkAddressable(exp, sc)) + return setError(); + } /* Run semantic on e2 */ @@ -13152,6 +13147,69 @@ bool checkAddressVar(Scope* sc, Expression exp, VarDeclaration v) return true; } +/************************************** + * This check ensures that the object in `exp` can have its address taken, or + * issue a diagnostic error. + * Params: + * e = expression to check + * sc = context + * Returns: + * true if the expression is addressable + */ +bool checkAddressable(Expression e, Scope* sc) +{ + Expression ex = e; + while (true) + { + switch (ex.op) + { + case EXP.dotVariable: + // https://issues.dlang.org/show_bug.cgi?id=22749 + // Error about taking address of any bit-field, regardless of + // whether SCOPE.Cfile is set. + if (auto bf = ex.isDotVarExp().var.isBitFieldDeclaration()) + { + e.error("cannot take address of bit-field `%s`", bf.toChars()); + return false; + } + goto case EXP.cast_; + + case EXP.index: + ex = ex.isBinExp().e1; + continue; + + case EXP.address: + case EXP.array: + case EXP.cast_: + ex = ex.isUnaExp().e1; + continue; + + case EXP.variable: + if (sc.flags & SCOPE.Cfile) + { + // C11 6.5.3.2: A variable that has its address taken cannot be + // stored in a register. + // C11 6.3.2.1: An array that has its address computed with `[]` + // or cast to an lvalue pointer cannot be stored in a register. + if (ex.isVarExp().var.storage_class & STC.register) + { + if (e.isIndexExp()) + e.error("cannot index through register variable `%s`", ex.toChars()); + else + e.error("cannot take address of register variable `%s`", ex.toChars()); + return false; + } + } + break; + + default: + break; + } + break; + } + return true; +} + /******************************* * Checks the attributes of a function. diff --git a/gcc/d/dmd/foreachvar.d b/gcc/d/dmd/foreachvar.d index 53ed62e..63281b5 100644 --- a/gcc/d/dmd/foreachvar.d +++ b/gcc/d/dmd/foreachvar.d @@ -75,19 +75,7 @@ void foreachVar(Expression e, void delegate(VarDeclaration) dgVar) if (!v) return; if (TupleDeclaration td = v.toAlias().isTupleDeclaration()) - { - if (!td.objects) - return; - foreach (o; *td.objects) - { - Expression ex = isExpression(o); - DsymbolExp s = ex ? ex.isDsymbolExp() : null; - assert(s); - VarDeclaration v2 = s.s.isVarDeclaration(); - assert(v2); - dgVar(v2); - } - } + td.foreachVar((s) { dgVar(s.isVarDeclaration()); }); else dgVar(v); Dsymbol s = v.toAlias(); diff --git a/gcc/d/dmd/importc.d b/gcc/d/dmd/importc.d index bcfbd9a..afec5ef 100644 --- a/gcc/d/dmd/importc.d +++ b/gcc/d/dmd/importc.d @@ -81,10 +81,14 @@ Expression arrayFuncConv(Expression e, Scope* sc) auto t = e.type.toBasetype(); if (auto ta = t.isTypeDArray()) { + if (!checkAddressable(e, sc)) + return ErrorExp.get(); e = e.castTo(sc, ta.next.pointerTo()); } else if (auto ts = t.isTypeSArray()) { + if (!checkAddressable(e, sc)) + return ErrorExp.get(); e = e.castTo(sc, ts.next.pointerTo()); } else if (t.isTypeFunction()) diff --git a/gcc/d/dmd/ob.d b/gcc/d/dmd/ob.d index 121a266..5ff73c9 100644 --- a/gcc/d/dmd/ob.d +++ b/gcc/d/dmd/ob.d @@ -1407,16 +1407,7 @@ void genKill(ref ObState obstate, ObNode* ob) } else if (auto td = s.isTupleDeclaration()) { - foreach (o; *td.objects) - { - if (auto eo = o.isExpression()) - { - if (auto se = eo.isDsymbolExp()) - { - Dsymbol_visit(se.s); - } - } - } + td.foreachVar(&Dsymbol_visit); } } @@ -2107,16 +2098,7 @@ void checkObErrors(ref ObState obstate) } else if (auto td = s.isTupleDeclaration()) { - foreach (o; *td.objects) - { - if (auto eo = o.isExpression()) - { - if (auto se = eo.isDsymbolExp()) - { - Dsymbol_visit(se.s); - } - } - } + td.foreachVar(&Dsymbol_visit); } } diff --git a/gcc/d/dmd/parse.d b/gcc/d/dmd/parse.d index eb5e694..4e3fd53 100644 --- a/gcc/d/dmd/parse.d +++ b/gcc/d/dmd/parse.d @@ -5877,7 +5877,8 @@ LagainStc: { if (isDeclaration(&token, NeedDeclaratorId.mustIfDstyle, TOK.reserved, null)) goto Ldeclaration; - if (peekNext() == TOK.leftParenthesis) + const tv = peekNext(); + if (tv == TOK.leftParenthesis) { // mixin(string) AST.Expression e = parseAssignExp(); @@ -5893,6 +5894,14 @@ LagainStc: } break; } + else if (tv == TOK.template_) + { + // mixin template + nextToken(); + AST.Dsymbol d = parseTemplateDeclaration(true); + s = new AST.ExpStatement(loc, d); + break; + } AST.Dsymbol d = parseMixin(); s = new AST.ExpStatement(loc, d); if (flags & ParseStatementFlags.scope_) diff --git a/gcc/d/dmd/root/filename.d b/gcc/d/dmd/root/filename.d index 3b7b75b..226141d 100644 --- a/gcc/d/dmd/root/filename.d +++ b/gcc/d/dmd/root/filename.d @@ -734,16 +734,15 @@ nothrow: * Returns: * index of the first reserved character in path if found, size_t.max otherwise */ - extern (D) static size_t findReservedChar(const(char)* name) pure @nogc + extern (D) static size_t findReservedChar(const(char)[] name) pure @nogc @safe { version (Windows) { - size_t idx = 0; // According to https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions // the following characters are not allowed in path: < > : " | ? * - for (const(char)* p = name; *p; p++, idx++) + foreach (idx; 0 .. name.length) { - char c = *p; + char c = name[idx]; if (c == '<' || c == '>' || c == ':' || c == '"' || c == '|' || c == '?' || c == '*') { return idx; @@ -784,21 +783,21 @@ nothrow: * Returns: * true if path contains '..' reference to parent directory */ - extern (D) static bool refersToParentDir(const(char)* name) pure @nogc + extern (D) static bool refersToParentDir(const(char)[] name) pure @nogc @safe { - if (name[0] == '.' && name[1] == '.' && (!name[2] || isDirSeparator(name[2]))) + size_t s = 0; + foreach (i; 0 .. name.length) { - return true; - } - - for (const(char)* p = name; *p; p++) - { - char c = *p; - if (isDirSeparator(c) && p[1] == '.' && p[2] == '.' && (!p[3] || isDirSeparator(p[3]))) + if (isDirSeparator(name[i])) { - return true; + if (name[s..i] == "..") + return true; + s = i + 1; } } + if (name[s..$] == "..") + return true; + return false; } unittest diff --git a/gcc/d/dmd/semantic2.d b/gcc/d/dmd/semantic2.d index 73dcaa6..bf18a21 100644 --- a/gcc/d/dmd/semantic2.d +++ b/gcc/d/dmd/semantic2.d @@ -677,6 +677,11 @@ private extern(C++) final class Semantic2Visitor : Visitor { visit(cast(AggregateDeclaration) cd); } + + override void visit(TupleDeclaration td) + { + td.foreachVar((s) { s.accept(this); }); + } } /** diff --git a/gcc/d/dmd/semantic3.d b/gcc/d/dmd/semantic3.d index a056c99..c5d7667 100644 --- a/gcc/d/dmd/semantic3.d +++ b/gcc/d/dmd/semantic3.d @@ -483,7 +483,7 @@ private extern(C++) final class Semantic3Visitor : Visitor if ((funcdecl.flags & FUNCFLAG.inferScope) && !(fparam.storageClass & STC.scope_)) stc |= STC.maybescope; - stc |= fparam.storageClass & (STC.IOR | STC.return_ | STC.scope_ | STC.lazy_ | STC.final_ | STC.TYPECTOR | STC.nodtor | STC.returnScope); + stc |= fparam.storageClass & (STC.IOR | STC.return_ | STC.scope_ | STC.lazy_ | STC.final_ | STC.TYPECTOR | STC.nodtor | STC.returnScope | STC.register); v.storage_class = stc; v.dsymbolSemantic(sc2); if (!sc2.insert(v)) diff --git a/gcc/d/types.cc b/gcc/d/types.cc index b706c91..38cc7f5 100644 --- a/gcc/d/types.cc +++ b/gcc/d/types.cc @@ -392,10 +392,10 @@ layout_aggregate_members (Dsymbols *members, tree context, bool inherited_p) RootObject *ro = (*td->objects)[j]; gcc_assert (ro->dyncast () == DYNCAST_EXPRESSION); Expression *e = (Expression *) ro; - gcc_assert (e->op == EXP::dSymbol); - DsymbolExp *se = e->isDsymbolExp (); + gcc_assert (e->op == EXP::variable); + VarExp *ve = e->isVarExp (); - tmembers.push (se->s); + tmembers.push (ve->var); } fields += layout_aggregate_members (&tmembers, context, diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_AnonDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_AnonDeclaration.d index 20134f5..a4c6ce4 100644 --- a/gcc/testsuite/gdc.test/compilable/dtoh_AnonDeclaration.d +++ b/gcc/testsuite/gdc.test/compilable/dtoh_AnonDeclaration.d @@ -61,9 +61,21 @@ struct S final int32_t innerPrivate; int32_t innerBar; }; - S() + S() : + y(), + z(), + outerPrivate(), + innerPrivate(), + innerBar() { } + S(int32_t y, double z = NAN, int32_t outerPrivate = 0, int32_t innerPrivate = 0, int32_t innerBar = 0) : + y(y), + z(z), + outerPrivate(outerPrivate), + innerPrivate(innerPrivate), + innerBar(innerBar) + {} }; extern void foo(); diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_StructDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_StructDeclaration.d index 8c7ba9b..2e36c7d 100644 --- a/gcc/testsuite/gdc.test/compilable/dtoh_StructDeclaration.d +++ b/gcc/testsuite/gdc.test/compilable/dtoh_StructDeclaration.d @@ -173,12 +173,16 @@ struct A final A() : a(), - s() + s(), + x(), + y() { } - A(int32_t a, S s = S()) : + A(int32_t a, S s = S(), int32_t x = 0, int32_t y = 0) : a(a), - s(s) + s(s), + x(x), + y(y) {} }; @@ -196,11 +200,13 @@ private: char smallarray[1$?:32=u|64=LLU$]; public: Array() : - length() + length(), + data() { } - Array(uint32_t length) : - length(length) + Array(uint32_t length, _d_dynamicArray< char > data = {}) : + length(length), + data(data) {} }; diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_TemplateDeclaration.d b/gcc/testsuite/gdc.test/compilable/dtoh_TemplateDeclaration.d index 1e2be90..1ed6318 100644 --- a/gcc/testsuite/gdc.test/compilable/dtoh_TemplateDeclaration.d +++ b/gcc/testsuite/gdc.test/compilable/dtoh_TemplateDeclaration.d @@ -219,9 +219,13 @@ struct ImportedBuffer final { typedef ActualBuffer Buffer; ActualBuffer buffer2; - ImportedBuffer() + ImportedBuffer() : + buffer2() { } + ImportedBuffer(ActualBuffer buffer2) : + buffer2(buffer2) + {} }; --- */ diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_mangling.d b/gcc/testsuite/gdc.test/compilable/dtoh_mangling.d index 10967c8..fda9efa 100644 --- a/gcc/testsuite/gdc.test/compilable/dtoh_mangling.d +++ b/gcc/testsuite/gdc.test/compilable/dtoh_mangling.d @@ -64,9 +64,15 @@ struct HasMangleMember final int32_t someAttrC; int32_t someAttrCpp; void hasDefaultVar(int32_t i = someAttrC); - HasMangleMember() + HasMangleMember() : + someAttrC(), + someAttrCpp() { } + HasMangleMember(int32_t someAttrC, int32_t someAttrCpp = 0) : + someAttrC(someAttrC), + someAttrCpp(someAttrCpp) + {} }; extern "C" void hasDefaultVar(int32_t i = someVarC); diff --git a/gcc/testsuite/gdc.test/compilable/dtoh_protection.d b/gcc/testsuite/gdc.test/compilable/dtoh_protection.d index 3fd54c7..dc07c7b 100644 --- a/gcc/testsuite/gdc.test/compilable/dtoh_protection.d +++ b/gcc/testsuite/gdc.test/compilable/dtoh_protection.d @@ -50,9 +50,21 @@ protected: private: int32_t e; public: - S1() + S1() : + a(), + b(), + c(), + d(), + e() { } + S1(int32_t a, int32_t b = 0, int32_t c = 0, int32_t d = 0, int32_t e = 0) : + a(a), + b(b), + c(c), + d(d), + e(e) + {} }; class S2 final @@ -102,10 +114,12 @@ public: public: int32_t publicInner; PublicInnerStruct() : + privateInner(), publicInner() { } - PublicInnerStruct(int32_t publicInner) : + PublicInnerStruct(int32_t privateInner, int32_t publicInner = 0) : + privateInner(privateInner), publicInner(publicInner) {} }; @@ -118,10 +132,12 @@ private: public: int32_t publicInner; PrivateInnerClass() : + privateInner(), publicInner() { } - PrivateInnerClass(int32_t publicInner) : + PrivateInnerClass(int32_t privateInner, int32_t publicInner = 0) : + privateInner(privateInner), publicInner(publicInner) {} }; @@ -142,9 +158,13 @@ private: public: typedef PrivateInnerEnum PublicAlias; - Outer() + Outer() : + privateOuter() { } + Outer(int32_t privateOuter) : + privateOuter(privateOuter) + {} }; --- */ diff --git a/gcc/testsuite/gdc.test/compilable/test23168.d b/gcc/testsuite/gdc.test/compilable/test23168.d new file mode 100644 index 0000000..61a4ff3 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/test23168.d @@ -0,0 +1,30 @@ +// https://issues.dlang.org/show_bug.cgi?id=23168 +// Issue 23168 - [DIP1000] return scope wrongly rewritten for structs with no indirections + +@safe: +struct Ptr +{ + int* fun() return scope { return null; } +} + +int* funf(ref return scope Ptr p) { return null; } + +int* use() +{ + Ptr ptr; + return ptr.fun; + return funf(ptr); +} + +// Prevent forward reference 'regression' +// See https://github.com/dlang/dmd/pull/14232#issuecomment-1162906573 +struct S +{ + void f() scope {} + alias x = _get_value; + + static if (true) + int _get_value() {return 3;} + else + int _get_value() {return 4;} +} diff --git a/gcc/testsuite/gdc.test/compilable/test23169.d b/gcc/testsuite/gdc.test/compilable/test23169.d new file mode 100644 index 0000000..6237661 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/test23169.d @@ -0,0 +1,14 @@ +// https://issues.dlang.org/show_bug.cgi?id=23169 +// Issue 23169 - [DIP1000] Mangling does not distinguish return and return scope + +struct Ptr +{ + int* impl; + void* fun0() return scope {return impl;} + void* fun1() scope return {return impl;} + void* fun2() return {return &this;} +} + +static assert(Ptr.fun0.mangleof == "_D9test231693Ptr4fun0MFNjNlZPv"); +static assert(Ptr.fun1.mangleof == "_D9test231693Ptr4fun1MFNlNjZPv"); +static assert(Ptr.fun2.mangleof == "_D9test231693Ptr4fun2MFNjZPv"); diff --git a/gcc/testsuite/gdc.test/compilable/testparse.d b/gcc/testsuite/gdc.test/compilable/testparse.d index 99378a9..cef1575 100644 --- a/gcc/testsuite/gdc.test/compilable/testparse.d +++ b/gcc/testsuite/gdc.test/compilable/testparse.d @@ -191,3 +191,13 @@ void test22019() break; } } + +/***************************************************/ +// https://issues.dlang.org/show_bug.cgi?id=23205 + +void test23205() +{ + mixin template tpl() { int x; } + mixin tpl!(); + x = 123; +} diff --git a/gcc/testsuite/gdc.test/runnable/test23010.d b/gcc/testsuite/gdc.test/runnable/test23010.d new file mode 100644 index 0000000..1cbacfc --- /dev/null +++ b/gcc/testsuite/gdc.test/runnable/test23010.d @@ -0,0 +1,43 @@ +// https://issues.dlang.org/show_bug.cgi?id=23010 + +alias AliasSeq(T...) = T; + +mixin template faz() { + alias T = AliasSeq!(int); + T bar = 12345; + + void write1() { + assert(bar[0] == 12345); + } + + AliasSeq!(string, float) foo = AliasSeq!("qwerty", 1.25f); + + void write2() { + assert(foo == AliasSeq!("qwerty", 1.25f)); + foo = AliasSeq!("asdfg", 2.5f); // this even crashed before + assert(foo == AliasSeq!("asdfg", 2.5f)); + } +} + +void main() { + mixin faz!(); + write1; + write2; + fun; +} + +// Testing static symbol generation ('toobj.d' changes) + +static AliasSeq!(int, string) tup; + +void fun() +{ + auto v = tup; + + struct S(T...) { + static T b; + } + + alias T = S!(int, float); + auto p = T.b; +} -- cgit v1.1 From 8288cd635fa0bd75a8c5f25c7a90d4a7a4acec81 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Fri, 24 Jun 2022 19:48:55 +0200 Subject: d: Construct indexes of ARRAY_TYPE using ARRAY_REF. This is a small simplification over `((T *)&array)[index]', which also allows eliding an unneccesary marking of TREE_ADDRESSABLE when the array expression is a parameter or variable declaration. gcc/d/ChangeLog: * d-codegen.cc (build_array_index): Rename to... (build_pointer_index): ...this. * d-tree.h (build_array_index): Rename declaration to... (build_pointer_index): ...this. * expr.cc (ExprVisitor::visit (IndexExp *)): Construct indexes of ARRAY_TYPE using ARRAY_REF. (ExprVisitor::visit (SliceExp *)): Update. * intrinsics.cc (expand_intrinsic_bt): Update. --- gcc/d/d-codegen.cc | 2 +- gcc/d/d-tree.h | 2 +- gcc/d/expr.cc | 38 +++++++++++++++++++++++++++++++------- gcc/d/intrinsics.cc | 4 ++-- 4 files changed, 35 insertions(+), 11 deletions(-) (limited to 'gcc') diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index 0e14654..3a20114 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -1626,7 +1626,7 @@ build_deref (tree exp) /* Builds pointer offset expression PTR[INDEX]. */ tree -build_array_index (tree ptr, tree index) +build_pointer_index (tree ptr, tree index) { if (error_operand_p (ptr) || error_operand_p (index)) return error_mark_node; diff --git a/gcc/d/d-tree.h b/gcc/d/d-tree.h index 7517463..a6c3811 100644 --- a/gcc/d/d-tree.h +++ b/gcc/d/d-tree.h @@ -578,7 +578,7 @@ extern tree imaginary_part (tree); extern tree complex_expr (tree, tree, tree); extern tree indirect_ref (tree, tree); extern tree build_deref (tree); -extern tree build_array_index (tree, tree); +extern tree build_pointer_index (tree, tree); extern tree build_offset_op (tree_code, tree, tree); extern tree build_offset (tree, tree); extern tree build_memref (tree, tree, tree); diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index fba397b..bf75092 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -1222,9 +1222,8 @@ public: } else { - /* Get the data pointer and length for static and dynamic arrays. */ + /* Get the array and length for static and dynamic arrays. */ tree array = d_save_expr (build_expr (e->e1)); - tree ptr = convert_expr (array, tb1, tb1->nextOf ()->pointerTo ()); tree length = NULL_TREE; if (tb1->ty != TY::Tpointer) @@ -1245,10 +1244,35 @@ public: if (tb1->ty != TY::Tpointer) index = build_bounds_index_condition (e, index, length); - /* Index the .ptr. */ - ptr = void_okay_p (ptr); - this->result_ = indirect_ref (TREE_TYPE (TREE_TYPE (ptr)), - build_array_index (ptr, index)); + /* Convert vectors to their underlying array type. */ + if (VECTOR_TYPE_P (TREE_TYPE (array))) + { + tree array_type = + build_array_type_nelts (TREE_TYPE (TREE_TYPE (array)), + TYPE_VECTOR_SUBPARTS (TREE_TYPE (array))); + d_mark_addressable (array); + array = build1 (VIEW_CONVERT_EXPR, array_type, array); + } + + if (TREE_CODE (TREE_TYPE (array)) == ARRAY_TYPE) + { + /* Generate `array[index]'. When the index is non-constant, we must + mark the array as addressable because we'll need to do pointer + arithmetic on its address. */ + if (TREE_CODE (index) != INTEGER_CST) + d_mark_addressable (array); + + this->result_ = build4 (ARRAY_REF, TREE_TYPE (TREE_TYPE (array)), + array, index, NULL_TREE, NULL_TREE); + } + else + { + /* Generate `array.ptr[index]'. */ + tree ptr = convert_expr (array, tb1, tb1->nextOf ()->pointerTo ()); + ptr = void_okay_p (ptr); + this->result_ = indirect_ref (TREE_TYPE (TREE_TYPE (ptr)), + build_pointer_index (ptr, index)); + } } } @@ -1347,7 +1371,7 @@ public: if (!integer_zerop (lwr_tree)) { tree ptrtype = TREE_TYPE (ptr); - ptr = build_array_index (void_okay_p (ptr), lwr_tree); + ptr = build_pointer_index (void_okay_p (ptr), lwr_tree); ptr = build_nop (ptrtype, ptr); } diff --git a/gcc/d/intrinsics.cc b/gcc/d/intrinsics.cc index 4222b8a..0f96284 100644 --- a/gcc/d/intrinsics.cc +++ b/gcc/d/intrinsics.cc @@ -306,8 +306,8 @@ expand_intrinsic_bt (intrinsic_code intrinsic, tree callexp) tree bitsize = fold_convert (type, TYPE_SIZE (TREE_TYPE (ptr))); /* ptr[bitnum / bitsize] */ - ptr = build_array_index (ptr, fold_build2 (TRUNC_DIV_EXPR, type, - bitnum, bitsize)); + ptr = build_pointer_index (ptr, fold_build2 (TRUNC_DIV_EXPR, type, + bitnum, bitsize)); ptr = indirect_ref (type, ptr); /* mask = 1 << (bitnum % bitsize); */ -- cgit v1.1 From 91418c42089cd1cbe71edcd6b2f5b26559819372 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Thu, 23 Jun 2022 18:24:07 +0200 Subject: d: Add `@register' attribute to compiler and library. The `@register` attribute specifies that a local or `__gshared` variable is to be given a register storage-class in the C sense of the term, and will be placed into a register named `registerName`. The variable needs to boiled down to a data type that fits the target register. It also cannot have either thread-local or `extern` storage. It is an error to take the address of a register variable. PR d/105413 gcc/d/ChangeLog: * d-attribs.cc (d_handle_register_attribute): New function. (d_langhook_attribute_table): Add register attribute. * d-codegen.cc (d_mark_addressable): Error if taken address of register variable. (build_frame_type): Error if register variable has non-local references. * d-tree.h (d_mark_addressable): Add complain parameter. * decl.cc (get_symbol_decl): Mark register varibles DECL_REGISTER. Error when register variable declared thread-local or extern. * expr.cc (ExprVisitor::visit (IndexExp *)): Don't complain about marking register vectors as addressable in an ARRAY_REF. libphobos/ChangeLog: * libdruntime/gcc/attributes.d (register): Define. gcc/testsuite/ChangeLog: * gdc.dg/attr_register1.d: New test. * gdc.dg/attr_register2.d: New test. * gdc.dg/attr_register3.d: New test. --- gcc/d/d-attribs.cc | 40 +++++++++++++++++++++++-- gcc/d/d-codegen.cc | 32 ++++++++++++++++---- gcc/d/d-tree.h | 2 +- gcc/d/decl.cc | 24 +++++++++++++-- gcc/d/expr.cc | 2 +- gcc/testsuite/gdc.dg/attr_register1.d | 55 +++++++++++++++++++++++++++++++++++ gcc/testsuite/gdc.dg/attr_register2.d | 11 +++++++ gcc/testsuite/gdc.dg/attr_register3.d | 22 ++++++++++++++ 8 files changed, 176 insertions(+), 12 deletions(-) create mode 100644 gcc/testsuite/gdc.dg/attr_register1.d create mode 100644 gcc/testsuite/gdc.dg/attr_register2.d create mode 100644 gcc/testsuite/gdc.dg/attr_register3.d (limited to 'gcc') diff --git a/gcc/d/d-attribs.cc b/gcc/d/d-attribs.cc index 4b54426..23bbe39 100644 --- a/gcc/d/d-attribs.cc +++ b/gcc/d/d-attribs.cc @@ -75,6 +75,7 @@ static tree d_handle_weak_attribute (tree *, tree, tree, int, bool *) ; static tree d_handle_noplt_attribute (tree *, tree, tree, int, bool *) ; static tree d_handle_alloc_size_attribute (tree *, tree, tree, int, bool *); static tree d_handle_cold_attribute (tree *, tree, tree, int, bool *); +static tree d_handle_register_attribute (tree *, tree, tree, int, bool *); static tree d_handle_restrict_attribute (tree *, tree, tree, int, bool *); static tree d_handle_used_attribute (tree *, tree, tree, int, bool *); static tree d_handle_visibility_attribute (tree *, tree, tree, int, bool *); @@ -223,6 +224,8 @@ const attribute_spec d_langhook_attribute_table[] = d_handle_cold_attribute, attr_cold_hot_exclusions), ATTR_SPEC ("no_sanitize", 1, -1, true, false, false, false, d_handle_no_sanitize_attribute, NULL), + ATTR_SPEC ("register", 1, 1, true, false, false, false, + d_handle_register_attribute, NULL), ATTR_SPEC ("restrict", 0, 0, true, false, false, false, d_handle_restrict_attribute, NULL), ATTR_SPEC ("used", 0, 0, true, false, false, false, @@ -1409,8 +1412,41 @@ d_handle_no_sanitize_attribute (tree *node, tree name, tree args, int, else { DECL_ATTRIBUTES (*node) = tree_cons (get_identifier ("no_sanitize"), - build_int_cst (d_uint_type, flags), - DECL_ATTRIBUTES (*node)); + build_int_cst (d_uint_type, flags), + DECL_ATTRIBUTES (*node)); + } + + return NULL_TREE; +} + +/* Handle a "register" attribute; arguments as in + struct attribute_spec.handler. */ + +static tree +d_handle_register_attribute (tree *node, tree name, tree args, int, + bool *no_add_attrs) +{ + if (!VAR_P (*node)) + { + warning (OPT_Wattributes, "%qE attribute ignored", name); + *no_add_attrs = true; + } + else if (TREE_CODE (TREE_VALUE (args)) != STRING_CST) + { + error ("%qE attribute argument not a string constant", name); + *no_add_attrs = true; + } + else if (TREE_STRING_LENGTH (TREE_VALUE (args)) == 0 + || TREE_STRING_POINTER (TREE_VALUE (args))[0] == '\0') + { + error ("register name not specified for %q+D", *node); + *no_add_attrs = true; + } + else + { + DECL_REGISTER (*node) = 1; + set_user_assembler_name (*node, TREE_STRING_POINTER (TREE_VALUE (args))); + DECL_HARD_REGISTER (*node) = 1; } return NULL_TREE; diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index 3a20114..8a8bf12 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -697,11 +697,12 @@ build_address (tree exp) return compound_expr (init, exp); } -/* Mark EXP saying that we need to be able to take the - address of it; it should not be allocated in a register. */ +/* Mark EXP saying that we need to be able to take the address of it; it should + not be allocated in a register. When COMPLAIN is true, issue an error if we + are marking a register variable. */ tree -d_mark_addressable (tree exp) +d_mark_addressable (tree exp, bool complain) { switch (TREE_CODE (exp)) { @@ -713,12 +714,22 @@ d_mark_addressable (tree exp) d_mark_addressable (TREE_OPERAND (exp, 0)); break; - case PARM_DECL: case VAR_DECL: + if (complain && DECL_REGISTER (exp)) + { + if (DECL_HARD_REGISTER (exp) || DECL_EXTERNAL (exp)) + error ("address of explicit register variable %qD requested", exp); + else + error ("address of register variable %qD requested", exp); + } + + /* Fall through. */ + case PARM_DECL: case RESULT_DECL: case CONST_DECL: case FUNCTION_DECL: - TREE_ADDRESSABLE (exp) = 1; + if (!VAR_P (exp) || !DECL_HARD_REGISTER (exp)) + TREE_ADDRESSABLE (exp) = 1; break; case CONSTRUCTOR: @@ -2704,7 +2715,16 @@ build_frame_type (tree ffi, FuncDeclaration *fd) if ((v->edtor && (v->storage_class & STCparameter)) || v->needsScopeDtor ()) error_at (make_location_t (v->loc), - "has scoped destruction, cannot build closure"); + "variable %qs has scoped destruction, " + "cannot build closure", v->toChars ()); + } + + if (DECL_REGISTER (vsym)) + { + /* Because the value will be in memory, not a register. */ + error_at (make_location_t (v->loc), + "explicit register variable %qs cannot be used in nested " + "function", v->toChars ()); } } diff --git a/gcc/d/d-tree.h b/gcc/d/d-tree.h index a6c3811..c3e95e4 100644 --- a/gcc/d/d-tree.h +++ b/gcc/d/d-tree.h @@ -549,7 +549,7 @@ extern tree stabilize_expr (tree *); extern tree build_target_expr (tree, tree); extern tree force_target_expr (tree); extern tree build_address (tree); -extern tree d_mark_addressable (tree); +extern tree d_mark_addressable (tree, bool = true); extern tree d_mark_used (tree); extern tree d_mark_read (tree); extern tree build_memcmp_call (tree, tree, tree); diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc index b82e2d5..5032ae0 100644 --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -670,10 +670,14 @@ public: rest_of_decl_compilation (decl, 1, 0); } } - else if (d->isDataseg () && !(d->storage_class & STCextern)) + else if (d->isDataseg ()) { tree decl = get_symbol_decl (d); + /* Only need to build the VAR_DECL for extern declarations. */ + if (d->storage_class & STCextern) + return; + /* Duplicated VarDeclarations map to the same symbol. Check if this is the one declaration which will be emitted. */ tree ident = DECL_ASSEMBLER_NAME (decl); @@ -1343,7 +1347,11 @@ get_symbol_decl (Declaration *decl) if (decl->storage_class & STCvolatile) TREE_THIS_VOLATILE (decl->csym) = 1; - /* Likewise, so could the deprecated attribute. */ + /* Symbol was marked register. */ + if (decl->storage_class & STCregister) + DECL_REGISTER (decl->csym) = 1; + + /* Symbol was declared with deprecated attribute. */ if (decl->storage_class & STCdeprecated) TREE_DEPRECATED (decl->csym) = 1; @@ -1376,6 +1384,18 @@ get_symbol_decl (Declaration *decl) /* Apply any user attributes that may affect semantic meaning. */ apply_user_attributes (decl, decl->csym); + /* Handle any conflicts between D language attributes and compiler-recognized + * user attributes. */ + if (VAR_P (decl->csym) && DECL_HARD_REGISTER (decl->csym)) + { + if (decl->storage_class & STCextern) + error_at (make_location_t (decl->loc), "explicit register variable " + "%qs declared %", decl->toChars ()); + else if (decl->isThreadlocal ()) + error_at (make_location_t (decl->loc), "explicit register variable " + "%qs declared thread local", decl->toChars ()); + } + /* %% Probably should be a little more intelligent about setting this. */ TREE_USED (decl->csym) = 1; d_keep (decl->csym); diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index bf75092..34b3ddd 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -1250,7 +1250,7 @@ public: tree array_type = build_array_type_nelts (TREE_TYPE (TREE_TYPE (array)), TYPE_VECTOR_SUBPARTS (TREE_TYPE (array))); - d_mark_addressable (array); + d_mark_addressable (array, false); array = build1 (VIEW_CONVERT_EXPR, array_type, array); } diff --git a/gcc/testsuite/gdc.dg/attr_register1.d b/gcc/testsuite/gdc.dg/attr_register1.d new file mode 100644 index 0000000..01fc245 --- /dev/null +++ b/gcc/testsuite/gdc.dg/attr_register1.d @@ -0,0 +1,55 @@ +// { dg-do compile } + +import gcc.attributes; + +@attribute("register", null) int var1; // { dg-error "attribute argument not a string constant" } + +@attribute("register", "") int var2; // { dg-error "register name not specified for .var2." } + +@attribute("register", "invalid") __gshared int var3; // { dg-error "invalid register name for .var3." } + +void f1(ref int r) { } + +void test1() +{ + @register("ref") int var6; + f1(var6); // { dg-error "address of explicit register variable .var6. requested" } +} + +void f2(out int r) { } + +void test2() +{ + @register("out") int var7; + f2(var7); // { dg-error "address of explicit register variable .var7. requested" } +} + +void f3(lazy int r) { } + +void test3() +{ + @register("lazy") int var8; // { dg-error "explicit register variable .var8. cannot be used in nested function" } + f3(var8); +} + +void test4() +{ + @register("addr") int var9; + auto ptr3 = &var9; // { dg-error "address of explicit register variable .var9. requested" } +} + +ref int test5() +{ + @register("refreturn") __gshared int var10; // { dg-error "invalid register name" } + return var10; // { dg-error "address of explicit register variable .var10. requested" } +} + +auto test6() +{ + @register("closure") int var11; // { dg-error "explicit register variable .var11. cannot be used in nested function" } + int nested() + { + return var11; + } + return &nested; +} diff --git a/gcc/testsuite/gdc.dg/attr_register2.d b/gcc/testsuite/gdc.dg/attr_register2.d new file mode 100644 index 0000000..9061a64 --- /dev/null +++ b/gcc/testsuite/gdc.dg/attr_register2.d @@ -0,0 +1,11 @@ +// { dg-do compile { target x86_64-*-* } } + +import gcc.attributes; + +@register("ebx") static int var1 = void; // { dg-error "explicit register variable .var1. declared thread local" } + +@register("ebx") extern int var2; // { dg-error "explicit register variable .var2. declared .extern." } + +@register("r12") __gshared int var3 = 0x2a; // { dg-error "global register variable has initial value" } + +@register("r12") __gshared int[256] var4 = void; // { dg-error "data type of .var4. isn.t suitable for a register" } diff --git a/gcc/testsuite/gdc.dg/attr_register3.d b/gcc/testsuite/gdc.dg/attr_register3.d new file mode 100644 index 0000000..706a399 --- /dev/null +++ b/gcc/testsuite/gdc.dg/attr_register3.d @@ -0,0 +1,22 @@ +// { dg-do compile } +// { dg-options "-Wall -O2 -fdump-tree-optimized" } + +import gcc.attributes; + +pragma(inline, true) +void syscall()(int val) +{ + @register("4") int reg = val; + asm { "/* Some Code %0 */" :: "r" (reg); } +} + +void do_syscalls() +{ + for (int s = 0; s < 2; s++) + { + syscall (0); + syscall (1); + } +} + +// { dg-final { scan-tree-dump-times "reg = " 4 "optimized" } } -- cgit v1.1 From 5959cf8217e90b1331170fce96d83dd796a2bd8d Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Fri, 24 Jun 2022 15:30:13 +0200 Subject: d: Give consistent error message when attribute argument not a string constant gcc/d/ChangeLog: * d-attribs.cc (d_handle_section_attribute): Update error message. (d_handle_symver_attribute): Likewise. (d_handle_no_sanitize_attribute): Likewise. (d_handle_visibility_attribute): Likewise. gcc/testsuite/ChangeLog: * gdc.dg/attr_section1.d: Update dg-error. * gdc.dg/attr_visibility1.d: Likewise. --- gcc/d/d-attribs.cc | 11 ++++++----- gcc/testsuite/gdc.dg/attr_section1.d | 2 +- gcc/testsuite/gdc.dg/attr_visibility1.d | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/d/d-attribs.cc b/gcc/d/d-attribs.cc index 23bbe39..1dd806f 100644 --- a/gcc/d/d-attribs.cc +++ b/gcc/d/d-attribs.cc @@ -1015,7 +1015,7 @@ d_handle_section_attribute (tree *node, tree name, tree args, int flags, if (TREE_CODE (TREE_VALUE (args)) != STRING_CST) { - error ("section attribute argument not a string constant"); + error ("%qE attribute argument not a string constant", name); *no_add_attrs = true; return NULL_TREE; } @@ -1065,7 +1065,8 @@ d_handle_section_attribute (tree *node, tree name, tree args, int flags, struct attribute_spec.handler. */ static tree -d_handle_symver_attribute (tree *node, tree, tree args, int, bool *no_add_attrs) +d_handle_symver_attribute (tree *node, tree name, tree args, int, + bool *no_add_attrs) { if (TREE_CODE (*node) != FUNCTION_DECL && TREE_CODE (*node) != VAR_DECL) { @@ -1088,7 +1089,7 @@ d_handle_symver_attribute (tree *node, tree, tree args, int, bool *no_add_attrs) tree symver = TREE_VALUE (args); if (TREE_CODE (symver) != STRING_CST) { - error ("% attribute argument not a string constant"); + error ("%qE attribute argument not a string constant", name); *no_add_attrs = true; return NULL_TREE; } @@ -1391,7 +1392,7 @@ d_handle_no_sanitize_attribute (tree *node, tree name, tree args, int, tree id = TREE_VALUE (args); if (TREE_CODE (id) != STRING_CST) { - error ("%qE argument not a string", name); + error ("%qE attribute argument not a string constant", name); return NULL_TREE; } @@ -1525,7 +1526,7 @@ d_handle_visibility_attribute (tree *node, tree name, tree args, tree id = TREE_VALUE (args); if (TREE_CODE (id) != STRING_CST) { - error ("visibility argument not a string"); + error ("%qE attribute argument not a string constant", name); return NULL_TREE; } diff --git a/gcc/testsuite/gdc.dg/attr_section1.d b/gcc/testsuite/gdc.dg/attr_section1.d index c24634f..759b203 100644 --- a/gcc/testsuite/gdc.dg/attr_section1.d +++ b/gcc/testsuite/gdc.dg/attr_section1.d @@ -7,7 +7,7 @@ import gcc.attributes; struct S {} // { dg-warning ".section. attribute does not apply to types" } @attribute("section", 123) -int f1(); // { dg-error "section attribute argument not a string constant" } +int f1(); // { dg-error ".section. attribute argument not a string constant" } int f2(@section("param") int a) // { dg-error "section attribute not allowed for .a." } { diff --git a/gcc/testsuite/gdc.dg/attr_visibility1.d b/gcc/testsuite/gdc.dg/attr_visibility1.d index a7ed406..932e6e6 100644 --- a/gcc/testsuite/gdc.dg/attr_visibility1.d +++ b/gcc/testsuite/gdc.dg/attr_visibility1.d @@ -13,7 +13,7 @@ void nested() } @attribute("visibility", 123) -int not_a_string(); // { dg-error "visibility argument not a string" } +int not_a_string(); // { dg-error ".visibility. attribute argument not a string constant" } @attribute("visibility", "invalid argument") int invalid_argument(); // { dg-error ".visibility. argument must be one of" } -- cgit v1.1 From b1d0d3520e96802dee37e8fc1c56e19c13d598b1 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Sun, 15 May 2022 17:30:52 +0300 Subject: testsuite: Remove reliance on argc in lto/pr101868_0.c Some embedded targets do not pass any argv arguments. When argc is zero, this causes spurious failures for lto/pr101868_0.c. Fix by following the strategy in r0-114701-g2c49569ecea56d. Use a volatile variable instead of argc to inject a runtime value into the test. I validated the following: - No changes in testresults for x86_64-pc-linux-gnu. - The spurious failures are fixed for PRU target. - lto/pr101868_0.c still fails on x86_64-pc-linux-gnu, if the PR/101868 fix (r12-2254-gfedcf3c476aff7) is reverted. PR tree-optimization/101868 gcc/testsuite/ChangeLog: * gcc.dg/lto/pr101868_0.c (zero): New volatile variable. (main): Use it instead of argc. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/gcc.dg/lto/pr101868_0.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/lto/pr101868_0.c b/gcc/testsuite/gcc.dg/lto/pr101868_0.c index c84d19b..0312430 100644 --- a/gcc/testsuite/gcc.dg/lto/pr101868_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr101868_0.c @@ -22,12 +22,13 @@ repro(VALUE dummy, VALUE hash) static VALUE (*that)(VALUE dummy, VALUE hash) = repro; +volatile int zero = 0; + int main(int argc, char **argv) { - argc--; - that(0, argc); + that(0, zero); - rb_check_type(argc, argc); + rb_check_type(zero, zero); } -- cgit v1.1 From 2e2371b5daad74b581842bbc846f8f10c78d4520 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Sun, 8 May 2022 15:35:02 +0300 Subject: testsuite: Rename test-defined macros Epiphany, PRU, ARC and NDS32 may predefine __big_endian__ and __little_endian__ macros. This leads to spurious warnings like: gcc.dg/sso/memcpy-1.c:7: warning: "__little_endian__" redefined Fix by renaming the macros in the test. gcc/testsuite/ChangeLog: * gcc.dg/sso/memcpy-1.c (__big_endian__, __little_endian__): Rename macros to avoid conflicts with predefined ones. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/gcc.dg/sso/memcpy-1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/sso/memcpy-1.c b/gcc/testsuite/gcc.dg/sso/memcpy-1.c index b4e1c87..0dea955 100644 --- a/gcc/testsuite/gcc.dg/sso/memcpy-1.c +++ b/gcc/testsuite/gcc.dg/sso/memcpy-1.c @@ -3,20 +3,20 @@ typedef unsigned char uint8_t; typedef unsigned int uint32_t; -#define __big_endian__ scalar_storage_order("big-endian") -#define __little_endian__ scalar_storage_order("little-endian") +#define __big_endian_attr__ scalar_storage_order("big-endian") +#define __little_endian_attr__ scalar_storage_order("little-endian") typedef union { uint32_t val; uint8_t v[4]; -} __attribute__((__big_endian__)) upal_u32be_t; +} __attribute__((__big_endian_attr__)) upal_u32be_t; typedef union { uint32_t val; uint8_t v[4]; -} __attribute__((__little_endian__)) upal_u32le_t; +} __attribute__((__little_endian_attr__)) upal_u32le_t; static inline uint32_t native_to_big_endian(uint32_t t) { -- cgit v1.1 From 5cd0e800195ce0f5cb88cde3f2e98b102174847a Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Fri, 13 May 2022 22:46:59 +0300 Subject: testsuite: Handle default_packed for gcc.dg/builtin-object-size-20.c The gcc.dg/builtin-object-size-20.c test case assumes that the target inserts padding between structure members. Obviously it fails for targets which pack structures by default. Split the cases into two tests, so that the ones requiring structure padding can be skipped for default_packed targets. gcc/testsuite/ChangeLog: * gcc.dg/builtin-object-size-20.c: Remove cases which work on default_packed targets. * gcc.dg/builtin-object-size-22.c: New test with the cases removed above. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/gcc.dg/builtin-object-size-20.c | 64 +--------------------- gcc/testsuite/gcc.dg/builtin-object-size-22.c | 79 +++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 62 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/builtin-object-size-22.c (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-20.c b/gcc/testsuite/gcc.dg/builtin-object-size-20.c index bed973c..f40e3dc 100644 --- a/gcc/testsuite/gcc.dg/builtin-object-size-20.c +++ b/gcc/testsuite/gcc.dg/builtin-object-size-20.c @@ -1,7 +1,8 @@ /* PR middle-end/92815 - spurious -Wstringop-overflow writing into a flexible array of an extern struct { dg-do compile } - { dg-options "-O -Wall -fdump-tree-optimized" } */ + { dg-options "-O -Wall -fdump-tree-optimized" } + { dg-skip-if "test assumes that structs have padding" { default_packed } } */ #define ASSERT(expr) ((expr) ? (void)0 : fail (__LINE__)) #define bos0(expr) __builtin_object_size (expr, 1) @@ -18,44 +19,6 @@ typedef __SIZE_TYPE__ size_t; extern void fail (int); -/* Verify sizes of a struct with a flexible array member and no padding. */ - -struct ACX { char n, a[]; }; - -struct ACX ac0 = { }; -struct ACX ac1 = { 1, { 1 } }; -struct ACX ac2 = { 2, { 1, 2 } }; -struct ACX ac3 = { 3, { 1, 2, 3 } }; - -extern struct ACX eacx; - -void facx (void) -{ - ASSERT (bos0 (&ac0) == sizeof ac0); - ASSERT (bos0 (&ac1) == 2); - ASSERT (bos0 (&ac2) == 3); - ASSERT (bos0 (&ac3) == 4); - ASSERT (bos0 (&eacx) == (size_t)-1); - - ASSERT (bos1 (&ac0) == sizeof ac0); - ASSERT (bos1 (&ac1) == 2); - ASSERT (bos1 (&ac2) == 3); - ASSERT (bos1 (&ac3) == 4); - ASSERT (bos1 (&eacx) == (size_t)-1); - - ASSERT (bos2 (&ac0) == sizeof ac0); - ASSERT (bos2 (&ac1) == 2); - ASSERT (bos2 (&ac2) == 3); - ASSERT (bos2 (&ac3) == 4); - ASSERT (bos2 (&eacx) == sizeof eacx); - - ASSERT (bos3 (&ac0) == sizeof ac0); - ASSERT (bos3 (&ac1) == 2); - ASSERT (bos3 (&ac2) == 3); - ASSERT (bos3 (&ac3) == 4); - ASSERT (bos3 (&eacx) == sizeof eacx); -} - /* Verify sizes of a struct with a flexible array member and 1 byte @@ -289,27 +252,4 @@ void fai64cx (void) ASSERT (bos3 (&eai64cx) == sizeof eai64cx); } - -/* Also verify sizes of a struct with a zero length array member. */ - -struct A0C0 { char n, a[0]; }; - -struct A0C0 a0c0 = { }; -extern struct A0C0 ea0c0; - -void fa0c0 (void) -{ - ASSERT (bos0 (&a0c0) == sizeof a0c0); - ASSERT (bos0 (&ea0c0) == sizeof ea0c0); - - ASSERT (bos1 (&a0c0) == sizeof a0c0); - ASSERT (bos1 (&a0c0) == sizeof ea0c0); - - ASSERT (bos2 (&a0c0) == sizeof a0c0); - ASSERT (bos2 (&a0c0) == sizeof ea0c0); - - ASSERT (bos3 (&a0c0) == sizeof a0c0); - ASSERT (bos3 (&a0c0) == sizeof ea0c0); -} - /* { dg-final { scan-tree-dump-not "fail" "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-22.c b/gcc/testsuite/gcc.dg/builtin-object-size-22.c new file mode 100644 index 0000000..1e55229 --- /dev/null +++ b/gcc/testsuite/gcc.dg/builtin-object-size-22.c @@ -0,0 +1,79 @@ +/* PR middle-end/92815 - a variant of gcc.dg/builtin-object-size-20.c + prepared for all targets, irregardless if they pack or not + the structs by default. + { dg-do compile } + { dg-options "-O -Wall -fdump-tree-optimized" } */ + +#define ASSERT(expr) ((expr) ? (void)0 : fail (__LINE__)) +#define bos0(expr) __builtin_object_size (expr, 1) +#define bos1(expr) __builtin_object_size (expr, 1) +#define bos2(expr) __builtin_object_size (expr, 2) +#define bos3(expr) __builtin_object_size (expr, 3) + +typedef __SIZE_TYPE__ size_t; + + +extern void fail (int); + + +/* Verify sizes of a struct with a flexible array member and no padding. */ + +struct ACX { char n, a[]; }; + +struct ACX ac0 = { }; +struct ACX ac1 = { 1, { 1 } }; +struct ACX ac2 = { 2, { 1, 2 } }; +struct ACX ac3 = { 3, { 1, 2, 3 } }; + +extern struct ACX eacx; + +void facx (void) +{ + ASSERT (bos0 (&ac0) == sizeof ac0); + ASSERT (bos0 (&ac1) == 2); + ASSERT (bos0 (&ac2) == 3); + ASSERT (bos0 (&ac3) == 4); + ASSERT (bos0 (&eacx) == (size_t)-1); + + ASSERT (bos1 (&ac0) == sizeof ac0); + ASSERT (bos1 (&ac1) == 2); + ASSERT (bos1 (&ac2) == 3); + ASSERT (bos1 (&ac3) == 4); + ASSERT (bos1 (&eacx) == (size_t)-1); + + ASSERT (bos2 (&ac0) == sizeof ac0); + ASSERT (bos2 (&ac1) == 2); + ASSERT (bos2 (&ac2) == 3); + ASSERT (bos2 (&ac3) == 4); + ASSERT (bos2 (&eacx) == sizeof eacx); + + ASSERT (bos3 (&ac0) == sizeof ac0); + ASSERT (bos3 (&ac1) == 2); + ASSERT (bos3 (&ac2) == 3); + ASSERT (bos3 (&ac3) == 4); + ASSERT (bos3 (&eacx) == sizeof eacx); +} + +/* Also verify sizes of a struct with a zero length array member. */ + +struct A0C0 { char n, a[0]; }; + +struct A0C0 a0c0 = { }; +extern struct A0C0 ea0c0; + +void fa0c0 (void) +{ + ASSERT (bos0 (&a0c0) == sizeof a0c0); + ASSERT (bos0 (&ea0c0) == sizeof ea0c0); + + ASSERT (bos1 (&a0c0) == sizeof a0c0); + ASSERT (bos1 (&a0c0) == sizeof ea0c0); + + ASSERT (bos2 (&a0c0) == sizeof a0c0); + ASSERT (bos2 (&a0c0) == sizeof ea0c0); + + ASSERT (bos3 (&a0c0) == sizeof a0c0); + ASSERT (bos3 (&a0c0) == sizeof ea0c0); +} + +/* { dg-final { scan-tree-dump-not "fail" "optimized" } } */ -- cgit v1.1 From f21f17f95c0237f4f987a5fa9f1fa9c7e0db3c40 Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Fri, 24 Jun 2022 22:21:39 +0200 Subject: Fortran: fix checking of arguments to UNPACK when MASK is a variable [PR105813] gcc/fortran/ChangeLog: PR fortran/105813 * check.cc (gfc_check_unpack): Try to simplify MASK argument to UNPACK so that checking of the VECTOR argument can work when MASK is a variable. gcc/testsuite/ChangeLog: PR fortran/105813 * gfortran.dg/unpack_vector_1.f90: New test. --- gcc/fortran/check.cc | 2 ++ gcc/testsuite/gfortran.dg/unpack_vector_1.f90 | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/unpack_vector_1.f90 (limited to 'gcc') diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc index 0c2cb50..91d87a1 100644 --- a/gcc/fortran/check.cc +++ b/gcc/fortran/check.cc @@ -6353,6 +6353,8 @@ gfc_check_unpack (gfc_expr *vector, gfc_expr *mask, gfc_expr *field) if (!same_type_check (vector, 0, field, 2)) return false; + gfc_simplify_expr (mask, 0); + if (mask->expr_type == EXPR_ARRAY && gfc_array_size (vector, &vector_size)) { diff --git a/gcc/testsuite/gfortran.dg/unpack_vector_1.f90 b/gcc/testsuite/gfortran.dg/unpack_vector_1.f90 new file mode 100644 index 0000000..5347c11 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/unpack_vector_1.f90 @@ -0,0 +1,12 @@ +! { dg-do compile } +! PR fortran/105813 +! Fix checking of VECTOR argument to UNPACK when MASK is a variable. +! Contributed by G.Steinmetz + +program p + logical, parameter :: mask(2,2) = reshape ([.true., .true., & + .false., .true.], & + shape (mask)) + print *, unpack ([1,2,3], mask, 0) ! OK + print *, unpack ([1,2], mask, 0) ! { dg-error "must provide at least" } +end -- cgit v1.1 From 75fa80bb5654d1f8b21310118f41705b74168039 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Thu, 9 Jun 2022 20:27:32 +0300 Subject: testsuite: Skip btf-bitfields-1.c if int is less than 32-bits This test spuriously fails on AVR with: error: width of 'bitfield_c' exceeds its type 8-bit and 16-bit microcontrollers do not seem to be the target audience for BTF file format. So the least intrusive fix is to simply skip the test for them. gcc/testsuite/ChangeLog: * gcc.dg/debug/btf/btf-bitfields-1.c: Skip if int is less than 32-bits. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c index c6bf521..3ee07dd 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c @@ -9,6 +9,7 @@ /* { dg-do compile ) */ /* { dg-options "-O0 -gbtf -dA" } */ +/* { dg-require-effective-target int32plus } */ /* { dg-final { scan-assembler-times "\[\t \]0x84000004\[\t \]+\[^\n\]*btt_info" 1 } } */ -- cgit v1.1 From 113844d68e94f4e9c0e946db351ba7d3d4a1335a Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 24 Jun 2022 14:40:12 -0400 Subject: c++: Include -Woverloaded-virtual in -Wall [PR87729] This seems like a good warning to have in -Wall, as requested. But as pointed out in PR20423, some users want a warning only when a derived function doesn't override any base function. So let's put that lesser version in -Wall (and -Woverloaded-virtual=1) while leaving the semantics for the existing option the same. PR c++/87729 PR c++/20423 gcc/c-family/ChangeLog: * c.opt (Woverloaded-virtual): Add levels, include in -Wall. gcc/ChangeLog: * doc/invoke.texi: Document changes. gcc/cp/ChangeLog: * class.cc (warn_hidden): Handle -Woverloaded-virtual=1. gcc/testsuite/ChangeLog: * g++.dg/warn/Woverloaded-virt1.C: New test. * g++.dg/warn/Woverloaded-virt2.C: New test. --- gcc/c-family/c.opt | 6 +++++- gcc/cp/class.cc | 17 +++++++++++++---- gcc/doc/invoke.texi | 26 +++++++++++++++++++++++++- gcc/testsuite/g++.dg/warn/Woverloaded-virt1.C | 14 ++++++++++++++ gcc/testsuite/g++.dg/warn/Woverloaded-virt2.C | 15 +++++++++++++++ 5 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/g++.dg/warn/Woverloaded-virt1.C create mode 100644 gcc/testsuite/g++.dg/warn/Woverloaded-virt2.C (limited to 'gcc') diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 41a20bc6..44e1a60 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1126,7 +1126,11 @@ C ObjC C++ ObjC++ Var(warn_overlength_strings) Warning LangEnabledBy(C ObjC C++ Warn if a string is longer than the maximum portable length specified by the standard. Woverloaded-virtual -C++ ObjC++ Var(warn_overloaded_virtual) Warning +C++ ObjC++ Warning Alias(Woverloaded-virtual=,2,0) +Warn about overloaded virtual function names. + +Woverloaded-virtual= +C++ ObjC++ Joined UInteger IntegerRange(0,2) Var(warn_overloaded_virtual) Warning LangEnabledBy(C++ ObjC++,Wall,1,0) Warn about overloaded virtual function names. Woverride-init diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc index 3c195b3..17683f4 100644 --- a/gcc/cp/class.cc +++ b/gcc/cp/class.cc @@ -3034,6 +3034,7 @@ warn_hidden (tree t) continue; /* Remove any overridden functions. */ + bool seen_non_override = false; for (tree fndecl : ovl_range (fns)) { if (TREE_CODE (fndecl) == FUNCTION_DECL @@ -3045,20 +3046,28 @@ warn_hidden (tree t) for (size_t k = 0; k < base_fndecls.length (); k++) if (base_fndecls[k] && same_signature_p (fndecl, base_fndecls[k])) - base_fndecls[k] = NULL_TREE; + { + base_fndecls[k] = NULL_TREE; + goto next; + } } + seen_non_override = true; + next:; } + if (!seen_non_override && warn_overloaded_virtual == 1) + /* All the derived fns override base virtuals. */ + return; + /* Now give a warning for all base functions without overriders, as they are hidden. */ - tree base_fndecl; - FOR_EACH_VEC_ELT (base_fndecls, j, base_fndecl) + for (tree base_fndecl : base_fndecls) if (base_fndecl) { auto_diagnostic_group d; /* Here we know it is a hider, and no overrider exists. */ if (warning_at (location_of (base_fndecl), - OPT_Woverloaded_virtual, + OPT_Woverloaded_virtual_, "%qD was hidden", base_fndecl)) inform (location_of (fns), " by %qD", fns); } diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index f794edd..dfaa561 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -4039,6 +4039,7 @@ a C++ program. The new-style casts (@code{dynamic_cast}, less vulnerable to unintended effects and much easier to search for. @item -Woverloaded-virtual @r{(C++ and Objective-C++ only)} +@itemx -Woverloaded-virtual=@var{n} @opindex Woverloaded-virtual @opindex Wno-overloaded-virtual @cindex overloaded virtual function, warning @@ -4052,7 +4053,7 @@ struct A @{ @}; struct B: public A @{ - void f(int); + void f(int); // does not override @}; @end smallexample @@ -4067,6 +4068,29 @@ b->f(); @noindent fails to compile. +The optional level suffix controls the behavior when all the +declarations in the derived class override virtual functions in the +base class, even if not all of the base functions are overridden: + +@smallexample +struct C @{ + virtual void f(); + virtual void f(int); +@}; + +struct D: public C @{ + void f(int); // does override +@} +@end smallexample + +This pattern is less likely to be a mistake; if D is only used +virtually, the user might have decided that the base class semantics +for some of the overloads are fine. + +At level 1, this case does not warn; at level 2, it does. +@option{-Woverloaded-virtual} by itself selects level 2. Level 1 is +included in @option{-Wall}. + @item -Wno-pmf-conversions @r{(C++ and Objective-C++ only)} @opindex Wno-pmf-conversions @opindex Wpmf-conversions diff --git a/gcc/testsuite/g++.dg/warn/Woverloaded-virt1.C b/gcc/testsuite/g++.dg/warn/Woverloaded-virt1.C new file mode 100644 index 0000000..92f8327 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Woverloaded-virt1.C @@ -0,0 +1,14 @@ +// PR c++/87729 +// { dg-additional-options -Wall } + +class Foo +{ +public: + virtual void f(int); // { dg-warning "hidden" } +}; + +class Bar : public Foo +{ +public: + virtual void f(short); // { dg-message "by" } +}; diff --git a/gcc/testsuite/g++.dg/warn/Woverloaded-virt2.C b/gcc/testsuite/g++.dg/warn/Woverloaded-virt2.C new file mode 100644 index 0000000..763ab29 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Woverloaded-virt2.C @@ -0,0 +1,15 @@ +// PR c++/20423 +// { dg-additional-options -Wall } + +class Foo +{ +public: + virtual void f(int); + virtual void f(short); +}; + +class Bar : public Foo +{ +public: + virtual void f(short); +}; -- cgit v1.1 From 84c2131d2c596ddf90500b3f0ad4aa43abe650f2 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 25 Jun 2022 00:16:23 +0000 Subject: Daily bump. --- gcc/ChangeLog | 145 ++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/analyzer/ChangeLog | 123 ++++++++++++++++++++++++++++++++++++++++ gcc/c-family/ChangeLog | 6 ++ gcc/cp/ChangeLog | 10 ++++ gcc/d/ChangeLog | 40 +++++++++++++ gcc/fortran/ChangeLog | 7 +++ gcc/testsuite/ChangeLog | 63 +++++++++++++++++++++ 8 files changed, 395 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b94bb62..51cb9ec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,148 @@ +2022-06-24 Jason Merrill + + PR c++/87729 + PR c++/20423 + * doc/invoke.texi: Document changes. + +2022-06-24 Iain Buclaw + + * config/tilepro/gen-mul-tables.cc (tilegx_emit): Adjust loop + condition to avoid overflow. + +2022-06-24 Will Schmidt + + * config/rs6000/aix71.h (MASK_PPC_GPOPT, MASK_PPC_GFXOPT): Replace with + OPTION_MASK_PPC_GPOPT, OPTION_MASK_PPC_GFXOPT. + * config/rs6000/darwin.h (MASK_PPC_GFXOPT): Replace with + OPTION_MASK_PPC_GFXOPT. + * config/rs6000/darwin64-biarch.h (MASK_PPC_GFXOPT): Same. + * config/rs6000/default64.h (MASK_PPC_GPOPT, MASK_PPC_GFXOPT): Replace with + OPTION_MASK_PPC_GPOPT, OPTION_MASK_PPC_GFXOPT. + * config/rs6000/rs6000-c.cc: Update comment. + * config/rs6000/rs6000-cpus.def: Update RS6000_CPU macro calls. + * config/rs6000/rs6000.cc (rs6000_darwin_file_start): Replace + MASK_PPC_GPOPT with OPTION_MASK_PPC_GPOPT. + (rs6000_builtin_mask_names): Replace MASK_PPC_GFXOPT, MASK_POPCNTB + with OPTION_MASK_PPC_GFXOPT, OPTION_MASK_POPCNTB. + * config/rs6000/rs6000.h: (MASK_P8_VECTOR, MASK_P9_VECTOR, + MASK_P9_MISC, MASK_POPCNTB, MASK_POPCNTD, MASK_PPC_GFXOPT, + MASK_PPC_GPOPT, MASK_RECIP_PRECISION, MASK_SOFT_FLOAT, + MASK_VSX, MASK_POWER10, MASK_P10_FUSION): Delete. + +2022-06-24 Will Schmidt + + * config/rs6000/aix71.h (TARGET_DEFAULT): Replace MASK_MFCRF with + OPTION_MASK_MFCRF. + * config/rs6000/darwin.h (TARGET_DEFAULT): Replace MASK_MULTIPLE with + OPTION_MASK_MULTIPLE. + * config/rs6000/darwin64-biarch.h (TARGET_DEFAULT): Same. + * config/rs6000/default64.h (TARGET_DEFAULT): Replace MASK_MFCRF with + OPTION_MASK_MFCRF. + * config/rs6000/eabi.h (TARGET_DEFAULT): Replace MASK_EABI with + OPTION_MASK_EABI. + * config/rs6000/eabialtivec.h (TARGET_DEFAULT): Same. + * config/rs6000/linuxaltivec.h (TARGET_DEFAULT): Replace + MASK_ALTIVEC with OPTION_MASK_ALTIVEC. + * config/rs6000/rs6000-cpus.def (MASK_ALTIVEC, MASK_CMPB, + MASK_CRYPTO, MASK_DFP, MASK_DIRECT_MOVE, MASK_DLMZB, MASK_EABI, + MASK_FLOAT128_KEYWORD, MASK_FLOAT128_HW, MASK_FPRND, + MASK_P8_FUSION, MASK_HARD_FLOAT, MASK_HTM, MASK_ISEL, MASK_MFCRF, + MASK_MMA, MASK_MULHW, MASK_MULTIPLE, MASK_NO_UPDATE): + Replace with + OPTION_MASK_ALTIVEC, OPTION_MASK_CMPB, OPTION_MASK_CRYPTO, + OPTION_MASK_DFP, OPTION_MASK_DIRECT_MOVE, OPTION_MASK_DLMZB, + OPTION_MASK_EABI, OPTION_MASK_FLOAT128_KEYWORD, + OPTION_MASK_FLOAT128_HW, OPTION_MASK_FPRND, OPTION_MASK_P8_FUSION, + OPTION_MASK_HARD_FLOAT, OPTION_MASK_HTM, OPTION_MASK_ISEL, + OPTION_MASK_MFCRF, OPTION_MASK_MMA, OPTION_MASK_MULHW, + OPTION_MASK_MULTIPLE, OPTION_MASK_NO_UPDATE. + * config/rs6000/rs6000.cc (rs6000_darwin_file_start): Replace + MASK_MFCRF, MASK_ALTIVEC with OPTION_MASK_MFCRF, OPTION_MASK_ALTIVEC. + * config/rs6000/rs6000.h (TARGET_DEFAULT): Replace MASK_MULTIPLE + with OPTION_MASK_MULTIPLE. + (MASK_ALTIVEC, MASK_CMPB, MASK_CRYPTO, MASK_DFP, + MASK_DIRECT_MOVE, MASK_DLMZB, MASK_EABI, MASK_FLOAT128_KEYWORD, + MASK_FLOAT128_HW, MASK_FPRND, MASK_P8_FUSION, MASK_HARD_FLOAT, + MASK_HTM, MASK_ISEL, MASK_MFCRF, MASK_MMA, MASK_MULHW, + MASK_MULTIPLE, MASK_NO_UPDATE): Delete. + * config/rs6000/vxworks.h (TARGET_DEFAULT): Replace MASK_EABI + with OPTION_MASK_EABI. + +2022-06-24 Will Schmidt + + * config/rs6000/rs6000.cc (RS6000_BTM_ALTIVEC, RS6000_BTM_CMPB, + RS6000_BTM_VSX, RS6000_BTM_FRE, RS6000_BTM_P8_VECTOR, + RS6000_BTM_P9_VECTOR, RS6000_BTM_P9_MISC, RS6000_BTM_MODULO, + RS6000_BTM_CRYPTO, RS6000_BTM_HTM): Replace with OPTION_MASK_ALTIVEC, + OPTION_MASK_CMPB, OPTION_MASK_VSX, OPTION_MASK_POPCNTB, + OPTION_MASK_P8_VECTOR, OPTION_MASK_P9_VECTOR, OPTION_MASK_P9_MISC, + OPTION_MASK_MODULO, OPTION_MASK_CRYPTO, OPTION_MASK_HTM. + * config/rs6000/rs6000.h (RS6000_BTM_MODULO, RS6000_BTM_ALTIVEC, + RS6000_BTM_CMPB, RS6000_BTM_VSX, RS6000_BTM_P8_VECTOR, + RS6000_BTM_P9_VECTOR, RS6000_BTM_P9_MISC, RS6000_BTM_CRYPTO, + RS6000_BTM_HTM, RS6000_BTM_FRE): Remove. + +2022-06-24 Will Schmidt + + * config/rs6000/rs6000-c.cc: Update comments. + * config/rs6000/rs6000.cc (RS6000_BTM_FRES, RS6000_BTM_FRSQRTE, + RS6000_BTM_FRSQRTES, RS6000_BTM_POPCNTD, RS6000_BTM_CELL, + RS6000_BTM_64BIT, RS6000_BTM_POWERPC64, RS6000_BTM_DFP, + RS6000_BTM_HARD_FLOAT,RS6000_BTM_LDBL128, RS6000_BTM_FLOAT128, + RS6000_BTM_FLOAT128_HW, RS6000_BTM_MMA, RS6000_BTM_P10): Replace + with OPTION_MASK_PPC_GFXOPT, OPTION_MASK_PPC_GFXOPT, + OPTION_MASK_POPCNTB, OPTION_MASK_POPCNTD, + OPTION_MASK_FPRND, MASK_64BIT, MASK_POWERPC64, + OPTION_MASK_DFP, OPTION_MASK_SOFT_FLOAT, OPTION_MASK_MULTIPLE, + OPTION_MASK_FLOAT128_KEYWORD, OPTION_MASK_FLOAT128_HW, + OPTION_MASK_MMA, OPTION_MASK_POWER10. + * config/rs6000/rs6000.h (RS6000_BTM_FRES, RS6000_BTM_FRSQRTE, + RS6000_BTM_FRSQRTES, RS6000_BTM_POPCNTD, RS6000_BTM_CELL, + RS6000_BTM_DFP, RS6000_BTM_HARD_FLOAT, RS6000_BTM_LDBL128, + RS6000_BTM_64BIT, RS6000_BTM_POWERPC64, RS6000_BTM_FLOAT128, + RS6000_BTM_FLOAT128_HW, RS6000_BTM_MMA, RS6000_BTM_P10): Delete. + +2022-06-24 Will Schmidt + + * config/rs6000/rs6000.h (RS6000_BTM_COMMON, RS6000_BTM_ALWAYS, + MASK_REGNAMES, OPTION_MASK_REGNAMES, MASK_PROTOTYPE, + OPTION_MASK_PROTOTYPE, MASK_UPDATE, OPTION_MASK_UPDATE): Remove. + +2022-06-24 Richard Biener + + PR middle-end/106070 + * match.pd (a != b ? a : b): Fix translation of + operand_equal_for_comparison_p. + +2022-06-24 Jan Hubicka + + PR ipa/106057 + * tree-ssa-alias.cc (stmt_kills_ref_p): Check for external throw. + +2022-06-24 Martin Liska + + PR middle-end/106059 + * profile-count.h: *= and /= operators need to modify this + object. + +2022-06-24 Roger Sayle + Uroš Bizjak + + PR target/105930 + * config/i386/i386.md (*di3_doubleword): Split after + reload. Use rtx_equal_p to avoid creating memory-to-memory moves, + and emit NOTE_INSN_DELETED if operand[2] is zero (i.e. with -O0). + +2022-06-24 Alexandre Oliva + + * common.opt (nostdlib++): New. + * doc/invoke.texi (-nostdlib++): Document it. + +2022-06-24 Alexandre Oliva + + * doc/sourcebuild.texi (Environment attributes): Document + two_plus_gigs. + 2022-06-23 David Malcolm * common.opt (fdiagnostics-show-rules): New option. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 4956361..e66783e 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220624 +20220625 diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog index f69a5b6..bf58d57 100644 --- a/gcc/analyzer/ChangeLog +++ b/gcc/analyzer/ChangeLog @@ -1,3 +1,126 @@ +2022-06-24 David Malcolm + + * call-string.cc: Add includes of "analyzer/analyzer.h" + and "analyzer/analyzer-logging.h". + (call_string::call_string): Delete copy ctor. + (call_string::operator=): Delete. + (call_string::operator==): Delete. + (call_string::hash): Delete. + (call_string::push_call): Make const, returning the resulting + call_string. + (call_string::pop): Delete. + (call_string::cmp_ptr_ptr): New. + (call_string::validate): Assert that m_parent is non-NULL, or + m_elements is empty. + (call_string::call_string): Move default ctor here from + call-string.h and reimplement. Add ctor taking a parent + and an element. + (call_string::~call_string): New. + (call_string::recursive_log): New. + * call-string.h (call_string::call_string): Move default ctor's + defn to call-string.cc. Delete copy ctor. Add ctor taking a + parent and an element. + (call_string::operator=): Delete. + (call_string::operator==): Delete. + (call_string::hash): Delete. + (call_string::push_call): Make const, returning the resulting + call_string. + (call_string::pop): Delete decl. + (call_string::get_parent): New. + (call_string::cmp_ptr_ptr): New decl. + (call_string::get_top_of_stack): New. + (struct call_string::hashmap_traits_t): New. + (class call_string): Add friend class region_model_manager. Add + DISABLE_COPY_AND_ASSIGN. + (call_string::~call_string): New decl. + (call_string::recursive_log): New decl. + (call_string::m_parent): New field. + (call_string::m_children): New field. + * constraint-manager.cc (selftest::test_many_constants): Pass + model manager to program_point::origin. + * engine.cc (exploded_graph::exploded_graph): Likewise. + (exploded_graph::add_function_entry): Likewise for + program_point::from_function_entry. + (add_tainted_args_callback): Likewise. + (exploded_graph::maybe_process_run_of_before_supernode_enodes): + Update for change to program_point.get_call_string. + (exploded_graph::process_node): Likewise. + (class function_call_string_cluster): Convert m_cs from a + call_string to a const call_string &. + (struct function_call_string): Likewise. + (pod_hash_traits::hash): Use pointer_hash + for m_cs. + (pod_hash_traits::equal): Update for change + to m_cs. + (root_cluster::add_node): Update for change to + function_call_string. + (viz_callgraph_node::dump_dot): Update for change to call_string. + * exploded-graph.h (per_call_string_data::m_key): Convert to a + reference. + (struct eg_call_string_hash_map_traits): Delete. + (exploded_graph::call_string_data_map_t): Remove traits class. + * program-point.cc: Move include of "analyzer/call-string.h" to + after "analyzer/analyzer-logging.h". + (program_point::print): Update for conversion of m_call_string to + a pointer. + (program_point::to_json): Likewise. + (program_point::push_to_call_stack): Update for immutability of + call strings. + (program_point::pop_from_call_stack): Likewise. + (program_point::hash): Use pointer hashing for m_call_string. + (program_point::get_function_at_depth): Update for change to + m_call_string. + (program_point::validate): Update for changes to call_string. + (program_point::on_edge): Likewise. + (program_point::origin): Move here from call-string.h. Add + region_model_manager param and use it to get empty call string. + (program_point::from_function_entry): Likewise. + (selftest::test_function_point_ordering): Likewise. + (selftest::test_function_point_ordering): Likewise. + * program-point.h (program_point::program_point): Update for + change to m_call_string. + (program_point::get_call_string): Likewise. + (program_point::get_stack_depth): Likewise. + (program_point::origin): Add region_model_manager param, and move + defn to call-string.cc. + (program_point::from_function_entry): Likewise. + (program_point::empty): Drop call_string. + (program_point::deleted): Likewise. + (program_point::program_point): New private ctor. + (program_point::m_call_string): Convert from call_string to const + call_string *. + * program-state.cc (selftest::test_program_state_merging): Update + for call_string changes. + (selftest::test_program_state_merging_2): Likewise. + * region-model-manager.cc + (region_model_manager::region_model_manager): Construct + m_empty_call_string. + (region_model_manager::log_stats): Log the call strings. + * region-model.cc (assert_region_models_merge): Pass the + region_model_manager when creating program_point instances. + (selftest::test_state_merging): Likewise. + (selftest::test_constraint_merging): Likewise. + (selftest::test_widening_constraints): Likewise. + (selftest::test_iteration_1): Likewise. + * region-model.h (region_model_manager::get_empty_call_string): + New. + (region_model_manager::m_empty_call_string): New. + * sm-signal.cc (register_signal_handler::impl_transition): Update + for changes to call_string. + +2022-06-24 David Malcolm + + * call-string.cc (call_string::calc_recursion_depth): Whitespace + cleanups. + (call_string::cmp): Likewise. + (call_string::get_caller_node): Likewise. + (call_string::validate): Likewise. + * engine.cc (dynamic_call_info_t::add_events_to_path): Likewise. + (exploded_graph::get_per_function_data): Likewise. + (exploded_graph::maybe_create_dynamic_call): Likewise. + (exploded_graph::maybe_create_dynamic_call): Likewise. + (exploded_graph::process_node): Likewise. + 2022-06-16 David Malcolm * varargs.cc (va_arg_type_mismatch::emit): Associate the warning diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index a605c3c..8a22e7e 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2022-06-24 Jason Merrill + + PR c++/87729 + PR c++/20423 + * c.opt (Woverloaded-virtual): Add levels, include in -Wall. + 2022-06-18 Jakub Jelinek * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift): diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7f5e29a..a50f5eb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +2022-06-24 Jason Merrill + + PR c++/87729 + PR c++/20423 + * class.cc (warn_hidden): Handle -Woverloaded-virtual=1. + +2022-06-24 Alexandre Oliva + + * g++spec.cc (lang_specific_driver): Implement -nostdlib++. + 2022-06-23 Jason Merrill PR c++/105925 diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 618e987..cea195e 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,43 @@ +2022-06-24 Iain Buclaw + + * d-attribs.cc (d_handle_section_attribute): Update error message. + (d_handle_symver_attribute): Likewise. + (d_handle_no_sanitize_attribute): Likewise. + (d_handle_visibility_attribute): Likewise. + +2022-06-24 Iain Buclaw + + PR d/105413 + * d-attribs.cc (d_handle_register_attribute): New function. + (d_langhook_attribute_table): Add register attribute. + * d-codegen.cc (d_mark_addressable): Error if taken address of + register variable. + (build_frame_type): Error if register variable has non-local + references. + * d-tree.h (d_mark_addressable): Add complain parameter. + * decl.cc (get_symbol_decl): Mark register varibles DECL_REGISTER. + Error when register variable declared thread-local or extern. + * expr.cc (ExprVisitor::visit (IndexExp *)): Don't complain about + marking register vectors as addressable in an ARRAY_REF. + +2022-06-24 Iain Buclaw + + * d-codegen.cc (build_array_index): Rename to... + (build_pointer_index): ...this. + * d-tree.h (build_array_index): Rename declaration to... + (build_pointer_index): ...this. + * expr.cc (ExprVisitor::visit (IndexExp *)): Construct indexes of + ARRAY_TYPE using ARRAY_REF. + (ExprVisitor::visit (SliceExp *)): Update. + * intrinsics.cc (expand_intrinsic_bt): Update. + +2022-06-24 Iain Buclaw + + * dmd/MERGE: Merge upstream dmd 529110f66. + * decl.cc (DeclVisitor::visit (TupleDeclaration *)): Update for new + front-end interface. + * types.cc (layout_aggregate_members): Likewise. + 2022-06-22 Iain Buclaw * dmd/MERGE: Merge upstream dmd 6203135dc. diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b668944..f89e088 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2022-06-24 Harald Anlauf + + PR fortran/105813 + * check.cc (gfc_check_unpack): Try to simplify MASK argument to + UNPACK so that checking of the VECTOR argument can work when MASK + is a variable. + 2022-06-18 Harald Anlauf PR fortran/105986 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2704581..105a540 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,66 @@ +2022-06-24 Jason Merrill + + PR c++/87729 + PR c++/20423 + * g++.dg/warn/Woverloaded-virt1.C: New test. + * g++.dg/warn/Woverloaded-virt2.C: New test. + +2022-06-24 Dimitar Dimitrov + + * gcc.dg/debug/btf/btf-bitfields-1.c: Skip if int is less than + 32-bits. + +2022-06-24 Harald Anlauf + + PR fortran/105813 + * gfortran.dg/unpack_vector_1.f90: New test. + +2022-06-24 Dimitar Dimitrov + + * gcc.dg/builtin-object-size-20.c: Remove cases which + work on default_packed targets. + * gcc.dg/builtin-object-size-22.c: New test with the cases + removed above. + +2022-06-24 Dimitar Dimitrov + + * gcc.dg/sso/memcpy-1.c (__big_endian__, __little_endian__): + Rename macros to avoid conflicts with predefined ones. + +2022-06-24 Dimitar Dimitrov + + PR tree-optimization/101868 + * gcc.dg/lto/pr101868_0.c (zero): New volatile variable. + (main): Use it instead of argc. + +2022-06-24 Iain Buclaw + + * gdc.dg/attr_section1.d: Update dg-error. + * gdc.dg/attr_visibility1.d: Likewise. + +2022-06-24 Iain Buclaw + + PR d/105413 + * gdc.dg/attr_register1.d: New test. + * gdc.dg/attr_register2.d: New test. + * gdc.dg/attr_register3.d: New test. + +2022-06-24 Richard Biener + + PR middle-end/106070 + * gcc.dg/torture/pr106070.c: New testcase. + +2022-06-24 Alexandre Oliva + + * g++.dg/abi/pure-virtual1.C: Use -nostdlib++. + +2022-06-24 Alexandre Oliva + + * lib/target-supports.exp + (check_effective_target_two_plus_gigs): New. + * gcc.target/aarch64/symbol-range.c: Link only on + two_plus_gigs targets, compile otherwise. + 2022-06-23 Jason Merrill PR c++/105925 -- cgit v1.1 From 476ef855d08db02a027150ea92611c1626ea7350 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 24 Jun 2022 14:27:18 +0800 Subject: intl: stop using fgrep for exgettext fgrep has been deprecated in favor of grep -F for a long time, and the next grep release (3.8 or 4.0) will print a warning of fgrep is used. And, the fgrep command in exgettext is no longer useful after we migrated from SVN to Git. Remove the fgrep command so we won't see the warning. gcc/po/ChangeLog: * exgettext: Remove unneeded fgrep command. --- gcc/po/exgettext | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/po/exgettext b/gcc/po/exgettext index 95cb0e7..43b2e81 100644 --- a/gcc/po/exgettext +++ b/gcc/po/exgettext @@ -99,7 +99,7 @@ echo "scanning for keywords, %e and %n strings..." >&2 lang_subdirs=`echo */config-lang.in */*/config-lang.in | sed -e 's|/config-lang\.in||g'` { for dir in "" c-family/ common/ common/config/ common/config/*/ \ config/ config/*/ \ - `find $lang_subdirs -type d -print | fgrep -v .svn | sort | sed -e 's|$|/|'` + `find $lang_subdirs -type d -print | sort | sed -e 's|$|/|'` do for glob in '*.c' '*.cc' '*.h' '*.def' do eval echo $dir$glob done -- cgit v1.1 From defa8537afc734faefde07c9ebdb38252133fbb1 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Sat, 25 Jun 2022 09:35:45 +0100 Subject: Iterating cprop_hardreg... Third time's a charm. This middle-end patch proposes the "hard register constant propagation" pass be performed up to three times on each basic block (up from the current two times) if the second pass successfully made changes. The motivation for three passes is to handle the "swap idiom" (i.e. t = x; x = y; y = t;" sequences) that get generated by register allocation (reload). Consider the x86_64 test case for __int128 addition recently discussed on gcc-patches. With that proposed patch, the input to the cprop_hardreg pass looks like: movq %rdi, %r8 movq %rsi, %rdi movq %r8, %rsi movq %rdx, %rax movq %rcx, %rdx addq %rsi %rax adcq %rdi, %rdx ret where the first three instructions effectively swap %rsi and %rdi. On the first pass of cprop_hardreg, we notice that the third insn, %rsi := %r8, is redundant and can eliminated/propagated to produce: movq %rdi, %r8 movq %rsi, %rdi movq %rdx, %rax movq %rcx, %rdx addq %r8 %rax adcq %rdi, %rdx ret Because a successful propagation was found, cprop_hardreg then runs a second pass/sweep on affected basic blocks (using worklist), and on this second pass notices that the second instruction, %rdi := %rsi, may now be propagated (%rsi was killed in the before the first transform), and after a second pass, we now end up with: movq %rdi, %r8 movq %rdx, %rax movq %rcx, %rdx addq %r8, %rax adcq %rsi, %rdx ret which is the current behaviour on mainline. However, a third and final pass would now notice that the first insn, "%r8 := %rdi" is also now eliminable, and a third iteration would produce optimal code: movq %rdx, %rax movq %rcx, %rdx addq %rdi, %rax adcq %rsi, %rdx ret The patch below creates two worklists, and alternates between them on sucessive passes, populating NEXT with the basic block id's of blocks that were updated during the current pass over the CURR worklist. It should be noted that this a regression fix; GCC 4.8 generated optimal code with two moves (whereas GCC 12 required 5 moves, up from GCC 11's 4 moves). 2022-06-25 Roger Sayle Richard Biener gcc/ChangeLog * regcprop.cc (pass_cprop_hardreg::execute): Perform a third iteration over each basic block that was updated by the second iteration. --- gcc/regcprop.cc | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/regcprop.cc b/gcc/regcprop.cc index 1fdc367..eacc59f 100644 --- a/gcc/regcprop.cc +++ b/gcc/regcprop.cc @@ -1383,7 +1383,9 @@ pass_cprop_hardreg::execute (function *fun) auto_sbitmap visited (last_basic_block_for_fn (fun)); bitmap_clear (visited); - auto_vec worklist; + auto_vec worklist1, worklist2; + auto_vec *curr = &worklist1; + auto_vec *next = &worklist2; bool any_debug_changes = false; /* We need accurate notes. Earlier passes such as if-conversion may @@ -1404,7 +1406,7 @@ pass_cprop_hardreg::execute (function *fun) FOR_EACH_BB_FN (bb, fun) { if (cprop_hardreg_bb (bb, all_vd, visited)) - worklist.safe_push (bb->index); + curr->safe_push (bb->index); if (all_vd[bb->index].n_debug_insn_changes) any_debug_changes = true; } @@ -1416,16 +1418,22 @@ pass_cprop_hardreg::execute (function *fun) if (MAY_HAVE_DEBUG_BIND_INSNS && any_debug_changes) cprop_hardreg_debug (fun, all_vd); - /* Second pass if we've changed anything, only for the bbs where we have - changed anything though. */ - if (!worklist.is_empty ()) + /* Repeat pass up to PASSES times, but only processing basic blocks + that have changed on the previous iteration. CURR points to the + current worklist, and each iteration populates the NEXT worklist, + swapping pointers after each cycle. */ + + unsigned int passes = optimize > 1 ? 3 : 2; + for (unsigned int pass = 2; pass <= passes && !curr->is_empty (); pass++) { any_debug_changes = false; bitmap_clear (visited); - for (int index : worklist) + next->truncate (0); + for (int index : *curr) { bb = BASIC_BLOCK_FOR_FN (fun, index); - cprop_hardreg_bb (bb, all_vd, visited); + if (cprop_hardreg_bb (bb, all_vd, visited)) + next->safe_push (bb->index); if (all_vd[bb->index].n_debug_insn_changes) any_debug_changes = true; } @@ -1433,6 +1441,7 @@ pass_cprop_hardreg::execute (function *fun) df_analyze (); if (MAY_HAVE_DEBUG_BIND_INSNS && any_debug_changes) cprop_hardreg_debug (fun, all_vd); + std::swap (curr, next); } free (all_vd); -- cgit v1.1 From 54a5f478487a955c3ffaec3e9164a72599bc1cfb Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Sat, 25 Jun 2022 09:58:35 +0100 Subject: testsuite, Darwin: Fix darwin-comm-1.c error messages for Darwin <= 10. When amending the allowed alignment size to accommodate the larger values permitted by newer tools, we retained the object file limit of 2^15 for Darwin versions <= 10, since that is what the native tools expect there. This triggers a different diagnostic path with a distinct error message, which is checked in the revised test here. Signed-off-by: Iain Sandoe gcc/testsuite/ChangeLog: * gcc.dg/darwin-comm-1.c: Check for the correct error message for Darwin <= 10. --- gcc/testsuite/gcc.dg/darwin-comm-1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/darwin-comm-1.c b/gcc/testsuite/gcc.dg/darwin-comm-1.c index 4651998..2ea11d6 100644 --- a/gcc/testsuite/gcc.dg/darwin-comm-1.c +++ b/gcc/testsuite/gcc.dg/darwin-comm-1.c @@ -1,5 +1,6 @@ -/* { dg-do compile { target *-*-darwin[912]* } } */ +/* { dg-do compile { target *-*-darwin* } } */ /* { dg-options "-fcommon" } */ /* In all cases, common has a max alignment of 2^15. */ -int badcommon __attribute__ ((aligned (65536))); /* { dg-error "common variables must have an alignment" } */ +int badcommon __attribute__ ((aligned (65536))); /* { dg-error "common variables must have an alignment" "" { target { *-*-darwin1[1-9]* *-*-darwin2* } } } */ +/* { dg-error "requested alignment .65536. exceeds object file maximum 32768" "" { target { *-*-darwin[4-9]* *-*-darwin10* } } .-1 } */ \ No newline at end of file -- cgit v1.1 From fc259b522c0f8b7bbca8e7adcd3da63330094a34 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sat, 25 Jun 2022 12:36:55 -0400 Subject: Remove long deprecated tilegx and tilepro ports / * MAINTAINERS: Remove tilegx and tilepro entries. * configure.ac: Remove tilegx and tilepro stanzas. * configure: Rebuilt. contrib/ * config-list.mk: Remove tilegx and tilepro entries. * gcc_update: Remove tilegx and tilepro entries. gcc/ * common/config/tilegx/tilegx-common.cc: Removed. * common/config/tilepro/tilepro-common.cc: Removed. * config.gcc: Remove tilegx and tilepro entries. * config/tilegx/constraints.md: Removed. * config/tilegx/feedback.h: Removed. * config/tilegx/linux.h: Removed. * config/tilegx/mul-tables.cc: Removed. * config/tilegx/predicates.md: Removed. * config/tilegx/sync.md: Removed. * config/tilegx/t-tilegx: Removed. * config/tilegx/tilegx-builtins.h: Removed. * config/tilegx/tilegx-c.cc: Removed. * config/tilegx/tilegx-generic.md: Removed. * config/tilegx/tilegx-modes.def: Removed. * config/tilegx/tilegx-multiply.h: Removed. * config/tilegx/tilegx-opts.h: Removed. * config/tilegx/tilegx-protos.h: Removed. * config/tilegx/tilegx.cc: Removed. * config/tilegx/tilegx.h: Removed. * config/tilegx/tilegx.md: Removed. * config/tilegx/tilegx.opt: Removed. * config/tilepro/constraints.md: Removed. * config/tilepro/feedback.h: Removed. * config/tilepro/gen-mul-tables.cc: Removed. * config/tilepro/linux.h: Removed. * config/tilepro/mul-tables.cc: Removed. * config/tilepro/predicates.md: Removed. * config/tilepro/t-tilepro: Removed. * config/tilepro/tilepro-builtins.h: Removed. * config/tilepro/tilepro-c.cc: Removed. * config/tilepro/tilepro-generic.md: Removed. * config/tilepro/tilepro-modes.def: Removed. * config/tilepro/tilepro-multiply.h: Removed. * config/tilepro/tilepro-protos.h: Removed. * config/tilepro/tilepro.cc: Removed. * config/tilepro/tilepro.h: Removed. * config/tilepro/tilepro.md: Removed. * config/tilepro/tilepro.opt: Removed. * configure.ac: Remove tilegx and tilepro entries. * configure: Rebuilt. * doc/extend.texi: Remove tilegx and tilepro entries. * doc/install.texi: Remove tilegx and tilepro entries. * doc/invoke.texi: Remove tilegx and tilepro entries. * doc/md.texi: Remove tilegx and tilepro entries. gcc/testsuite/ * gcc.dg/lower-subreg-1.c: Remove tilegx and tilepro entries. * gcc.misc-tests/linkage.exp: Remove tilegx and tilepro entries. libgcc/ * config.host: Removed tilegx and tilepro entries. * config/tilegx/sfp-machine.h: Removed. * config/tilegx/sfp-machine32.h: Removed. * config/tilegx/sfp-machine64.h: Removed. * config/tilegx/t-crtstuff: Removed. * config/tilegx/t-softfp: Removed. * config/tilegx/t-tilegx: Removed. * config/tilepro/atomic.c: Removed. * config/tilepro/atomic.h: Removed. * config/tilepro/linux-unwind.h: Removed. * config/tilepro/sfp-machine.h: Removed. * config/tilepro/softdivide.c: Removed. * config/tilepro/softmpy.S: Removed. * config/tilepro/t-crtstuff: Removed. * config/tilepro/t-tilepro: Removed. --- gcc/common/config/tilegx/tilegx-common.cc | 58 - gcc/common/config/tilepro/tilepro-common.cc | 54 - gcc/config.gcc | 30 +- gcc/config/tilegx/constraints.md | 115 - gcc/config/tilegx/feedback.h | 14 - gcc/config/tilegx/linux.h | 83 - gcc/config/tilegx/mul-tables.cc | 27249 -------------------------- gcc/config/tilegx/predicates.md | 290 - gcc/config/tilegx/sync.md | 227 - gcc/config/tilegx/t-tilegx | 21 - gcc/config/tilegx/tilegx-builtins.h | 325 - gcc/config/tilegx/tilegx-c.cc | 55 - gcc/config/tilegx/tilegx-generic.md | 115 - gcc/config/tilegx/tilegx-modes.def | 37 - gcc/config/tilegx/tilegx-multiply.h | 78 - gcc/config/tilegx/tilegx-opts.h | 33 - gcc/config/tilegx/tilegx-protos.h | 75 - gcc/config/tilegx/tilegx.cc | 5728 ------ gcc/config/tilegx/tilegx.h | 530 - gcc/config/tilegx/tilegx.md | 5664 ------ gcc/config/tilegx/tilegx.opt | 63 - gcc/config/tilepro/constraints.md | 99 - gcc/config/tilepro/feedback.h | 14 - gcc/config/tilepro/gen-mul-tables.cc | 1369 -- gcc/config/tilepro/linux.h | 83 - gcc/config/tilepro/mul-tables.cc | 17837 ----------------- gcc/config/tilepro/predicates.md | 258 - gcc/config/tilepro/t-tilepro | 15 - gcc/config/tilepro/tilepro-builtins.h | 216 - gcc/config/tilepro/tilepro-c.cc | 54 - gcc/config/tilepro/tilepro-generic.md | 107 - gcc/config/tilepro/tilepro-modes.def | 34 - gcc/config/tilepro/tilepro-multiply.h | 82 - gcc/config/tilepro/tilepro-protos.h | 76 - gcc/config/tilepro/tilepro.cc | 5083 ----- gcc/config/tilepro/tilepro.h | 457 - gcc/config/tilepro/tilepro.md | 3816 ---- gcc/config/tilepro/tilepro.opt | 36 - gcc/configure | 29 +- gcc/configure.ac | 29 +- gcc/doc/extend.texi | 71 - gcc/doc/install.texi | 32 +- gcc/doc/invoke.texi | 66 - gcc/doc/md.texi | 148 - gcc/testsuite/gcc.dg/lower-subreg-1.c | 2 +- gcc/testsuite/gcc.misc-tests/linkage.exp | 7 - 46 files changed, 5 insertions(+), 70859 deletions(-) delete mode 100644 gcc/common/config/tilegx/tilegx-common.cc delete mode 100644 gcc/common/config/tilepro/tilepro-common.cc delete mode 100644 gcc/config/tilegx/constraints.md delete mode 100644 gcc/config/tilegx/feedback.h delete mode 100644 gcc/config/tilegx/linux.h delete mode 100644 gcc/config/tilegx/mul-tables.cc delete mode 100644 gcc/config/tilegx/predicates.md delete mode 100644 gcc/config/tilegx/sync.md delete mode 100644 gcc/config/tilegx/t-tilegx delete mode 100644 gcc/config/tilegx/tilegx-builtins.h delete mode 100644 gcc/config/tilegx/tilegx-c.cc delete mode 100644 gcc/config/tilegx/tilegx-generic.md delete mode 100644 gcc/config/tilegx/tilegx-modes.def delete mode 100644 gcc/config/tilegx/tilegx-multiply.h delete mode 100644 gcc/config/tilegx/tilegx-opts.h delete mode 100644 gcc/config/tilegx/tilegx-protos.h delete mode 100644 gcc/config/tilegx/tilegx.cc delete mode 100644 gcc/config/tilegx/tilegx.h delete mode 100644 gcc/config/tilegx/tilegx.md delete mode 100644 gcc/config/tilegx/tilegx.opt delete mode 100644 gcc/config/tilepro/constraints.md delete mode 100644 gcc/config/tilepro/feedback.h delete mode 100644 gcc/config/tilepro/gen-mul-tables.cc delete mode 100644 gcc/config/tilepro/linux.h delete mode 100644 gcc/config/tilepro/mul-tables.cc delete mode 100644 gcc/config/tilepro/predicates.md delete mode 100644 gcc/config/tilepro/t-tilepro delete mode 100644 gcc/config/tilepro/tilepro-builtins.h delete mode 100644 gcc/config/tilepro/tilepro-c.cc delete mode 100644 gcc/config/tilepro/tilepro-generic.md delete mode 100644 gcc/config/tilepro/tilepro-modes.def delete mode 100644 gcc/config/tilepro/tilepro-multiply.h delete mode 100644 gcc/config/tilepro/tilepro-protos.h delete mode 100644 gcc/config/tilepro/tilepro.cc delete mode 100644 gcc/config/tilepro/tilepro.h delete mode 100644 gcc/config/tilepro/tilepro.md delete mode 100644 gcc/config/tilepro/tilepro.opt (limited to 'gcc') diff --git a/gcc/common/config/tilegx/tilegx-common.cc b/gcc/common/config/tilegx/tilegx-common.cc deleted file mode 100644 index 3d33b7b..0000000 --- a/gcc/common/config/tilegx/tilegx-common.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* Common hooks for TILE-Gx. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "diagnostic-core.h" -#include "tm.h" -#include "common/common-target.h" -#include "common/common-target-def.h" -#include "opts.h" -#include "flags.h" - -static const struct default_options tilegx_option_optimization_table[] = { - /* Scheduling and bundling are super important for our architecture, so - enable them at -O1. */ - {OPT_LEVELS_1_PLUS, OPT_fschedule_insns, NULL, 1}, - {OPT_LEVELS_1_PLUS, OPT_fschedule_insns2, NULL, 1}, - {OPT_LEVELS_NONE, 0, NULL, 0} -}; - - -static void -tilegx_option_init_struct (struct gcc_options *opts) -{ - opts->x_flag_asynchronous_unwind_tables = 1; -} - - -#undef TARGET_DEFAULT_TARGET_FLAGS -#define TARGET_DEFAULT_TARGET_FLAGS \ - (TARGET_DEFAULT \ - | TARGET_ENDIAN_DEFAULT) - -#undef TARGET_OPTION_OPTIMIZATION_TABLE -#define TARGET_OPTION_OPTIMIZATION_TABLE tilegx_option_optimization_table - -#undef TARGET_OPTION_INIT_STRUCT -#define TARGET_OPTION_INIT_STRUCT tilegx_option_init_struct - -struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; diff --git a/gcc/common/config/tilepro/tilepro-common.cc b/gcc/common/config/tilepro/tilepro-common.cc deleted file mode 100644 index 8e09736..0000000 --- a/gcc/common/config/tilepro/tilepro-common.cc +++ /dev/null @@ -1,54 +0,0 @@ -/* Common hooks for TILEPro. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "diagnostic-core.h" -#include "tm.h" -#include "common/common-target.h" -#include "common/common-target-def.h" -#include "opts.h" -#include "flags.h" - -static const struct default_options tilepro_option_optimization_table[] = { - /* Scheduling and bundling are super important for our architecture, so - enable them at -O1. */ - {OPT_LEVELS_1_PLUS, OPT_fschedule_insns, NULL, 1}, - {OPT_LEVELS_1_PLUS, OPT_fschedule_insns2, NULL, 1}, - {OPT_LEVELS_NONE, 0, NULL, 0} -}; - - -static void -tilepro_option_init_struct (struct gcc_options *opts) -{ - opts->x_flag_asynchronous_unwind_tables = 1; -} - - - -#undef TARGET_OPTION_OPTIMIZATION_TABLE -#define TARGET_OPTION_OPTIMIZATION_TABLE tilepro_option_optimization_table - -#undef TARGET_OPTION_INIT_STRUCT -#define TARGET_OPTION_INIT_STRUCT tilepro_option_init_struct - -struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; diff --git a/gcc/config.gcc b/gcc/config.gcc index cdbefb5..4e3b15b 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -248,8 +248,7 @@ md_file= # Obsolete configurations. case ${target} in - tile*-*-* \ - | cr16-*-* \ + cr16-*-* \ | hppa[12]*-*-hpux10* \ | hppa[12]*-*-hpux11* \ | m32c-*-rtems* \ @@ -557,12 +556,6 @@ tic6x-*-*) xtensa*-*-*) extra_options="${extra_options} fused-madd.opt" ;; -tilegx*-*-*) - cpu_type=tilegx - ;; -tilepro*-*-*) - cpu_type=tilepro - ;; esac tm_file=${cpu_type}/${cpu_type}.h @@ -3477,27 +3470,6 @@ tic6x-*-uclinux) tmake_file="${tmake_file} c6x/t-c6x c6x/t-c6x-elf c6x/t-c6x-uclinux" use_collect2=no ;; -tilegx*-*-linux*) - tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilegx/linux.h ${tm_file}" - tmake_file="${tmake_file} tilegx/t-tilegx" - extra_objs="${extra_objs} mul-tables.o" - c_target_objs="${c_target_objs} tilegx-c.o" - cxx_target_objs="${cxx_target_objs} tilegx-c.o" - extra_headers="feedback.h" - case $target in - tilegxbe-*) - tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" - ;; - esac - ;; -tilepro*-*-linux*) - tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h tilepro/linux.h ${tm_file}" - tmake_file="${tmake_file} tilepro/t-tilepro" - extra_objs="${extra_objs} mul-tables.o" - c_target_objs="${c_target_objs} tilepro-c.o" - cxx_target_objs="${cxx_target_objs} tilepro-c.o" - extra_headers="feedback.h" - ;; v850-*-rtems*) target_cpu_default="TARGET_CPU_generic" tm_file="elfos.h v850/v850.h" diff --git a/gcc/config/tilegx/constraints.md b/gcc/config/tilegx/constraints.md deleted file mode 100644 index dee57d8..0000000 --- a/gcc/config/tilegx/constraints.md +++ /dev/null @@ -1,115 +0,0 @@ -;; Constraint definitions for Tilera TILE-Gx. -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Contributed by Walter Lee (walt@tilera.com) -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; . - -(define_register_constraint "R00" "R0_REGS" "r0") -(define_register_constraint "R01" "R1_REGS" "r1") -(define_register_constraint "R02" "R2_REGS" "r2") -(define_register_constraint "R03" "R3_REGS" "r3") -(define_register_constraint "R04" "R4_REGS" "r4") -(define_register_constraint "R05" "R5_REGS" "r5") -(define_register_constraint "R06" "R6_REGS" "r6") -(define_register_constraint "R07" "R7_REGS" "r7") -(define_register_constraint "R08" "R8_REGS" "r8") -(define_register_constraint "R09" "R9_REGS" "r9") -(define_register_constraint "R10" "R10_REGS" "r10") - -(define_constraint "I" - "A signed 8 bit constant" - (and (match_code "const_int") - (match_test "ival >= -128 && ival <= 127"))) - -(define_constraint "J" - "Signed 16-bit integer constant" - (and (match_code "const_int") - (match_test "ival >= -32768 && ival <= 32767"))) - -(define_constraint "K" - "Unsigned 16-bit integer constant" - (and (match_code "const_int") - (match_test "(ival >= 0 && ival <= 65535)"))) - -(define_constraint "L" - "Integer constant that fits in one signed byte when incremented" - (and (match_code "const_int") - (match_test "ival >= -129 && ival <= 126"))) - -(define_constraint "M" - "A bit mask suitable for 'bfins'" - (and (match_code "const_int") - (match_test "tilegx_bitfield_operand_p (ival, NULL, NULL)"))) - -(define_constraint "N" - "Integer constant that is a byte tiled out eight times" - (and (match_code "const_int") - (match_test "(ival == (ival & 0xFF) * 0x0101010101010101LL)"))) - -(define_constraint "O" - "The integer zero constant" - (and (match_code "const_int") - (match_test "ival == 0"))) - -(define_constraint "P" - "Integer constant that is a sign-extended byte tiled out as four shorts" - (and (match_code "const_int") - (match_test "(ival - == ((trunc_int_for_mode (ival, QImode) & 0xFFFF) - * 0x0001000100010001LL))"))) - -(define_constraint "Q" - "Integer constant that fits in one signed byte when incremented, but not -1" - (and (match_code "const_int") - (match_test "ival >= -129 && ival <= 126 && ival != -1"))) - -(define_constraint "S" - "Integer constant that has all 1 bits consecutive and starting at bit 0" - (and (match_code "const_int") - (match_test "ival != 0 && (ival & (ival + 1)) == 0"))) - -(define_constraint "T" - "An unspec wrapper for a symbolc operand" - (ior (match_operand 0 "const_last_symbolic_operand") - (match_operand 0 "const_symbolic_operand"))) - -(define_memory_constraint "U" - "Non-auto-incrementing memory" - (and (match_code "mem") - (match_test "GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != RTX_AUTOINC"))) - -(define_constraint "W" - "An 8-element vector constant with identical elements" - (and (match_code "const_vector") - (match_test "CONST_VECTOR_NUNITS (op) == 8") - (match_test "const_vec_duplicate_p (op)"))) - -(define_constraint "Y" - "A 4-element vector constant with identical elements" - (and (match_code "const_vector") - (match_test "CONST_VECTOR_NUNITS (op) == 4") - (match_test "const_vec_duplicate_p (op)"))) - -(define_constraint "Z0" - "The integer constant 0xffffffff" - (and (match_code "const_int") - (match_test "ival == 0xffffffff"))) - -(define_constraint "Z1" - "The integer constant 0xffffffff00000000" - (and (match_code "const_int") - (match_test "ival == (HOST_WIDE_INT)0xffffffff00000000LL"))) diff --git a/gcc/config/tilegx/feedback.h b/gcc/config/tilegx/feedback.h deleted file mode 100644 index 34e48ed..0000000 --- a/gcc/config/tilegx/feedback.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _FEEDBACK_H -#define _FEEDBACK_H 1 - -#ifdef __ASSEMBLER__ - -/* Stub defines for feedback instrumentation. */ -#define FEEDBACK_ENTER_EXPLICIT(FUNCNAME, SECNAME, SIZE) -#define FEEDBACK_ENTER(FUNCNAME) -#define FEEDBACK_REENTER(FUNCNAME) -#define FEEDBACK_ENTRY(FUNCNAME, SECNAME, SIZE) - -#endif /* __ASSEMBLER__ */ - -#endif /* _FEEDBACK_H */ diff --git a/gcc/config/tilegx/linux.h b/gcc/config/tilegx/linux.h deleted file mode 100644 index aae1f95..0000000 --- a/gcc/config/tilegx/linux.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Definitions for TILE-Gx running Linux-based GNU systems with ELF. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#undef CPP_SPEC -#define CPP_SPEC "%{pthread:-D_REENTRANT}" - -#undef ASM_SPEC -#define ASM_SPEC "%(endian_spec) %{m32:--32} %{m64:--64}" - -#undef LINK_SPEC -#define LINK_SPEC "%(endian_spec) \ - %{m64:-m elf64tilegx} %{m32:-m elf32tilegx} \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker \ - %{ m32: /lib32/ld.so.1} \ - %{!m32: /lib/ld.so.1}} \ - %{static:-static}}" - -#define MULTILIB_DEFAULTS { "m64" } - -#define NO_PROFILE_COUNTERS 1 - -#undef MCOUNT_NAME -#define MCOUNT_NAME "__mcount" - -#undef NEED_INDICATE_EXEC_STACK -#define NEED_INDICATE_EXEC_STACK 1 - -#ifdef TARGET_LIBC_PROVIDES_SSP -/* TILE-Gx glibc provides __stack_chk_guard two pointer-size words before - tp. */ -#define TARGET_THREAD_SSP_OFFSET (-2 * GET_MODE_SIZE (ptr_mode)) -#endif - -/* For __clear_cache in libgcc2.c. */ -#ifdef IN_LIBGCC2 - -/* Use the minimum page size of 4K. Alternatively we can call - getpagesize() but it introduces a libc dependence. - See Linux arch/tile/include/uapi/arch/icache.h for more commentary. */ -#undef CLEAR_INSN_CACHE -#define CLEAR_INSN_CACHE(BEG, END) \ -{ \ - long size = (long) (END) - (long) (BEG); \ - if (size) \ - { \ - const char *p = (const char *) ((unsigned long) (BEG) & -64L); \ - const char *end = p + (size < 4096 ? size : 4096) - 1; \ - __insn_mf (); \ - for (; p <= end; p += 64) \ - __insn_icoh (p); \ - __insn_drain (); \ - } \ -} - -#else - -/* define CLEAR_INSN_CACHE so that gcc knows to expand __builtin__clear_cache - to the libraray call. */ -#undef CLEAR_INSN_CACHE -#define CLEAR_INSN_CACHE 1 - -#endif diff --git a/gcc/config/tilegx/mul-tables.cc b/gcc/config/tilegx/mul-tables.cc deleted file mode 100644 index 67f85ce..0000000 --- a/gcc/config/tilegx/mul-tables.cc +++ /dev/null @@ -1,27249 +0,0 @@ -/* Constant multiply table for TILE-Gx. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -/* Note this file is auto-generated from gen-mul-tables.cc. - Make any required changes there. */ - -#define IN_TARGET_CODE 1 - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "rtl.h" -#include "expmed.h" -#include "tilegx-multiply.h" - -const enum insn_code tilegx_multiply_insn_seq_decode_opcode[] = { - CODE_FOR_nothing /* must be first */ , - CODE_FOR_adddi3, - CODE_FOR_subdi3, - CODE_FOR_insn_shl1add, - CODE_FOR_insn_shl2add, - CODE_FOR_insn_shl3add, - CODE_FOR_ashldi3 -}; - -const struct tilegx_multiply_insn_seq tilegx_multiply_insn_seq_table[] = { - {-9223372036854775807ll - 1 /* 0x8000000000000000 */ , - {{6, 1, 63}} /* shli r2, r1, 63 */ - }, - {-9223372036854775807ll /* 0x8000000000000001 */ , - {{6, 1, 63}, /* shli r2, r1, 63 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {-9223372036854775806ll /* 0x8000000000000002 */ , - {{6, 1, 63}, /* shli r2, r1, 63 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {-9223372036854775805ll /* 0x8000000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854775804ll /* 0x8000000000000004 */ , - {{6, 1, 63}, /* shli r2, r1, 63 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {-9223372036854775803ll /* 0x8000000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854775802ll /* 0x8000000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-9223372036854775801ll /* 0x8000000000000007 */ , - {{6, 1, 63}, /* shli r2, r1, 63 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {-9223372036854775800ll /* 0x8000000000000008 */ , - {{6, 1, 63}, /* shli r2, r1, 63 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {-9223372036854775799ll /* 0x8000000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854775798ll /* 0x800000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-9223372036854775792ll /* 0x8000000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854775776ll /* 0x8000000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854775744ll /* 0x8000000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854775680ll /* 0x8000000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854775552ll /* 0x8000000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854775296ll /* 0x8000000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854774784ll /* 0x8000000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854773760ll /* 0x8000000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854771712ll /* 0x8000000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854767616ll /* 0x8000000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854759424ll /* 0x8000000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854743040ll /* 0x8000000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854710272ll /* 0x8000000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854644736ll /* 0x8000000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854513664ll /* 0x8000000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036854251520ll /* 0x8000000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036853727232ll /* 0x8000000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036852678656ll /* 0x8000000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036850581504ll /* 0x8000000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036846387200ll /* 0x8000000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036837998592ll /* 0x8000000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036821221376ll /* 0x8000000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036787666944ll /* 0x8000000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036720558080ll /* 0x8000000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036586340352ll /* 0x8000000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372036317904896ll /* 0x8000000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372035781033984ll /* 0x8000000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372034707292160ll /* 0x8000000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372032559808512ll /* 0x8000000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372028264841216ll /* 0x8000000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372019674906624ll /* 0x8000000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223372002495037440ll /* 0x8000000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223371968135299072ll /* 0x8000001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223371899415822336ll /* 0x8000002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223371761976868864ll /* 0x8000004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223371487098961920ll /* 0x8000008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223370937343148032ll /* 0x8000010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223369837831520256ll /* 0x8000020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223367638808264704ll /* 0x8000040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223363240761753600ll /* 0x8000080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223354444668731392ll /* 0x8000100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223336852482686976ll /* 0x8000200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223301668110598144ll /* 0x8000400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223231299366420480ll /* 0x8000800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9223090561878065152ll /* 0x8001000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9222809086901354496ll /* 0x8002000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9222246136947933184ll /* 0x8004000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9221120237041090560ll /* 0x8008000000000000 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9218868437227405312ll /* 0x8010000000000000 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9214364837600034816ll /* 0x8020000000000000 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9205357638345293824ll /* 0x8040000000000000 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9187343239835811840ll /* 0x8080000000000000 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9151314442816847872ll /* 0x8100000000000000 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-9079256848778919936ll /* 0x8200000000000000 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-8935141660703064064ll /* 0x8400000000000000 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-8646911284551352320ll /* 0x8800000000000000 */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-8070450532247928832ll /* 0x9000000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 60}} /* shli r3, r2, 60 */ - }, - {-6917529027641081857ll /* 0x9fffffffffffffff */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 61}, /* shli r3, r2, 61 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {-6917529027641081856ll /* 0xa000000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 61}} /* shli r3, r2, 61 */ - }, - {-4611686018427387912ll /* 0xbffffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 62}, /* shli r3, r2, 62 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-4611686018427387911ll /* 0xbffffffffffffff9 */ , - {{6, 1, 62}, /* shli r2, r1, 62 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4611686018427387908ll /* 0xbffffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 62}, /* shli r3, r2, 62 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-4611686018427387907ll /* 0xbffffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 62}, /* shli r3, r2, 62 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {-4611686018427387906ll /* 0xbffffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 62}, /* shli r3, r2, 62 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-4611686018427387905ll /* 0xbfffffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4611686018427387904ll /* 0xc000000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 62}} /* shli r3, r2, 62 */ - }, - {-4611686018427387903ll /* 0xc000000000000001 */ , - {{6, 1, 62}, /* shli r2, r1, 62 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-4611686018427387902ll /* 0xc000000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4611686018427387901ll /* 0xc000000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4611686018427387900ll /* 0xc000000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4611686018427387899ll /* 0xc000000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4611686018427387898ll /* 0xc000000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 62}, /* shli r3, r2, 62 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-4611686018427387896ll /* 0xc000000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4611686018427387895ll /* 0xc000000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-3458764513820540929ll /* 0xcfffffffffffffff */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2305843009213693960ll /* 0xdffffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 61}, /* shli r3, r2, 61 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-2305843009213693959ll /* 0xdffffffffffffff9 */ , - {{6, 1, 61}, /* shli r2, r1, 61 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2305843009213693956ll /* 0xdffffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 61}, /* shli r3, r2, 61 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-2305843009213693955ll /* 0xdffffffffffffffd */ , - {{6, 1, 61}, /* shli r2, r1, 61 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2305843009213693954ll /* 0xdffffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 61}, /* shli r3, r2, 61 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-2305843009213693953ll /* 0xdfffffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2305843009213693952ll /* 0xe000000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 61}} /* shli r3, r2, 61 */ - }, - {-2305843009213693951ll /* 0xe000000000000001 */ , - {{6, 1, 61}, /* shli r2, r1, 61 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2305843009213693950ll /* 0xe000000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2305843009213693949ll /* 0xe000000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2305843009213693948ll /* 0xe000000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2305843009213693947ll /* 0xe000000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2305843009213693944ll /* 0xe000000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2305843009213693943ll /* 0xe000000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1729382256910270465ll /* 0xe7ffffffffffffff */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1152921504606846984ll /* 0xeffffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 60}, /* shli r3, r2, 60 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-1152921504606846983ll /* 0xeffffffffffffff9 */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1152921504606846980ll /* 0xeffffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 60}, /* shli r3, r2, 60 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-1152921504606846979ll /* 0xeffffffffffffffd */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1152921504606846978ll /* 0xeffffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 60}, /* shli r3, r2, 60 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-1152921504606846977ll /* 0xefffffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1152921504606846976ll /* 0xf000000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 60}} /* shli r3, r2, 60 */ - }, - {-1152921504606846975ll /* 0xf000000000000001 */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-1152921504606846974ll /* 0xf000000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1152921504606846973ll /* 0xf000000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1152921504606846972ll /* 0xf000000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1152921504606846971ll /* 0xf000000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1152921504606846968ll /* 0xf000000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1152921504606846967ll /* 0xf000000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-864691128455135233ll /* 0xf3ffffffffffffff */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-576460752303423496ll /* 0xf7fffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 59}, /* shli r3, r2, 59 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-576460752303423495ll /* 0xf7fffffffffffff9 */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-576460752303423492ll /* 0xf7fffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 59}, /* shli r3, r2, 59 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-576460752303423491ll /* 0xf7fffffffffffffd */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-576460752303423490ll /* 0xf7fffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 59}, /* shli r3, r2, 59 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-576460752303423489ll /* 0xf7ffffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-576460752303423488ll /* 0xf800000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 59}} /* shli r3, r2, 59 */ - }, - {-576460752303423487ll /* 0xf800000000000001 */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-576460752303423486ll /* 0xf800000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-576460752303423485ll /* 0xf800000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-576460752303423484ll /* 0xf800000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-576460752303423483ll /* 0xf800000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-576460752303423480ll /* 0xf800000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-576460752303423479ll /* 0xf800000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-432345564227567617ll /* 0xf9ffffffffffffff */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-288230376151711752ll /* 0xfbfffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 58}, /* shli r3, r2, 58 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-288230376151711751ll /* 0xfbfffffffffffff9 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-288230376151711748ll /* 0xfbfffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 58}, /* shli r3, r2, 58 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-288230376151711747ll /* 0xfbfffffffffffffd */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-288230376151711746ll /* 0xfbfffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 58}, /* shli r3, r2, 58 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-288230376151711745ll /* 0xfbffffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-288230376151711744ll /* 0xfc00000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 58}} /* shli r3, r2, 58 */ - }, - {-288230376151711743ll /* 0xfc00000000000001 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-288230376151711742ll /* 0xfc00000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-288230376151711741ll /* 0xfc00000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-288230376151711740ll /* 0xfc00000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-288230376151711739ll /* 0xfc00000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-288230376151711736ll /* 0xfc00000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-288230376151711735ll /* 0xfc00000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-216172782113783809ll /* 0xfcffffffffffffff */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-144115188075855880ll /* 0xfdfffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 57}, /* shli r3, r2, 57 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-144115188075855879ll /* 0xfdfffffffffffff9 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-144115188075855876ll /* 0xfdfffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 57}, /* shli r3, r2, 57 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-144115188075855875ll /* 0xfdfffffffffffffd */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-144115188075855874ll /* 0xfdfffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 57}, /* shli r3, r2, 57 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-144115188075855873ll /* 0xfdffffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-144115188075855872ll /* 0xfe00000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 57}} /* shli r3, r2, 57 */ - }, - {-144115188075855871ll /* 0xfe00000000000001 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-144115188075855870ll /* 0xfe00000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-144115188075855869ll /* 0xfe00000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-144115188075855868ll /* 0xfe00000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-144115188075855867ll /* 0xfe00000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-144115188075855864ll /* 0xfe00000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-144115188075855863ll /* 0xfe00000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-108086391056891905ll /* 0xfe7fffffffffffff */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-72057594037927944ll /* 0xfefffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 56}, /* shli r3, r2, 56 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-72057594037927943ll /* 0xfefffffffffffff9 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-72057594037927940ll /* 0xfefffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 56}, /* shli r3, r2, 56 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-72057594037927939ll /* 0xfefffffffffffffd */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-72057594037927938ll /* 0xfefffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 56}, /* shli r3, r2, 56 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-72057594037927937ll /* 0xfeffffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-72057594037927936ll /* 0xff00000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 56}} /* shli r3, r2, 56 */ - }, - {-72057594037927935ll /* 0xff00000000000001 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-72057594037927934ll /* 0xff00000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-72057594037927933ll /* 0xff00000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-72057594037927932ll /* 0xff00000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-72057594037927931ll /* 0xff00000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-72057594037927928ll /* 0xff00000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-72057594037927927ll /* 0xff00000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-54043195528445953ll /* 0xff3fffffffffffff */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-36028797018963976ll /* 0xff7ffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 55}, /* shli r3, r2, 55 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-36028797018963975ll /* 0xff7ffffffffffff9 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-36028797018963972ll /* 0xff7ffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 55}, /* shli r3, r2, 55 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-36028797018963971ll /* 0xff7ffffffffffffd */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-36028797018963970ll /* 0xff7ffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 55}, /* shli r3, r2, 55 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-36028797018963969ll /* 0xff7fffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-36028797018963968ll /* 0xff80000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 55}} /* shli r3, r2, 55 */ - }, - {-36028797018963967ll /* 0xff80000000000001 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-36028797018963966ll /* 0xff80000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-36028797018963965ll /* 0xff80000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-36028797018963964ll /* 0xff80000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-36028797018963963ll /* 0xff80000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-36028797018963960ll /* 0xff80000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-36028797018963959ll /* 0xff80000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-27021597764222977ll /* 0xff9fffffffffffff */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-18014398509481992ll /* 0xffbffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 54}, /* shli r3, r2, 54 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-18014398509481991ll /* 0xffbffffffffffff9 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-18014398509481988ll /* 0xffbffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 54}, /* shli r3, r2, 54 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-18014398509481987ll /* 0xffbffffffffffffd */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-18014398509481986ll /* 0xffbffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 54}, /* shli r3, r2, 54 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-18014398509481985ll /* 0xffbfffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-18014398509481984ll /* 0xffc0000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 54}} /* shli r3, r2, 54 */ - }, - {-18014398509481983ll /* 0xffc0000000000001 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-18014398509481982ll /* 0xffc0000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-18014398509481981ll /* 0xffc0000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-18014398509481980ll /* 0xffc0000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-18014398509481979ll /* 0xffc0000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-18014398509481976ll /* 0xffc0000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-18014398509481975ll /* 0xffc0000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-13510798882111489ll /* 0xffcfffffffffffff */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-9007199254741000ll /* 0xffdffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 53}, /* shli r3, r2, 53 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-9007199254740999ll /* 0xffdffffffffffff9 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-9007199254740996ll /* 0xffdffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 53}, /* shli r3, r2, 53 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-9007199254740995ll /* 0xffdffffffffffffd */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-9007199254740994ll /* 0xffdffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 53}, /* shli r3, r2, 53 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-9007199254740993ll /* 0xffdfffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-9007199254740992ll /* 0xffe0000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 53}} /* shli r3, r2, 53 */ - }, - {-9007199254740991ll /* 0xffe0000000000001 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-9007199254740990ll /* 0xffe0000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-9007199254740989ll /* 0xffe0000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-9007199254740988ll /* 0xffe0000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-9007199254740987ll /* 0xffe0000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-9007199254740984ll /* 0xffe0000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-9007199254740983ll /* 0xffe0000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-6755399441055745ll /* 0xffe7ffffffffffff */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4503599627370504ll /* 0xffeffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 52}, /* shli r3, r2, 52 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-4503599627370503ll /* 0xffeffffffffffff9 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4503599627370500ll /* 0xffeffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 52}, /* shli r3, r2, 52 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-4503599627370499ll /* 0xffeffffffffffffd */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4503599627370498ll /* 0xffeffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 52}, /* shli r3, r2, 52 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-4503599627370497ll /* 0xffefffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4503599627370496ll /* 0xfff0000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 52}} /* shli r3, r2, 52 */ - }, - {-4503599627370495ll /* 0xfff0000000000001 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-4503599627370494ll /* 0xfff0000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4503599627370493ll /* 0xfff0000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4503599627370492ll /* 0xfff0000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4503599627370491ll /* 0xfff0000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4503599627370488ll /* 0xfff0000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4503599627370487ll /* 0xfff0000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-3377699720527873ll /* 0xfff3ffffffffffff */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2251799813685256ll /* 0xfff7fffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 51}, /* shli r3, r2, 51 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-2251799813685255ll /* 0xfff7fffffffffff9 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2251799813685252ll /* 0xfff7fffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 51}, /* shli r3, r2, 51 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-2251799813685251ll /* 0xfff7fffffffffffd */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2251799813685250ll /* 0xfff7fffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 51}, /* shli r3, r2, 51 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-2251799813685249ll /* 0xfff7ffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2251799813685248ll /* 0xfff8000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 51}} /* shli r3, r2, 51 */ - }, - {-2251799813685247ll /* 0xfff8000000000001 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2251799813685246ll /* 0xfff8000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2251799813685245ll /* 0xfff8000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2251799813685244ll /* 0xfff8000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2251799813685243ll /* 0xfff8000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2251799813685240ll /* 0xfff8000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2251799813685239ll /* 0xfff8000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1688849860263937ll /* 0xfff9ffffffffffff */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1125899906842632ll /* 0xfffbfffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 50}, /* shli r3, r2, 50 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-1125899906842631ll /* 0xfffbfffffffffff9 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1125899906842628ll /* 0xfffbfffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 50}, /* shli r3, r2, 50 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-1125899906842627ll /* 0xfffbfffffffffffd */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1125899906842626ll /* 0xfffbfffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 50}, /* shli r3, r2, 50 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-1125899906842625ll /* 0xfffbffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1125899906842624ll /* 0xfffc000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 50}} /* shli r3, r2, 50 */ - }, - {-1125899906842623ll /* 0xfffc000000000001 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-1125899906842622ll /* 0xfffc000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1125899906842621ll /* 0xfffc000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1125899906842620ll /* 0xfffc000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1125899906842619ll /* 0xfffc000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1125899906842616ll /* 0xfffc000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1125899906842615ll /* 0xfffc000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-844424930131969ll /* 0xfffcffffffffffff */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-562949953421320ll /* 0xfffdfffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 49}, /* shli r3, r2, 49 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-562949953421319ll /* 0xfffdfffffffffff9 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-562949953421316ll /* 0xfffdfffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 49}, /* shli r3, r2, 49 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-562949953421315ll /* 0xfffdfffffffffffd */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-562949953421314ll /* 0xfffdfffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 49}, /* shli r3, r2, 49 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-562949953421313ll /* 0xfffdffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-562949953421312ll /* 0xfffe000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 49}} /* shli r3, r2, 49 */ - }, - {-562949953421311ll /* 0xfffe000000000001 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-562949953421310ll /* 0xfffe000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-562949953421309ll /* 0xfffe000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-562949953421308ll /* 0xfffe000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-562949953421307ll /* 0xfffe000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-562949953421304ll /* 0xfffe000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-562949953421303ll /* 0xfffe000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-422212465065985ll /* 0xfffe7fffffffffff */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-281474976710664ll /* 0xfffefffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 48}, /* shli r3, r2, 48 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-281474976710663ll /* 0xfffefffffffffff9 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-281474976710660ll /* 0xfffefffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 48}, /* shli r3, r2, 48 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-281474976710659ll /* 0xfffefffffffffffd */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-281474976710658ll /* 0xfffefffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 48}, /* shli r3, r2, 48 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-281474976710657ll /* 0xfffeffffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-281474976710656ll /* 0xffff000000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 48}} /* shli r3, r2, 48 */ - }, - {-281474976710655ll /* 0xffff000000000001 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-281474976710654ll /* 0xffff000000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-281474976710653ll /* 0xffff000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-281474976710652ll /* 0xffff000000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-281474976710651ll /* 0xffff000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-281474976710648ll /* 0xffff000000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-281474976710647ll /* 0xffff000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-211106232532993ll /* 0xffff3fffffffffff */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-140737488355336ll /* 0xffff7ffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 47}, /* shli r3, r2, 47 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-140737488355335ll /* 0xffff7ffffffffff9 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-140737488355332ll /* 0xffff7ffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 47}, /* shli r3, r2, 47 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-140737488355331ll /* 0xffff7ffffffffffd */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-140737488355330ll /* 0xffff7ffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 47}, /* shli r3, r2, 47 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-140737488355329ll /* 0xffff7fffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-140737488355328ll /* 0xffff800000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 47}} /* shli r3, r2, 47 */ - }, - {-140737488355327ll /* 0xffff800000000001 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-140737488355326ll /* 0xffff800000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-140737488355325ll /* 0xffff800000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-140737488355324ll /* 0xffff800000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-140737488355323ll /* 0xffff800000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-140737488355320ll /* 0xffff800000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-140737488355319ll /* 0xffff800000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-105553116266497ll /* 0xffff9fffffffffff */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-70368744177672ll /* 0xffffbffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 46}, /* shli r3, r2, 46 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-70368744177671ll /* 0xffffbffffffffff9 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-70368744177668ll /* 0xffffbffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 46}, /* shli r3, r2, 46 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-70368744177667ll /* 0xffffbffffffffffd */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-70368744177666ll /* 0xffffbffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 46}, /* shli r3, r2, 46 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-70368744177665ll /* 0xffffbfffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-70368744177664ll /* 0xffffc00000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 46}} /* shli r3, r2, 46 */ - }, - {-70368744177663ll /* 0xffffc00000000001 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-70368744177662ll /* 0xffffc00000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-70368744177661ll /* 0xffffc00000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-70368744177660ll /* 0xffffc00000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-70368744177659ll /* 0xffffc00000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-70368744177656ll /* 0xffffc00000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-70368744177655ll /* 0xffffc00000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-52776558133249ll /* 0xffffcfffffffffff */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-35184372088840ll /* 0xffffdffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 45}, /* shli r3, r2, 45 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-35184372088839ll /* 0xffffdffffffffff9 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-35184372088836ll /* 0xffffdffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 45}, /* shli r3, r2, 45 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-35184372088835ll /* 0xffffdffffffffffd */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-35184372088834ll /* 0xffffdffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 45}, /* shli r3, r2, 45 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-35184372088833ll /* 0xffffdfffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-35184372088832ll /* 0xffffe00000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 45}} /* shli r3, r2, 45 */ - }, - {-35184372088831ll /* 0xffffe00000000001 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-35184372088830ll /* 0xffffe00000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-35184372088829ll /* 0xffffe00000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-35184372088828ll /* 0xffffe00000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-35184372088827ll /* 0xffffe00000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-35184372088824ll /* 0xffffe00000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-35184372088823ll /* 0xffffe00000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-26388279066625ll /* 0xffffe7ffffffffff */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17592186044424ll /* 0xffffeffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 44}, /* shli r3, r2, 44 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-17592186044423ll /* 0xffffeffffffffff9 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-17592186044420ll /* 0xffffeffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 44}, /* shli r3, r2, 44 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-17592186044419ll /* 0xffffeffffffffffd */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-17592186044418ll /* 0xffffeffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 44}, /* shli r3, r2, 44 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-17592186044417ll /* 0xffffefffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17592186044416ll /* 0xfffff00000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 44}} /* shli r3, r2, 44 */ - }, - {-17592186044415ll /* 0xfffff00000000001 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-17592186044414ll /* 0xfffff00000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17592186044413ll /* 0xfffff00000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17592186044412ll /* 0xfffff00000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17592186044411ll /* 0xfffff00000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17592186044408ll /* 0xfffff00000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17592186044407ll /* 0xfffff00000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-13194139533313ll /* 0xfffff3ffffffffff */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8796093022216ll /* 0xfffff7fffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 43}, /* shli r3, r2, 43 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-8796093022215ll /* 0xfffff7fffffffff9 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8796093022212ll /* 0xfffff7fffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 43}, /* shli r3, r2, 43 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-8796093022211ll /* 0xfffff7fffffffffd */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8796093022210ll /* 0xfffff7fffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 43}, /* shli r3, r2, 43 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-8796093022209ll /* 0xfffff7ffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8796093022208ll /* 0xfffff80000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 43}} /* shli r3, r2, 43 */ - }, - {-8796093022207ll /* 0xfffff80000000001 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-8796093022206ll /* 0xfffff80000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8796093022205ll /* 0xfffff80000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8796093022204ll /* 0xfffff80000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8796093022203ll /* 0xfffff80000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8796093022200ll /* 0xfffff80000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8796093022199ll /* 0xfffff80000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-6597069766657ll /* 0xfffff9ffffffffff */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4398046511112ll /* 0xfffffbfffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 42}, /* shli r3, r2, 42 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-4398046511111ll /* 0xfffffbfffffffff9 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4398046511108ll /* 0xfffffbfffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 42}, /* shli r3, r2, 42 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-4398046511107ll /* 0xfffffbfffffffffd */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4398046511106ll /* 0xfffffbfffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 42}, /* shli r3, r2, 42 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-4398046511105ll /* 0xfffffbffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4398046511104ll /* 0xfffffc0000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 42}} /* shli r3, r2, 42 */ - }, - {-4398046511103ll /* 0xfffffc0000000001 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-4398046511102ll /* 0xfffffc0000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4398046511101ll /* 0xfffffc0000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4398046511100ll /* 0xfffffc0000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4398046511099ll /* 0xfffffc0000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4398046511096ll /* 0xfffffc0000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4398046511095ll /* 0xfffffc0000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-3298534883329ll /* 0xfffffcffffffffff */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2199023255560ll /* 0xfffffdfffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 41}, /* shli r3, r2, 41 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-2199023255559ll /* 0xfffffdfffffffff9 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2199023255556ll /* 0xfffffdfffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 41}, /* shli r3, r2, 41 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-2199023255555ll /* 0xfffffdfffffffffd */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2199023255554ll /* 0xfffffdfffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 41}, /* shli r3, r2, 41 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-2199023255553ll /* 0xfffffdffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2199023255552ll /* 0xfffffe0000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 41}} /* shli r3, r2, 41 */ - }, - {-2199023255551ll /* 0xfffffe0000000001 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2199023255550ll /* 0xfffffe0000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2199023255549ll /* 0xfffffe0000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2199023255548ll /* 0xfffffe0000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2199023255547ll /* 0xfffffe0000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2199023255544ll /* 0xfffffe0000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2199023255543ll /* 0xfffffe0000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1649267441665ll /* 0xfffffe7fffffffff */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1099511627784ll /* 0xfffffefffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 40}, /* shli r3, r2, 40 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-1099511627783ll /* 0xfffffefffffffff9 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1099511627780ll /* 0xfffffefffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 40}, /* shli r3, r2, 40 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-1099511627779ll /* 0xfffffefffffffffd */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1099511627778ll /* 0xfffffefffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 40}, /* shli r3, r2, 40 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-1099511627777ll /* 0xfffffeffffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1099511627776ll /* 0xffffff0000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 40}} /* shli r3, r2, 40 */ - }, - {-1099511627775ll /* 0xffffff0000000001 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-1099511627774ll /* 0xffffff0000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1099511627773ll /* 0xffffff0000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1099511627772ll /* 0xffffff0000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1099511627771ll /* 0xffffff0000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1099511627768ll /* 0xffffff0000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1099511627767ll /* 0xffffff0000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-824633720833ll /* 0xffffff3fffffffff */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-549755813896ll /* 0xffffff7ffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 39}, /* shli r3, r2, 39 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-549755813895ll /* 0xffffff7ffffffff9 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-549755813892ll /* 0xffffff7ffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 39}, /* shli r3, r2, 39 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-549755813891ll /* 0xffffff7ffffffffd */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-549755813890ll /* 0xffffff7ffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 39}, /* shli r3, r2, 39 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-549755813889ll /* 0xffffff7fffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-549755813888ll /* 0xffffff8000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 39}} /* shli r3, r2, 39 */ - }, - {-549755813887ll /* 0xffffff8000000001 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-549755813886ll /* 0xffffff8000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-549755813885ll /* 0xffffff8000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-549755813884ll /* 0xffffff8000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-549755813883ll /* 0xffffff8000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-549755813880ll /* 0xffffff8000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-549755813879ll /* 0xffffff8000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-412316860417ll /* 0xffffff9fffffffff */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-274877906952ll /* 0xffffffbffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 38}, /* shli r3, r2, 38 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-274877906951ll /* 0xffffffbffffffff9 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-274877906948ll /* 0xffffffbffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 38}, /* shli r3, r2, 38 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-274877906947ll /* 0xffffffbffffffffd */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-274877906946ll /* 0xffffffbffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 38}, /* shli r3, r2, 38 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-274877906945ll /* 0xffffffbfffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-274877906944ll /* 0xffffffc000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 38}} /* shli r3, r2, 38 */ - }, - {-274877906943ll /* 0xffffffc000000001 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-274877906942ll /* 0xffffffc000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-274877906941ll /* 0xffffffc000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-274877906940ll /* 0xffffffc000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-274877906939ll /* 0xffffffc000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-274877906936ll /* 0xffffffc000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-274877906935ll /* 0xffffffc000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-206158430209ll /* 0xffffffcfffffffff */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-137438953480ll /* 0xffffffdffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 37}, /* shli r3, r2, 37 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-137438953479ll /* 0xffffffdffffffff9 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-137438953476ll /* 0xffffffdffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 37}, /* shli r3, r2, 37 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-137438953475ll /* 0xffffffdffffffffd */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-137438953474ll /* 0xffffffdffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 37}, /* shli r3, r2, 37 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-137438953473ll /* 0xffffffdfffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-137438953472ll /* 0xffffffe000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 37}} /* shli r3, r2, 37 */ - }, - {-137438953471ll /* 0xffffffe000000001 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-137438953470ll /* 0xffffffe000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-137438953469ll /* 0xffffffe000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-137438953468ll /* 0xffffffe000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-137438953467ll /* 0xffffffe000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-137438953464ll /* 0xffffffe000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-137438953463ll /* 0xffffffe000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-103079215105ll /* 0xffffffe7ffffffff */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-68719476744ll /* 0xffffffeffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 36}, /* shli r3, r2, 36 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-68719476743ll /* 0xffffffeffffffff9 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-68719476740ll /* 0xffffffeffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 36}, /* shli r3, r2, 36 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-68719476739ll /* 0xffffffeffffffffd */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-68719476738ll /* 0xffffffeffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 36}, /* shli r3, r2, 36 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-68719476737ll /* 0xffffffefffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-68719476736ll /* 0xfffffff000000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 36}} /* shli r3, r2, 36 */ - }, - {-68719476735ll /* 0xfffffff000000001 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-68719476734ll /* 0xfffffff000000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-68719476733ll /* 0xfffffff000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-68719476732ll /* 0xfffffff000000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-68719476731ll /* 0xfffffff000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-68719476728ll /* 0xfffffff000000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-68719476727ll /* 0xfffffff000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-51539607553ll /* 0xfffffff3ffffffff */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-34359738376ll /* 0xfffffff7fffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 35}, /* shli r3, r2, 35 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-34359738375ll /* 0xfffffff7fffffff9 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-34359738372ll /* 0xfffffff7fffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 35}, /* shli r3, r2, 35 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-34359738371ll /* 0xfffffff7fffffffd */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-34359738370ll /* 0xfffffff7fffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 35}, /* shli r3, r2, 35 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-34359738369ll /* 0xfffffff7ffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-34359738368ll /* 0xfffffff800000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 35}} /* shli r3, r2, 35 */ - }, - {-34359738367ll /* 0xfffffff800000001 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-34359738366ll /* 0xfffffff800000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-34359738365ll /* 0xfffffff800000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-34359738364ll /* 0xfffffff800000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-34359738363ll /* 0xfffffff800000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-34359738360ll /* 0xfffffff800000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-34359738359ll /* 0xfffffff800000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-25769803777ll /* 0xfffffff9ffffffff */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17179869192ll /* 0xfffffffbfffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 34}, /* shli r3, r2, 34 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-17179869191ll /* 0xfffffffbfffffff9 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-17179869188ll /* 0xfffffffbfffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 34}, /* shli r3, r2, 34 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-17179869187ll /* 0xfffffffbfffffffd */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-17179869186ll /* 0xfffffffbfffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 34}, /* shli r3, r2, 34 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-17179869185ll /* 0xfffffffbffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17179869184ll /* 0xfffffffc00000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 34}} /* shli r3, r2, 34 */ - }, - {-17179869183ll /* 0xfffffffc00000001 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-17179869182ll /* 0xfffffffc00000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17179869181ll /* 0xfffffffc00000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17179869180ll /* 0xfffffffc00000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17179869179ll /* 0xfffffffc00000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17179869176ll /* 0xfffffffc00000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-17179869175ll /* 0xfffffffc00000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-12884901889ll /* 0xfffffffcffffffff */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8589934600ll /* 0xfffffffdfffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 33}, /* shli r3, r2, 33 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-8589934599ll /* 0xfffffffdfffffff9 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8589934596ll /* 0xfffffffdfffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 33}, /* shli r3, r2, 33 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-8589934595ll /* 0xfffffffdfffffffd */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8589934594ll /* 0xfffffffdfffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 33}, /* shli r3, r2, 33 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-8589934593ll /* 0xfffffffdffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8589934592ll /* 0xfffffffe00000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 33}} /* shli r3, r2, 33 */ - }, - {-8589934591ll /* 0xfffffffe00000001 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-8589934590ll /* 0xfffffffe00000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8589934589ll /* 0xfffffffe00000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8589934588ll /* 0xfffffffe00000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8589934587ll /* 0xfffffffe00000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8589934584ll /* 0xfffffffe00000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8589934583ll /* 0xfffffffe00000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-6442450945ll /* 0xfffffffe7fffffff */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4294967304ll /* 0xfffffffefffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 32}, /* shli r3, r2, 32 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-4294967303ll /* 0xfffffffefffffff9 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4294967300ll /* 0xfffffffefffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 32}, /* shli r3, r2, 32 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-4294967299ll /* 0xfffffffefffffffd */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4294967298ll /* 0xfffffffefffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 32}, /* shli r3, r2, 32 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-4294967297ll /* 0xfffffffeffffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4294967296ll /* 0xffffffff00000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 32}} /* shli r3, r2, 32 */ - }, - {-4294967295ll /* 0xffffffff00000001 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-4294967294ll /* 0xffffffff00000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4294967293ll /* 0xffffffff00000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4294967292ll /* 0xffffffff00000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4294967291ll /* 0xffffffff00000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4294967288ll /* 0xffffffff00000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4294967287ll /* 0xffffffff00000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-3221225473ll /* 0xffffffff3fffffff */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2147483656ll /* 0xffffffff7ffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 31}, /* shli r3, r2, 31 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-2147483655ll /* 0xffffffff7ffffff9 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2147483652ll /* 0xffffffff7ffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 31}, /* shli r3, r2, 31 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-2147483651ll /* 0xffffffff7ffffffd */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2147483650ll /* 0xffffffff7ffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 31}, /* shli r3, r2, 31 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-2147483649ll /* 0xffffffff7fffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2147483648ll /* 0xffffffff80000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 31}} /* shli r3, r2, 31 */ - }, - {-2147483647ll /* 0xffffffff80000001 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2147483646ll /* 0xffffffff80000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2147483645ll /* 0xffffffff80000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2147483644ll /* 0xffffffff80000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2147483643ll /* 0xffffffff80000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2147483640ll /* 0xffffffff80000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2147483639ll /* 0xffffffff80000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1610612737ll /* 0xffffffff9fffffff */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741832ll /* 0xffffffffbffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 30}, /* shli r3, r2, 30 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-1073741831ll /* 0xffffffffbffffff9 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1073741828ll /* 0xffffffffbffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 30}, /* shli r3, r2, 30 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-1073741827ll /* 0xffffffffbffffffd */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1073741826ll /* 0xffffffffbffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 30}, /* shli r3, r2, 30 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-1073741825ll /* 0xffffffffbfffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741824ll /* 0xffffffffc0000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 30}} /* shli r3, r2, 30 */ - }, - {-1073741823ll /* 0xffffffffc0000001 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-1073741822ll /* 0xffffffffc0000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741821ll /* 0xffffffffc0000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741820ll /* 0xffffffffc0000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741819ll /* 0xffffffffc0000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741816ll /* 0xffffffffc0000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741815ll /* 0xffffffffc0000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-805306369ll /* 0xffffffffcfffffff */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870920ll /* 0xffffffffdffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 29}, /* shli r3, r2, 29 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-536870919ll /* 0xffffffffdffffff9 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-536870916ll /* 0xffffffffdffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 29}, /* shli r3, r2, 29 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-536870915ll /* 0xffffffffdffffffd */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-536870914ll /* 0xffffffffdffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 29}, /* shli r3, r2, 29 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-536870913ll /* 0xffffffffdfffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870912ll /* 0xffffffffe0000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 29}} /* shli r3, r2, 29 */ - }, - {-536870911ll /* 0xffffffffe0000001 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-536870910ll /* 0xffffffffe0000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870909ll /* 0xffffffffe0000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870908ll /* 0xffffffffe0000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870907ll /* 0xffffffffe0000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870904ll /* 0xffffffffe0000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870903ll /* 0xffffffffe0000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-402653185ll /* 0xffffffffe7ffffff */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435464ll /* 0xffffffffeffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 28}, /* shli r3, r2, 28 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-268435463ll /* 0xffffffffeffffff9 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-268435460ll /* 0xffffffffeffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 28}, /* shli r3, r2, 28 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-268435459ll /* 0xffffffffeffffffd */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-268435458ll /* 0xffffffffeffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 28}, /* shli r3, r2, 28 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-268435457ll /* 0xffffffffefffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435456ll /* 0xfffffffff0000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 28}} /* shli r3, r2, 28 */ - }, - {-268435455ll /* 0xfffffffff0000001 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-268435454ll /* 0xfffffffff0000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435453ll /* 0xfffffffff0000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435452ll /* 0xfffffffff0000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435451ll /* 0xfffffffff0000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435448ll /* 0xfffffffff0000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435447ll /* 0xfffffffff0000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-201326593ll /* 0xfffffffff3ffffff */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217736ll /* 0xfffffffff7fffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}, /* shli r3, r2, 27 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-134217735ll /* 0xfffffffff7fffff9 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-134217732ll /* 0xfffffffff7fffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}, /* shli r3, r2, 27 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-134217731ll /* 0xfffffffff7fffffd */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-134217730ll /* 0xfffffffff7fffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}, /* shli r3, r2, 27 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-134217729ll /* 0xfffffffff7ffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217728ll /* 0xfffffffff8000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}} /* shli r3, r2, 27 */ - }, - {-134217727ll /* 0xfffffffff8000001 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-134217726ll /* 0xfffffffff8000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217725ll /* 0xfffffffff8000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217724ll /* 0xfffffffff8000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217723ll /* 0xfffffffff8000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217720ll /* 0xfffffffff8000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217719ll /* 0xfffffffff8000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-100663297ll /* 0xfffffffff9ffffff */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108872ll /* 0xfffffffffbfffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}, /* shli r3, r2, 26 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-67108871ll /* 0xfffffffffbfffff9 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-67108868ll /* 0xfffffffffbfffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}, /* shli r3, r2, 26 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-67108867ll /* 0xfffffffffbfffffd */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-67108866ll /* 0xfffffffffbfffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}, /* shli r3, r2, 26 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-67108865ll /* 0xfffffffffbffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108864ll /* 0xfffffffffc000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}} /* shli r3, r2, 26 */ - }, - {-67108863ll /* 0xfffffffffc000001 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-67108862ll /* 0xfffffffffc000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108861ll /* 0xfffffffffc000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108860ll /* 0xfffffffffc000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108859ll /* 0xfffffffffc000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108856ll /* 0xfffffffffc000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108855ll /* 0xfffffffffc000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-50331649ll /* 0xfffffffffcffffff */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554440ll /* 0xfffffffffdfffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}, /* shli r3, r2, 25 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-33554439ll /* 0xfffffffffdfffff9 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-33554436ll /* 0xfffffffffdfffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}, /* shli r3, r2, 25 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-33554435ll /* 0xfffffffffdfffffd */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-33554434ll /* 0xfffffffffdfffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}, /* shli r3, r2, 25 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-33554433ll /* 0xfffffffffdffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554432ll /* 0xfffffffffe000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}} /* shli r3, r2, 25 */ - }, - {-33554431ll /* 0xfffffffffe000001 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-33554430ll /* 0xfffffffffe000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554429ll /* 0xfffffffffe000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554428ll /* 0xfffffffffe000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554427ll /* 0xfffffffffe000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554424ll /* 0xfffffffffe000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554423ll /* 0xfffffffffe000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-25165825ll /* 0xfffffffffe7fffff */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777224ll /* 0xfffffffffefffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}, /* shli r3, r2, 24 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-16777223ll /* 0xfffffffffefffff9 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-16777220ll /* 0xfffffffffefffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}, /* shli r3, r2, 24 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-16777219ll /* 0xfffffffffefffffd */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-16777218ll /* 0xfffffffffefffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}, /* shli r3, r2, 24 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-16777217ll /* 0xfffffffffeffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777216ll /* 0xffffffffff000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}} /* shli r3, r2, 24 */ - }, - {-16777215ll /* 0xffffffffff000001 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-16777214ll /* 0xffffffffff000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777213ll /* 0xffffffffff000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777212ll /* 0xffffffffff000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777211ll /* 0xffffffffff000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777208ll /* 0xffffffffff000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777207ll /* 0xffffffffff000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-12582913ll /* 0xffffffffff3fffff */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388616ll /* 0xffffffffff7ffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}, /* shli r3, r2, 23 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-8388615ll /* 0xffffffffff7ffff9 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8388612ll /* 0xffffffffff7ffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}, /* shli r3, r2, 23 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-8388611ll /* 0xffffffffff7ffffd */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8388610ll /* 0xffffffffff7ffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}, /* shli r3, r2, 23 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-8388609ll /* 0xffffffffff7fffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388608ll /* 0xffffffffff800000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}} /* shli r3, r2, 23 */ - }, - {-8388607ll /* 0xffffffffff800001 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-8388606ll /* 0xffffffffff800002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388605ll /* 0xffffffffff800003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388604ll /* 0xffffffffff800004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388603ll /* 0xffffffffff800005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388600ll /* 0xffffffffff800008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388599ll /* 0xffffffffff800009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-6291457ll /* 0xffffffffff9fffff */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194312ll /* 0xffffffffffbffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}, /* shli r3, r2, 22 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-4194311ll /* 0xffffffffffbffff9 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4194308ll /* 0xffffffffffbffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}, /* shli r3, r2, 22 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-4194307ll /* 0xffffffffffbffffd */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4194306ll /* 0xffffffffffbffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}, /* shli r3, r2, 22 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-4194305ll /* 0xffffffffffbfffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194304ll /* 0xffffffffffc00000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}} /* shli r3, r2, 22 */ - }, - {-4194303ll /* 0xffffffffffc00001 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-4194302ll /* 0xffffffffffc00002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194301ll /* 0xffffffffffc00003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194300ll /* 0xffffffffffc00004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194299ll /* 0xffffffffffc00005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194296ll /* 0xffffffffffc00008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194295ll /* 0xffffffffffc00009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-3145729ll /* 0xffffffffffcfffff */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097160ll /* 0xffffffffffdffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}, /* shli r3, r2, 21 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-2097159ll /* 0xffffffffffdffff9 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2097156ll /* 0xffffffffffdffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}, /* shli r3, r2, 21 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-2097155ll /* 0xffffffffffdffffd */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2097154ll /* 0xffffffffffdffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}, /* shli r3, r2, 21 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-2097153ll /* 0xffffffffffdfffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097152ll /* 0xffffffffffe00000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}} /* shli r3, r2, 21 */ - }, - {-2097151ll /* 0xffffffffffe00001 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2097150ll /* 0xffffffffffe00002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097149ll /* 0xffffffffffe00003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097148ll /* 0xffffffffffe00004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097147ll /* 0xffffffffffe00005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097144ll /* 0xffffffffffe00008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097143ll /* 0xffffffffffe00009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1572865ll /* 0xffffffffffe7ffff */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048584ll /* 0xffffffffffeffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}, /* shli r3, r2, 20 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-1048583ll /* 0xffffffffffeffff9 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1048580ll /* 0xffffffffffeffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}, /* shli r3, r2, 20 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-1048579ll /* 0xffffffffffeffffd */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1048578ll /* 0xffffffffffeffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}, /* shli r3, r2, 20 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-1048577ll /* 0xffffffffffefffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048576ll /* 0xfffffffffff00000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}} /* shli r3, r2, 20 */ - }, - {-1048575ll /* 0xfffffffffff00001 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-1048574ll /* 0xfffffffffff00002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048573ll /* 0xfffffffffff00003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048572ll /* 0xfffffffffff00004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048571ll /* 0xfffffffffff00005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048568ll /* 0xfffffffffff00008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048567ll /* 0xfffffffffff00009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-786433ll /* 0xfffffffffff3ffff */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524296ll /* 0xfffffffffff7fff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}, /* shli r3, r2, 19 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-524295ll /* 0xfffffffffff7fff9 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-524292ll /* 0xfffffffffff7fffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}, /* shli r3, r2, 19 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-524291ll /* 0xfffffffffff7fffd */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-524290ll /* 0xfffffffffff7fffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}, /* shli r3, r2, 19 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-524289ll /* 0xfffffffffff7ffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524288ll /* 0xfffffffffff80000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}} /* shli r3, r2, 19 */ - }, - {-524287ll /* 0xfffffffffff80001 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-524286ll /* 0xfffffffffff80002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524285ll /* 0xfffffffffff80003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524284ll /* 0xfffffffffff80004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524283ll /* 0xfffffffffff80005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524280ll /* 0xfffffffffff80008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524279ll /* 0xfffffffffff80009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-393217ll /* 0xfffffffffff9ffff */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262152ll /* 0xfffffffffffbfff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}, /* shli r3, r2, 18 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-262151ll /* 0xfffffffffffbfff9 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-262148ll /* 0xfffffffffffbfffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}, /* shli r3, r2, 18 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-262147ll /* 0xfffffffffffbfffd */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-262146ll /* 0xfffffffffffbfffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}, /* shli r3, r2, 18 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-262145ll /* 0xfffffffffffbffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262144ll /* 0xfffffffffffc0000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}} /* shli r3, r2, 18 */ - }, - {-262143ll /* 0xfffffffffffc0001 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-262142ll /* 0xfffffffffffc0002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262141ll /* 0xfffffffffffc0003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262140ll /* 0xfffffffffffc0004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262139ll /* 0xfffffffffffc0005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262136ll /* 0xfffffffffffc0008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262135ll /* 0xfffffffffffc0009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-196609ll /* 0xfffffffffffcffff */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131080ll /* 0xfffffffffffdfff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}, /* shli r3, r2, 17 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-131079ll /* 0xfffffffffffdfff9 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-131076ll /* 0xfffffffffffdfffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}, /* shli r3, r2, 17 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-131075ll /* 0xfffffffffffdfffd */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-131074ll /* 0xfffffffffffdfffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}, /* shli r3, r2, 17 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-131073ll /* 0xfffffffffffdffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131072ll /* 0xfffffffffffe0000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}} /* shli r3, r2, 17 */ - }, - {-131071ll /* 0xfffffffffffe0001 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-131070ll /* 0xfffffffffffe0002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131069ll /* 0xfffffffffffe0003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131068ll /* 0xfffffffffffe0004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131067ll /* 0xfffffffffffe0005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131064ll /* 0xfffffffffffe0008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131063ll /* 0xfffffffffffe0009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-98305ll /* 0xfffffffffffe7fff */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65544ll /* 0xfffffffffffefff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}, /* shli r3, r2, 16 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-65543ll /* 0xfffffffffffefff9 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-65540ll /* 0xfffffffffffefffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}, /* shli r3, r2, 16 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-65539ll /* 0xfffffffffffefffd */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-65538ll /* 0xfffffffffffefffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}, /* shli r3, r2, 16 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-65537ll /* 0xfffffffffffeffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65536ll /* 0xffffffffffff0000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}} /* shli r3, r2, 16 */ - }, - {-65535ll /* 0xffffffffffff0001 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-65534ll /* 0xffffffffffff0002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65533ll /* 0xffffffffffff0003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65532ll /* 0xffffffffffff0004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65531ll /* 0xffffffffffff0005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65528ll /* 0xffffffffffff0008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65527ll /* 0xffffffffffff0009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-49153ll /* 0xffffffffffff3fff */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32776ll /* 0xffffffffffff7ff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}, /* shli r3, r2, 15 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-32775ll /* 0xffffffffffff7ff9 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-32772ll /* 0xffffffffffff7ffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}, /* shli r3, r2, 15 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-32771ll /* 0xffffffffffff7ffd */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-32770ll /* 0xffffffffffff7ffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}, /* shli r3, r2, 15 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-32769ll /* 0xffffffffffff7fff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32768ll /* 0xffffffffffff8000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}} /* shli r3, r2, 15 */ - }, - {-32767ll /* 0xffffffffffff8001 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-32766ll /* 0xffffffffffff8002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32765ll /* 0xffffffffffff8003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32764ll /* 0xffffffffffff8004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32763ll /* 0xffffffffffff8005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32760ll /* 0xffffffffffff8008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32759ll /* 0xffffffffffff8009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-24577ll /* 0xffffffffffff9fff */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16392ll /* 0xffffffffffffbff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}, /* shli r3, r2, 14 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-16391ll /* 0xffffffffffffbff9 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-16388ll /* 0xffffffffffffbffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}, /* shli r3, r2, 14 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-16387ll /* 0xffffffffffffbffd */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-16386ll /* 0xffffffffffffbffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}, /* shli r3, r2, 14 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-16385ll /* 0xffffffffffffbfff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16384ll /* 0xffffffffffffc000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}} /* shli r3, r2, 14 */ - }, - {-16383ll /* 0xffffffffffffc001 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-16382ll /* 0xffffffffffffc002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16381ll /* 0xffffffffffffc003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16380ll /* 0xffffffffffffc004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16379ll /* 0xffffffffffffc005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16376ll /* 0xffffffffffffc008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16375ll /* 0xffffffffffffc009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-12289ll /* 0xffffffffffffcfff */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8200ll /* 0xffffffffffffdff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}, /* shli r3, r2, 13 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-8199ll /* 0xffffffffffffdff9 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8196ll /* 0xffffffffffffdffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}, /* shli r3, r2, 13 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-8195ll /* 0xffffffffffffdffd */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8194ll /* 0xffffffffffffdffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}, /* shli r3, r2, 13 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-8193ll /* 0xffffffffffffdfff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8192ll /* 0xffffffffffffe000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}} /* shli r3, r2, 13 */ - }, - {-8191ll /* 0xffffffffffffe001 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-8190ll /* 0xffffffffffffe002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8189ll /* 0xffffffffffffe003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8188ll /* 0xffffffffffffe004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8187ll /* 0xffffffffffffe005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8184ll /* 0xffffffffffffe008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8183ll /* 0xffffffffffffe009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-6145ll /* 0xffffffffffffe7ff */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4104ll /* 0xffffffffffffeff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}, /* shli r3, r2, 12 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-4103ll /* 0xffffffffffffeff9 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4100ll /* 0xffffffffffffeffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}, /* shli r3, r2, 12 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-4099ll /* 0xffffffffffffeffd */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4098ll /* 0xffffffffffffeffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}, /* shli r3, r2, 12 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-4097ll /* 0xffffffffffffefff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4096ll /* 0xfffffffffffff000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}} /* shli r3, r2, 12 */ - }, - {-4095ll /* 0xfffffffffffff001 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-4094ll /* 0xfffffffffffff002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4093ll /* 0xfffffffffffff003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4092ll /* 0xfffffffffffff004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4091ll /* 0xfffffffffffff005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4088ll /* 0xfffffffffffff008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4087ll /* 0xfffffffffffff009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-3073ll /* 0xfffffffffffff3ff */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-3072ll /* 0xfffffffffffff400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2056ll /* 0xfffffffffffff7f8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}, /* shli r3, r2, 11 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-2055ll /* 0xfffffffffffff7f9 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2052ll /* 0xfffffffffffff7fc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}, /* shli r3, r2, 11 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-2051ll /* 0xfffffffffffff7fd */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2050ll /* 0xfffffffffffff7fe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}, /* shli r3, r2, 11 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-2049ll /* 0xfffffffffffff7ff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2048ll /* 0xfffffffffffff800 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}} /* shli r3, r2, 11 */ - }, - {-2047ll /* 0xfffffffffffff801 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2046ll /* 0xfffffffffffff802 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2045ll /* 0xfffffffffffff803 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2044ll /* 0xfffffffffffff804 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2043ll /* 0xfffffffffffff805 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2040ll /* 0xfffffffffffff808 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2039ll /* 0xfffffffffffff809 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1537ll /* 0xfffffffffffff9ff */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1032ll /* 0xfffffffffffffbf8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-1031ll /* 0xfffffffffffffbf9 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1028ll /* 0xfffffffffffffbfc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-1027ll /* 0xfffffffffffffbfd */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1026ll /* 0xfffffffffffffbfe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-1025ll /* 0xfffffffffffffbff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1024ll /* 0xfffffffffffffc00 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}} /* shli r3, r2, 10 */ - }, - {-1023ll /* 0xfffffffffffffc01 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-1022ll /* 0xfffffffffffffc02 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1021ll /* 0xfffffffffffffc03 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1020ll /* 0xfffffffffffffc04 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1019ll /* 0xfffffffffffffc05 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1018ll /* 0xfffffffffffffc06 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-1017ll /* 0xfffffffffffffc07 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1016ll /* 0xfffffffffffffc08 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1015ll /* 0xfffffffffffffc09 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1014ll /* 0xfffffffffffffc0a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-1013ll /* 0xfffffffffffffc0b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-1012ll /* 0xfffffffffffffc0c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-1011ll /* 0xfffffffffffffc0d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-1010ll /* 0xfffffffffffffc0e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 1, 3}, /* shl1add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1009ll /* 0xfffffffffffffc0f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1008ll /* 0xfffffffffffffc10 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1007ll /* 0xfffffffffffffc11 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1006ll /* 0xfffffffffffffc12 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-1005ll /* 0xfffffffffffffc13 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 1}} /* shl1add r5, r4, r1 */ - }, - {-1004ll /* 0xfffffffffffffc14 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-1003ll /* 0xfffffffffffffc15 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-1001ll /* 0xfffffffffffffc17 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1000ll /* 0xfffffffffffffc18 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-999ll /* 0xfffffffffffffc19 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {-997ll /* 0xfffffffffffffc1b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-996ll /* 0xfffffffffffffc1c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {4, 1, 3}, /* shl2add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-994ll /* 0xfffffffffffffc1e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 1, 3}, /* shl1add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-993ll /* 0xfffffffffffffc1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-992ll /* 0xfffffffffffffc20 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-991ll /* 0xfffffffffffffc21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-990ll /* 0xfffffffffffffc22 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-988ll /* 0xfffffffffffffc24 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-987ll /* 0xfffffffffffffc25 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-984ll /* 0xfffffffffffffc28 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-983ll /* 0xfffffffffffffc29 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {-979ll /* 0xfffffffffffffc2d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-976ll /* 0xfffffffffffffc30 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-975ll /* 0xfffffffffffffc31 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {-969ll /* 0xfffffffffffffc37 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-968ll /* 0xfffffffffffffc38 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {5, 1, 3}, /* shl3add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-967ll /* 0xfffffffffffffc39 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-965ll /* 0xfffffffffffffc3b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-964ll /* 0xfffffffffffffc3c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {4, 1, 3}, /* shl2add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-963ll /* 0xfffffffffffffc3d */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 1}, /* shl1add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-962ll /* 0xfffffffffffffc3e */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 1, 3}, /* shl1add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-961ll /* 0xfffffffffffffc3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-960ll /* 0xfffffffffffffc40 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-959ll /* 0xfffffffffffffc41 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-958ll /* 0xfffffffffffffc42 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-957ll /* 0xfffffffffffffc43 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-956ll /* 0xfffffffffffffc44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-955ll /* 0xfffffffffffffc45 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {-953ll /* 0xfffffffffffffc47 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-952ll /* 0xfffffffffffffc48 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-951ll /* 0xfffffffffffffc49 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {-945ll /* 0xfffffffffffffc4f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {-944ll /* 0xfffffffffffffc50 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-943ll /* 0xfffffffffffffc51 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-942ll /* 0xfffffffffffffc52 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {-940ll /* 0xfffffffffffffc54 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-936ll /* 0xfffffffffffffc58 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-935ll /* 0xfffffffffffffc59 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-929ll /* 0xfffffffffffffc5f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-928ll /* 0xfffffffffffffc60 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-925ll /* 0xfffffffffffffc63 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-924ll /* 0xfffffffffffffc64 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-920ll /* 0xfffffffffffffc68 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-919ll /* 0xfffffffffffffc69 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-916ll /* 0xfffffffffffffc6c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-913ll /* 0xfffffffffffffc6f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-912ll /* 0xfffffffffffffc70 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-911ll /* 0xfffffffffffffc71 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-910ll /* 0xfffffffffffffc72 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-905ll /* 0xfffffffffffffc77 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-904ll /* 0xfffffffffffffc78 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-903ll /* 0xfffffffffffffc79 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {-902ll /* 0xfffffffffffffc7a */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-901ll /* 0xfffffffffffffc7b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-900ll /* 0xfffffffffffffc7c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-899ll /* 0xfffffffffffffc7d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-898ll /* 0xfffffffffffffc7e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-897ll /* 0xfffffffffffffc7f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-896ll /* 0xfffffffffffffc80 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-895ll /* 0xfffffffffffffc81 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-894ll /* 0xfffffffffffffc82 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-893ll /* 0xfffffffffffffc83 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-892ll /* 0xfffffffffffffc84 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-891ll /* 0xfffffffffffffc85 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-890ll /* 0xfffffffffffffc86 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-889ll /* 0xfffffffffffffc87 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-888ll /* 0xfffffffffffffc88 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {-887ll /* 0xfffffffffffffc89 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-886ll /* 0xfffffffffffffc8a */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* shl1add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-884ll /* 0xfffffffffffffc8c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 1, 2}, /* shl2add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-881ll /* 0xfffffffffffffc8f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-880ll /* 0xfffffffffffffc90 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-879ll /* 0xfffffffffffffc91 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {3, 4, 1}} /* shl1add r5, r4, r1 */ - }, - {-873ll /* 0xfffffffffffffc97 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-872ll /* 0xfffffffffffffc98 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-868ll /* 0xfffffffffffffc9c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-865ll /* 0xfffffffffffffc9f */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-864ll /* 0xfffffffffffffca0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-863ll /* 0xfffffffffffffca1 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-861ll /* 0xfffffffffffffca3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-860ll /* 0xfffffffffffffca4 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-856ll /* 0xfffffffffffffca8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-855ll /* 0xfffffffffffffca9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-847ll /* 0xfffffffffffffcb1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-837ll /* 0xfffffffffffffcbb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-835ll /* 0xfffffffffffffcbd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-834ll /* 0xfffffffffffffcbe */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {-832ll /* 0xfffffffffffffcc0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 6}} /* shli r5, r4, 6 */ - }, - {-831ll /* 0xfffffffffffffcc1 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-829ll /* 0xfffffffffffffcc3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-828ll /* 0xfffffffffffffcc4 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-827ll /* 0xfffffffffffffcc5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-824ll /* 0xfffffffffffffcc8 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-823ll /* 0xfffffffffffffcc9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-819ll /* 0xfffffffffffffccd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-816ll /* 0xfffffffffffffcd0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-815ll /* 0xfffffffffffffcd1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-803ll /* 0xfffffffffffffcdd */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-801ll /* 0xfffffffffffffcdf */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-800ll /* 0xfffffffffffffce0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-799ll /* 0xfffffffffffffce1 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-797ll /* 0xfffffffffffffce3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-796ll /* 0xfffffffffffffce4 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-795ll /* 0xfffffffffffffce5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-793ll /* 0xfffffffffffffce7 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-792ll /* 0xfffffffffffffce8 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-791ll /* 0xfffffffffffffce9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-789ll /* 0xfffffffffffffceb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-788ll /* 0xfffffffffffffcec */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-785ll /* 0xfffffffffffffcef */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-784ll /* 0xfffffffffffffcf0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-783ll /* 0xfffffffffffffcf1 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-781ll /* 0xfffffffffffffcf3 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-780ll /* 0xfffffffffffffcf4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-779ll /* 0xfffffffffffffcf5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-777ll /* 0xfffffffffffffcf7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-776ll /* 0xfffffffffffffcf8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-775ll /* 0xfffffffffffffcf9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-774ll /* 0xfffffffffffffcfa */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-773ll /* 0xfffffffffffffcfb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-772ll /* 0xfffffffffffffcfc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-771ll /* 0xfffffffffffffcfd */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* shl1add r5, r4, r4 */ - }, - {-770ll /* 0xfffffffffffffcfe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-769ll /* 0xfffffffffffffcff */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-768ll /* 0xfffffffffffffd00 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-767ll /* 0xfffffffffffffd01 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-766ll /* 0xfffffffffffffd02 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-765ll /* 0xfffffffffffffd03 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-764ll /* 0xfffffffffffffd04 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {-763ll /* 0xfffffffffffffd05 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-762ll /* 0xfffffffffffffd06 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-761ll /* 0xfffffffffffffd07 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-760ll /* 0xfffffffffffffd08 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-759ll /* 0xfffffffffffffd09 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-757ll /* 0xfffffffffffffd0b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-756ll /* 0xfffffffffffffd0c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-755ll /* 0xfffffffffffffd0d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-753ll /* 0xfffffffffffffd0f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-752ll /* 0xfffffffffffffd10 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-751ll /* 0xfffffffffffffd11 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-749ll /* 0xfffffffffffffd13 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 1, 3}, /* shl3add r4, r1, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {-748ll /* 0xfffffffffffffd14 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-744ll /* 0xfffffffffffffd18 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-743ll /* 0xfffffffffffffd19 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-741ll /* 0xfffffffffffffd1b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-739ll /* 0xfffffffffffffd1d */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-737ll /* 0xfffffffffffffd1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-736ll /* 0xfffffffffffffd20 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-735ll /* 0xfffffffffffffd21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {-732ll /* 0xfffffffffffffd24 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-729ll /* 0xfffffffffffffd27 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-728ll /* 0xfffffffffffffd28 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-720ll /* 0xfffffffffffffd30 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-719ll /* 0xfffffffffffffd31 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-715ll /* 0xfffffffffffffd35 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-712ll /* 0xfffffffffffffd38 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-711ll /* 0xfffffffffffffd39 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-708ll /* 0xfffffffffffffd3c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-707ll /* 0xfffffffffffffd3d */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-705ll /* 0xfffffffffffffd3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-704ll /* 0xfffffffffffffd40 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 6}} /* shli r5, r4, 6 */ - }, - {-703ll /* 0xfffffffffffffd41 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-701ll /* 0xfffffffffffffd43 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-700ll /* 0xfffffffffffffd44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-699ll /* 0xfffffffffffffd45 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-695ll /* 0xfffffffffffffd49 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-693ll /* 0xfffffffffffffd4b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-692ll /* 0xfffffffffffffd4c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-688ll /* 0xfffffffffffffd50 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-680ll /* 0xfffffffffffffd58 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-679ll /* 0xfffffffffffffd59 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-675ll /* 0xfffffffffffffd5d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-673ll /* 0xfffffffffffffd5f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-672ll /* 0xfffffffffffffd60 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-671ll /* 0xfffffffffffffd61 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-667ll /* 0xfffffffffffffd65 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-664ll /* 0xfffffffffffffd68 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-660ll /* 0xfffffffffffffd6c */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-659ll /* 0xfffffffffffffd6d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-657ll /* 0xfffffffffffffd6f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-656ll /* 0xfffffffffffffd70 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-655ll /* 0xfffffffffffffd71 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-651ll /* 0xfffffffffffffd75 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-650ll /* 0xfffffffffffffd76 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-649ll /* 0xfffffffffffffd77 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-648ll /* 0xfffffffffffffd78 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-647ll /* 0xfffffffffffffd79 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 3}, /* shli r4, r3, 3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-645ll /* 0xfffffffffffffd7b */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {-644ll /* 0xfffffffffffffd7c */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-643ll /* 0xfffffffffffffd7d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-642ll /* 0xfffffffffffffd7e */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {-641ll /* 0xfffffffffffffd7f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-640ll /* 0xfffffffffffffd80 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 7}} /* shli r4, r3, 7 */ - }, - {-639ll /* 0xfffffffffffffd81 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-638ll /* 0xfffffffffffffd82 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-637ll /* 0xfffffffffffffd83 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-636ll /* 0xfffffffffffffd84 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-635ll /* 0xfffffffffffffd85 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-634ll /* 0xfffffffffffffd86 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-633ll /* 0xfffffffffffffd87 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-632ll /* 0xfffffffffffffd88 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-631ll /* 0xfffffffffffffd89 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-630ll /* 0xfffffffffffffd8a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-629ll /* 0xfffffffffffffd8b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-627ll /* 0xfffffffffffffd8d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-625ll /* 0xfffffffffffffd8f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {-624ll /* 0xfffffffffffffd90 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-620ll /* 0xfffffffffffffd94 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-619ll /* 0xfffffffffffffd95 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-616ll /* 0xfffffffffffffd98 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-615ll /* 0xfffffffffffffd99 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-613ll /* 0xfffffffffffffd9b */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {4, 3, 3}, /* shl2add r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-612ll /* 0xfffffffffffffd9c */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-611ll /* 0xfffffffffffffd9d */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-609ll /* 0xfffffffffffffd9f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-608ll /* 0xfffffffffffffda0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-607ll /* 0xfffffffffffffda1 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-604ll /* 0xfffffffffffffda4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-603ll /* 0xfffffffffffffda5 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-600ll /* 0xfffffffffffffda8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-599ll /* 0xfffffffffffffda9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-595ll /* 0xfffffffffffffdad */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-594ll /* 0xfffffffffffffdae */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-593ll /* 0xfffffffffffffdaf */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-592ll /* 0xfffffffffffffdb0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-591ll /* 0xfffffffffffffdb1 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-589ll /* 0xfffffffffffffdb3 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-588ll /* 0xfffffffffffffdb4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 3}, /* shl2add r4, r3, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-585ll /* 0xfffffffffffffdb7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-584ll /* 0xfffffffffffffdb8 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-583ll /* 0xfffffffffffffdb9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-581ll /* 0xfffffffffffffdbb */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {4, 3, 3}, /* shl2add r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-580ll /* 0xfffffffffffffdbc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-579ll /* 0xfffffffffffffdbd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-578ll /* 0xfffffffffffffdbe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {-577ll /* 0xfffffffffffffdbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-576ll /* 0xfffffffffffffdc0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {-575ll /* 0xfffffffffffffdc1 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-574ll /* 0xfffffffffffffdc2 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-573ll /* 0xfffffffffffffdc3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-572ll /* 0xfffffffffffffdc4 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-571ll /* 0xfffffffffffffdc5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-569ll /* 0xfffffffffffffdc7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-568ll /* 0xfffffffffffffdc8 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-567ll /* 0xfffffffffffffdc9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-566ll /* 0xfffffffffffffdca */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-565ll /* 0xfffffffffffffdcb */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-564ll /* 0xfffffffffffffdcc */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-563ll /* 0xfffffffffffffdcd */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-561ll /* 0xfffffffffffffdcf */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-560ll /* 0xfffffffffffffdd0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-559ll /* 0xfffffffffffffdd1 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-558ll /* 0xfffffffffffffdd2 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-557ll /* 0xfffffffffffffdd3 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-556ll /* 0xfffffffffffffdd4 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-555ll /* 0xfffffffffffffdd5 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-553ll /* 0xfffffffffffffdd7 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-552ll /* 0xfffffffffffffdd8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-551ll /* 0xfffffffffffffdd9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-549ll /* 0xfffffffffffffddb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-548ll /* 0xfffffffffffffddc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-547ll /* 0xfffffffffffffddd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-546ll /* 0xfffffffffffffdde */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {-545ll /* 0xfffffffffffffddf */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-544ll /* 0xfffffffffffffde0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-543ll /* 0xfffffffffffffde1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-542ll /* 0xfffffffffffffde2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-540ll /* 0xfffffffffffffde4 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-539ll /* 0xfffffffffffffde5 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-536ll /* 0xfffffffffffffde8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-535ll /* 0xfffffffffffffde9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-533ll /* 0xfffffffffffffdeb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-532ll /* 0xfffffffffffffdec */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-531ll /* 0xfffffffffffffded */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-530ll /* 0xfffffffffffffdee */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-529ll /* 0xfffffffffffffdef */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-528ll /* 0xfffffffffffffdf0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-527ll /* 0xfffffffffffffdf1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-526ll /* 0xfffffffffffffdf2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-525ll /* 0xfffffffffffffdf3 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {-524ll /* 0xfffffffffffffdf4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-523ll /* 0xfffffffffffffdf5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-522ll /* 0xfffffffffffffdf6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-521ll /* 0xfffffffffffffdf7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-520ll /* 0xfffffffffffffdf8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}, /* shli r3, r2, 9 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-519ll /* 0xfffffffffffffdf9 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-518ll /* 0xfffffffffffffdfa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-517ll /* 0xfffffffffffffdfb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-516ll /* 0xfffffffffffffdfc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}, /* shli r3, r2, 9 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-515ll /* 0xfffffffffffffdfd */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-514ll /* 0xfffffffffffffdfe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}, /* shli r3, r2, 9 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-513ll /* 0xfffffffffffffdff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-512ll /* 0xfffffffffffffe00 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}} /* shli r3, r2, 9 */ - }, - {-511ll /* 0xfffffffffffffe01 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-510ll /* 0xfffffffffffffe02 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-509ll /* 0xfffffffffffffe03 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-508ll /* 0xfffffffffffffe04 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-507ll /* 0xfffffffffffffe05 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-506ll /* 0xfffffffffffffe06 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-505ll /* 0xfffffffffffffe07 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-504ll /* 0xfffffffffffffe08 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-503ll /* 0xfffffffffffffe09 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-502ll /* 0xfffffffffffffe0a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-501ll /* 0xfffffffffffffe0b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-500ll /* 0xfffffffffffffe0c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-499ll /* 0xfffffffffffffe0d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-498ll /* 0xfffffffffffffe0e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 1, 3}, /* shl1add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-497ll /* 0xfffffffffffffe0f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-496ll /* 0xfffffffffffffe10 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-495ll /* 0xfffffffffffffe11 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-494ll /* 0xfffffffffffffe12 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-493ll /* 0xfffffffffffffe13 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 1}} /* shl1add r5, r4, r1 */ - }, - {-492ll /* 0xfffffffffffffe14 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-491ll /* 0xfffffffffffffe15 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-489ll /* 0xfffffffffffffe17 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-488ll /* 0xfffffffffffffe18 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-487ll /* 0xfffffffffffffe19 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {-485ll /* 0xfffffffffffffe1b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-484ll /* 0xfffffffffffffe1c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 1, 3}, /* shl2add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-483ll /* 0xfffffffffffffe1d */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 1}, /* shl1add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-482ll /* 0xfffffffffffffe1e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 1, 3}, /* shl1add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-481ll /* 0xfffffffffffffe1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-480ll /* 0xfffffffffffffe20 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-479ll /* 0xfffffffffffffe21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-478ll /* 0xfffffffffffffe22 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-477ll /* 0xfffffffffffffe23 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-476ll /* 0xfffffffffffffe24 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-475ll /* 0xfffffffffffffe25 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-472ll /* 0xfffffffffffffe28 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-471ll /* 0xfffffffffffffe29 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {-468ll /* 0xfffffffffffffe2c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-467ll /* 0xfffffffffffffe2d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-465ll /* 0xfffffffffffffe2f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {-464ll /* 0xfffffffffffffe30 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-463ll /* 0xfffffffffffffe31 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-462ll /* 0xfffffffffffffe32 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-460ll /* 0xfffffffffffffe34 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-457ll /* 0xfffffffffffffe37 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-456ll /* 0xfffffffffffffe38 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-455ll /* 0xfffffffffffffe39 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {-454ll /* 0xfffffffffffffe3a */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-453ll /* 0xfffffffffffffe3b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-452ll /* 0xfffffffffffffe3c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-451ll /* 0xfffffffffffffe3d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-450ll /* 0xfffffffffffffe3e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-449ll /* 0xfffffffffffffe3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-448ll /* 0xfffffffffffffe40 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-447ll /* 0xfffffffffffffe41 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-446ll /* 0xfffffffffffffe42 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-445ll /* 0xfffffffffffffe43 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-444ll /* 0xfffffffffffffe44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-443ll /* 0xfffffffffffffe45 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-442ll /* 0xfffffffffffffe46 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-441ll /* 0xfffffffffffffe47 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-440ll /* 0xfffffffffffffe48 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {-439ll /* 0xfffffffffffffe49 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-438ll /* 0xfffffffffffffe4a */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* shl1add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-436ll /* 0xfffffffffffffe4c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 1, 2}, /* shl2add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-433ll /* 0xfffffffffffffe4f */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-432ll /* 0xfffffffffffffe50 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-431ll /* 0xfffffffffffffe51 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-429ll /* 0xfffffffffffffe53 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-428ll /* 0xfffffffffffffe54 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-424ll /* 0xfffffffffffffe58 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-423ll /* 0xfffffffffffffe59 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-419ll /* 0xfffffffffffffe5d */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-418ll /* 0xfffffffffffffe5e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {-417ll /* 0xfffffffffffffe5f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-416ll /* 0xfffffffffffffe60 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-415ll /* 0xfffffffffffffe61 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-413ll /* 0xfffffffffffffe63 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-412ll /* 0xfffffffffffffe64 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-411ll /* 0xfffffffffffffe65 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-409ll /* 0xfffffffffffffe67 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-408ll /* 0xfffffffffffffe68 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-407ll /* 0xfffffffffffffe69 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-405ll /* 0xfffffffffffffe6b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-404ll /* 0xfffffffffffffe6c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-403ll /* 0xfffffffffffffe6d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-401ll /* 0xfffffffffffffe6f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-400ll /* 0xfffffffffffffe70 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-399ll /* 0xfffffffffffffe71 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-397ll /* 0xfffffffffffffe73 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-396ll /* 0xfffffffffffffe74 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-395ll /* 0xfffffffffffffe75 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-393ll /* 0xfffffffffffffe77 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-392ll /* 0xfffffffffffffe78 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-391ll /* 0xfffffffffffffe79 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-390ll /* 0xfffffffffffffe7a */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-389ll /* 0xfffffffffffffe7b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-388ll /* 0xfffffffffffffe7c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-387ll /* 0xfffffffffffffe7d */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* shl1add r5, r4, r4 */ - }, - {-386ll /* 0xfffffffffffffe7e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-385ll /* 0xfffffffffffffe7f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-384ll /* 0xfffffffffffffe80 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-383ll /* 0xfffffffffffffe81 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-382ll /* 0xfffffffffffffe82 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-381ll /* 0xfffffffffffffe83 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-380ll /* 0xfffffffffffffe84 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {-379ll /* 0xfffffffffffffe85 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-378ll /* 0xfffffffffffffe86 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-377ll /* 0xfffffffffffffe87 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-376ll /* 0xfffffffffffffe88 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-375ll /* 0xfffffffffffffe89 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-373ll /* 0xfffffffffffffe8b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-372ll /* 0xfffffffffffffe8c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-371ll /* 0xfffffffffffffe8d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-369ll /* 0xfffffffffffffe8f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-368ll /* 0xfffffffffffffe90 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-367ll /* 0xfffffffffffffe91 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-365ll /* 0xfffffffffffffe93 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 1, 3}, /* shl3add r4, r1, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {-364ll /* 0xfffffffffffffe94 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-361ll /* 0xfffffffffffffe97 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-360ll /* 0xfffffffffffffe98 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-359ll /* 0xfffffffffffffe99 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-357ll /* 0xfffffffffffffe9b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-356ll /* 0xfffffffffffffe9c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-355ll /* 0xfffffffffffffe9d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 3}, /* shli r4, r3, 3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-353ll /* 0xfffffffffffffe9f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-352ll /* 0xfffffffffffffea0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-351ll /* 0xfffffffffffffea1 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-349ll /* 0xfffffffffffffea3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-348ll /* 0xfffffffffffffea4 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-347ll /* 0xfffffffffffffea5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-344ll /* 0xfffffffffffffea8 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-343ll /* 0xfffffffffffffea9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-341ll /* 0xfffffffffffffeab */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-340ll /* 0xfffffffffffffeac */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-339ll /* 0xfffffffffffffead */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-337ll /* 0xfffffffffffffeaf */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-336ll /* 0xfffffffffffffeb0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-335ll /* 0xfffffffffffffeb1 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-333ll /* 0xfffffffffffffeb3 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-332ll /* 0xfffffffffffffeb4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-331ll /* 0xfffffffffffffeb5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-330ll /* 0xfffffffffffffeb6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-329ll /* 0xfffffffffffffeb7 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-328ll /* 0xfffffffffffffeb8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-327ll /* 0xfffffffffffffeb9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-325ll /* 0xfffffffffffffebb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {-324ll /* 0xfffffffffffffebc */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-323ll /* 0xfffffffffffffebd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-322ll /* 0xfffffffffffffebe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {-321ll /* 0xfffffffffffffebf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-320ll /* 0xfffffffffffffec0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {-319ll /* 0xfffffffffffffec1 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-318ll /* 0xfffffffffffffec2 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-317ll /* 0xfffffffffffffec3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-316ll /* 0xfffffffffffffec4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-315ll /* 0xfffffffffffffec5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-314ll /* 0xfffffffffffffec6 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-313ll /* 0xfffffffffffffec7 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-312ll /* 0xfffffffffffffec8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-311ll /* 0xfffffffffffffec9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-310ll /* 0xfffffffffffffeca */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-309ll /* 0xfffffffffffffecb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-307ll /* 0xfffffffffffffecd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-306ll /* 0xfffffffffffffece */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-305ll /* 0xfffffffffffffecf */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {-304ll /* 0xfffffffffffffed0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-303ll /* 0xfffffffffffffed1 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-301ll /* 0xfffffffffffffed3 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-300ll /* 0xfffffffffffffed4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-299ll /* 0xfffffffffffffed5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-297ll /* 0xfffffffffffffed7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-296ll /* 0xfffffffffffffed8 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-295ll /* 0xfffffffffffffed9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-293ll /* 0xfffffffffffffedb */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-292ll /* 0xfffffffffffffedc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-291ll /* 0xfffffffffffffedd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-290ll /* 0xfffffffffffffede */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {-289ll /* 0xfffffffffffffedf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-288ll /* 0xfffffffffffffee0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {-287ll /* 0xfffffffffffffee1 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-286ll /* 0xfffffffffffffee2 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-285ll /* 0xfffffffffffffee3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-284ll /* 0xfffffffffffffee4 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-283ll /* 0xfffffffffffffee5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-281ll /* 0xfffffffffffffee7 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-280ll /* 0xfffffffffffffee8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-279ll /* 0xfffffffffffffee9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-278ll /* 0xfffffffffffffeea */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-277ll /* 0xfffffffffffffeeb */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-276ll /* 0xfffffffffffffeec */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-275ll /* 0xfffffffffffffeed */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-274ll /* 0xfffffffffffffeee */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-273ll /* 0xfffffffffffffeef */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-272ll /* 0xfffffffffffffef0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-271ll /* 0xfffffffffffffef1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-270ll /* 0xfffffffffffffef2 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-269ll /* 0xfffffffffffffef3 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-268ll /* 0xfffffffffffffef4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-267ll /* 0xfffffffffffffef5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-266ll /* 0xfffffffffffffef6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-265ll /* 0xfffffffffffffef7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-264ll /* 0xfffffffffffffef8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-263ll /* 0xfffffffffffffef9 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-262ll /* 0xfffffffffffffefa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-261ll /* 0xfffffffffffffefb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-260ll /* 0xfffffffffffffefc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-259ll /* 0xfffffffffffffefd */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-258ll /* 0xfffffffffffffefe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-257ll /* 0xfffffffffffffeff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-256ll /* 0xffffffffffffff00 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}} /* shli r3, r2, 8 */ - }, - {-255ll /* 0xffffffffffffff01 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-254ll /* 0xffffffffffffff02 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-253ll /* 0xffffffffffffff03 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-252ll /* 0xffffffffffffff04 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-251ll /* 0xffffffffffffff05 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-250ll /* 0xffffffffffffff06 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-249ll /* 0xffffffffffffff07 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-248ll /* 0xffffffffffffff08 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-247ll /* 0xffffffffffffff09 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-246ll /* 0xffffffffffffff0a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-245ll /* 0xffffffffffffff0b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-244ll /* 0xffffffffffffff0c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-243ll /* 0xffffffffffffff0d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-242ll /* 0xffffffffffffff0e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 1, 3}, /* shl1add r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-241ll /* 0xffffffffffffff0f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-240ll /* 0xffffffffffffff10 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-239ll /* 0xffffffffffffff11 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-238ll /* 0xffffffffffffff12 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-237ll /* 0xffffffffffffff13 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 1}} /* shl1add r5, r4, r1 */ - }, - {-236ll /* 0xffffffffffffff14 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-235ll /* 0xffffffffffffff15 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-234ll /* 0xffffffffffffff16 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-233ll /* 0xffffffffffffff17 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-232ll /* 0xffffffffffffff18 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-231ll /* 0xffffffffffffff19 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {-230ll /* 0xffffffffffffff1a */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-229ll /* 0xffffffffffffff1b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-228ll /* 0xffffffffffffff1c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-227ll /* 0xffffffffffffff1d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-226ll /* 0xffffffffffffff1e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-225ll /* 0xffffffffffffff1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-224ll /* 0xffffffffffffff20 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-223ll /* 0xffffffffffffff21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-222ll /* 0xffffffffffffff22 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-221ll /* 0xffffffffffffff23 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-220ll /* 0xffffffffffffff24 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-219ll /* 0xffffffffffffff25 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-218ll /* 0xffffffffffffff26 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-217ll /* 0xffffffffffffff27 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-216ll /* 0xffffffffffffff28 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {-215ll /* 0xffffffffffffff29 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-214ll /* 0xffffffffffffff2a */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* shl1add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-213ll /* 0xffffffffffffff2b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 3}, /* shli r4, r3, 3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-212ll /* 0xffffffffffffff2c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 1, 2}, /* shl2add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-211ll /* 0xffffffffffffff2d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-210ll /* 0xffffffffffffff2e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {-209ll /* 0xffffffffffffff2f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-208ll /* 0xffffffffffffff30 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-207ll /* 0xffffffffffffff31 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-205ll /* 0xffffffffffffff33 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-204ll /* 0xffffffffffffff34 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-203ll /* 0xffffffffffffff35 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-202ll /* 0xffffffffffffff36 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-201ll /* 0xffffffffffffff37 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-200ll /* 0xffffffffffffff38 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-199ll /* 0xffffffffffffff39 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-198ll /* 0xffffffffffffff3a */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-197ll /* 0xffffffffffffff3b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-196ll /* 0xffffffffffffff3c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-195ll /* 0xffffffffffffff3d */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* shl1add r5, r4, r4 */ - }, - {-194ll /* 0xffffffffffffff3e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-193ll /* 0xffffffffffffff3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-192ll /* 0xffffffffffffff40 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-191ll /* 0xffffffffffffff41 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-190ll /* 0xffffffffffffff42 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-189ll /* 0xffffffffffffff43 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-188ll /* 0xffffffffffffff44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {-187ll /* 0xffffffffffffff45 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-186ll /* 0xffffffffffffff46 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-185ll /* 0xffffffffffffff47 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-184ll /* 0xffffffffffffff48 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-183ll /* 0xffffffffffffff49 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-181ll /* 0xffffffffffffff4b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-180ll /* 0xffffffffffffff4c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-179ll /* 0xffffffffffffff4d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-178ll /* 0xffffffffffffff4e */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-177ll /* 0xffffffffffffff4f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-176ll /* 0xffffffffffffff50 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-175ll /* 0xffffffffffffff51 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-173ll /* 0xffffffffffffff53 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-172ll /* 0xffffffffffffff54 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-171ll /* 0xffffffffffffff55 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-170ll /* 0xffffffffffffff56 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-169ll /* 0xffffffffffffff57 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-168ll /* 0xffffffffffffff58 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-167ll /* 0xffffffffffffff59 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-165ll /* 0xffffffffffffff5b */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {-164ll /* 0xffffffffffffff5c */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-163ll /* 0xffffffffffffff5d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-162ll /* 0xffffffffffffff5e */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-161ll /* 0xffffffffffffff5f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-160ll /* 0xffffffffffffff60 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {-159ll /* 0xffffffffffffff61 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-158ll /* 0xffffffffffffff62 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-157ll /* 0xffffffffffffff63 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-156ll /* 0xffffffffffffff64 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-155ll /* 0xffffffffffffff65 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-154ll /* 0xffffffffffffff66 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-153ll /* 0xffffffffffffff67 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {-152ll /* 0xffffffffffffff68 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-151ll /* 0xffffffffffffff69 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-150ll /* 0xffffffffffffff6a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-149ll /* 0xffffffffffffff6b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-148ll /* 0xffffffffffffff6c */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {-147ll /* 0xffffffffffffff6d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-146ll /* 0xffffffffffffff6e */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-145ll /* 0xffffffffffffff6f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-144ll /* 0xffffffffffffff70 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {-143ll /* 0xffffffffffffff71 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-142ll /* 0xffffffffffffff72 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-141ll /* 0xffffffffffffff73 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-140ll /* 0xffffffffffffff74 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-139ll /* 0xffffffffffffff75 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-138ll /* 0xffffffffffffff76 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-137ll /* 0xffffffffffffff77 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-136ll /* 0xffffffffffffff78 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {-135ll /* 0xffffffffffffff79 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134ll /* 0xffffffffffffff7a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-133ll /* 0xffffffffffffff7b */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-132ll /* 0xffffffffffffff7c */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-131ll /* 0xffffffffffffff7d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-130ll /* 0xffffffffffffff7e */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-129ll /* 0xffffffffffffff7f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-128ll /* 0xffffffffffffff80 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}} /* shli r3, r2, 7 */ - }, - {-127ll /* 0xffffffffffffff81 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-126ll /* 0xffffffffffffff82 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-125ll /* 0xffffffffffffff83 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-124ll /* 0xffffffffffffff84 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-123ll /* 0xffffffffffffff85 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-122ll /* 0xffffffffffffff86 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-121ll /* 0xffffffffffffff87 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-120ll /* 0xffffffffffffff88 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-119ll /* 0xffffffffffffff89 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-118ll /* 0xffffffffffffff8a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-117ll /* 0xffffffffffffff8b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-116ll /* 0xffffffffffffff8c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-115ll /* 0xffffffffffffff8d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-114ll /* 0xffffffffffffff8e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-113ll /* 0xffffffffffffff8f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-112ll /* 0xffffffffffffff90 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-111ll /* 0xffffffffffffff91 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-110ll /* 0xffffffffffffff92 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-109ll /* 0xffffffffffffff93 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-108ll /* 0xffffffffffffff94 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-107ll /* 0xffffffffffffff95 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {-106ll /* 0xffffffffffffff96 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {-105ll /* 0xffffffffffffff97 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-104ll /* 0xffffffffffffff98 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {-103ll /* 0xffffffffffffff99 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {-102ll /* 0xffffffffffffff9a */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* shl1add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {-101ll /* 0xffffffffffffff9b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-100ll /* 0xffffffffffffff9c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-99ll /* 0xffffffffffffff9d */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* shl1add r5, r4, r4 */ - }, - {-98ll /* 0xffffffffffffff9e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-97ll /* 0xffffffffffffff9f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-96ll /* 0xffffffffffffffa0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-95ll /* 0xffffffffffffffa1 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-94ll /* 0xffffffffffffffa2 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-93ll /* 0xffffffffffffffa3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-92ll /* 0xffffffffffffffa4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {-91ll /* 0xffffffffffffffa5 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-90ll /* 0xffffffffffffffa6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-89ll /* 0xffffffffffffffa7 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-88ll /* 0xffffffffffffffa8 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-87ll /* 0xffffffffffffffa9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-86ll /* 0xffffffffffffffaa */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-85ll /* 0xffffffffffffffab */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {-84ll /* 0xffffffffffffffac */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-83ll /* 0xffffffffffffffad */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-82ll /* 0xffffffffffffffae */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {-81ll /* 0xffffffffffffffaf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}} /* shl3add r4, r3, r3 */ - }, - {-80ll /* 0xffffffffffffffb0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {-79ll /* 0xffffffffffffffb1 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-78ll /* 0xffffffffffffffb2 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-77ll /* 0xffffffffffffffb3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-76ll /* 0xffffffffffffffb4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-75ll /* 0xffffffffffffffb5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-74ll /* 0xffffffffffffffb6 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-73ll /* 0xffffffffffffffb7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {-72ll /* 0xffffffffffffffb8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {-71ll /* 0xffffffffffffffb9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-70ll /* 0xffffffffffffffba */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-69ll /* 0xffffffffffffffbb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {-68ll /* 0xffffffffffffffbc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {-67ll /* 0xffffffffffffffbd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-66ll /* 0xffffffffffffffbe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-65ll /* 0xffffffffffffffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-64ll /* 0xffffffffffffffc0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}} /* shli r3, r2, 6 */ - }, - {-63ll /* 0xffffffffffffffc1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-62ll /* 0xffffffffffffffc2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-61ll /* 0xffffffffffffffc3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-60ll /* 0xffffffffffffffc4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-59ll /* 0xffffffffffffffc5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-58ll /* 0xffffffffffffffc6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-57ll /* 0xffffffffffffffc7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-56ll /* 0xffffffffffffffc8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-55ll /* 0xffffffffffffffc9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-54ll /* 0xffffffffffffffca */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-53ll /* 0xffffffffffffffcb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {-52ll /* 0xffffffffffffffcc */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-51ll /* 0xffffffffffffffcd */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* shl1add r5, r4, r4 */ - }, - {-50ll /* 0xffffffffffffffce */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-49ll /* 0xffffffffffffffcf */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-48ll /* 0xffffffffffffffd0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-47ll /* 0xffffffffffffffd1 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-46ll /* 0xffffffffffffffd2 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-45ll /* 0xffffffffffffffd3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-44ll /* 0xffffffffffffffd4 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {-43ll /* 0xffffffffffffffd5 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {-42ll /* 0xffffffffffffffd6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-41ll /* 0xffffffffffffffd7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {-40ll /* 0xffffffffffffffd8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {-39ll /* 0xffffffffffffffd9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-38ll /* 0xffffffffffffffda */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-37ll /* 0xffffffffffffffdb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {-36ll /* 0xffffffffffffffdc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 2}} /* shli r4, r3, 2 */ - }, - {-35ll /* 0xffffffffffffffdd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-34ll /* 0xffffffffffffffde */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {-33ll /* 0xffffffffffffffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32ll /* 0xffffffffffffffe0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 5}} /* shli r3, r2, 5 */ - }, - {-31ll /* 0xffffffffffffffe1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-30ll /* 0xffffffffffffffe2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-29ll /* 0xffffffffffffffe3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-28ll /* 0xffffffffffffffe4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-27ll /* 0xffffffffffffffe5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-26ll /* 0xffffffffffffffe6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-25ll /* 0xffffffffffffffe7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-24ll /* 0xffffffffffffffe8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-23ll /* 0xffffffffffffffe9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-22ll /* 0xffffffffffffffea */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-21ll /* 0xffffffffffffffeb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-20ll /* 0xffffffffffffffec */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 2}} /* shli r4, r3, 2 */ - }, - {-19ll /* 0xffffffffffffffed */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-18ll /* 0xffffffffffffffee */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 1}} /* shli r4, r3, 1 */ - }, - {-17ll /* 0xffffffffffffffef */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16ll /* 0xfffffffffffffff0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 4}} /* shli r3, r2, 4 */ - }, - {-15ll /* 0xfffffffffffffff1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-14ll /* 0xfffffffffffffff2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-13ll /* 0xfffffffffffffff3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-12ll /* 0xfffffffffffffff4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-11ll /* 0xfffffffffffffff5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-10ll /* 0xfffffffffffffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-9ll /* 0xfffffffffffffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}} /* shl3add r3, r2, r2 */ - }, - {-8ll /* 0xfffffffffffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 3}} /* shli r3, r2, 3 */ - }, - {-7ll /* 0xfffffffffffffff9 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-6ll /* 0xfffffffffffffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-5ll /* 0xfffffffffffffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}} /* shl2add r3, r2, r2 */ - }, - {-4ll /* 0xfffffffffffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 2}} /* shli r3, r2, 2 */ - }, - {-3ll /* 0xfffffffffffffffd */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2ll /* 0xfffffffffffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 1}} /* shli r3, r2, 1 */ - }, - {-1ll /* 0xffffffffffffffff */ , - {{2, 0, 1}} /* sub r2, zero, r1 */ - }, - {2ll /* 0x2 */ , - {{6, 1, 1}} /* shli r2, r1, 1 */ - }, - {3ll /* 0x3 */ , - {{3, 1, 1}} /* shl1add r2, r1, r1 */ - }, - {4ll /* 0x4 */ , - {{6, 1, 2}} /* shli r2, r1, 2 */ - }, - {5ll /* 0x5 */ , - {{4, 1, 1}} /* shl2add r2, r1, r1 */ - }, - {6ll /* 0x6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 1}} /* shli r3, r2, 1 */ - }, - {7ll /* 0x7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {8ll /* 0x8 */ , - {{6, 1, 3}} /* shli r2, r1, 3 */ - }, - {9ll /* 0x9 */ , - {{5, 1, 1}} /* shl3add r2, r1, r1 */ - }, - {10ll /* 0xa */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 1}} /* shli r3, r2, 1 */ - }, - {11ll /* 0xb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}} /* shl1add r3, r2, r1 */ - }, - {12ll /* 0xc */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 2}} /* shli r3, r2, 2 */ - }, - {13ll /* 0xd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}} /* shl2add r3, r2, r1 */ - }, - {14ll /* 0xe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {15ll /* 0xf */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {16ll /* 0x10 */ , - {{6, 1, 4}} /* shli r2, r1, 4 */ - }, - {17ll /* 0x11 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {18ll /* 0x12 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 1}} /* shli r3, r2, 1 */ - }, - {19ll /* 0x13 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}} /* shl1add r3, r2, r1 */ - }, - {20ll /* 0x14 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 2}} /* shli r3, r2, 2 */ - }, - {21ll /* 0x15 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}} /* shl2add r3, r2, r1 */ - }, - {22ll /* 0x16 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {23ll /* 0x17 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {24ll /* 0x18 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 3}} /* shli r3, r2, 3 */ - }, - {25ll /* 0x19 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}} /* shl3add r3, r2, r1 */ - }, - {26ll /* 0x1a */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {27ll /* 0x1b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}} /* shl3add r3, r2, r2 */ - }, - {28ll /* 0x1c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {29ll /* 0x1d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {30ll /* 0x1e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {31ll /* 0x1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {32ll /* 0x20 */ , - {{6, 1, 5}} /* shli r2, r1, 5 */ - }, - {33ll /* 0x21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {34ll /* 0x22 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {35ll /* 0x23 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36ll /* 0x24 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 2}} /* shli r3, r2, 2 */ - }, - {37ll /* 0x25 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}} /* shl2add r3, r2, r1 */ - }, - {38ll /* 0x26 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {39ll /* 0x27 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {40ll /* 0x28 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 3}} /* shli r3, r2, 3 */ - }, - {41ll /* 0x29 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}} /* shl3add r3, r2, r1 */ - }, - {42ll /* 0x2a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {43ll /* 0x2b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {44ll /* 0x2c */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {45ll /* 0x2d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}} /* shl3add r3, r2, r2 */ - }, - {46ll /* 0x2e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {47ll /* 0x2f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {48ll /* 0x30 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}} /* shli r3, r2, 4 */ - }, - {49ll /* 0x31 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {50ll /* 0x32 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {51ll /* 0x33 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {52ll /* 0x34 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {53ll /* 0x35 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {54ll /* 0x36 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 1}} /* shli r4, r3, 1 */ - }, - {55ll /* 0x37 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {56ll /* 0x38 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {57ll /* 0x39 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {58ll /* 0x3a */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {59ll /* 0x3b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {60ll /* 0x3c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {61ll /* 0x3d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {62ll /* 0x3e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {63ll /* 0x3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {64ll /* 0x40 */ , - {{6, 1, 6}} /* shli r2, r1, 6 */ - }, - {65ll /* 0x41 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {66ll /* 0x42 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {67ll /* 0x43 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68ll /* 0x44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {69ll /* 0x45 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70ll /* 0x46 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {71ll /* 0x47 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {72ll /* 0x48 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 3}} /* shli r3, r2, 3 */ - }, - {73ll /* 0x49 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}} /* shl3add r3, r2, r1 */ - }, - {74ll /* 0x4a */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {75ll /* 0x4b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {76ll /* 0x4c */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {77ll /* 0x4d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {78ll /* 0x4e */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {79ll /* 0x4f */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {80ll /* 0x50 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}} /* shli r3, r2, 4 */ - }, - {81ll /* 0x51 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}} /* shl3add r3, r2, r2 */ - }, - {82ll /* 0x52 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {83ll /* 0x53 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 1}} /* shl1add r4, r3, r1 */ - }, - {84ll /* 0x54 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {85ll /* 0x55 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {86ll /* 0x56 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {87ll /* 0x57 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {88ll /* 0x58 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {89ll /* 0x59 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {90ll /* 0x5a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 1}} /* shli r4, r3, 1 */ - }, - {91ll /* 0x5b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {3, 3, 1}} /* shl1add r4, r3, r1 */ - }, - {92ll /* 0x5c */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {93ll /* 0x5d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {94ll /* 0x5e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {95ll /* 0x5f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {96ll /* 0x60 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}} /* shli r3, r2, 5 */ - }, - {97ll /* 0x61 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {98ll /* 0x62 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {99ll /* 0x63 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {100ll /* 0x64 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {101ll /* 0x65 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 1}} /* shl2add r4, r3, r1 */ - }, - {102ll /* 0x66 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {103ll /* 0x67 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {104ll /* 0x68 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {105ll /* 0x69 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {106ll /* 0x6a */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {107ll /* 0x6b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {108ll /* 0x6c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 2}} /* shli r4, r3, 2 */ - }, - {109ll /* 0x6d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {4, 3, 1}} /* shl2add r4, r3, r1 */ - }, - {110ll /* 0x6e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {111ll /* 0x6f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {112ll /* 0x70 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {113ll /* 0x71 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {114ll /* 0x72 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {115ll /* 0x73 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {116ll /* 0x74 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {117ll /* 0x75 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 3}} /* shl3add r4, r3, r3 */ - }, - {118ll /* 0x76 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {119ll /* 0x77 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {120ll /* 0x78 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {121ll /* 0x79 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {122ll /* 0x7a */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {123ll /* 0x7b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {124ll /* 0x7c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {125ll /* 0x7d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {126ll /* 0x7e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {127ll /* 0x7f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {128ll /* 0x80 */ , - {{6, 1, 7}} /* shli r2, r1, 7 */ - }, - {129ll /* 0x81 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {130ll /* 0x82 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {131ll /* 0x83 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {132ll /* 0x84 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {133ll /* 0x85 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134ll /* 0x86 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {135ll /* 0x87 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {136ll /* 0x88 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {137ll /* 0x89 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {138ll /* 0x8a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {139ll /* 0x8b */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {140ll /* 0x8c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {141ll /* 0x8d */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {142ll /* 0x8e */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {143ll /* 0x8f */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {144ll /* 0x90 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}} /* shli r3, r2, 4 */ - }, - {145ll /* 0x91 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {146ll /* 0x92 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {147ll /* 0x93 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 1}} /* shl1add r4, r3, r1 */ - }, - {148ll /* 0x94 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {149ll /* 0x95 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {4, 3, 1}} /* shl2add r4, r3, r1 */ - }, - {150ll /* 0x96 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {151ll /* 0x97 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {152ll /* 0x98 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {153ll /* 0x99 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {154ll /* 0x9a */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {155ll /* 0x9b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {156ll /* 0x9c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {157ll /* 0x9d */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {158ll /* 0x9e */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {159ll /* 0x9f */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {160ll /* 0xa0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}} /* shli r3, r2, 5 */ - }, - {161ll /* 0xa1 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {162ll /* 0xa2 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 1}} /* shli r4, r3, 1 */ - }, - {163ll /* 0xa3 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {3, 3, 1}} /* shl1add r4, r3, r1 */ - }, - {164ll /* 0xa4 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {165ll /* 0xa5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {166ll /* 0xa6 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {167ll /* 0xa7 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {168ll /* 0xa8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {169ll /* 0xa9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {170ll /* 0xaa */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {171ll /* 0xab */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 3, 3}} /* shl3add r4, r3, r3 */ - }, - {172ll /* 0xac */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {173ll /* 0xad */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {174ll /* 0xae */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {175ll /* 0xaf */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {176ll /* 0xb0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {177ll /* 0xb1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {178ll /* 0xb2 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {179ll /* 0xb3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {180ll /* 0xb4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 2}} /* shli r4, r3, 2 */ - }, - {181ll /* 0xb5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {4, 3, 1}} /* shl2add r4, r3, r1 */ - }, - {182ll /* 0xb6 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {183ll /* 0xb7 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {184ll /* 0xb8 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {185ll /* 0xb9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {186ll /* 0xba */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {187ll /* 0xbb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {188ll /* 0xbc */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {189ll /* 0xbd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {190ll /* 0xbe */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {191ll /* 0xbf */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {192ll /* 0xc0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}} /* shli r3, r2, 6 */ - }, - {193ll /* 0xc1 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {194ll /* 0xc2 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {195ll /* 0xc3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {196ll /* 0xc4 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {197ll /* 0xc5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {198ll /* 0xc6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {199ll /* 0xc7 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {200ll /* 0xc8 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {201ll /* 0xc9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {202ll /* 0xca */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {203ll /* 0xcb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {204ll /* 0xcc */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {205ll /* 0xcd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {206ll /* 0xce */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {207ll /* 0xcf */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {208ll /* 0xd0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {209ll /* 0xd1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {210ll /* 0xd2 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {211ll /* 0xd3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {212ll /* 0xd4 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {213ll /* 0xd5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {214ll /* 0xd6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {215ll /* 0xd7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {216ll /* 0xd8 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {217ll /* 0xd9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {218ll /* 0xda */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {219ll /* 0xdb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {220ll /* 0xdc */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {221ll /* 0xdd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {222ll /* 0xde */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {223ll /* 0xdf */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {224ll /* 0xe0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {225ll /* 0xe1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {226ll /* 0xe2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {227ll /* 0xe3 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {228ll /* 0xe4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {229ll /* 0xe5 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {230ll /* 0xe6 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {231ll /* 0xe7 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 1, 8}, /* shli r4, r1, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {232ll /* 0xe8 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {233ll /* 0xe9 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {234ll /* 0xea */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {235ll /* 0xeb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {236ll /* 0xec */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {237ll /* 0xed */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {238ll /* 0xee */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {239ll /* 0xef */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {240ll /* 0xf0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {241ll /* 0xf1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {242ll /* 0xf2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {243ll /* 0xf3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}} /* shl3add r4, r3, r3 */ - }, - {244ll /* 0xf4 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {245ll /* 0xf5 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {246ll /* 0xf6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {247ll /* 0xf7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {248ll /* 0xf8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {249ll /* 0xf9 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {250ll /* 0xfa */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {251ll /* 0xfb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {252ll /* 0xfc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {253ll /* 0xfd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {254ll /* 0xfe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {255ll /* 0xff */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {256ll /* 0x100 */ , - {{6, 1, 8}} /* shli r2, r1, 8 */ - }, - {257ll /* 0x101 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {258ll /* 0x102 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {259ll /* 0x103 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {260ll /* 0x104 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {261ll /* 0x105 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262ll /* 0x106 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {263ll /* 0x107 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {264ll /* 0x108 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {265ll /* 0x109 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {266ll /* 0x10a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {267ll /* 0x10b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {268ll /* 0x10c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {269ll /* 0x10d */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {270ll /* 0x10e */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {271ll /* 0x10f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {272ll /* 0x110 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {273ll /* 0x111 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {274ll /* 0x112 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {275ll /* 0x113 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {276ll /* 0x114 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {277ll /* 0x115 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {278ll /* 0x116 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {279ll /* 0x117 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {280ll /* 0x118 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {281ll /* 0x119 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {282ll /* 0x11a */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {283ll /* 0x11b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {284ll /* 0x11c */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {285ll /* 0x11d */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {286ll /* 0x11e */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {287ll /* 0x11f */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {288ll /* 0x120 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}} /* shli r3, r2, 5 */ - }, - {289ll /* 0x121 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {290ll /* 0x122 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {291ll /* 0x123 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {292ll /* 0x124 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {293ll /* 0x125 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 1}} /* shl2add r4, r3, r1 */ - }, - {294ll /* 0x126 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {295ll /* 0x127 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {296ll /* 0x128 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {297ll /* 0x129 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {298ll /* 0x12a */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {299ll /* 0x12b */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {300ll /* 0x12c */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {301ll /* 0x12d */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {302ll /* 0x12e */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {303ll /* 0x12f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {304ll /* 0x130 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {305ll /* 0x131 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {306ll /* 0x132 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {307ll /* 0x133 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {308ll /* 0x134 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {309ll /* 0x135 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {310ll /* 0x136 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {311ll /* 0x137 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {312ll /* 0x138 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {313ll /* 0x139 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {314ll /* 0x13a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {315ll /* 0x13b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {316ll /* 0x13c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {317ll /* 0x13d */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {318ll /* 0x13e */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {319ll /* 0x13f */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {320ll /* 0x140 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}} /* shli r3, r2, 6 */ - }, - {321ll /* 0x141 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {322ll /* 0x142 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {323ll /* 0x143 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {324ll /* 0x144 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {325ll /* 0x145 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {326ll /* 0x146 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {327ll /* 0x147 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {328ll /* 0x148 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {329ll /* 0x149 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {330ll /* 0x14a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {331ll /* 0x14b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {332ll /* 0x14c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {333ll /* 0x14d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {334ll /* 0x14e */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {335ll /* 0x14f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {336ll /* 0x150 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {337ll /* 0x151 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {338ll /* 0x152 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {339ll /* 0x153 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {340ll /* 0x154 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {341ll /* 0x155 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {342ll /* 0x156 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {343ll /* 0x157 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {344ll /* 0x158 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {345ll /* 0x159 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {346ll /* 0x15a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {347ll /* 0x15b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {348ll /* 0x15c */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 2}, /* shli r4, r2, 2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {349ll /* 0x15d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {350ll /* 0x15e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {351ll /* 0x15f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {352ll /* 0x160 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {353ll /* 0x161 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {354ll /* 0x162 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {355ll /* 0x163 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {356ll /* 0x164 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {357ll /* 0x165 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {358ll /* 0x166 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {359ll /* 0x167 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {360ll /* 0x168 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {361ll /* 0x169 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {362ll /* 0x16a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {363ll /* 0x16b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {364ll /* 0x16c */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 1, 2}, /* shli r4, r1, 2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {365ll /* 0x16d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {366ll /* 0x16e */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {367ll /* 0x16f */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {368ll /* 0x170 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {369ll /* 0x171 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 3}} /* shl3add r4, r3, r3 */ - }, - {370ll /* 0x172 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {371ll /* 0x173 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {372ll /* 0x174 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {373ll /* 0x175 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {374ll /* 0x176 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {375ll /* 0x177 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {376ll /* 0x178 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {377ll /* 0x179 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {378ll /* 0x17a */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {379ll /* 0x17b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {380ll /* 0x17c */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {381ll /* 0x17d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {382ll /* 0x17e */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {383ll /* 0x17f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {384ll /* 0x180 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}} /* shli r3, r2, 7 */ - }, - {385ll /* 0x181 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {386ll /* 0x182 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {387ll /* 0x183 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {388ll /* 0x184 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {389ll /* 0x185 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {390ll /* 0x186 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {391ll /* 0x187 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {392ll /* 0x188 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {393ll /* 0x189 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {394ll /* 0x18a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {395ll /* 0x18b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {396ll /* 0x18c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {397ll /* 0x18d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {398ll /* 0x18e */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {399ll /* 0x18f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {400ll /* 0x190 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {401ll /* 0x191 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {402ll /* 0x192 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {403ll /* 0x193 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {404ll /* 0x194 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {4, 1, 2}, /* shl2add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {405ll /* 0x195 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}} /* shl3add r4, r3, r3 */ - }, - {406ll /* 0x196 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {407ll /* 0x197 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {408ll /* 0x198 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {409ll /* 0x199 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {410ll /* 0x19a */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {411ll /* 0x19b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {412ll /* 0x19c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {413ll /* 0x19d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {414ll /* 0x19e */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {415ll /* 0x19f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {416ll /* 0x1a0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {417ll /* 0x1a1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {418ll /* 0x1a2 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {419ll /* 0x1a3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {420ll /* 0x1a4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {421ll /* 0x1a5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {422ll /* 0x1a6 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {423ll /* 0x1a7 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {424ll /* 0x1a8 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {425ll /* 0x1a9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {426ll /* 0x1aa */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {427ll /* 0x1ab */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {428ll /* 0x1ac */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {429ll /* 0x1ad */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {430ll /* 0x1ae */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {431ll /* 0x1af */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {432ll /* 0x1b0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {433ll /* 0x1b1 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {434ll /* 0x1b2 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {435ll /* 0x1b3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {436ll /* 0x1b4 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {437ll /* 0x1b5 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {438ll /* 0x1b6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {439ll /* 0x1b7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {440ll /* 0x1b8 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {441ll /* 0x1b9 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {442ll /* 0x1ba */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {443ll /* 0x1bb */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {444ll /* 0x1bc */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {445ll /* 0x1bd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {446ll /* 0x1be */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {447ll /* 0x1bf */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {448ll /* 0x1c0 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {449ll /* 0x1c1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {450ll /* 0x1c2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {451ll /* 0x1c3 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {452ll /* 0x1c4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {453ll /* 0x1c5 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {454ll /* 0x1c6 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {455ll /* 0x1c7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {456ll /* 0x1c8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {457ll /* 0x1c9 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {458ll /* 0x1ca */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {459ll /* 0x1cb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {460ll /* 0x1cc */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {461ll /* 0x1cd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {462ll /* 0x1ce */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {463ll /* 0x1cf */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {464ll /* 0x1d0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {465ll /* 0x1d1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* shl1add r4, r1, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {467ll /* 0x1d3 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {468ll /* 0x1d4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {469ll /* 0x1d5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {470ll /* 0x1d6 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {471ll /* 0x1d7 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {472ll /* 0x1d8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {473ll /* 0x1d9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {475ll /* 0x1db */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {476ll /* 0x1dc */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {477ll /* 0x1dd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {478ll /* 0x1de */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {479ll /* 0x1df */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {480ll /* 0x1e0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {481ll /* 0x1e1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {482ll /* 0x1e2 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {483ll /* 0x1e3 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {484ll /* 0x1e4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {485ll /* 0x1e5 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {486ll /* 0x1e6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {487ll /* 0x1e7 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {488ll /* 0x1e8 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {489ll /* 0x1e9 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {490ll /* 0x1ea */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {491ll /* 0x1eb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {492ll /* 0x1ec */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {493ll /* 0x1ed */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {494ll /* 0x1ee */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {495ll /* 0x1ef */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {496ll /* 0x1f0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {497ll /* 0x1f1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {498ll /* 0x1f2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {499ll /* 0x1f3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {500ll /* 0x1f4 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {501ll /* 0x1f5 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {502ll /* 0x1f6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {503ll /* 0x1f7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {504ll /* 0x1f8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {505ll /* 0x1f9 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {506ll /* 0x1fa */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {507ll /* 0x1fb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {508ll /* 0x1fc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {509ll /* 0x1fd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {510ll /* 0x1fe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {511ll /* 0x1ff */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {512ll /* 0x200 */ , - {{6, 1, 9}} /* shli r2, r1, 9 */ - }, - {513ll /* 0x201 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {514ll /* 0x202 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {515ll /* 0x203 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {516ll /* 0x204 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {517ll /* 0x205 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {518ll /* 0x206 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {519ll /* 0x207 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {520ll /* 0x208 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {521ll /* 0x209 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {522ll /* 0x20a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {523ll /* 0x20b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {524ll /* 0x20c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {525ll /* 0x20d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {526ll /* 0x20e */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {527ll /* 0x20f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {528ll /* 0x210 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {529ll /* 0x211 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {530ll /* 0x212 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {531ll /* 0x213 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {532ll /* 0x214 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {533ll /* 0x215 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {534ll /* 0x216 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {535ll /* 0x217 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {536ll /* 0x218 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {537ll /* 0x219 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {538ll /* 0x21a */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {539ll /* 0x21b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {540ll /* 0x21c */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {541ll /* 0x21d */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {542ll /* 0x21e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {543ll /* 0x21f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {544ll /* 0x220 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {545ll /* 0x221 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {546ll /* 0x222 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {547ll /* 0x223 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {548ll /* 0x224 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {549ll /* 0x225 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {550ll /* 0x226 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {551ll /* 0x227 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {552ll /* 0x228 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {553ll /* 0x229 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {554ll /* 0x22a */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {555ll /* 0x22b */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {556ll /* 0x22c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {557ll /* 0x22d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {558ll /* 0x22e */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {559ll /* 0x22f */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {560ll /* 0x230 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {561ll /* 0x231 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {562ll /* 0x232 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {563ll /* 0x233 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {564ll /* 0x234 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {565ll /* 0x235 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {566ll /* 0x236 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {567ll /* 0x237 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {568ll /* 0x238 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {569ll /* 0x239 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {570ll /* 0x23a */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 1, 2}, /* shl1add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {571ll /* 0x23b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {572ll /* 0x23c */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {573ll /* 0x23d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {574ll /* 0x23e */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {575ll /* 0x23f */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {576ll /* 0x240 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}} /* shli r3, r2, 6 */ - }, - {577ll /* 0x241 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {578ll /* 0x242 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {579ll /* 0x243 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {580ll /* 0x244 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {581ll /* 0x245 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {582ll /* 0x246 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {583ll /* 0x247 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {584ll /* 0x248 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {585ll /* 0x249 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {586ll /* 0x24a */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {587ll /* 0x24b */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {588ll /* 0x24c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {589ll /* 0x24d */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {590ll /* 0x24e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {591ll /* 0x24f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {592ll /* 0x250 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {593ll /* 0x251 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {594ll /* 0x252 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {595ll /* 0x253 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {596ll /* 0x254 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {597ll /* 0x255 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {598ll /* 0x256 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {599ll /* 0x257 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {600ll /* 0x258 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {601ll /* 0x259 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {602ll /* 0x25a */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {603ll /* 0x25b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {604ll /* 0x25c */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {605ll /* 0x25d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {606ll /* 0x25e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {607ll /* 0x25f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {608ll /* 0x260 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {609ll /* 0x261 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {610ll /* 0x262 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {611ll /* 0x263 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {612ll /* 0x264 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {613ll /* 0x265 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {614ll /* 0x266 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {615ll /* 0x267 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {616ll /* 0x268 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {617ll /* 0x269 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {619ll /* 0x26b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {620ll /* 0x26c */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {621ll /* 0x26d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {623ll /* 0x26f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {624ll /* 0x270 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {625ll /* 0x271 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {626ll /* 0x272 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {627ll /* 0x273 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {628ll /* 0x274 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {629ll /* 0x275 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {630ll /* 0x276 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {631ll /* 0x277 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {632ll /* 0x278 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {633ll /* 0x279 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {634ll /* 0x27a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {635ll /* 0x27b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {636ll /* 0x27c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {637ll /* 0x27d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {638ll /* 0x27e */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {639ll /* 0x27f */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {640ll /* 0x280 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}} /* shli r3, r2, 7 */ - }, - {641ll /* 0x281 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {642ll /* 0x282 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {643ll /* 0x283 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {644ll /* 0x284 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {645ll /* 0x285 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {646ll /* 0x286 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {647ll /* 0x287 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {648ll /* 0x288 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {649ll /* 0x289 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {650ll /* 0x28a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {651ll /* 0x28b */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {652ll /* 0x28c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {653ll /* 0x28d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {654ll /* 0x28e */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {655ll /* 0x28f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {656ll /* 0x290 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {657ll /* 0x291 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 3}} /* shl3add r4, r3, r3 */ - }, - {658ll /* 0x292 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {659ll /* 0x293 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {660ll /* 0x294 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {661ll /* 0x295 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {662ll /* 0x296 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {663ll /* 0x297 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {664ll /* 0x298 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {665ll /* 0x299 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {666ll /* 0x29a */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {667ll /* 0x29b */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {668ll /* 0x29c */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {669ll /* 0x29d */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 1}, /* shl1add r4, r3, r1 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {670ll /* 0x29e */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {671ll /* 0x29f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {672ll /* 0x2a0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {673ll /* 0x2a1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {674ll /* 0x2a2 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {675ll /* 0x2a3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {676ll /* 0x2a4 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {677ll /* 0x2a5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {679ll /* 0x2a7 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {5, 2, 4}} /* shl3add r5, r2, r4 */ - }, - {680ll /* 0x2a8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {681ll /* 0x2a9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {682ll /* 0x2aa */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {684ll /* 0x2ac */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 2}, /* shli r4, r2, 2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {685ll /* 0x2ad */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {688ll /* 0x2b0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 1, 1}, /* shl2add r3, r1, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {689ll /* 0x2b1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {690ll /* 0x2b2 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {692ll /* 0x2b4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {693ll /* 0x2b5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 1}, /* shl3add r3, r1, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {694ll /* 0x2b6 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 3}, /* shl2add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {695ll /* 0x2b7 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {696ll /* 0x2b8 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {697ll /* 0x2b9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {699ll /* 0x2bb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {700ll /* 0x2bc */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {701ll /* 0x2bd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {702ll /* 0x2be */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {703ll /* 0x2bf */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {704ll /* 0x2c0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {705ll /* 0x2c1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {706ll /* 0x2c2 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {707ll /* 0x2c3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {708ll /* 0x2c4 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {709ll /* 0x2c5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {710ll /* 0x2c6 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {711ll /* 0x2c7 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {712ll /* 0x2c8 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {713ll /* 0x2c9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {714ll /* 0x2ca */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 3}, /* shl2add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {715ll /* 0x2cb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {716ll /* 0x2cc */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {717ll /* 0x2cd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {719ll /* 0x2cf */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 4, 1}} /* sub r5, r4, r1 */ - }, - {720ll /* 0x2d0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {721ll /* 0x2d1 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {722ll /* 0x2d2 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {723ll /* 0x2d3 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {724ll /* 0x2d4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {725ll /* 0x2d5 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {726ll /* 0x2d6 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {727ll /* 0x2d7 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {728ll /* 0x2d8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {729ll /* 0x2d9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}} /* shl3add r4, r3, r3 */ - }, - {730ll /* 0x2da */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {731ll /* 0x2db */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {3, 4, 1}} /* shl1add r5, r4, r1 */ - }, - {733ll /* 0x2dd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {735ll /* 0x2df */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {736ll /* 0x2e0 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {737ll /* 0x2e1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {738ll /* 0x2e2 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {739ll /* 0x2e3 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {740ll /* 0x2e4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {741ll /* 0x2e5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {743ll /* 0x2e7 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {744ll /* 0x2e8 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {745ll /* 0x2e9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {747ll /* 0x2eb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {748ll /* 0x2ec */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {749ll /* 0x2ed */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {750ll /* 0x2ee */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {752ll /* 0x2f0 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {753ll /* 0x2f1 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {755ll /* 0x2f3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {756ll /* 0x2f4 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {757ll /* 0x2f5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {758ll /* 0x2f6 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {759ll /* 0x2f7 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {760ll /* 0x2f8 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {761ll /* 0x2f9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {762ll /* 0x2fa */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {763ll /* 0x2fb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {764ll /* 0x2fc */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {765ll /* 0x2fd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {766ll /* 0x2fe */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {767ll /* 0x2ff */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {768ll /* 0x300 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}} /* shli r3, r2, 8 */ - }, - {769ll /* 0x301 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {770ll /* 0x302 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {771ll /* 0x303 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {772ll /* 0x304 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {773ll /* 0x305 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {774ll /* 0x306 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {775ll /* 0x307 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {776ll /* 0x308 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {777ll /* 0x309 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {778ll /* 0x30a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {779ll /* 0x30b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {780ll /* 0x30c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {781ll /* 0x30d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {782ll /* 0x30e */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {783ll /* 0x30f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {784ll /* 0x310 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {785ll /* 0x311 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 1, 2}, /* shl3add r4, r1, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {786ll /* 0x312 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {787ll /* 0x313 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 1, 3}, /* shl1add r4, r1, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {788ll /* 0x314 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {789ll /* 0x315 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 2, 4}} /* shl3add r5, r2, r4 */ - }, - {790ll /* 0x316 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {791ll /* 0x317 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {792ll /* 0x318 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {793ll /* 0x319 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {794ll /* 0x31a */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {795ll /* 0x31b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {796ll /* 0x31c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {797ll /* 0x31d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {798ll /* 0x31e */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {799ll /* 0x31f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {800ll /* 0x320 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {801ll /* 0x321 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {802ll /* 0x322 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {803ll /* 0x323 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {804ll /* 0x324 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {4, 1, 2}, /* shl2add r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {805ll /* 0x325 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {806ll /* 0x326 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {807ll /* 0x327 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {808ll /* 0x328 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {809ll /* 0x329 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}, /* shl2add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {810ll /* 0x32a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {811ll /* 0x32b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {812ll /* 0x32c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {813ll /* 0x32d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {815ll /* 0x32f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {816ll /* 0x330 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {817ll /* 0x331 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {818ll /* 0x332 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {819ll /* 0x333 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {820ll /* 0x334 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {821ll /* 0x335 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {822ll /* 0x336 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {823ll /* 0x337 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {824ll /* 0x338 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {825ll /* 0x339 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {827ll /* 0x33b */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {828ll /* 0x33c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {829ll /* 0x33d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {831ll /* 0x33f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {832ll /* 0x340 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {833ll /* 0x341 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {834ll /* 0x342 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 2, 2}, /* shl1add r4, r2, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {835ll /* 0x343 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {836ll /* 0x344 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* shl3add r4, r2, r2 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {837ll /* 0x345 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {838ll /* 0x346 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {840ll /* 0x348 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {841ll /* 0x349 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {842ll /* 0x34a */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {843ll /* 0x34b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {844ll /* 0x34c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {845ll /* 0x34d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {846ll /* 0x34e */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {848ll /* 0x350 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {4, 2, 2}, /* shl2add r4, r2, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {849ll /* 0x351 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {850ll /* 0x352 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {852ll /* 0x354 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {853ll /* 0x355 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {855ll /* 0x357 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {856ll /* 0x358 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {857ll /* 0x359 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {858ll /* 0x35a */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {859ll /* 0x35b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {861ll /* 0x35d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {862ll /* 0x35e */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {863ll /* 0x35f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 1}} /* sub r5, r4, r1 */ - }, - {864ll /* 0x360 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {865ll /* 0x361 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 1, 4}} /* add r5, r1, r4 */ - }, - {866ll /* 0x362 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {867ll /* 0x363 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {868ll /* 0x364 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {869ll /* 0x365 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {870ll /* 0x366 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {871ll /* 0x367 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {872ll /* 0x368 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {873ll /* 0x369 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {875ll /* 0x36b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {876ll /* 0x36c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {877ll /* 0x36d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {879ll /* 0x36f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {880ll /* 0x370 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {881ll /* 0x371 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 2}, /* shl1add r3, r2, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {882ll /* 0x372 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {884ll /* 0x374 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {885ll /* 0x375 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {888ll /* 0x378 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {889ll /* 0x379 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {890ll /* 0x37a */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {891ll /* 0x37b */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {892ll /* 0x37c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {893ll /* 0x37d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {894ll /* 0x37e */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {895ll /* 0x37f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {896ll /* 0x380 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {897ll /* 0x381 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {898ll /* 0x382 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {899ll /* 0x383 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {900ll /* 0x384 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {901ll /* 0x385 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {902ll /* 0x386 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {903ll /* 0x387 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {904ll /* 0x388 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {905ll /* 0x389 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {906ll /* 0x38a */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {908ll /* 0x38c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {3, 3, 3}, /* shl1add r4, r3, r3 */ - {3, 4, 2}} /* shl1add r5, r4, r2 */ - }, - {909ll /* 0x38d */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {910ll /* 0x38e */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {911ll /* 0x38f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {912ll /* 0x390 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {913ll /* 0x391 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* shl1add r4, r1, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {915ll /* 0x393 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {916ll /* 0x394 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {917ll /* 0x395 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 3, 2}, /* shl3add r4, r3, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {918ll /* 0x396 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {919ll /* 0x397 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {920ll /* 0x398 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {924ll /* 0x39c */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {925ll /* 0x39d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {927ll /* 0x39f */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {4, 3, 2}, /* shl2add r4, r3, r2 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {928ll /* 0x3a0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {929ll /* 0x3a1 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 1, 2}, /* shl2add r4, r1, r2 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {932ll /* 0x3a4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {4, 4, 2}} /* shl2add r5, r4, r2 */ - }, - {935ll /* 0x3a7 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {936ll /* 0x3a8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}, /* shl3add r4, r2, r3 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {937ll /* 0x3a9 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {939ll /* 0x3ab */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {941ll /* 0x3ad */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {943ll /* 0x3af */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {944ll /* 0x3b0 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {945ll /* 0x3b1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {948ll /* 0x3b4 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {949ll /* 0x3b5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {950ll /* 0x3b6 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {951ll /* 0x3b7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {952ll /* 0x3b8 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {953ll /* 0x3b9 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {955ll /* 0x3bb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {4, 4, 4}} /* shl2add r5, r4, r4 */ - }, - {956ll /* 0x3bc */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {957ll /* 0x3bd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {958ll /* 0x3be */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {959ll /* 0x3bf */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {960ll /* 0x3c0 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {961ll /* 0x3c1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {962ll /* 0x3c2 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {963ll /* 0x3c3 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {964ll /* 0x3c4 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {4, 3, 4}} /* shl2add r5, r3, r4 */ - }, - {965ll /* 0x3c5 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {966ll /* 0x3c6 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 3, 2}, /* shl1add r4, r3, r2 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {967ll /* 0x3c7 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {968ll /* 0x3c8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {5, 3, 4}} /* shl3add r5, r3, r4 */ - }, - {969ll /* 0x3c9 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* shl1add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {970ll /* 0x3ca */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {971ll /* 0x3cb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 2}, /* shl2add r3, r2, r2 */ - {5, 3, 1}, /* shl3add r4, r3, r1 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {972ll /* 0x3cc */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {973ll /* 0x3cd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {5, 3, 3}, /* shl3add r4, r3, r3 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {975ll /* 0x3cf */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {976ll /* 0x3d0 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {979ll /* 0x3d3 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {980ll /* 0x3d4 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}, /* shl1add r4, r2, r3 */ - {3, 4, 3}} /* shl1add r5, r4, r3 */ - }, - {981ll /* 0x3d5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {4, 3, 1}, /* shl2add r4, r3, r1 */ - {5, 4, 4}} /* shl3add r5, r4, r4 */ - }, - {983ll /* 0x3d7 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {984ll /* 0x3d8 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {985ll /* 0x3d9 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* shl3add r5, r4, r1 */ - }, - {987ll /* 0x3db */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {988ll /* 0x3dc */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {989ll /* 0x3dd */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {990ll /* 0x3de */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {991ll /* 0x3df */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {992ll /* 0x3e0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {993ll /* 0x3e1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {994ll /* 0x3e2 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* shl1add r5, r3, r4 */ - }, - {996ll /* 0x3e4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {997ll /* 0x3e5 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 1}, /* shl3add r4, r2, r1 */ - {4, 4, 3}} /* shl2add r5, r4, r3 */ - }, - {999ll /* 0x3e7 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1000ll /* 0x3e8 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {1001ll /* 0x3e9 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* shl2add r4, r2, r1 */ - {5, 4, 3}} /* shl3add r5, r4, r3 */ - }, - {1003ll /* 0x3eb */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {1004ll /* 0x3ec */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {1005ll /* 0x3ed */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {1006ll /* 0x3ee */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1007ll /* 0x3ef */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1008ll /* 0x3f0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1009ll /* 0x3f1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {1010ll /* 0x3f2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* shl3add r5, r4, r2 */ - }, - {1011ll /* 0x3f3 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1012ll /* 0x3f4 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {1013ll /* 0x3f5 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* shl2add r5, r4, r1 */ - }, - {1014ll /* 0x3f6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1015ll /* 0x3f7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1016ll /* 0x3f8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1017ll /* 0x3f9 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {1018ll /* 0x3fa */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {1019ll /* 0x3fb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1020ll /* 0x3fc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1021ll /* 0x3fd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1022ll /* 0x3fe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1023ll /* 0x3ff */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {1024ll /* 0x400 */ , - {{6, 1, 10}} /* shli r2, r1, 10 */ - }, - {1025ll /* 0x401 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {1026ll /* 0x402 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {1027ll /* 0x403 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1028ll /* 0x404 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {1029ll /* 0x405 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1030ll /* 0x406 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1031ll /* 0x407 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {1032ll /* 0x408 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {1033ll /* 0x409 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1034ll /* 0x40a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1036ll /* 0x40c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {1040ll /* 0x410 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1041ll /* 0x411 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {1042ll /* 0x412 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1044ll /* 0x414 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {1048ll /* 0x418 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {1056ll /* 0x420 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1057ll /* 0x421 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* shl2add r3, r1, r2 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {1060ll /* 0x424 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {1064ll /* 0x428 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {1088ll /* 0x440 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1089ll /* 0x441 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* shl3add r3, r1, r2 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {1090ll /* 0x442 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {3, 3, 2}} /* shl1add r4, r3, r2 */ - }, - {1092ll /* 0x444 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {1096ll /* 0x448 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {1152ll /* 0x480 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 7}} /* shli r3, r2, 7 */ - }, - {1280ll /* 0x500 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 8}} /* shli r3, r2, 8 */ - }, - {1312ll /* 0x520 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {1320ll /* 0x528 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {1344ll /* 0x540 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {1536ll /* 0x600 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 9}} /* shli r3, r2, 9 */ - }, - {1664ll /* 0x680 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 7}} /* shli r4, r3, 7 */ - }, - {2039ll /* 0x7f7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2040ll /* 0x7f8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2041ll /* 0x7f9 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {2043ll /* 0x7fb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2044ll /* 0x7fc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2045ll /* 0x7fd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2046ll /* 0x7fe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2047ll /* 0x7ff */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {2048ll /* 0x800 */ , - {{6, 1, 11}} /* shli r2, r1, 11 */ - }, - {2049ll /* 0x801 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {2050ll /* 0x802 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {2051ll /* 0x803 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2052ll /* 0x804 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {2053ll /* 0x805 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2054ll /* 0x806 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2055ll /* 0x807 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {2056ll /* 0x808 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {2057ll /* 0x809 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2058ll /* 0x80a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2064ll /* 0x810 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2080ll /* 0x820 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2112ll /* 0x840 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2176ll /* 0x880 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2184ll /* 0x888 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {2304ll /* 0x900 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 8}} /* shli r3, r2, 8 */ - }, - {2320ll /* 0x910 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {5, 3, 2}} /* shl3add r4, r3, r2 */ - }, - {2560ll /* 0xa00 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 9}} /* shli r3, r2, 9 */ - }, - {2592ll /* 0xa20 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {2880ll /* 0xb40 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {3072ll /* 0xc00 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 10}} /* shli r3, r2, 10 */ - }, - {3328ll /* 0xd00 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 8}} /* shli r4, r3, 8 */ - }, - {4087ll /* 0xff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4088ll /* 0xff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4089ll /* 0xff9 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {4091ll /* 0xffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4092ll /* 0xffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4093ll /* 0xffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4094ll /* 0xffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4095ll /* 0xfff */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {4096ll /* 0x1000 */ , - {{6, 1, 12}} /* shli r2, r1, 12 */ - }, - {4097ll /* 0x1001 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {4098ll /* 0x1002 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {4099ll /* 0x1003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4100ll /* 0x1004 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {4101ll /* 0x1005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4102ll /* 0x1006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4103ll /* 0x1007 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {4104ll /* 0x1008 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {4105ll /* 0x1009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4106ll /* 0x100a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4108ll /* 0x100c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {4112ll /* 0x1010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4128ll /* 0x1020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4160ll /* 0x1040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4224ll /* 0x1080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4352ll /* 0x1100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4608ll /* 0x1200 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 9}} /* shli r3, r2, 9 */ - }, - {4864ll /* 0x1300 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {3, 2, 1}, /* shl1add r3, r2, r1 */ - {6, 3, 8}} /* shli r4, r3, 8 */ - }, - {5120ll /* 0x1400 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 10}} /* shli r3, r2, 10 */ - }, - {6144ll /* 0x1800 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 11}} /* shli r3, r2, 11 */ - }, - {6400ll /* 0x1900 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 8}} /* shli r4, r3, 8 */ - }, - {6656ll /* 0x1a00 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {4, 2, 1}, /* shl2add r3, r2, r1 */ - {6, 3, 9}} /* shli r4, r3, 9 */ - }, - {7169ll /* 0x1c01 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* shl3add r4, r2, r3 */ - }, - {8183ll /* 0x1ff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8184ll /* 0x1ff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8185ll /* 0x1ff9 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {8187ll /* 0x1ffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8188ll /* 0x1ffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8189ll /* 0x1ffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8190ll /* 0x1ffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8191ll /* 0x1fff */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {8192ll /* 0x2000 */ , - {{6, 1, 13}} /* shli r2, r1, 13 */ - }, - {8193ll /* 0x2001 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {8194ll /* 0x2002 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {8195ll /* 0x2003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8196ll /* 0x2004 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {8197ll /* 0x2005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8198ll /* 0x2006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {8199ll /* 0x2007 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {8200ll /* 0x2008 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {8201ll /* 0x2009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8202ll /* 0x200a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {8204ll /* 0x200c */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {4, 2, 3}} /* shl2add r4, r2, r3 */ - }, - {8208ll /* 0x2010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8224ll /* 0x2020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8256ll /* 0x2040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8320ll /* 0x2080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8448ll /* 0x2100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8704ll /* 0x2200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9216ll /* 0x2400 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 10}} /* shli r3, r2, 10 */ - }, - {9217ll /* 0x2401 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {10240ll /* 0x2800 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 11}} /* shli r3, r2, 11 */ - }, - {10248ll /* 0x2808 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {3, 1, 2}, /* shl1add r3, r1, r2 */ - {4, 3, 2}} /* shl2add r4, r3, r2 */ - }, - {10368ll /* 0x2880 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 7}} /* shli r4, r3, 7 */ - }, - {12288ll /* 0x3000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 12}} /* shli r3, r2, 12 */ - }, - {16375ll /* 0x3ff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16376ll /* 0x3ff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16377ll /* 0x3ff9 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {16379ll /* 0x3ffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16380ll /* 0x3ffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16381ll /* 0x3ffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16382ll /* 0x3ffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16383ll /* 0x3fff */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {16384ll /* 0x4000 */ , - {{6, 1, 14}} /* shli r2, r1, 14 */ - }, - {16385ll /* 0x4001 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {16386ll /* 0x4002 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {16387ll /* 0x4003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16388ll /* 0x4004 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {16389ll /* 0x4005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16390ll /* 0x4006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {16391ll /* 0x4007 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {16392ll /* 0x4008 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {16393ll /* 0x4009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16394ll /* 0x400a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {16400ll /* 0x4010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16416ll /* 0x4020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16448ll /* 0x4040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16512ll /* 0x4080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16640ll /* 0x4100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16896ll /* 0x4200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17408ll /* 0x4400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18432ll /* 0x4800 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 11}} /* shli r3, r2, 11 */ - }, - {20480ll /* 0x5000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 12}} /* shli r3, r2, 12 */ - }, - {24576ll /* 0x6000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 13}} /* shli r3, r2, 13 */ - }, - {25600ll /* 0x6400 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {5, 2, 1}, /* shl3add r3, r2, r1 */ - {6, 3, 10}} /* shli r4, r3, 10 */ - }, - {32759ll /* 0x7ff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32760ll /* 0x7ff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32761ll /* 0x7ff9 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {32763ll /* 0x7ffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32764ll /* 0x7ffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32765ll /* 0x7ffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32766ll /* 0x7ffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32767ll /* 0x7fff */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {32768ll /* 0x8000 */ , - {{6, 1, 15}} /* shli r2, r1, 15 */ - }, - {32769ll /* 0x8001 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {32770ll /* 0x8002 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {32771ll /* 0x8003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32772ll /* 0x8004 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {32773ll /* 0x8005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32774ll /* 0x8006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {32775ll /* 0x8007 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {32776ll /* 0x8008 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {32777ll /* 0x8009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32778ll /* 0x800a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {32784ll /* 0x8010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32800ll /* 0x8020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32832ll /* 0x8040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32896ll /* 0x8080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33024ll /* 0x8100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33280ll /* 0x8200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33792ll /* 0x8400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34816ll /* 0x8800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36864ll /* 0x9000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 12}} /* shli r3, r2, 12 */ - }, - {40960ll /* 0xa000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 13}} /* shli r3, r2, 13 */ - }, - {49152ll /* 0xc000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 14}} /* shli r3, r2, 14 */ - }, - {65527ll /* 0xfff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65528ll /* 0xfff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65529ll /* 0xfff9 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {65531ll /* 0xfffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65532ll /* 0xfffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65533ll /* 0xfffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65534ll /* 0xfffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65535ll /* 0xffff */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {65536ll /* 0x10000 */ , - {{6, 1, 16}} /* shli r2, r1, 16 */ - }, - {65537ll /* 0x10001 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {65538ll /* 0x10002 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {65539ll /* 0x10003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65540ll /* 0x10004 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {65541ll /* 0x10005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65542ll /* 0x10006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {65543ll /* 0x10007 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {65544ll /* 0x10008 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {65545ll /* 0x10009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65546ll /* 0x1000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {65552ll /* 0x10010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65568ll /* 0x10020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65600ll /* 0x10040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65664ll /* 0x10080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65792ll /* 0x10100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {66048ll /* 0x10200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {66560ll /* 0x10400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67584ll /* 0x10800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {69632ll /* 0x11000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {73728ll /* 0x12000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 13}} /* shli r3, r2, 13 */ - }, - {81920ll /* 0x14000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 14}} /* shli r3, r2, 14 */ - }, - {98304ll /* 0x18000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 15}} /* shli r3, r2, 15 */ - }, - {131063ll /* 0x1fff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131064ll /* 0x1fff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131065ll /* 0x1fff9 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {131067ll /* 0x1fffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131068ll /* 0x1fffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131069ll /* 0x1fffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131070ll /* 0x1fffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131071ll /* 0x1ffff */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {131072ll /* 0x20000 */ , - {{6, 1, 17}} /* shli r2, r1, 17 */ - }, - {131073ll /* 0x20001 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {131074ll /* 0x20002 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {131075ll /* 0x20003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131076ll /* 0x20004 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {131077ll /* 0x20005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131078ll /* 0x20006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {131079ll /* 0x20007 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {131080ll /* 0x20008 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {131081ll /* 0x20009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131082ll /* 0x2000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {131088ll /* 0x20010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131104ll /* 0x20020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131136ll /* 0x20040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131200ll /* 0x20080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131328ll /* 0x20100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131584ll /* 0x20200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {132096ll /* 0x20400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {133120ll /* 0x20800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {135168ll /* 0x21000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {139264ll /* 0x22000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {147456ll /* 0x24000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 14}} /* shli r3, r2, 14 */ - }, - {163840ll /* 0x28000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 15}} /* shli r3, r2, 15 */ - }, - {196608ll /* 0x30000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 16}} /* shli r3, r2, 16 */ - }, - {262135ll /* 0x3fff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262136ll /* 0x3fff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262137ll /* 0x3fff9 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {262139ll /* 0x3fffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262140ll /* 0x3fffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262141ll /* 0x3fffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262142ll /* 0x3fffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262143ll /* 0x3ffff */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {262144ll /* 0x40000 */ , - {{6, 1, 18}} /* shli r2, r1, 18 */ - }, - {262145ll /* 0x40001 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {262146ll /* 0x40002 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {262147ll /* 0x40003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262148ll /* 0x40004 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {262149ll /* 0x40005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262150ll /* 0x40006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {262151ll /* 0x40007 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {262152ll /* 0x40008 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {262153ll /* 0x40009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262154ll /* 0x4000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {262160ll /* 0x40010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262176ll /* 0x40020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262208ll /* 0x40040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262272ll /* 0x40080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262400ll /* 0x40100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262656ll /* 0x40200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {263168ll /* 0x40400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {264192ll /* 0x40800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {266240ll /* 0x41000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {270336ll /* 0x42000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {278528ll /* 0x44000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {294912ll /* 0x48000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 15}} /* shli r3, r2, 15 */ - }, - {327680ll /* 0x50000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 16}} /* shli r3, r2, 16 */ - }, - {393216ll /* 0x60000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 17}} /* shli r3, r2, 17 */ - }, - {524279ll /* 0x7fff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524280ll /* 0x7fff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524281ll /* 0x7fff9 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {524283ll /* 0x7fffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524284ll /* 0x7fffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524285ll /* 0x7fffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524286ll /* 0x7fffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524287ll /* 0x7ffff */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {524288ll /* 0x80000 */ , - {{6, 1, 19}} /* shli r2, r1, 19 */ - }, - {524289ll /* 0x80001 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {524290ll /* 0x80002 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {524291ll /* 0x80003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524292ll /* 0x80004 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {524293ll /* 0x80005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524294ll /* 0x80006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {524295ll /* 0x80007 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {524296ll /* 0x80008 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {524297ll /* 0x80009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524298ll /* 0x8000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {524304ll /* 0x80010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524320ll /* 0x80020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524352ll /* 0x80040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524416ll /* 0x80080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524544ll /* 0x80100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524800ll /* 0x80200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {525312ll /* 0x80400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {526336ll /* 0x80800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {528384ll /* 0x81000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {532480ll /* 0x82000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {540672ll /* 0x84000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {557056ll /* 0x88000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {589824ll /* 0x90000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 16}} /* shli r3, r2, 16 */ - }, - {655360ll /* 0xa0000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 17}} /* shli r3, r2, 17 */ - }, - {786432ll /* 0xc0000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 18}} /* shli r3, r2, 18 */ - }, - {1048567ll /* 0xffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048568ll /* 0xffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048569ll /* 0xffff9 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {1048571ll /* 0xffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048572ll /* 0xffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048573ll /* 0xffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048574ll /* 0xffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048575ll /* 0xfffff */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {1048576ll /* 0x100000 */ , - {{6, 1, 20}} /* shli r2, r1, 20 */ - }, - {1048577ll /* 0x100001 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {1048578ll /* 0x100002 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {1048579ll /* 0x100003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048580ll /* 0x100004 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {1048581ll /* 0x100005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048582ll /* 0x100006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1048583ll /* 0x100007 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {1048584ll /* 0x100008 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {1048585ll /* 0x100009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048586ll /* 0x10000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1048592ll /* 0x100010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048608ll /* 0x100020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048640ll /* 0x100040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048704ll /* 0x100080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048832ll /* 0x100100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1049088ll /* 0x100200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1049600ll /* 0x100400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1050624ll /* 0x100800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1052672ll /* 0x101000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1056768ll /* 0x102000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1064960ll /* 0x104000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1081344ll /* 0x108000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1114112ll /* 0x110000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1179648ll /* 0x120000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 17}} /* shli r3, r2, 17 */ - }, - {1310720ll /* 0x140000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 18}} /* shli r3, r2, 18 */ - }, - {1572864ll /* 0x180000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 19}} /* shli r3, r2, 19 */ - }, - {2097143ll /* 0x1ffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097144ll /* 0x1ffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097145ll /* 0x1ffff9 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {2097147ll /* 0x1ffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097148ll /* 0x1ffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097149ll /* 0x1ffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097150ll /* 0x1ffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097151ll /* 0x1fffff */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {2097152ll /* 0x200000 */ , - {{6, 1, 21}} /* shli r2, r1, 21 */ - }, - {2097153ll /* 0x200001 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {2097154ll /* 0x200002 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {2097155ll /* 0x200003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097156ll /* 0x200004 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {2097157ll /* 0x200005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097158ll /* 0x200006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2097159ll /* 0x200007 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {2097160ll /* 0x200008 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {2097161ll /* 0x200009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097162ll /* 0x20000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2097168ll /* 0x200010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097184ll /* 0x200020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097216ll /* 0x200040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097280ll /* 0x200080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097408ll /* 0x200100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097664ll /* 0x200200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2098176ll /* 0x200400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2099200ll /* 0x200800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2101248ll /* 0x201000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2105344ll /* 0x202000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2113536ll /* 0x204000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2129920ll /* 0x208000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2162688ll /* 0x210000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2228224ll /* 0x220000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2359296ll /* 0x240000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 18}} /* shli r3, r2, 18 */ - }, - {2621440ll /* 0x280000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 19}} /* shli r3, r2, 19 */ - }, - {3145728ll /* 0x300000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 20}} /* shli r3, r2, 20 */ - }, - {4194295ll /* 0x3ffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194296ll /* 0x3ffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194297ll /* 0x3ffff9 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {4194299ll /* 0x3ffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194300ll /* 0x3ffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194301ll /* 0x3ffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194302ll /* 0x3ffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194303ll /* 0x3fffff */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {4194304ll /* 0x400000 */ , - {{6, 1, 22}} /* shli r2, r1, 22 */ - }, - {4194305ll /* 0x400001 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {4194306ll /* 0x400002 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {4194307ll /* 0x400003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194308ll /* 0x400004 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {4194309ll /* 0x400005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194310ll /* 0x400006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4194311ll /* 0x400007 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {4194312ll /* 0x400008 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {4194313ll /* 0x400009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194314ll /* 0x40000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4194320ll /* 0x400010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194336ll /* 0x400020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194368ll /* 0x400040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194432ll /* 0x400080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194560ll /* 0x400100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194816ll /* 0x400200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4195328ll /* 0x400400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4196352ll /* 0x400800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4198400ll /* 0x401000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4202496ll /* 0x402000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4210688ll /* 0x404000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4227072ll /* 0x408000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4259840ll /* 0x410000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4325376ll /* 0x420000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4456448ll /* 0x440000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4718592ll /* 0x480000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 19}} /* shli r3, r2, 19 */ - }, - {5242880ll /* 0x500000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 20}} /* shli r3, r2, 20 */ - }, - {6291456ll /* 0x600000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 21}} /* shli r3, r2, 21 */ - }, - {8388599ll /* 0x7ffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388600ll /* 0x7ffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388601ll /* 0x7ffff9 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {8388603ll /* 0x7ffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388604ll /* 0x7ffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388605ll /* 0x7ffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388606ll /* 0x7ffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388607ll /* 0x7fffff */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {8388608ll /* 0x800000 */ , - {{6, 1, 23}} /* shli r2, r1, 23 */ - }, - {8388609ll /* 0x800001 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {8388610ll /* 0x800002 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {8388611ll /* 0x800003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388612ll /* 0x800004 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {8388613ll /* 0x800005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388614ll /* 0x800006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {8388615ll /* 0x800007 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {8388616ll /* 0x800008 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {8388617ll /* 0x800009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388618ll /* 0x80000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {8388624ll /* 0x800010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388640ll /* 0x800020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388672ll /* 0x800040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388736ll /* 0x800080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388864ll /* 0x800100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8389120ll /* 0x800200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8389632ll /* 0x800400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8390656ll /* 0x800800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8392704ll /* 0x801000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8396800ll /* 0x802000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8404992ll /* 0x804000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8421376ll /* 0x808000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8454144ll /* 0x810000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8519680ll /* 0x820000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8650752ll /* 0x840000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8912896ll /* 0x880000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9437184ll /* 0x900000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 20}} /* shli r3, r2, 20 */ - }, - {10485760ll /* 0xa00000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 21}} /* shli r3, r2, 21 */ - }, - {11796480ll /* 0xb40000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 18}} /* shli r4, r3, 18 */ - }, - {12582912ll /* 0xc00000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 22}} /* shli r3, r2, 22 */ - }, - {16777207ll /* 0xfffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777208ll /* 0xfffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777209ll /* 0xfffff9 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {16777211ll /* 0xfffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777212ll /* 0xfffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777213ll /* 0xfffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777214ll /* 0xfffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777215ll /* 0xffffff */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {16777216ll /* 0x1000000 */ , - {{6, 1, 24}} /* shli r2, r1, 24 */ - }, - {16777217ll /* 0x1000001 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {16777218ll /* 0x1000002 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {16777219ll /* 0x1000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777220ll /* 0x1000004 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {16777221ll /* 0x1000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777222ll /* 0x1000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {16777223ll /* 0x1000007 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {16777224ll /* 0x1000008 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {16777225ll /* 0x1000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777226ll /* 0x100000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {16777232ll /* 0x1000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777248ll /* 0x1000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777280ll /* 0x1000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777344ll /* 0x1000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777472ll /* 0x1000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777728ll /* 0x1000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16778240ll /* 0x1000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16779264ll /* 0x1000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16781312ll /* 0x1001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16785408ll /* 0x1002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16793600ll /* 0x1004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16809984ll /* 0x1008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16842752ll /* 0x1010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16908288ll /* 0x1020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17039360ll /* 0x1040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17301504ll /* 0x1080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17825792ll /* 0x1100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18874368ll /* 0x1200000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 21}} /* shli r3, r2, 21 */ - }, - {20971520ll /* 0x1400000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 22}} /* shli r3, r2, 22 */ - }, - {23592960ll /* 0x1680000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {5, 2, 2}, /* shl3add r3, r2, r2 */ - {6, 3, 19}} /* shli r4, r3, 19 */ - }, - {25165824ll /* 0x1800000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 23}} /* shli r3, r2, 23 */ - }, - {33554423ll /* 0x1fffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554424ll /* 0x1fffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554425ll /* 0x1fffff9 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {33554427ll /* 0x1fffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554428ll /* 0x1fffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554429ll /* 0x1fffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554430ll /* 0x1fffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554431ll /* 0x1ffffff */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {33554432ll /* 0x2000000 */ , - {{6, 1, 25}} /* shli r2, r1, 25 */ - }, - {33554433ll /* 0x2000001 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {33554434ll /* 0x2000002 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {33554435ll /* 0x2000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554436ll /* 0x2000004 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {33554437ll /* 0x2000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554438ll /* 0x2000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {33554439ll /* 0x2000007 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {33554440ll /* 0x2000008 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {33554441ll /* 0x2000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554442ll /* 0x200000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {33554448ll /* 0x2000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554464ll /* 0x2000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554496ll /* 0x2000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554560ll /* 0x2000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554688ll /* 0x2000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554944ll /* 0x2000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33555456ll /* 0x2000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33556480ll /* 0x2000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33558528ll /* 0x2001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33562624ll /* 0x2002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33570816ll /* 0x2004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33587200ll /* 0x2008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33619968ll /* 0x2010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33685504ll /* 0x2020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33816576ll /* 0x2040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34078720ll /* 0x2080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34603008ll /* 0x2100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35651584ll /* 0x2200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {37748736ll /* 0x2400000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 22}} /* shli r3, r2, 22 */ - }, - {41943040ll /* 0x2800000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 23}} /* shli r3, r2, 23 */ - }, - {50331648ll /* 0x3000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 24}} /* shli r3, r2, 24 */ - }, - {67108855ll /* 0x3fffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108856ll /* 0x3fffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108857ll /* 0x3fffff9 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {67108859ll /* 0x3fffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108860ll /* 0x3fffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108861ll /* 0x3fffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108862ll /* 0x3fffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108863ll /* 0x3ffffff */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {67108864ll /* 0x4000000 */ , - {{6, 1, 26}} /* shli r2, r1, 26 */ - }, - {67108865ll /* 0x4000001 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {67108866ll /* 0x4000002 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {67108867ll /* 0x4000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108868ll /* 0x4000004 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {67108869ll /* 0x4000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108870ll /* 0x4000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {67108871ll /* 0x4000007 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {67108872ll /* 0x4000008 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {67108873ll /* 0x4000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108874ll /* 0x400000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {67108880ll /* 0x4000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108896ll /* 0x4000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108928ll /* 0x4000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108992ll /* 0x4000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67109120ll /* 0x4000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67109376ll /* 0x4000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67109888ll /* 0x4000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67110912ll /* 0x4000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67112960ll /* 0x4001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67117056ll /* 0x4002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67125248ll /* 0x4004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67141632ll /* 0x4008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67174400ll /* 0x4010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67239936ll /* 0x4020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67371008ll /* 0x4040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67633152ll /* 0x4080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68157440ll /* 0x4100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {69206016ll /* 0x4200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {71303168ll /* 0x4400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {75497472ll /* 0x4800000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 23}} /* shli r3, r2, 23 */ - }, - {83886080ll /* 0x5000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 24}} /* shli r3, r2, 24 */ - }, - {100663296ll /* 0x6000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 25}} /* shli r3, r2, 25 */ - }, - {134217719ll /* 0x7fffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217720ll /* 0x7fffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217721ll /* 0x7fffff9 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {134217723ll /* 0x7fffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217724ll /* 0x7fffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217725ll /* 0x7fffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217726ll /* 0x7fffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217727ll /* 0x7ffffff */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {134217728ll /* 0x8000000 */ , - {{6, 1, 27}} /* shli r2, r1, 27 */ - }, - {134217729ll /* 0x8000001 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {134217730ll /* 0x8000002 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {134217731ll /* 0x8000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217732ll /* 0x8000004 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {134217733ll /* 0x8000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217734ll /* 0x8000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {134217735ll /* 0x8000007 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {134217736ll /* 0x8000008 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {134217737ll /* 0x8000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217738ll /* 0x800000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {134217744ll /* 0x8000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217760ll /* 0x8000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217792ll /* 0x8000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217856ll /* 0x8000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217984ll /* 0x8000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134218240ll /* 0x8000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134218752ll /* 0x8000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134219776ll /* 0x8000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134221824ll /* 0x8001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134225920ll /* 0x8002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134234112ll /* 0x8004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134250496ll /* 0x8008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134283264ll /* 0x8010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134348800ll /* 0x8020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134479872ll /* 0x8040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134742016ll /* 0x8080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {135266304ll /* 0x8100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {136314880ll /* 0x8200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {138412032ll /* 0x8400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {142606336ll /* 0x8800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {150994944ll /* 0x9000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 24}} /* shli r3, r2, 24 */ - }, - {167772160ll /* 0xa000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 25}} /* shli r3, r2, 25 */ - }, - {201326592ll /* 0xc000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 26}} /* shli r3, r2, 26 */ - }, - {268435447ll /* 0xffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435448ll /* 0xffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435449ll /* 0xffffff9 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {268435451ll /* 0xffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435452ll /* 0xffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435453ll /* 0xffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435454ll /* 0xffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435455ll /* 0xfffffff */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {268435456ll /* 0x10000000 */ , - {{6, 1, 28}} /* shli r2, r1, 28 */ - }, - {268435457ll /* 0x10000001 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {268435458ll /* 0x10000002 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {268435459ll /* 0x10000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435460ll /* 0x10000004 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {268435461ll /* 0x10000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435462ll /* 0x10000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {268435463ll /* 0x10000007 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {268435464ll /* 0x10000008 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {268435465ll /* 0x10000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435466ll /* 0x1000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {268435472ll /* 0x10000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435488ll /* 0x10000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435520ll /* 0x10000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435584ll /* 0x10000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435712ll /* 0x10000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435968ll /* 0x10000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268436480ll /* 0x10000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268437504ll /* 0x10000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268439552ll /* 0x10001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268443648ll /* 0x10002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268451840ll /* 0x10004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268468224ll /* 0x10008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268500992ll /* 0x10010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268566528ll /* 0x10020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268697600ll /* 0x10040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268959744ll /* 0x10080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {269484032ll /* 0x10100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {270532608ll /* 0x10200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {272629760ll /* 0x10400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {276824064ll /* 0x10800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {285212672ll /* 0x11000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {301989888ll /* 0x12000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 25}} /* shli r3, r2, 25 */ - }, - {335544320ll /* 0x14000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 26}} /* shli r3, r2, 26 */ - }, - {402653184ll /* 0x18000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 27}} /* shli r3, r2, 27 */ - }, - {536870903ll /* 0x1ffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870904ll /* 0x1ffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870905ll /* 0x1ffffff9 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {536870907ll /* 0x1ffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870908ll /* 0x1ffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870909ll /* 0x1ffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870910ll /* 0x1ffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870911ll /* 0x1fffffff */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {536870912ll /* 0x20000000 */ , - {{6, 1, 29}} /* shli r2, r1, 29 */ - }, - {536870913ll /* 0x20000001 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {536870914ll /* 0x20000002 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {536870915ll /* 0x20000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870916ll /* 0x20000004 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {536870917ll /* 0x20000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870918ll /* 0x20000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {536870919ll /* 0x20000007 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {536870920ll /* 0x20000008 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {536870921ll /* 0x20000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870922ll /* 0x2000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {536870928ll /* 0x20000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870944ll /* 0x20000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870976ll /* 0x20000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536871040ll /* 0x20000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536871168ll /* 0x20000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536871424ll /* 0x20000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536871936ll /* 0x20000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536872960ll /* 0x20000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536875008ll /* 0x20001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536879104ll /* 0x20002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536887296ll /* 0x20004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536903680ll /* 0x20008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536936448ll /* 0x20010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {537001984ll /* 0x20020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {537133056ll /* 0x20040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {537395200ll /* 0x20080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {537919488ll /* 0x20100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {538968064ll /* 0x20200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {541065216ll /* 0x20400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {545259520ll /* 0x20800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {553648128ll /* 0x21000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {570425344ll /* 0x22000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {603979776ll /* 0x24000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 26}} /* shli r3, r2, 26 */ - }, - {671088640ll /* 0x28000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 27}} /* shli r3, r2, 27 */ - }, - {805306368ll /* 0x30000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 28}} /* shli r3, r2, 28 */ - }, - {1073741815ll /* 0x3ffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741816ll /* 0x3ffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741817ll /* 0x3ffffff9 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {1073741819ll /* 0x3ffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741820ll /* 0x3ffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741821ll /* 0x3ffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741822ll /* 0x3ffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741823ll /* 0x3fffffff */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {1073741824ll /* 0x40000000 */ , - {{6, 1, 30}} /* shli r2, r1, 30 */ - }, - {1073741825ll /* 0x40000001 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {1073741826ll /* 0x40000002 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {1073741827ll /* 0x40000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741828ll /* 0x40000004 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {1073741829ll /* 0x40000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741830ll /* 0x40000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1073741831ll /* 0x40000007 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {1073741832ll /* 0x40000008 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {1073741833ll /* 0x40000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741834ll /* 0x4000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1073741840ll /* 0x40000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741856ll /* 0x40000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741888ll /* 0x40000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741952ll /* 0x40000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073742080ll /* 0x40000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073742336ll /* 0x40000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073742848ll /* 0x40000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073743872ll /* 0x40000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073745920ll /* 0x40001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073750016ll /* 0x40002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073758208ll /* 0x40004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073774592ll /* 0x40008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073807360ll /* 0x40010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073872896ll /* 0x40020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1074003968ll /* 0x40040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1074266112ll /* 0x40080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1074790400ll /* 0x40100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1075838976ll /* 0x40200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1077936128ll /* 0x40400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1082130432ll /* 0x40800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1090519040ll /* 0x41000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1107296256ll /* 0x42000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1140850688ll /* 0x44000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1207959552ll /* 0x48000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 27}} /* shli r3, r2, 27 */ - }, - {1342177280ll /* 0x50000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 28}} /* shli r3, r2, 28 */ - }, - {1610612736ll /* 0x60000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 29}} /* shli r3, r2, 29 */ - }, - {2147483639ll /* 0x7ffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483640ll /* 0x7ffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483641ll /* 0x7ffffff9 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {2147483643ll /* 0x7ffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483644ll /* 0x7ffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483645ll /* 0x7ffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483646ll /* 0x7ffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483647ll /* 0x7fffffff */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {2147483648ll /* 0x80000000 */ , - {{6, 1, 31}} /* shli r2, r1, 31 */ - }, - {2147483649ll /* 0x80000001 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {2147483650ll /* 0x80000002 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {2147483651ll /* 0x80000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147483652ll /* 0x80000004 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {2147483653ll /* 0x80000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147483654ll /* 0x80000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2147483655ll /* 0x80000007 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {2147483656ll /* 0x80000008 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {2147483657ll /* 0x80000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147483658ll /* 0x8000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2147483664ll /* 0x80000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147483680ll /* 0x80000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147483712ll /* 0x80000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147483776ll /* 0x80000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147483904ll /* 0x80000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147484160ll /* 0x80000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147484672ll /* 0x80000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147485696ll /* 0x80000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147487744ll /* 0x80001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147491840ll /* 0x80002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147500032ll /* 0x80004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147516416ll /* 0x80008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147549184ll /* 0x80010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147614720ll /* 0x80020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2147745792ll /* 0x80040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2148007936ll /* 0x80080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2148532224ll /* 0x80100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2149580800ll /* 0x80200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2151677952ll /* 0x80400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2155872256ll /* 0x80800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2164260864ll /* 0x81000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2181038080ll /* 0x82000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2214592512ll /* 0x84000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2281701376ll /* 0x88000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2415919104ll /* 0x90000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 28}} /* shli r3, r2, 28 */ - }, - {2684354560ll /* 0xa0000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 29}} /* shli r3, r2, 29 */ - }, - {3221225472ll /* 0xc0000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 30}} /* shli r3, r2, 30 */ - }, - {4294967287ll /* 0xfffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4294967288ll /* 0xfffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4294967289ll /* 0xfffffff9 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {4294967291ll /* 0xfffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4294967292ll /* 0xfffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4294967293ll /* 0xfffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4294967294ll /* 0xfffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4294967295ll /* 0xffffffff */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {4294967296ll /* 0x100000000 */ , - {{6, 1, 32}} /* shli r2, r1, 32 */ - }, - {4294967297ll /* 0x100000001 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {4294967298ll /* 0x100000002 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {4294967299ll /* 0x100000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294967300ll /* 0x100000004 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {4294967301ll /* 0x100000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294967302ll /* 0x100000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4294967303ll /* 0x100000007 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {4294967304ll /* 0x100000008 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {4294967305ll /* 0x100000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294967306ll /* 0x10000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4294967312ll /* 0x100000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294967328ll /* 0x100000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294967360ll /* 0x100000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294967424ll /* 0x100000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294967552ll /* 0x100000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294967808ll /* 0x100000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294968320ll /* 0x100000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294969344ll /* 0x100000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294971392ll /* 0x100001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294975488ll /* 0x100002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4294983680ll /* 0x100004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4295000064ll /* 0x100008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4295032832ll /* 0x100010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4295098368ll /* 0x100020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4295229440ll /* 0x100040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4295491584ll /* 0x100080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4296015872ll /* 0x100100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4297064448ll /* 0x100200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4299161600ll /* 0x100400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4303355904ll /* 0x100800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4311744512ll /* 0x101000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4328521728ll /* 0x102000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4362076160ll /* 0x104000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4429185024ll /* 0x108000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4563402752ll /* 0x110000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 32}, /* shli r3, r1, 32 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4831838208ll /* 0x120000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 29}} /* shli r3, r2, 29 */ - }, - {5368709120ll /* 0x140000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 30}} /* shli r3, r2, 30 */ - }, - {6442450944ll /* 0x180000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 31}} /* shli r3, r2, 31 */ - }, - {8589934583ll /* 0x1fffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8589934584ll /* 0x1fffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8589934585ll /* 0x1fffffff9 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {8589934587ll /* 0x1fffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8589934588ll /* 0x1fffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8589934589ll /* 0x1fffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8589934590ll /* 0x1fffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8589934591ll /* 0x1ffffffff */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {8589934592ll /* 0x200000000 */ , - {{6, 1, 33}} /* shli r2, r1, 33 */ - }, - {8589934593ll /* 0x200000001 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {8589934594ll /* 0x200000002 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {8589934595ll /* 0x200000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589934596ll /* 0x200000004 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {8589934597ll /* 0x200000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589934598ll /* 0x200000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {8589934599ll /* 0x200000007 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {8589934600ll /* 0x200000008 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {8589934601ll /* 0x200000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589934602ll /* 0x20000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {8589934608ll /* 0x200000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589934624ll /* 0x200000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589934656ll /* 0x200000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589934720ll /* 0x200000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589934848ll /* 0x200000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589935104ll /* 0x200000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589935616ll /* 0x200000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589936640ll /* 0x200000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589938688ll /* 0x200001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589942784ll /* 0x200002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589950976ll /* 0x200004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8589967360ll /* 0x200008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8590000128ll /* 0x200010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8590065664ll /* 0x200020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8590196736ll /* 0x200040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8590458880ll /* 0x200080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8590983168ll /* 0x200100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8592031744ll /* 0x200200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8594128896ll /* 0x200400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8598323200ll /* 0x200800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8606711808ll /* 0x201000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8623489024ll /* 0x202000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8657043456ll /* 0x204000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8724152320ll /* 0x208000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8858370048ll /* 0x210000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9126805504ll /* 0x220000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 33}, /* shli r3, r1, 33 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9663676416ll /* 0x240000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 30}} /* shli r3, r2, 30 */ - }, - {10737418240ll /* 0x280000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 31}} /* shli r3, r2, 31 */ - }, - {12884901888ll /* 0x300000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 32}} /* shli r3, r2, 32 */ - }, - {17179869175ll /* 0x3fffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17179869176ll /* 0x3fffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17179869177ll /* 0x3fffffff9 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {17179869179ll /* 0x3fffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17179869180ll /* 0x3fffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17179869181ll /* 0x3fffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17179869182ll /* 0x3fffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17179869183ll /* 0x3ffffffff */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {17179869184ll /* 0x400000000 */ , - {{6, 1, 34}} /* shli r2, r1, 34 */ - }, - {17179869185ll /* 0x400000001 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {17179869186ll /* 0x400000002 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {17179869187ll /* 0x400000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179869188ll /* 0x400000004 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {17179869189ll /* 0x400000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179869190ll /* 0x400000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {17179869191ll /* 0x400000007 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {17179869192ll /* 0x400000008 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {17179869193ll /* 0x400000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179869194ll /* 0x40000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {17179869200ll /* 0x400000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179869216ll /* 0x400000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179869248ll /* 0x400000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179869312ll /* 0x400000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179869440ll /* 0x400000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179869696ll /* 0x400000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179870208ll /* 0x400000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179871232ll /* 0x400000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179873280ll /* 0x400001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179877376ll /* 0x400002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179885568ll /* 0x400004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179901952ll /* 0x400008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17179934720ll /* 0x400010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17180000256ll /* 0x400020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17180131328ll /* 0x400040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17180393472ll /* 0x400080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17180917760ll /* 0x400100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17181966336ll /* 0x400200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17184063488ll /* 0x400400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17188257792ll /* 0x400800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17196646400ll /* 0x401000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17213423616ll /* 0x402000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17246978048ll /* 0x404000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17314086912ll /* 0x408000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17448304640ll /* 0x410000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17716740096ll /* 0x420000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18253611008ll /* 0x440000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 34}, /* shli r3, r1, 34 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {19327352832ll /* 0x480000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 31}} /* shli r3, r2, 31 */ - }, - {21474836480ll /* 0x500000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 32}} /* shli r3, r2, 32 */ - }, - {25769803776ll /* 0x600000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 33}} /* shli r3, r2, 33 */ - }, - {34359738359ll /* 0x7fffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {34359738360ll /* 0x7fffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {34359738361ll /* 0x7fffffff9 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {34359738363ll /* 0x7fffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {34359738364ll /* 0x7fffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {34359738365ll /* 0x7fffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {34359738366ll /* 0x7fffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {34359738367ll /* 0x7ffffffff */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {34359738368ll /* 0x800000000 */ , - {{6, 1, 35}} /* shli r2, r1, 35 */ - }, - {34359738369ll /* 0x800000001 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {34359738370ll /* 0x800000002 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {34359738371ll /* 0x800000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359738372ll /* 0x800000004 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {34359738373ll /* 0x800000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359738374ll /* 0x800000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {34359738375ll /* 0x800000007 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {34359738376ll /* 0x800000008 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {34359738377ll /* 0x800000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359738378ll /* 0x80000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {34359738384ll /* 0x800000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359738400ll /* 0x800000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359738432ll /* 0x800000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359738496ll /* 0x800000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359738624ll /* 0x800000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359738880ll /* 0x800000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359739392ll /* 0x800000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359740416ll /* 0x800000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359742464ll /* 0x800001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359746560ll /* 0x800002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359754752ll /* 0x800004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359771136ll /* 0x800008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359803904ll /* 0x800010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34359869440ll /* 0x800020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34360000512ll /* 0x800040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34360262656ll /* 0x800080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34360786944ll /* 0x800100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34361835520ll /* 0x800200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34363932672ll /* 0x800400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34368126976ll /* 0x800800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34376515584ll /* 0x801000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34393292800ll /* 0x802000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34426847232ll /* 0x804000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34493956096ll /* 0x808000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34628173824ll /* 0x810000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34896609280ll /* 0x820000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35433480192ll /* 0x840000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36507222016ll /* 0x880000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 35}, /* shli r3, r1, 35 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {38654705664ll /* 0x900000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 32}} /* shli r3, r2, 32 */ - }, - {42949672960ll /* 0xa00000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 33}} /* shli r3, r2, 33 */ - }, - {51539607552ll /* 0xc00000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 34}} /* shli r3, r2, 34 */ - }, - {68719476727ll /* 0xffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {68719476728ll /* 0xffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {68719476729ll /* 0xffffffff9 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {68719476731ll /* 0xffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {68719476732ll /* 0xffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {68719476733ll /* 0xffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {68719476734ll /* 0xffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {68719476735ll /* 0xfffffffff */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {68719476736ll /* 0x1000000000 */ , - {{6, 1, 36}} /* shli r2, r1, 36 */ - }, - {68719476737ll /* 0x1000000001 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {68719476738ll /* 0x1000000002 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {68719476739ll /* 0x1000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719476740ll /* 0x1000000004 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {68719476741ll /* 0x1000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719476742ll /* 0x1000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {68719476743ll /* 0x1000000007 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {68719476744ll /* 0x1000000008 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {68719476745ll /* 0x1000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719476746ll /* 0x100000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {68719476752ll /* 0x1000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719476768ll /* 0x1000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719476800ll /* 0x1000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719476864ll /* 0x1000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719476992ll /* 0x1000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719477248ll /* 0x1000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719477760ll /* 0x1000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719478784ll /* 0x1000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719480832ll /* 0x1000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719484928ll /* 0x1000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719493120ll /* 0x1000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719509504ll /* 0x1000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719542272ll /* 0x1000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719607808ll /* 0x1000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68719738880ll /* 0x1000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68720001024ll /* 0x1000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68720525312ll /* 0x1000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68721573888ll /* 0x1000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68723671040ll /* 0x1000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68727865344ll /* 0x1000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68736253952ll /* 0x1001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68753031168ll /* 0x1002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68786585600ll /* 0x1004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68853694464ll /* 0x1008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68987912192ll /* 0x1010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {69256347648ll /* 0x1020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {69793218560ll /* 0x1040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70866960384ll /* 0x1080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {73014444032ll /* 0x1100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 36}, /* shli r3, r1, 36 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {77309411328ll /* 0x1200000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 33}} /* shli r3, r2, 33 */ - }, - {85899345920ll /* 0x1400000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 34}} /* shli r3, r2, 34 */ - }, - {103079215104ll /* 0x1800000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 35}} /* shli r3, r2, 35 */ - }, - {137438953463ll /* 0x1ffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {137438953464ll /* 0x1ffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {137438953465ll /* 0x1ffffffff9 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {137438953467ll /* 0x1ffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {137438953468ll /* 0x1ffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {137438953469ll /* 0x1ffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {137438953470ll /* 0x1ffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {137438953471ll /* 0x1fffffffff */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {137438953472ll /* 0x2000000000 */ , - {{6, 1, 37}} /* shli r2, r1, 37 */ - }, - {137438953473ll /* 0x2000000001 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {137438953474ll /* 0x2000000002 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {137438953475ll /* 0x2000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438953476ll /* 0x2000000004 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {137438953477ll /* 0x2000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438953478ll /* 0x2000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {137438953479ll /* 0x2000000007 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {137438953480ll /* 0x2000000008 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {137438953481ll /* 0x2000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438953482ll /* 0x200000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {137438953488ll /* 0x2000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438953504ll /* 0x2000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438953536ll /* 0x2000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438953600ll /* 0x2000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438953728ll /* 0x2000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438953984ll /* 0x2000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438954496ll /* 0x2000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438955520ll /* 0x2000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438957568ll /* 0x2000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438961664ll /* 0x2000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438969856ll /* 0x2000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137438986240ll /* 0x2000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137439019008ll /* 0x2000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137439084544ll /* 0x2000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137439215616ll /* 0x2000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137439477760ll /* 0x2000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137440002048ll /* 0x2000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137441050624ll /* 0x2000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137443147776ll /* 0x2000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137447342080ll /* 0x2000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137455730688ll /* 0x2001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137472507904ll /* 0x2002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137506062336ll /* 0x2004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137573171200ll /* 0x2008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137707388928ll /* 0x2010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {137975824384ll /* 0x2020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {138512695296ll /* 0x2040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {139586437120ll /* 0x2080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {141733920768ll /* 0x2100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {146028888064ll /* 0x2200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 37}, /* shli r3, r1, 37 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {154618822656ll /* 0x2400000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 34}} /* shli r3, r2, 34 */ - }, - {171798691840ll /* 0x2800000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 35}} /* shli r3, r2, 35 */ - }, - {206158430208ll /* 0x3000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 36}} /* shli r3, r2, 36 */ - }, - {274877906935ll /* 0x3ffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {274877906936ll /* 0x3ffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {274877906937ll /* 0x3ffffffff9 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {274877906939ll /* 0x3ffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {274877906940ll /* 0x3ffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {274877906941ll /* 0x3ffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {274877906942ll /* 0x3ffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {274877906943ll /* 0x3fffffffff */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {274877906944ll /* 0x4000000000 */ , - {{6, 1, 38}} /* shli r2, r1, 38 */ - }, - {274877906945ll /* 0x4000000001 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {274877906946ll /* 0x4000000002 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {274877906947ll /* 0x4000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877906948ll /* 0x4000000004 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {274877906949ll /* 0x4000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877906950ll /* 0x4000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {274877906951ll /* 0x4000000007 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {274877906952ll /* 0x4000000008 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {274877906953ll /* 0x4000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877906954ll /* 0x400000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {274877906960ll /* 0x4000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877906976ll /* 0x4000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877907008ll /* 0x4000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877907072ll /* 0x4000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877907200ll /* 0x4000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877907456ll /* 0x4000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877907968ll /* 0x4000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877908992ll /* 0x4000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877911040ll /* 0x4000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877915136ll /* 0x4000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877923328ll /* 0x4000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877939712ll /* 0x4000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274877972480ll /* 0x4000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274878038016ll /* 0x4000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274878169088ll /* 0x4000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274878431232ll /* 0x4000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274878955520ll /* 0x4000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274880004096ll /* 0x4000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274882101248ll /* 0x4000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274886295552ll /* 0x4000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274894684160ll /* 0x4001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274911461376ll /* 0x4002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {274945015808ll /* 0x4004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {275012124672ll /* 0x4008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {275146342400ll /* 0x4010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {275414777856ll /* 0x4020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {275951648768ll /* 0x4040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {277025390592ll /* 0x4080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {279172874240ll /* 0x4100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {283467841536ll /* 0x4200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {292057776128ll /* 0x4400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 38}, /* shli r3, r1, 38 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {309237645312ll /* 0x4800000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 35}} /* shli r3, r2, 35 */ - }, - {343597383680ll /* 0x5000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 36}} /* shli r3, r2, 36 */ - }, - {412316860416ll /* 0x6000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 37}} /* shli r3, r2, 37 */ - }, - {549755813879ll /* 0x7ffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {549755813880ll /* 0x7ffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {549755813881ll /* 0x7ffffffff9 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {549755813883ll /* 0x7ffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {549755813884ll /* 0x7ffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {549755813885ll /* 0x7ffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {549755813886ll /* 0x7ffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {549755813887ll /* 0x7fffffffff */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {549755813888ll /* 0x8000000000 */ , - {{6, 1, 39}} /* shli r2, r1, 39 */ - }, - {549755813889ll /* 0x8000000001 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {549755813890ll /* 0x8000000002 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {549755813891ll /* 0x8000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755813892ll /* 0x8000000004 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {549755813893ll /* 0x8000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755813894ll /* 0x8000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {549755813895ll /* 0x8000000007 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {549755813896ll /* 0x8000000008 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {549755813897ll /* 0x8000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755813898ll /* 0x800000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {549755813904ll /* 0x8000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755813920ll /* 0x8000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755813952ll /* 0x8000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755814016ll /* 0x8000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755814144ll /* 0x8000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755814400ll /* 0x8000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755814912ll /* 0x8000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755815936ll /* 0x8000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755817984ll /* 0x8000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755822080ll /* 0x8000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755830272ll /* 0x8000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755846656ll /* 0x8000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755879424ll /* 0x8000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549755944960ll /* 0x8000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549756076032ll /* 0x8000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549756338176ll /* 0x8000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549756862464ll /* 0x8000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549757911040ll /* 0x8000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549760008192ll /* 0x8000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549764202496ll /* 0x8000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549772591104ll /* 0x8001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549789368320ll /* 0x8002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549822922752ll /* 0x8004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {549890031616ll /* 0x8008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {550024249344ll /* 0x8010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {550292684800ll /* 0x8020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {550829555712ll /* 0x8040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {551903297536ll /* 0x8080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {554050781184ll /* 0x8100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {558345748480ll /* 0x8200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {566935683072ll /* 0x8400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {584115552256ll /* 0x8800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 39}, /* shli r3, r1, 39 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {618475290624ll /* 0x9000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 36}} /* shli r3, r2, 36 */ - }, - {687194767360ll /* 0xa000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 37}} /* shli r3, r2, 37 */ - }, - {824633720832ll /* 0xc000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 38}} /* shli r3, r2, 38 */ - }, - {1099511627767ll /* 0xfffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1099511627768ll /* 0xfffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1099511627769ll /* 0xfffffffff9 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {1099511627771ll /* 0xfffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1099511627772ll /* 0xfffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1099511627773ll /* 0xfffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1099511627774ll /* 0xfffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1099511627775ll /* 0xffffffffff */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {1099511627776ll /* 0x10000000000 */ , - {{6, 1, 40}} /* shli r2, r1, 40 */ - }, - {1099511627777ll /* 0x10000000001 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {1099511627778ll /* 0x10000000002 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {1099511627779ll /* 0x10000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511627780ll /* 0x10000000004 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {1099511627781ll /* 0x10000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511627782ll /* 0x10000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1099511627783ll /* 0x10000000007 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {1099511627784ll /* 0x10000000008 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {1099511627785ll /* 0x10000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511627786ll /* 0x1000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1099511627792ll /* 0x10000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511627808ll /* 0x10000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511627840ll /* 0x10000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511627904ll /* 0x10000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511628032ll /* 0x10000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511628288ll /* 0x10000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511628800ll /* 0x10000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511629824ll /* 0x10000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511631872ll /* 0x10000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511635968ll /* 0x10000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511644160ll /* 0x10000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511660544ll /* 0x10000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511693312ll /* 0x10000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511758848ll /* 0x10000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099511889920ll /* 0x10000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099512152064ll /* 0x10000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099512676352ll /* 0x10000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099513724928ll /* 0x10000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099515822080ll /* 0x10000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099520016384ll /* 0x10000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099528404992ll /* 0x10001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099545182208ll /* 0x10002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099578736640ll /* 0x10004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099645845504ll /* 0x10008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1099780063232ll /* 0x10010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1100048498688ll /* 0x10020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1100585369600ll /* 0x10040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1101659111424ll /* 0x10080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1103806595072ll /* 0x10100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1108101562368ll /* 0x10200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1116691496960ll /* 0x10400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1133871366144ll /* 0x10800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1168231104512ll /* 0x11000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 40}, /* shli r3, r1, 40 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1236950581248ll /* 0x12000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 37}} /* shli r3, r2, 37 */ - }, - {1374389534720ll /* 0x14000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 38}} /* shli r3, r2, 38 */ - }, - {1649267441664ll /* 0x18000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 39}} /* shli r3, r2, 39 */ - }, - {2199023255543ll /* 0x1fffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2199023255544ll /* 0x1fffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2199023255545ll /* 0x1fffffffff9 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {2199023255547ll /* 0x1fffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2199023255548ll /* 0x1fffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2199023255549ll /* 0x1fffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2199023255550ll /* 0x1fffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2199023255551ll /* 0x1ffffffffff */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {2199023255552ll /* 0x20000000000 */ , - {{6, 1, 41}} /* shli r2, r1, 41 */ - }, - {2199023255553ll /* 0x20000000001 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {2199023255554ll /* 0x20000000002 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {2199023255555ll /* 0x20000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023255556ll /* 0x20000000004 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {2199023255557ll /* 0x20000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023255558ll /* 0x20000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2199023255559ll /* 0x20000000007 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {2199023255560ll /* 0x20000000008 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {2199023255561ll /* 0x20000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023255562ll /* 0x2000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2199023255568ll /* 0x20000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023255584ll /* 0x20000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023255616ll /* 0x20000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023255680ll /* 0x20000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023255808ll /* 0x20000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023256064ll /* 0x20000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023256576ll /* 0x20000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023257600ll /* 0x20000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023259648ll /* 0x20000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023263744ll /* 0x20000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023271936ll /* 0x20000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023288320ll /* 0x20000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023321088ll /* 0x20000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023386624ll /* 0x20000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023517696ll /* 0x20000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199023779840ll /* 0x20000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199024304128ll /* 0x20000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199025352704ll /* 0x20000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199027449856ll /* 0x20000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199031644160ll /* 0x20000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199040032768ll /* 0x20001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199056809984ll /* 0x20002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199090364416ll /* 0x20004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199157473280ll /* 0x20008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199291691008ll /* 0x20010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2199560126464ll /* 0x20020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2200096997376ll /* 0x20040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2201170739200ll /* 0x20080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2203318222848ll /* 0x20100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2207613190144ll /* 0x20200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2216203124736ll /* 0x20400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2233382993920ll /* 0x20800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2267742732288ll /* 0x21000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2336462209024ll /* 0x22000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 41}, /* shli r3, r1, 41 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2473901162496ll /* 0x24000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 38}} /* shli r3, r2, 38 */ - }, - {2748779069440ll /* 0x28000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 39}} /* shli r3, r2, 39 */ - }, - {3298534883328ll /* 0x30000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 40}} /* shli r3, r2, 40 */ - }, - {4398046511095ll /* 0x3fffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4398046511096ll /* 0x3fffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4398046511097ll /* 0x3fffffffff9 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {4398046511099ll /* 0x3fffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4398046511100ll /* 0x3fffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4398046511101ll /* 0x3fffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4398046511102ll /* 0x3fffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4398046511103ll /* 0x3ffffffffff */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {4398046511104ll /* 0x40000000000 */ , - {{6, 1, 42}} /* shli r2, r1, 42 */ - }, - {4398046511105ll /* 0x40000000001 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {4398046511106ll /* 0x40000000002 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {4398046511107ll /* 0x40000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046511108ll /* 0x40000000004 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {4398046511109ll /* 0x40000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046511110ll /* 0x40000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4398046511111ll /* 0x40000000007 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {4398046511112ll /* 0x40000000008 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {4398046511113ll /* 0x40000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046511114ll /* 0x4000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4398046511120ll /* 0x40000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046511136ll /* 0x40000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046511168ll /* 0x40000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046511232ll /* 0x40000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046511360ll /* 0x40000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046511616ll /* 0x40000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046512128ll /* 0x40000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046513152ll /* 0x40000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046515200ll /* 0x40000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046519296ll /* 0x40000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046527488ll /* 0x40000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046543872ll /* 0x40000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046576640ll /* 0x40000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046642176ll /* 0x40000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398046773248ll /* 0x40000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398047035392ll /* 0x40000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398047559680ll /* 0x40000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398048608256ll /* 0x40000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398050705408ll /* 0x40000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398054899712ll /* 0x40000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398063288320ll /* 0x40001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398080065536ll /* 0x40002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398113619968ll /* 0x40004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398180728832ll /* 0x40008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398314946560ll /* 0x40010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4398583382016ll /* 0x40020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4399120252928ll /* 0x40040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4400193994752ll /* 0x40080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4402341478400ll /* 0x40100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4406636445696ll /* 0x40200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4415226380288ll /* 0x40400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4432406249472ll /* 0x40800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4466765987840ll /* 0x41000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4535485464576ll /* 0x42000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4672924418048ll /* 0x44000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 42}, /* shli r3, r1, 42 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4947802324992ll /* 0x48000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 39}} /* shli r3, r2, 39 */ - }, - {5497558138880ll /* 0x50000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 40}} /* shli r3, r2, 40 */ - }, - {6597069766656ll /* 0x60000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 41}} /* shli r3, r2, 41 */ - }, - {8796093022199ll /* 0x7fffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8796093022200ll /* 0x7fffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8796093022201ll /* 0x7fffffffff9 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {8796093022203ll /* 0x7fffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8796093022204ll /* 0x7fffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8796093022205ll /* 0x7fffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8796093022206ll /* 0x7fffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8796093022207ll /* 0x7ffffffffff */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {8796093022208ll /* 0x80000000000 */ , - {{6, 1, 43}} /* shli r2, r1, 43 */ - }, - {8796093022209ll /* 0x80000000001 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {8796093022210ll /* 0x80000000002 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {8796093022211ll /* 0x80000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093022212ll /* 0x80000000004 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {8796093022213ll /* 0x80000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093022214ll /* 0x80000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {8796093022215ll /* 0x80000000007 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {8796093022216ll /* 0x80000000008 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {8796093022217ll /* 0x80000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093022218ll /* 0x8000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {8796093022224ll /* 0x80000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093022240ll /* 0x80000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093022272ll /* 0x80000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093022336ll /* 0x80000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093022464ll /* 0x80000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093022720ll /* 0x80000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093023232ll /* 0x80000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093024256ll /* 0x80000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093026304ll /* 0x80000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093030400ll /* 0x80000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093038592ll /* 0x80000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093054976ll /* 0x80000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093087744ll /* 0x80000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093153280ll /* 0x80000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093284352ll /* 0x80000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796093546496ll /* 0x80000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796094070784ll /* 0x80000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796095119360ll /* 0x80000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796097216512ll /* 0x80000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796101410816ll /* 0x80000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796109799424ll /* 0x80001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796126576640ll /* 0x80002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796160131072ll /* 0x80004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796227239936ll /* 0x80008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796361457664ll /* 0x80010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8796629893120ll /* 0x80020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8797166764032ll /* 0x80040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8798240505856ll /* 0x80080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8800387989504ll /* 0x80100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8804682956800ll /* 0x80200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8813272891392ll /* 0x80400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8830452760576ll /* 0x80800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8864812498944ll /* 0x81000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8933531975680ll /* 0x82000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9070970929152ll /* 0x84000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9345848836096ll /* 0x88000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 43}, /* shli r3, r1, 43 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9895604649984ll /* 0x90000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 40}} /* shli r3, r2, 40 */ - }, - {10995116277760ll /* 0xa0000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 41}} /* shli r3, r2, 41 */ - }, - {13194139533312ll /* 0xc0000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 42}} /* shli r3, r2, 42 */ - }, - {17592186044407ll /* 0xffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17592186044408ll /* 0xffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17592186044409ll /* 0xffffffffff9 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {17592186044411ll /* 0xffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17592186044412ll /* 0xffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17592186044413ll /* 0xffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17592186044414ll /* 0xffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {17592186044415ll /* 0xfffffffffff */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {17592186044416ll /* 0x100000000000 */ , - {{6, 1, 44}} /* shli r2, r1, 44 */ - }, - {17592186044417ll /* 0x100000000001 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {17592186044418ll /* 0x100000000002 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {17592186044419ll /* 0x100000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186044420ll /* 0x100000000004 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {17592186044421ll /* 0x100000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186044422ll /* 0x100000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {17592186044423ll /* 0x100000000007 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {17592186044424ll /* 0x100000000008 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {17592186044425ll /* 0x100000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186044426ll /* 0x10000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {17592186044432ll /* 0x100000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186044448ll /* 0x100000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186044480ll /* 0x100000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186044544ll /* 0x100000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186044672ll /* 0x100000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186044928ll /* 0x100000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186045440ll /* 0x100000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186046464ll /* 0x100000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186048512ll /* 0x100000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186052608ll /* 0x100000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186060800ll /* 0x100000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186077184ll /* 0x100000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186109952ll /* 0x100000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186175488ll /* 0x100000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186306560ll /* 0x100000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592186568704ll /* 0x100000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592187092992ll /* 0x100000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592188141568ll /* 0x100000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592190238720ll /* 0x100000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592194433024ll /* 0x100000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592202821632ll /* 0x100001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592219598848ll /* 0x100002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592253153280ll /* 0x100004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592320262144ll /* 0x100008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592454479872ll /* 0x100010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17592722915328ll /* 0x100020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17593259786240ll /* 0x100040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17594333528064ll /* 0x100080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17596481011712ll /* 0x100100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17600775979008ll /* 0x100200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17609365913600ll /* 0x100400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17626545782784ll /* 0x100800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17660905521152ll /* 0x101000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17729624997888ll /* 0x102000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17867063951360ll /* 0x104000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18141941858304ll /* 0x108000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18691697672192ll /* 0x110000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 44}, /* shli r3, r1, 44 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {19791209299968ll /* 0x120000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 41}} /* shli r3, r2, 41 */ - }, - {21990232555520ll /* 0x140000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 42}} /* shli r3, r2, 42 */ - }, - {26388279066624ll /* 0x180000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 43}} /* shli r3, r2, 43 */ - }, - {35184372088823ll /* 0x1ffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {35184372088824ll /* 0x1ffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {35184372088825ll /* 0x1ffffffffff9 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {35184372088827ll /* 0x1ffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {35184372088828ll /* 0x1ffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {35184372088829ll /* 0x1ffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {35184372088830ll /* 0x1ffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {35184372088831ll /* 0x1fffffffffff */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {35184372088832ll /* 0x200000000000 */ , - {{6, 1, 45}} /* shli r2, r1, 45 */ - }, - {35184372088833ll /* 0x200000000001 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {35184372088834ll /* 0x200000000002 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {35184372088835ll /* 0x200000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372088836ll /* 0x200000000004 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {35184372088837ll /* 0x200000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372088838ll /* 0x200000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {35184372088839ll /* 0x200000000007 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {35184372088840ll /* 0x200000000008 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {35184372088841ll /* 0x200000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372088842ll /* 0x20000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {35184372088848ll /* 0x200000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372088864ll /* 0x200000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372088896ll /* 0x200000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372088960ll /* 0x200000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372089088ll /* 0x200000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372089344ll /* 0x200000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372089856ll /* 0x200000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372090880ll /* 0x200000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372092928ll /* 0x200000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372097024ll /* 0x200000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372105216ll /* 0x200000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372121600ll /* 0x200000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372154368ll /* 0x200000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372219904ll /* 0x200000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372350976ll /* 0x200000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184372613120ll /* 0x200000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184373137408ll /* 0x200000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184374185984ll /* 0x200000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184376283136ll /* 0x200000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184380477440ll /* 0x200000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184388866048ll /* 0x200001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184405643264ll /* 0x200002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184439197696ll /* 0x200004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184506306560ll /* 0x200008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184640524288ll /* 0x200010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35184908959744ll /* 0x200020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35185445830656ll /* 0x200040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35186519572480ll /* 0x200080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35188667056128ll /* 0x200100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35192962023424ll /* 0x200200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35201551958016ll /* 0x200400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35218731827200ll /* 0x200800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35253091565568ll /* 0x201000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35321811042304ll /* 0x202000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35459249995776ll /* 0x204000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35734127902720ll /* 0x208000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36283883716608ll /* 0x210000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {37383395344384ll /* 0x220000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 45}, /* shli r3, r1, 45 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {39582418599936ll /* 0x240000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 42}} /* shli r3, r2, 42 */ - }, - {43980465111040ll /* 0x280000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 43}} /* shli r3, r2, 43 */ - }, - {52776558133248ll /* 0x300000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 44}} /* shli r3, r2, 44 */ - }, - {70368744177655ll /* 0x3ffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {70368744177656ll /* 0x3ffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {70368744177657ll /* 0x3ffffffffff9 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {70368744177659ll /* 0x3ffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {70368744177660ll /* 0x3ffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {70368744177661ll /* 0x3ffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {70368744177662ll /* 0x3ffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {70368744177663ll /* 0x3fffffffffff */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {70368744177664ll /* 0x400000000000 */ , - {{6, 1, 46}} /* shli r2, r1, 46 */ - }, - {70368744177665ll /* 0x400000000001 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {70368744177666ll /* 0x400000000002 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {70368744177667ll /* 0x400000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744177668ll /* 0x400000000004 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {70368744177669ll /* 0x400000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744177670ll /* 0x400000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {70368744177671ll /* 0x400000000007 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {70368744177672ll /* 0x400000000008 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {70368744177673ll /* 0x400000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744177674ll /* 0x40000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {70368744177680ll /* 0x400000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744177696ll /* 0x400000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744177728ll /* 0x400000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744177792ll /* 0x400000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744177920ll /* 0x400000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744178176ll /* 0x400000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744178688ll /* 0x400000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744179712ll /* 0x400000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744181760ll /* 0x400000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744185856ll /* 0x400000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744194048ll /* 0x400000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744210432ll /* 0x400000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744243200ll /* 0x400000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744308736ll /* 0x400000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744439808ll /* 0x400000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368744701952ll /* 0x400000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368745226240ll /* 0x400000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368746274816ll /* 0x400000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368748371968ll /* 0x400000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368752566272ll /* 0x400000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368760954880ll /* 0x400001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368777732096ll /* 0x400002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368811286528ll /* 0x400004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70368878395392ll /* 0x400008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70369012613120ll /* 0x400010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70369281048576ll /* 0x400020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70369817919488ll /* 0x400040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70370891661312ll /* 0x400080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70373039144960ll /* 0x400100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70377334112256ll /* 0x400200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70385924046848ll /* 0x400400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70403103916032ll /* 0x400800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70437463654400ll /* 0x401000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70506183131136ll /* 0x402000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70643622084608ll /* 0x404000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70918499991552ll /* 0x408000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {71468255805440ll /* 0x410000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72567767433216ll /* 0x420000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {74766790688768ll /* 0x440000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 46}, /* shli r3, r1, 46 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {79164837199872ll /* 0x480000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 43}} /* shli r3, r2, 43 */ - }, - {87960930222080ll /* 0x500000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 44}} /* shli r3, r2, 44 */ - }, - {105553116266496ll /* 0x600000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 45}} /* shli r3, r2, 45 */ - }, - {140737488355319ll /* 0x7ffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {140737488355320ll /* 0x7ffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {140737488355321ll /* 0x7ffffffffff9 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {140737488355323ll /* 0x7ffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {140737488355324ll /* 0x7ffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {140737488355325ll /* 0x7ffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {140737488355326ll /* 0x7ffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {140737488355327ll /* 0x7fffffffffff */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {140737488355328ll /* 0x800000000000 */ , - {{6, 1, 47}} /* shli r2, r1, 47 */ - }, - {140737488355329ll /* 0x800000000001 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {140737488355330ll /* 0x800000000002 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {140737488355331ll /* 0x800000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488355332ll /* 0x800000000004 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {140737488355333ll /* 0x800000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488355334ll /* 0x800000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {140737488355335ll /* 0x800000000007 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {140737488355336ll /* 0x800000000008 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {140737488355337ll /* 0x800000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488355338ll /* 0x80000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {140737488355344ll /* 0x800000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488355360ll /* 0x800000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488355392ll /* 0x800000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488355456ll /* 0x800000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488355584ll /* 0x800000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488355840ll /* 0x800000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488356352ll /* 0x800000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488357376ll /* 0x800000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488359424ll /* 0x800000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488363520ll /* 0x800000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488371712ll /* 0x800000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488388096ll /* 0x800000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488420864ll /* 0x800000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488486400ll /* 0x800000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488617472ll /* 0x800000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737488879616ll /* 0x800000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737489403904ll /* 0x800000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737490452480ll /* 0x800000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737492549632ll /* 0x800000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737496743936ll /* 0x800000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737505132544ll /* 0x800001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737521909760ll /* 0x800002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737555464192ll /* 0x800004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737622573056ll /* 0x800008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140737756790784ll /* 0x800010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140738025226240ll /* 0x800020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140738562097152ll /* 0x800040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140739635838976ll /* 0x800080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140741783322624ll /* 0x800100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140746078289920ll /* 0x800200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140754668224512ll /* 0x800400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140771848093696ll /* 0x800800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140806207832064ll /* 0x801000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {140874927308800ll /* 0x802000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {141012366262272ll /* 0x804000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {141287244169216ll /* 0x808000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {141836999983104ll /* 0x810000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {142936511610880ll /* 0x820000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {145135534866432ll /* 0x840000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {149533581377536ll /* 0x880000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 47}, /* shli r3, r1, 47 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {158329674399744ll /* 0x900000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 44}} /* shli r3, r2, 44 */ - }, - {175921860444160ll /* 0xa00000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 45}} /* shli r3, r2, 45 */ - }, - {211106232532992ll /* 0xc00000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 46}} /* shli r3, r2, 46 */ - }, - {281474976710647ll /* 0xfffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {281474976710648ll /* 0xfffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {281474976710649ll /* 0xfffffffffff9 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {281474976710651ll /* 0xfffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {281474976710652ll /* 0xfffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {281474976710653ll /* 0xfffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {281474976710654ll /* 0xfffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {281474976710655ll /* 0xffffffffffff */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {281474976710656ll /* 0x1000000000000 */ , - {{6, 1, 48}} /* shli r2, r1, 48 */ - }, - {281474976710657ll /* 0x1000000000001 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {281474976710658ll /* 0x1000000000002 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {281474976710659ll /* 0x1000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976710660ll /* 0x1000000000004 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {281474976710661ll /* 0x1000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976710662ll /* 0x1000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {281474976710663ll /* 0x1000000000007 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {281474976710664ll /* 0x1000000000008 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {281474976710665ll /* 0x1000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976710666ll /* 0x100000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {281474976710672ll /* 0x1000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976710688ll /* 0x1000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976710720ll /* 0x1000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976710784ll /* 0x1000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976710912ll /* 0x1000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976711168ll /* 0x1000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976711680ll /* 0x1000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976712704ll /* 0x1000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976714752ll /* 0x1000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976718848ll /* 0x1000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976727040ll /* 0x1000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976743424ll /* 0x1000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976776192ll /* 0x1000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976841728ll /* 0x1000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474976972800ll /* 0x1000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474977234944ll /* 0x1000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474977759232ll /* 0x1000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474978807808ll /* 0x1000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474980904960ll /* 0x1000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474985099264ll /* 0x1000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281474993487872ll /* 0x1000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281475010265088ll /* 0x1000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281475043819520ll /* 0x1000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281475110928384ll /* 0x1000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281475245146112ll /* 0x1000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281475513581568ll /* 0x1000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281476050452480ll /* 0x1000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281477124194304ll /* 0x1000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281479271677952ll /* 0x1000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281483566645248ll /* 0x1000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281492156579840ll /* 0x1000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281509336449024ll /* 0x1000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281543696187392ll /* 0x1001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281612415664128ll /* 0x1002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {281749854617600ll /* 0x1004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {282024732524544ll /* 0x1008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {282574488338432ll /* 0x1010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {283673999966208ll /* 0x1020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {285873023221760ll /* 0x1040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {290271069732864ll /* 0x1080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {299067162755072ll /* 0x1100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 48}, /* shli r3, r1, 48 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {316659348799488ll /* 0x1200000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 45}} /* shli r3, r2, 45 */ - }, - {351843720888320ll /* 0x1400000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 46}} /* shli r3, r2, 46 */ - }, - {422212465065984ll /* 0x1800000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 47}} /* shli r3, r2, 47 */ - }, - {562949953421303ll /* 0x1fffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {562949953421304ll /* 0x1fffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {562949953421305ll /* 0x1fffffffffff9 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {562949953421307ll /* 0x1fffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {562949953421308ll /* 0x1fffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {562949953421309ll /* 0x1fffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {562949953421310ll /* 0x1fffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {562949953421311ll /* 0x1ffffffffffff */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {562949953421312ll /* 0x2000000000000 */ , - {{6, 1, 49}} /* shli r2, r1, 49 */ - }, - {562949953421313ll /* 0x2000000000001 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {562949953421314ll /* 0x2000000000002 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {562949953421315ll /* 0x2000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953421316ll /* 0x2000000000004 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {562949953421317ll /* 0x2000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953421318ll /* 0x2000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {562949953421319ll /* 0x2000000000007 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {562949953421320ll /* 0x2000000000008 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {562949953421321ll /* 0x2000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953421322ll /* 0x200000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {562949953421328ll /* 0x2000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953421344ll /* 0x2000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953421376ll /* 0x2000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953421440ll /* 0x2000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953421568ll /* 0x2000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953421824ll /* 0x2000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953422336ll /* 0x2000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953423360ll /* 0x2000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953425408ll /* 0x2000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953429504ll /* 0x2000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953437696ll /* 0x2000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953454080ll /* 0x2000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953486848ll /* 0x2000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953552384ll /* 0x2000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953683456ll /* 0x2000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949953945600ll /* 0x2000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949954469888ll /* 0x2000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949955518464ll /* 0x2000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949957615616ll /* 0x2000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949961809920ll /* 0x2000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949970198528ll /* 0x2000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562949986975744ll /* 0x2000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562950020530176ll /* 0x2000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562950087639040ll /* 0x2000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562950221856768ll /* 0x2000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562950490292224ll /* 0x2000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562951027163136ll /* 0x2000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562952100904960ll /* 0x2000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562954248388608ll /* 0x2000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562958543355904ll /* 0x2000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562967133290496ll /* 0x2000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {562984313159680ll /* 0x2000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {563018672898048ll /* 0x2001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {563087392374784ll /* 0x2002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {563224831328256ll /* 0x2004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {563499709235200ll /* 0x2008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {564049465049088ll /* 0x2010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {565148976676864ll /* 0x2020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {567347999932416ll /* 0x2040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {571746046443520ll /* 0x2080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {580542139465728ll /* 0x2100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {598134325510144ll /* 0x2200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 49}, /* shli r3, r1, 49 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {633318697598976ll /* 0x2400000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 46}} /* shli r3, r2, 46 */ - }, - {703687441776640ll /* 0x2800000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 47}} /* shli r3, r2, 47 */ - }, - {844424930131968ll /* 0x3000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 48}} /* shli r3, r2, 48 */ - }, - {1125899906842615ll /* 0x3fffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1125899906842616ll /* 0x3fffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1125899906842617ll /* 0x3fffffffffff9 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {1125899906842619ll /* 0x3fffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1125899906842620ll /* 0x3fffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1125899906842621ll /* 0x3fffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1125899906842622ll /* 0x3fffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1125899906842623ll /* 0x3ffffffffffff */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {1125899906842624ll /* 0x4000000000000 */ , - {{6, 1, 50}} /* shli r2, r1, 50 */ - }, - {1125899906842625ll /* 0x4000000000001 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {1125899906842626ll /* 0x4000000000002 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {1125899906842627ll /* 0x4000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906842628ll /* 0x4000000000004 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {1125899906842629ll /* 0x4000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906842630ll /* 0x4000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1125899906842631ll /* 0x4000000000007 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {1125899906842632ll /* 0x4000000000008 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {1125899906842633ll /* 0x4000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906842634ll /* 0x400000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1125899906842640ll /* 0x4000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906842656ll /* 0x4000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906842688ll /* 0x4000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906842752ll /* 0x4000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906842880ll /* 0x4000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906843136ll /* 0x4000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906843648ll /* 0x4000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906844672ll /* 0x4000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906846720ll /* 0x4000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906850816ll /* 0x4000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906859008ll /* 0x4000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906875392ll /* 0x4000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906908160ll /* 0x4000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899906973696ll /* 0x4000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899907104768ll /* 0x4000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899907366912ll /* 0x4000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899907891200ll /* 0x4000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899908939776ll /* 0x4000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899911036928ll /* 0x4000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899915231232ll /* 0x4000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899923619840ll /* 0x4000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899940397056ll /* 0x4000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125899973951488ll /* 0x4000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125900041060352ll /* 0x4000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125900175278080ll /* 0x4000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125900443713536ll /* 0x4000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125900980584448ll /* 0x4000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125902054326272ll /* 0x4000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125904201809920ll /* 0x4000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125908496777216ll /* 0x4000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125917086711808ll /* 0x4000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125934266580992ll /* 0x4000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1125968626319360ll /* 0x4001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1126037345796096ll /* 0x4002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1126174784749568ll /* 0x4004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1126449662656512ll /* 0x4008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1126999418470400ll /* 0x4010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1128098930098176ll /* 0x4020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1130297953353728ll /* 0x4040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1134695999864832ll /* 0x4080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1143492092887040ll /* 0x4100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1161084278931456ll /* 0x4200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1196268651020288ll /* 0x4400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 50}, /* shli r3, r1, 50 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1266637395197952ll /* 0x4800000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 47}} /* shli r3, r2, 47 */ - }, - {1407374883553280ll /* 0x5000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 48}} /* shli r3, r2, 48 */ - }, - {1688849860263936ll /* 0x6000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 49}} /* shli r3, r2, 49 */ - }, - {2251799813685239ll /* 0x7fffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2251799813685240ll /* 0x7fffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2251799813685241ll /* 0x7fffffffffff9 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {2251799813685243ll /* 0x7fffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2251799813685244ll /* 0x7fffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2251799813685245ll /* 0x7fffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2251799813685246ll /* 0x7fffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2251799813685247ll /* 0x7ffffffffffff */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {2251799813685248ll /* 0x8000000000000 */ , - {{6, 1, 51}} /* shli r2, r1, 51 */ - }, - {2251799813685249ll /* 0x8000000000001 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {2251799813685250ll /* 0x8000000000002 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {2251799813685251ll /* 0x8000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813685252ll /* 0x8000000000004 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {2251799813685253ll /* 0x8000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813685254ll /* 0x8000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2251799813685255ll /* 0x8000000000007 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {2251799813685256ll /* 0x8000000000008 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {2251799813685257ll /* 0x8000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813685258ll /* 0x800000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2251799813685264ll /* 0x8000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813685280ll /* 0x8000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813685312ll /* 0x8000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813685376ll /* 0x8000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813685504ll /* 0x8000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813685760ll /* 0x8000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813686272ll /* 0x8000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813687296ll /* 0x8000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813689344ll /* 0x8000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813693440ll /* 0x8000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813701632ll /* 0x8000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813718016ll /* 0x8000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813750784ll /* 0x8000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813816320ll /* 0x8000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799813947392ll /* 0x8000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799814209536ll /* 0x8000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799814733824ll /* 0x8000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799815782400ll /* 0x8000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799817879552ll /* 0x8000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799822073856ll /* 0x8000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799830462464ll /* 0x8000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799847239680ll /* 0x8000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799880794112ll /* 0x8000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251799947902976ll /* 0x8000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251800082120704ll /* 0x8000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251800350556160ll /* 0x8000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251800887427072ll /* 0x8000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251801961168896ll /* 0x8000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251804108652544ll /* 0x8000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251808403619840ll /* 0x8000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251816993554432ll /* 0x8000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251834173423616ll /* 0x8000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251868533161984ll /* 0x8001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2251937252638720ll /* 0x8002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2252074691592192ll /* 0x8004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2252349569499136ll /* 0x8008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2252899325313024ll /* 0x8010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2253998836940800ll /* 0x8020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2256197860196352ll /* 0x8040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2260595906707456ll /* 0x8080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2269391999729664ll /* 0x8100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2286984185774080ll /* 0x8200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2322168557862912ll /* 0x8400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2392537302040576ll /* 0x8800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 51}, /* shli r3, r1, 51 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2533274790395904ll /* 0x9000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 48}} /* shli r3, r2, 48 */ - }, - {2814749767106560ll /* 0xa000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 49}} /* shli r3, r2, 49 */ - }, - {3377699720527872ll /* 0xc000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 50}} /* shli r3, r2, 50 */ - }, - {4503599627370487ll /* 0xffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4503599627370488ll /* 0xffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4503599627370489ll /* 0xffffffffffff9 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {4503599627370491ll /* 0xffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4503599627370492ll /* 0xffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4503599627370493ll /* 0xffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4503599627370494ll /* 0xffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4503599627370495ll /* 0xfffffffffffff */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {4503599627370496ll /* 0x10000000000000 */ , - {{6, 1, 52}} /* shli r2, r1, 52 */ - }, - {4503599627370497ll /* 0x10000000000001 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {4503599627370498ll /* 0x10000000000002 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {4503599627370499ll /* 0x10000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627370500ll /* 0x10000000000004 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {4503599627370501ll /* 0x10000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627370502ll /* 0x10000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4503599627370503ll /* 0x10000000000007 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {4503599627370504ll /* 0x10000000000008 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {4503599627370505ll /* 0x10000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627370506ll /* 0x1000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4503599627370512ll /* 0x10000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627370528ll /* 0x10000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627370560ll /* 0x10000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627370624ll /* 0x10000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627370752ll /* 0x10000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627371008ll /* 0x10000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627371520ll /* 0x10000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627372544ll /* 0x10000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627374592ll /* 0x10000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627378688ll /* 0x10000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627386880ll /* 0x10000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627403264ll /* 0x10000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627436032ll /* 0x10000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627501568ll /* 0x10000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627632640ll /* 0x10000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599627894784ll /* 0x10000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599628419072ll /* 0x10000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599629467648ll /* 0x10000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599631564800ll /* 0x10000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599635759104ll /* 0x10000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599644147712ll /* 0x10000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599660924928ll /* 0x10000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599694479360ll /* 0x10000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599761588224ll /* 0x10000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503599895805952ll /* 0x10000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503600164241408ll /* 0x10000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503600701112320ll /* 0x10000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503601774854144ll /* 0x10000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503603922337792ll /* 0x10000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503608217305088ll /* 0x10000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503616807239680ll /* 0x10000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503633987108864ll /* 0x10000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503668346847232ll /* 0x10001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503737066323968ll /* 0x10002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4503874505277440ll /* 0x10004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4504149383184384ll /* 0x10008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4504699138998272ll /* 0x10010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4505798650626048ll /* 0x10020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4507997673881600ll /* 0x10040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4512395720392704ll /* 0x10080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4521191813414912ll /* 0x10100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4538783999459328ll /* 0x10200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4573968371548160ll /* 0x10400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4644337115725824ll /* 0x10800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4785074604081152ll /* 0x11000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 52}, /* shli r3, r1, 52 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {5066549580791808ll /* 0x12000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 49}} /* shli r3, r2, 49 */ - }, - {5629499534213120ll /* 0x14000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 50}} /* shli r3, r2, 50 */ - }, - {6755399441055744ll /* 0x18000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 51}} /* shli r3, r2, 51 */ - }, - {9007199254740983ll /* 0x1ffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9007199254740984ll /* 0x1ffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9007199254740985ll /* 0x1ffffffffffff9 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {9007199254740987ll /* 0x1ffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9007199254740988ll /* 0x1ffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9007199254740989ll /* 0x1ffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9007199254740990ll /* 0x1ffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9007199254740991ll /* 0x1fffffffffffff */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {9007199254740992ll /* 0x20000000000000 */ , - {{6, 1, 53}} /* shli r2, r1, 53 */ - }, - {9007199254740993ll /* 0x20000000000001 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {9007199254740994ll /* 0x20000000000002 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {9007199254740995ll /* 0x20000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254740996ll /* 0x20000000000004 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {9007199254740997ll /* 0x20000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254740998ll /* 0x20000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {9007199254740999ll /* 0x20000000000007 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {9007199254741000ll /* 0x20000000000008 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {9007199254741001ll /* 0x20000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254741002ll /* 0x2000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {9007199254741008ll /* 0x20000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254741024ll /* 0x20000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254741056ll /* 0x20000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254741120ll /* 0x20000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254741248ll /* 0x20000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254741504ll /* 0x20000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254742016ll /* 0x20000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254743040ll /* 0x20000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254745088ll /* 0x20000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254749184ll /* 0x20000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254757376ll /* 0x20000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254773760ll /* 0x20000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254806528ll /* 0x20000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199254872064ll /* 0x20000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199255003136ll /* 0x20000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199255265280ll /* 0x20000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199255789568ll /* 0x20000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199256838144ll /* 0x20000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199258935296ll /* 0x20000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199263129600ll /* 0x20000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199271518208ll /* 0x20000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199288295424ll /* 0x20000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199321849856ll /* 0x20000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199388958720ll /* 0x20000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199523176448ll /* 0x20000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007199791611904ll /* 0x20000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007200328482816ll /* 0x20000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007201402224640ll /* 0x20000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007203549708288ll /* 0x20000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007207844675584ll /* 0x20000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007216434610176ll /* 0x20000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007233614479360ll /* 0x20000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007267974217728ll /* 0x20001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007336693694464ll /* 0x20002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007474132647936ll /* 0x20004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9007749010554880ll /* 0x20008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9008298766368768ll /* 0x20010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9009398277996544ll /* 0x20020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9011597301252096ll /* 0x20040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9015995347763200ll /* 0x20080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9024791440785408ll /* 0x20100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9042383626829824ll /* 0x20200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9077567998918656ll /* 0x20400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9147936743096320ll /* 0x20800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9288674231451648ll /* 0x21000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9570149208162304ll /* 0x22000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 53}, /* shli r3, r1, 53 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {10133099161583616ll /* 0x24000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 50}} /* shli r3, r2, 50 */ - }, - {11258999068426240ll /* 0x28000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 51}} /* shli r3, r2, 51 */ - }, - {13510798882111488ll /* 0x30000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 52}} /* shli r3, r2, 52 */ - }, - {18014398509481975ll /* 0x3ffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {18014398509481976ll /* 0x3ffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {18014398509481977ll /* 0x3ffffffffffff9 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {18014398509481979ll /* 0x3ffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {18014398509481980ll /* 0x3ffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {18014398509481981ll /* 0x3ffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {18014398509481982ll /* 0x3ffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {18014398509481983ll /* 0x3fffffffffffff */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {18014398509481984ll /* 0x40000000000000 */ , - {{6, 1, 54}} /* shli r2, r1, 54 */ - }, - {18014398509481985ll /* 0x40000000000001 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {18014398509481986ll /* 0x40000000000002 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {18014398509481987ll /* 0x40000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509481988ll /* 0x40000000000004 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {18014398509481989ll /* 0x40000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509481990ll /* 0x40000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {18014398509481991ll /* 0x40000000000007 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {18014398509481992ll /* 0x40000000000008 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {18014398509481993ll /* 0x40000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509481994ll /* 0x4000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {18014398509482000ll /* 0x40000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509482016ll /* 0x40000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509482048ll /* 0x40000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509482112ll /* 0x40000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509482240ll /* 0x40000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509482496ll /* 0x40000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509483008ll /* 0x40000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509484032ll /* 0x40000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509486080ll /* 0x40000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509490176ll /* 0x40000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509498368ll /* 0x40000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509514752ll /* 0x40000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509547520ll /* 0x40000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509613056ll /* 0x40000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398509744128ll /* 0x40000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398510006272ll /* 0x40000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398510530560ll /* 0x40000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398511579136ll /* 0x40000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398513676288ll /* 0x40000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398517870592ll /* 0x40000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398526259200ll /* 0x40000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398543036416ll /* 0x40000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398576590848ll /* 0x40000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398643699712ll /* 0x40000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014398777917440ll /* 0x40000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014399046352896ll /* 0x40000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014399583223808ll /* 0x40000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014400656965632ll /* 0x40000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014402804449280ll /* 0x40000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014407099416576ll /* 0x40000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014415689351168ll /* 0x40000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014432869220352ll /* 0x40000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014467228958720ll /* 0x40001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014535948435456ll /* 0x40002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014673387388928ll /* 0x40004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18014948265295872ll /* 0x40008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18015498021109760ll /* 0x40010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18016597532737536ll /* 0x40020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18018796555993088ll /* 0x40040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18023194602504192ll /* 0x40080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18031990695526400ll /* 0x40100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18049582881570816ll /* 0x40200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18084767253659648ll /* 0x40400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18155135997837312ll /* 0x40800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18295873486192640ll /* 0x41000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18577348462903296ll /* 0x42000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {19140298416324608ll /* 0x44000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 54}, /* shli r3, r1, 54 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {20266198323167232ll /* 0x48000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 51}} /* shli r3, r2, 51 */ - }, - {22517998136852480ll /* 0x50000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 52}} /* shli r3, r2, 52 */ - }, - {27021597764222976ll /* 0x60000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 53}} /* shli r3, r2, 53 */ - }, - {36028797018963959ll /* 0x7ffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {36028797018963960ll /* 0x7ffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {36028797018963961ll /* 0x7ffffffffffff9 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {36028797018963963ll /* 0x7ffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {36028797018963964ll /* 0x7ffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {36028797018963965ll /* 0x7ffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {36028797018963966ll /* 0x7ffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {36028797018963967ll /* 0x7fffffffffffff */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {36028797018963968ll /* 0x80000000000000 */ , - {{6, 1, 55}} /* shli r2, r1, 55 */ - }, - {36028797018963969ll /* 0x80000000000001 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {36028797018963970ll /* 0x80000000000002 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {36028797018963971ll /* 0x80000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018963972ll /* 0x80000000000004 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {36028797018963973ll /* 0x80000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018963974ll /* 0x80000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {36028797018963975ll /* 0x80000000000007 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {36028797018963976ll /* 0x80000000000008 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {36028797018963977ll /* 0x80000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018963978ll /* 0x8000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {36028797018963984ll /* 0x80000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018964000ll /* 0x80000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018964032ll /* 0x80000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018964096ll /* 0x80000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018964224ll /* 0x80000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018964480ll /* 0x80000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018964992ll /* 0x80000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018966016ll /* 0x80000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018968064ll /* 0x80000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018972160ll /* 0x80000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018980352ll /* 0x80000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797018996736ll /* 0x80000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797019029504ll /* 0x80000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797019095040ll /* 0x80000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797019226112ll /* 0x80000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797019488256ll /* 0x80000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797020012544ll /* 0x80000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797021061120ll /* 0x80000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797023158272ll /* 0x80000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797027352576ll /* 0x80000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797035741184ll /* 0x80000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797052518400ll /* 0x80000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797086072832ll /* 0x80000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797153181696ll /* 0x80000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797287399424ll /* 0x80000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028797555834880ll /* 0x80000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028798092705792ll /* 0x80000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028799166447616ll /* 0x80000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028801313931264ll /* 0x80000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028805608898560ll /* 0x80000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028814198833152ll /* 0x80000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028831378702336ll /* 0x80000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028865738440704ll /* 0x80001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36028934457917440ll /* 0x80002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36029071896870912ll /* 0x80004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36029346774777856ll /* 0x80008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36029896530591744ll /* 0x80010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36030996042219520ll /* 0x80020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36033195065475072ll /* 0x80040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36037593111986176ll /* 0x80080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36046389205008384ll /* 0x80100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36063981391052800ll /* 0x80200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36099165763141632ll /* 0x80400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36169534507319296ll /* 0x80800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36310271995674624ll /* 0x81000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36591746972385280ll /* 0x82000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {37154696925806592ll /* 0x84000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {38280596832649216ll /* 0x88000000000000 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {6, 1, 55}, /* shli r3, r1, 55 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {40532396646334464ll /* 0x90000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 52}} /* shli r3, r2, 52 */ - }, - {45035996273704960ll /* 0xa0000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 53}} /* shli r3, r2, 53 */ - }, - {54043195528445952ll /* 0xc0000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 54}} /* shli r3, r2, 54 */ - }, - {72057594037927927ll /* 0xfffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {72057594037927928ll /* 0xfffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {72057594037927929ll /* 0xfffffffffffff9 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {72057594037927931ll /* 0xfffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {72057594037927932ll /* 0xfffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {72057594037927933ll /* 0xfffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {72057594037927934ll /* 0xfffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {72057594037927935ll /* 0xffffffffffffff */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {72057594037927936ll /* 0x100000000000000 */ , - {{6, 1, 56}} /* shli r2, r1, 56 */ - }, - {72057594037927937ll /* 0x100000000000001 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {72057594037927938ll /* 0x100000000000002 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {72057594037927939ll /* 0x100000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037927940ll /* 0x100000000000004 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {72057594037927941ll /* 0x100000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037927942ll /* 0x100000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {72057594037927943ll /* 0x100000000000007 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {72057594037927944ll /* 0x100000000000008 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {72057594037927945ll /* 0x100000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037927946ll /* 0x10000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {72057594037927952ll /* 0x100000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037927968ll /* 0x100000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037928000ll /* 0x100000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037928064ll /* 0x100000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037928192ll /* 0x100000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037928448ll /* 0x100000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037928960ll /* 0x100000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037929984ll /* 0x100000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037932032ll /* 0x100000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037936128ll /* 0x100000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037944320ll /* 0x100000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037960704ll /* 0x100000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594037993472ll /* 0x100000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594038059008ll /* 0x100000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594038190080ll /* 0x100000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594038452224ll /* 0x100000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594038976512ll /* 0x100000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594040025088ll /* 0x100000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594042122240ll /* 0x100000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594046316544ll /* 0x100000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594054705152ll /* 0x100000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594071482368ll /* 0x100000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594105036800ll /* 0x100000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594172145664ll /* 0x100000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594306363392ll /* 0x100000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057594574798848ll /* 0x100000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057595111669760ll /* 0x100000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057596185411584ll /* 0x100000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057598332895232ll /* 0x100000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057602627862528ll /* 0x100000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057611217797120ll /* 0x100000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057628397666304ll /* 0x100000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057662757404672ll /* 0x100001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057731476881408ll /* 0x100002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72057868915834880ll /* 0x100004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72058143793741824ll /* 0x100008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72058693549555712ll /* 0x100010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72059793061183488ll /* 0x100020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72061992084439040ll /* 0x100040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72066390130950144ll /* 0x100080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72075186223972352ll /* 0x100100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72092778410016768ll /* 0x100200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72127962782105600ll /* 0x100400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72198331526283264ll /* 0x100800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72339069014638592ll /* 0x101000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {72620543991349248ll /* 0x102000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {73183493944770560ll /* 0x104000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {74309393851613184ll /* 0x108000000000000 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {76561193665298432ll /* 0x110000000000000 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {6, 1, 56}, /* shli r3, r1, 56 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {81064793292668928ll /* 0x120000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 53}} /* shli r3, r2, 53 */ - }, - {90071992547409920ll /* 0x140000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 54}} /* shli r3, r2, 54 */ - }, - {108086391056891904ll /* 0x180000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 55}} /* shli r3, r2, 55 */ - }, - {144115188075855863ll /* 0x1fffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {144115188075855864ll /* 0x1fffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {144115188075855865ll /* 0x1fffffffffffff9 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {144115188075855867ll /* 0x1fffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {144115188075855868ll /* 0x1fffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {144115188075855869ll /* 0x1fffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {144115188075855870ll /* 0x1fffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {144115188075855871ll /* 0x1ffffffffffffff */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {144115188075855872ll /* 0x200000000000000 */ , - {{6, 1, 57}} /* shli r2, r1, 57 */ - }, - {144115188075855873ll /* 0x200000000000001 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {144115188075855874ll /* 0x200000000000002 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {144115188075855875ll /* 0x200000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075855876ll /* 0x200000000000004 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {144115188075855877ll /* 0x200000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075855878ll /* 0x200000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {144115188075855879ll /* 0x200000000000007 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {144115188075855880ll /* 0x200000000000008 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {144115188075855881ll /* 0x200000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075855882ll /* 0x20000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {144115188075855888ll /* 0x200000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075855904ll /* 0x200000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075855936ll /* 0x200000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075856000ll /* 0x200000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075856128ll /* 0x200000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075856384ll /* 0x200000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075856896ll /* 0x200000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075857920ll /* 0x200000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075859968ll /* 0x200000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075864064ll /* 0x200000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075872256ll /* 0x200000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075888640ll /* 0x200000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075921408ll /* 0x200000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188075986944ll /* 0x200000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188076118016ll /* 0x200000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188076380160ll /* 0x200000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188076904448ll /* 0x200000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188077953024ll /* 0x200000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188080050176ll /* 0x200000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188084244480ll /* 0x200000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188092633088ll /* 0x200000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188109410304ll /* 0x200000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188142964736ll /* 0x200000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188210073600ll /* 0x200000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188344291328ll /* 0x200000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115188612726784ll /* 0x200000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115189149597696ll /* 0x200000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115190223339520ll /* 0x200000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115192370823168ll /* 0x200000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115196665790464ll /* 0x200000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115205255725056ll /* 0x200000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115222435594240ll /* 0x200000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115256795332608ll /* 0x200001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115325514809344ll /* 0x200002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115462953762816ll /* 0x200004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144115737831669760ll /* 0x200008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144116287587483648ll /* 0x200010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144117387099111424ll /* 0x200020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144119586122366976ll /* 0x200040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144123984168878080ll /* 0x200080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144132780261900288ll /* 0x200100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144150372447944704ll /* 0x200200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144185556820033536ll /* 0x200400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144255925564211200ll /* 0x200800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144396663052566528ll /* 0x201000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {144678138029277184ll /* 0x202000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {145241087982698496ll /* 0x204000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {146366987889541120ll /* 0x208000000000000 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {148618787703226368ll /* 0x210000000000000 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {153122387330596864ll /* 0x220000000000000 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {6, 1, 57}, /* shli r3, r1, 57 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {162129586585337856ll /* 0x240000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 54}} /* shli r3, r2, 54 */ - }, - {180143985094819840ll /* 0x280000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 55}} /* shli r3, r2, 55 */ - }, - {216172782113783808ll /* 0x300000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 56}} /* shli r3, r2, 56 */ - }, - {288230376151711735ll /* 0x3fffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {288230376151711736ll /* 0x3fffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {288230376151711737ll /* 0x3fffffffffffff9 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {288230376151711739ll /* 0x3fffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {288230376151711740ll /* 0x3fffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {288230376151711741ll /* 0x3fffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {288230376151711742ll /* 0x3fffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {288230376151711743ll /* 0x3ffffffffffffff */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {288230376151711744ll /* 0x400000000000000 */ , - {{6, 1, 58}} /* shli r2, r1, 58 */ - }, - {288230376151711745ll /* 0x400000000000001 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {288230376151711746ll /* 0x400000000000002 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {288230376151711747ll /* 0x400000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151711748ll /* 0x400000000000004 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {288230376151711749ll /* 0x400000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151711750ll /* 0x400000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {288230376151711751ll /* 0x400000000000007 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {288230376151711752ll /* 0x400000000000008 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {288230376151711753ll /* 0x400000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151711754ll /* 0x40000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {288230376151711760ll /* 0x400000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151711776ll /* 0x400000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151711808ll /* 0x400000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151711872ll /* 0x400000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151712000ll /* 0x400000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151712256ll /* 0x400000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151712768ll /* 0x400000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151713792ll /* 0x400000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151715840ll /* 0x400000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151719936ll /* 0x400000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151728128ll /* 0x400000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151744512ll /* 0x400000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151777280ll /* 0x400000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151842816ll /* 0x400000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376151973888ll /* 0x400000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376152236032ll /* 0x400000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376152760320ll /* 0x400000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376153808896ll /* 0x400000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376155906048ll /* 0x400000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376160100352ll /* 0x400000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376168488960ll /* 0x400000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376185266176ll /* 0x400000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376218820608ll /* 0x400000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376285929472ll /* 0x400000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376420147200ll /* 0x400000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230376688582656ll /* 0x400000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230377225453568ll /* 0x400000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230378299195392ll /* 0x400000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230380446679040ll /* 0x400000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230384741646336ll /* 0x400000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230393331580928ll /* 0x400000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230410511450112ll /* 0x400000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230444871188480ll /* 0x400001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230513590665216ll /* 0x400002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230651029618688ll /* 0x400004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288230925907525632ll /* 0x400008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288231475663339520ll /* 0x400010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288232575174967296ll /* 0x400020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288234774198222848ll /* 0x400040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288239172244733952ll /* 0x400080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288247968337756160ll /* 0x400100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288265560523800576ll /* 0x400200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288300744895889408ll /* 0x400400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288371113640067072ll /* 0x400800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288511851128422400ll /* 0x401000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {288793326105133056ll /* 0x402000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {289356276058554368ll /* 0x404000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {290482175965396992ll /* 0x408000000000000 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {292733975779082240ll /* 0x410000000000000 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {297237575406452736ll /* 0x420000000000000 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {306244774661193728ll /* 0x440000000000000 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {6, 1, 58}, /* shli r3, r1, 58 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {324259173170675712ll /* 0x480000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 55}} /* shli r3, r2, 55 */ - }, - {360287970189639680ll /* 0x500000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 56}} /* shli r3, r2, 56 */ - }, - {432345564227567616ll /* 0x600000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 57}} /* shli r3, r2, 57 */ - }, - {576460752303423479ll /* 0x7fffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {576460752303423480ll /* 0x7fffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {576460752303423481ll /* 0x7fffffffffffff9 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {576460752303423483ll /* 0x7fffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {576460752303423484ll /* 0x7fffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {576460752303423485ll /* 0x7fffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {576460752303423486ll /* 0x7fffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {576460752303423487ll /* 0x7ffffffffffffff */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {576460752303423488ll /* 0x800000000000000 */ , - {{6, 1, 59}} /* shli r2, r1, 59 */ - }, - {576460752303423489ll /* 0x800000000000001 */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {576460752303423490ll /* 0x800000000000002 */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {576460752303423491ll /* 0x800000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303423492ll /* 0x800000000000004 */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {576460752303423493ll /* 0x800000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303423494ll /* 0x800000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {576460752303423495ll /* 0x800000000000007 */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {576460752303423496ll /* 0x800000000000008 */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {576460752303423497ll /* 0x800000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303423498ll /* 0x80000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {576460752303423504ll /* 0x800000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303423520ll /* 0x800000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303423552ll /* 0x800000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303423616ll /* 0x800000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303423744ll /* 0x800000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303424000ll /* 0x800000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303424512ll /* 0x800000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303425536ll /* 0x800000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303427584ll /* 0x800000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303431680ll /* 0x800000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303439872ll /* 0x800000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303456256ll /* 0x800000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303489024ll /* 0x800000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303554560ll /* 0x800000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303685632ll /* 0x800000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752303947776ll /* 0x800000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752304472064ll /* 0x800000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752305520640ll /* 0x800000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752307617792ll /* 0x800000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752311812096ll /* 0x800000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752320200704ll /* 0x800000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752336977920ll /* 0x800000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752370532352ll /* 0x800000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752437641216ll /* 0x800000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752571858944ll /* 0x800000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460752840294400ll /* 0x800000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460753377165312ll /* 0x800000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460754450907136ll /* 0x800000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460756598390784ll /* 0x800000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460760893358080ll /* 0x800000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460769483292672ll /* 0x800000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460786663161856ll /* 0x800000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460821022900224ll /* 0x800001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576460889742376960ll /* 0x800002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576461027181330432ll /* 0x800004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576461302059237376ll /* 0x800008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576461851815051264ll /* 0x800010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576462951326679040ll /* 0x800020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576465150349934592ll /* 0x800040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576469548396445696ll /* 0x800080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576478344489467904ll /* 0x800100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576495936675512320ll /* 0x800200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576531121047601152ll /* 0x800400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576601489791778816ll /* 0x800800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {576742227280134144ll /* 0x801000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {577023702256844800ll /* 0x802000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {577586652210266112ll /* 0x804000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {578712552117108736ll /* 0x808000000000000 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {580964351930793984ll /* 0x810000000000000 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {585467951558164480ll /* 0x820000000000000 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {594475150812905472ll /* 0x840000000000000 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {612489549322387456ll /* 0x880000000000000 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {6, 1, 59}, /* shli r3, r1, 59 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {648518346341351424ll /* 0x900000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 56}} /* shli r3, r2, 56 */ - }, - {720575940379279360ll /* 0xa00000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 57}} /* shli r3, r2, 57 */ - }, - {864691128455135232ll /* 0xc00000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 58}} /* shli r3, r2, 58 */ - }, - {1152921504606846967ll /* 0xffffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1152921504606846968ll /* 0xffffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1152921504606846969ll /* 0xffffffffffffff9 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {1152921504606846971ll /* 0xffffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1152921504606846972ll /* 0xffffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1152921504606846973ll /* 0xffffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1152921504606846974ll /* 0xffffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1152921504606846975ll /* 0xfffffffffffffff */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {1152921504606846976ll /* 0x1000000000000000 */ , - {{6, 1, 60}} /* shli r2, r1, 60 */ - }, - {1152921504606846977ll /* 0x1000000000000001 */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {1152921504606846978ll /* 0x1000000000000002 */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {1152921504606846979ll /* 0x1000000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606846980ll /* 0x1000000000000004 */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {1152921504606846981ll /* 0x1000000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606846982ll /* 0x1000000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1152921504606846983ll /* 0x1000000000000007 */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {1152921504606846984ll /* 0x1000000000000008 */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {1152921504606846985ll /* 0x1000000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606846986ll /* 0x100000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {1152921504606846992ll /* 0x1000000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606847008ll /* 0x1000000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606847040ll /* 0x1000000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606847104ll /* 0x1000000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606847232ll /* 0x1000000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606847488ll /* 0x1000000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606848000ll /* 0x1000000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606849024ll /* 0x1000000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606851072ll /* 0x1000000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606855168ll /* 0x1000000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606863360ll /* 0x1000000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606879744ll /* 0x1000000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606912512ll /* 0x1000000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504606978048ll /* 0x1000000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504607109120ll /* 0x1000000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504607371264ll /* 0x1000000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504607895552ll /* 0x1000000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504608944128ll /* 0x1000000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504611041280ll /* 0x1000000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504615235584ll /* 0x1000000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504623624192ll /* 0x1000000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504640401408ll /* 0x1000000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504673955840ll /* 0x1000000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504741064704ll /* 0x1000000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921504875282432ll /* 0x1000000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921505143717888ll /* 0x1000000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921505680588800ll /* 0x1000000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921506754330624ll /* 0x1000000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921508901814272ll /* 0x1000000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921513196781568ll /* 0x1000000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921521786716160ll /* 0x1000000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921538966585344ll /* 0x1000000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921573326323712ll /* 0x1000001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921642045800448ll /* 0x1000002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152921779484753920ll /* 0x1000004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152922054362660864ll /* 0x1000008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152922604118474752ll /* 0x1000010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152923703630102528ll /* 0x1000020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152925902653358080ll /* 0x1000040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152930300699869184ll /* 0x1000080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152939096792891392ll /* 0x1000100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152956688978935808ll /* 0x1000200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1152991873351024640ll /* 0x1000400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1153062242095202304ll /* 0x1000800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1153202979583557632ll /* 0x1001000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1153484454560268288ll /* 0x1002000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1154047404513689600ll /* 0x1004000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1155173304420532224ll /* 0x1008000000000000 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1157425104234217472ll /* 0x1010000000000000 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1161928703861587968ll /* 0x1020000000000000 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1170935903116328960ll /* 0x1040000000000000 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1188950301625810944ll /* 0x1080000000000000 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1224979098644774912ll /* 0x1100000000000000 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {6, 1, 60}, /* shli r3, r1, 60 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1297036692682702848ll /* 0x1200000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 57}} /* shli r3, r2, 57 */ - }, - {1441151880758558720ll /* 0x1400000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 58}} /* shli r3, r2, 58 */ - }, - {1729382256910270464ll /* 0x1800000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 59}} /* shli r3, r2, 59 */ - }, - {2305843009213693943ll /* 0x1ffffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2305843009213693944ll /* 0x1ffffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2305843009213693945ll /* 0x1ffffffffffffff9 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {2305843009213693947ll /* 0x1ffffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2305843009213693948ll /* 0x1ffffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2305843009213693949ll /* 0x1ffffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2305843009213693950ll /* 0x1ffffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2305843009213693951ll /* 0x1fffffffffffffff */ , - {{6, 1, 61}, /* shli r2, r1, 61 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {2305843009213693952ll /* 0x2000000000000000 */ , - {{6, 1, 61}} /* shli r2, r1, 61 */ - }, - {2305843009213693953ll /* 0x2000000000000001 */ , - {{6, 1, 61}, /* shli r2, r1, 61 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {2305843009213693954ll /* 0x2000000000000002 */ , - {{6, 1, 61}, /* shli r2, r1, 61 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {2305843009213693955ll /* 0x2000000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213693956ll /* 0x2000000000000004 */ , - {{6, 1, 61}, /* shli r2, r1, 61 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {2305843009213693957ll /* 0x2000000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213693958ll /* 0x2000000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2305843009213693959ll /* 0x2000000000000007 */ , - {{6, 1, 61}, /* shli r2, r1, 61 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {2305843009213693960ll /* 0x2000000000000008 */ , - {{6, 1, 61}, /* shli r2, r1, 61 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {2305843009213693961ll /* 0x2000000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213693962ll /* 0x200000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {2305843009213693968ll /* 0x2000000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213693984ll /* 0x2000000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213694016ll /* 0x2000000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213694080ll /* 0x2000000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213694208ll /* 0x2000000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213694464ll /* 0x2000000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213694976ll /* 0x2000000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213696000ll /* 0x2000000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213698048ll /* 0x2000000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213702144ll /* 0x2000000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213710336ll /* 0x2000000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213726720ll /* 0x2000000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213759488ll /* 0x2000000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213825024ll /* 0x2000000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009213956096ll /* 0x2000000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009214218240ll /* 0x2000000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009214742528ll /* 0x2000000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009215791104ll /* 0x2000000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009217888256ll /* 0x2000000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009222082560ll /* 0x2000000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009230471168ll /* 0x2000000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009247248384ll /* 0x2000000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009280802816ll /* 0x2000000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009347911680ll /* 0x2000000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009482129408ll /* 0x2000000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843009750564864ll /* 0x2000000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843010287435776ll /* 0x2000000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843011361177600ll /* 0x2000000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843013508661248ll /* 0x2000000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843017803628544ll /* 0x2000000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843026393563136ll /* 0x2000000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843043573432320ll /* 0x2000000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843077933170688ll /* 0x2000001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843146652647424ll /* 0x2000002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843284091600896ll /* 0x2000004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305843558969507840ll /* 0x2000008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305844108725321728ll /* 0x2000010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305845208236949504ll /* 0x2000020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305847407260205056ll /* 0x2000040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305851805306716160ll /* 0x2000080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305860601399738368ll /* 0x2000100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305878193585782784ll /* 0x2000200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305913377957871616ll /* 0x2000400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2305983746702049280ll /* 0x2000800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2306124484190404608ll /* 0x2001000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2306405959167115264ll /* 0x2002000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2306968909120536576ll /* 0x2004000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2308094809027379200ll /* 0x2008000000000000 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2310346608841064448ll /* 0x2010000000000000 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2314850208468434944ll /* 0x2020000000000000 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2323857407723175936ll /* 0x2040000000000000 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2341871806232657920ll /* 0x2080000000000000 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2377900603251621888ll /* 0x2100000000000000 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2449958197289549824ll /* 0x2200000000000000 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {6, 1, 61}, /* shli r3, r1, 61 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2594073385365405696ll /* 0x2400000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 58}} /* shli r3, r2, 58 */ - }, - {2882303761517117440ll /* 0x2800000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 59}} /* shli r3, r2, 59 */ - }, - {3458764513820540928ll /* 0x3000000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 60}} /* shli r3, r2, 60 */ - }, - {4611686018427387895ll /* 0x3ffffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4611686018427387896ll /* 0x3ffffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4611686018427387897ll /* 0x3ffffffffffffff9 */ , - {{6, 1, 59}, /* shli r2, r1, 59 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {4611686018427387899ll /* 0x3ffffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4611686018427387900ll /* 0x3ffffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4611686018427387901ll /* 0x3ffffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4611686018427387902ll /* 0x3ffffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4611686018427387903ll /* 0x3fffffffffffffff */ , - {{6, 1, 62}, /* shli r2, r1, 62 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {4611686018427387904ll /* 0x4000000000000000 */ , - {{6, 1, 62}} /* shli r2, r1, 62 */ - }, - {4611686018427387905ll /* 0x4000000000000001 */ , - {{6, 1, 62}, /* shli r2, r1, 62 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {4611686018427387906ll /* 0x4000000000000002 */ , - {{6, 1, 62}, /* shli r2, r1, 62 */ - {3, 1, 2}} /* shl1add r3, r1, r2 */ - }, - {4611686018427387907ll /* 0x4000000000000003 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427387908ll /* 0x4000000000000004 */ , - {{6, 1, 62}, /* shli r2, r1, 62 */ - {4, 1, 2}} /* shl2add r3, r1, r2 */ - }, - {4611686018427387909ll /* 0x4000000000000005 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427387910ll /* 0x4000000000000006 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4611686018427387911ll /* 0x4000000000000007 */ , - {{6, 1, 62}, /* shli r2, r1, 62 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* shl3add r4, r1, r3 */ - }, - {4611686018427387912ll /* 0x4000000000000008 */ , - {{6, 1, 62}, /* shli r2, r1, 62 */ - {5, 1, 2}} /* shl3add r3, r1, r2 */ - }, - {4611686018427387913ll /* 0x4000000000000009 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427387914ll /* 0x400000000000000a */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {3, 2, 3}} /* shl1add r4, r2, r3 */ - }, - {4611686018427387920ll /* 0x4000000000000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427387936ll /* 0x4000000000000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427387968ll /* 0x4000000000000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427388032ll /* 0x4000000000000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427388160ll /* 0x4000000000000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427388416ll /* 0x4000000000000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427388928ll /* 0x4000000000000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427389952ll /* 0x4000000000000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427392000ll /* 0x4000000000001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427396096ll /* 0x4000000000002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427404288ll /* 0x4000000000004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427420672ll /* 0x4000000000008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427453440ll /* 0x4000000000010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427518976ll /* 0x4000000000020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427650048ll /* 0x4000000000040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018427912192ll /* 0x4000000000080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018428436480ll /* 0x4000000000100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018429485056ll /* 0x4000000000200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018431582208ll /* 0x4000000000400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018435776512ll /* 0x4000000000800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018444165120ll /* 0x4000000001000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018460942336ll /* 0x4000000002000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018494496768ll /* 0x4000000004000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018561605632ll /* 0x4000000008000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018695823360ll /* 0x4000000010000000 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686018964258816ll /* 0x4000000020000000 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686019501129728ll /* 0x4000000040000000 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686020574871552ll /* 0x4000000080000000 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686022722355200ll /* 0x4000000100000000 */ , - {{6, 1, 32}, /* shli r2, r1, 32 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686027017322496ll /* 0x4000000200000000 */ , - {{6, 1, 33}, /* shli r2, r1, 33 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686035607257088ll /* 0x4000000400000000 */ , - {{6, 1, 34}, /* shli r2, r1, 34 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686052787126272ll /* 0x4000000800000000 */ , - {{6, 1, 35}, /* shli r2, r1, 35 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686087146864640ll /* 0x4000001000000000 */ , - {{6, 1, 36}, /* shli r2, r1, 36 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686155866341376ll /* 0x4000002000000000 */ , - {{6, 1, 37}, /* shli r2, r1, 37 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686293305294848ll /* 0x4000004000000000 */ , - {{6, 1, 38}, /* shli r2, r1, 38 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611686568183201792ll /* 0x4000008000000000 */ , - {{6, 1, 39}, /* shli r2, r1, 39 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611687117939015680ll /* 0x4000010000000000 */ , - {{6, 1, 40}, /* shli r2, r1, 40 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611688217450643456ll /* 0x4000020000000000 */ , - {{6, 1, 41}, /* shli r2, r1, 41 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611690416473899008ll /* 0x4000040000000000 */ , - {{6, 1, 42}, /* shli r2, r1, 42 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611694814520410112ll /* 0x4000080000000000 */ , - {{6, 1, 43}, /* shli r2, r1, 43 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611703610613432320ll /* 0x4000100000000000 */ , - {{6, 1, 44}, /* shli r2, r1, 44 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611721202799476736ll /* 0x4000200000000000 */ , - {{6, 1, 45}, /* shli r2, r1, 45 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611756387171565568ll /* 0x4000400000000000 */ , - {{6, 1, 46}, /* shli r2, r1, 46 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611826755915743232ll /* 0x4000800000000000 */ , - {{6, 1, 47}, /* shli r2, r1, 47 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4611967493404098560ll /* 0x4001000000000000 */ , - {{6, 1, 48}, /* shli r2, r1, 48 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4612248968380809216ll /* 0x4002000000000000 */ , - {{6, 1, 49}, /* shli r2, r1, 49 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4612811918334230528ll /* 0x4004000000000000 */ , - {{6, 1, 50}, /* shli r2, r1, 50 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4613937818241073152ll /* 0x4008000000000000 */ , - {{6, 1, 51}, /* shli r2, r1, 51 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4616189618054758400ll /* 0x4010000000000000 */ , - {{6, 1, 52}, /* shli r2, r1, 52 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4620693217682128896ll /* 0x4020000000000000 */ , - {{6, 1, 53}, /* shli r2, r1, 53 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4629700416936869888ll /* 0x4040000000000000 */ , - {{6, 1, 54}, /* shli r2, r1, 54 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4647714815446351872ll /* 0x4080000000000000 */ , - {{6, 1, 55}, /* shli r2, r1, 55 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4683743612465315840ll /* 0x4100000000000000 */ , - {{6, 1, 56}, /* shli r2, r1, 56 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4755801206503243776ll /* 0x4200000000000000 */ , - {{6, 1, 57}, /* shli r2, r1, 57 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4899916394579099648ll /* 0x4400000000000000 */ , - {{6, 1, 58}, /* shli r2, r1, 58 */ - {6, 1, 62}, /* shli r3, r1, 62 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {5188146770730811392ll /* 0x4800000000000000 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 2, 59}} /* shli r3, r2, 59 */ - }, - {5764607523034234880ll /* 0x5000000000000000 */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 2, 60}} /* shli r3, r2, 60 */ - }, - {6917529027641081855ll /* 0x5fffffffffffffff */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 61}, /* shli r3, r2, 61 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {6917529027641081856ll /* 0x6000000000000000 */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 2, 61}} /* shli r3, r2, 61 */ - }, - {9223372036854775799ll /* 0x7ffffffffffffff7 */ , - {{5, 1, 1}, /* shl3add r2, r1, r1 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9223372036854775800ll /* 0x7ffffffffffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9223372036854775801ll /* 0x7ffffffffffffff9 */ , - {{6, 1, 60}, /* shli r2, r1, 60 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* shl3add r4, r3, r1 */ - }, - {9223372036854775803ll /* 0x7ffffffffffffffb */ , - {{4, 1, 1}, /* shl2add r2, r1, r1 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9223372036854775804ll /* 0x7ffffffffffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9223372036854775805ll /* 0x7ffffffffffffffd */ , - {{3, 1, 1}, /* shl1add r2, r1, r1 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9223372036854775806ll /* 0x7ffffffffffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 63}, /* shli r3, r1, 63 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {9223372036854775807ll /* 0x7fffffffffffffff */ , - {{6, 1, 63}, /* shli r2, r1, 63 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - } -}; - -const int tilegx_multiply_insn_seq_table_size = - (int) (sizeof tilegx_multiply_insn_seq_table - / sizeof tilegx_multiply_insn_seq_table[0]); diff --git a/gcc/config/tilegx/predicates.md b/gcc/config/tilegx/predicates.md deleted file mode 100644 index f21ddab..0000000 --- a/gcc/config/tilegx/predicates.md +++ /dev/null @@ -1,290 +0,0 @@ -;; Predicate definitions for Tilera TILE-Gx. -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Contributed by Walter Lee (walt@tilera.com) -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; . - -;; Return true if OP is the zero constant for MODE. -(define_predicate "const_zero_operand" - (and (match_code "const_int,const_double,const_vector") - (match_test "op == CONST0_RTX (mode)"))) - -;; Returns true if OP is either the constant zero or a register. -(define_predicate "reg_or_0_operand" - (and (ior (match_operand 0 "register_operand") - (match_operand 0 "const_zero_operand")) - (match_test "GET_MODE_SIZE (mode) <= UNITS_PER_WORD"))) - -; Return 1 if OP is a valid Pmode pointer. -(define_predicate "pointer_operand" - (and (match_operand 0 "address_operand") - (ior (match_operand 0 "pmode_register_operand") - (match_operand 0 "const_zero_operand")))) - -; Return 1 if OP is a network register identifier. -(define_predicate "netreg_operand" - (and (match_code "const_int") - (match_test "IN_RANGE (INTVAL (op), 0, 5)"))) - -; Return 1 if OP is an unsigned 6-bit constant. -(define_predicate "u6bit_cint_operand" - (and (match_code "const_int") - (match_test "INTVAL (op) == (INTVAL (op) & 0x3F)"))) - -;; Return 1 if OP is an unsigned 16-bit constant. -(define_predicate "u16bit_cint_operand" - (and (match_code "const_int") - (match_test "(unsigned HOST_WIDE_INT)INTVAL (op) < (1U << 16)"))) - -;; Return 1 if OP is a signed 8-bit constant. -(define_predicate "s8bit_cint_operand" - (and (match_code "const_int") - (match_test "satisfies_constraint_I (op)"))) - -;; Return 1 if OP is a signed 16-bit constant. -(define_predicate "s16bit_cint_operand" - (and (match_code "const_int") - (match_test "satisfies_constraint_J (op)"))) - -;; Return 1 if OP is an unsigned 14-bit constant. -(define_predicate "u14bit_cint_operand" - (and (match_code "const_int") - (match_test "(unsigned HOST_WIDE_INT)INTVAL (op) < (1U << 14)"))) - -;; Return 1 if OP is a constant or any register. -(define_predicate "reg_or_cint_operand" - (ior (match_operand 0 "register_operand") - (match_operand 0 "const_int_operand"))) - -;; Returns 1 if OP is a "last" unspec wrapper for a symbol, got, or -;; tls reference. -(define_predicate "const_last_symbolic_operand" - (and (match_code "const") - (match_test "GET_CODE (XEXP (op,0)) == UNSPEC") - (ior (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW0_LAST") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1_LAST") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW2_LAST") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1_LAST_PCREL") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW2_LAST_PCREL") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW0_LAST_GOT") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1_LAST_GOT") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1_LAST_TLS_GD") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1_LAST_TLS_IE") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1_LAST_TLS_LE") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1_LAST_PLT_PCREL") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW2_LAST_PLT_PCREL")))) - -;; Returns 1 if OP is an unspec wrapper for a symbol, got, or tls -;; reference. -(define_predicate "const_symbolic_operand" - (and (match_code "const") - (match_test "GET_CODE (XEXP (op,0)) == UNSPEC") - (ior (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW0") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW2") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW3") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW0_PCREL") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1_PCREL") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW0_GOT") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW0_TLS_GD") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW0_TLS_IE") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW0_TLS_LE") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW0_PLT_PCREL") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_HW1_PLT_PCREL")))) - -;; Return 1 if OP is a 8-element vector constant with identical signed -;; 8-bit elements or any register. -(define_predicate "reg_or_v8s8bit_operand" - (ior (match_operand 0 "register_operand") - (and (match_code "const_vector") - (match_test "CONST_VECTOR_NUNITS (op) == 8 - && (satisfies_constraint_I - (unwrap_const_vec_duplicate (op)))")))) - -;; Return 1 if OP is a 4-element vector constant with identical signed -;; 8-bit elements or any register. -(define_predicate "reg_or_v4s8bit_operand" - (ior (match_operand 0 "register_operand") - (and (match_code "const_vector") - (match_test "CONST_VECTOR_NUNITS (op) == 4 - && (satisfies_constraint_I - (unwrap_const_vec_duplicate (op)))")))) - -;; Return 1 if the operand is a valid second operand to an add insn. -(define_predicate "add_operand" - (if_then_else (match_code "const_int") - (match_test "satisfies_constraint_J (op)") - (ior (match_operand 0 "register_operand") - (match_operand 0 "const_last_symbolic_operand")))) - -;; Return 1 if the operand is a register or signed 8-bit immediate operand. -(define_predicate "reg_or_s8bit_operand" - (if_then_else (match_code "const_int") - (match_test "satisfies_constraint_I (op)") - (match_operand 0 "register_operand"))) - -;; Return 1 if the operand is a register or unsigned 5-bit immediate operand. -(define_predicate "reg_or_u5bit_operand" - (if_then_else (match_code "const_int") - (match_test "INTVAL (op) == (INTVAL (op) & 0x1F)") - (match_operand 0 "register_operand"))) - -;; Return 1 if the operand is a register or unsigned 6-bit immediate operand. -(define_predicate "reg_or_u6bit_operand" - (if_then_else (match_code "const_int") - (match_test "INTVAL (op) == (INTVAL (op) & 0x3F)") - (match_operand 0 "register_operand"))) - -;; Return 1 for an operand suitable for ANDing with a register. -(define_predicate "and_operand" - (if_then_else (match_code "const_int") - (match_test "satisfies_constraint_I (op) || satisfies_constraint_M (op)") - (match_operand 0 "register_operand"))) - -; Return 1 if the operand is 2, 4 or 8. -(define_predicate "cint_248_operand" - (and (match_code "const_int") - (match_test - "INTVAL (op) == 2 || INTVAL (op) == 4 || INTVAL (op) == 8"))) - -;; Return true if OP is a TLS symbolic operand. -(define_predicate "tls_symbolic_operand" - (and (match_code "symbol_ref") - (match_test "SYMBOL_REF_TLS_MODEL (op) != TLS_MODEL_NONE"))) - -;; Return true if OP is a symbolic operand for the TLS Global Dynamic model. -(define_predicate "tls_gd_symbolic_operand" - (and (match_code "symbol_ref") - (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_GLOBAL_DYNAMIC"))) - -;; Return true if OP is a symbolic operand for the TLS Local Dynamic model. -(define_predicate "tls_ld_symbolic_operand" - (and (match_code "symbol_ref") - (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_LOCAL_DYNAMIC"))) - -;; Return true if OP is a symbolic operand that can be used for the -;; TLS Initial Exec model. -(define_predicate "tls_ie_symbolic_operand" - (and (match_code "symbol_ref") - (ior (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_INITIAL_EXEC") - (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_LOCAL_EXEC")))) - -;; Return true if OP is a symbolic operand for the TLS Local Exec model. -(define_predicate "tls_le_symbolic_operand" - (and (match_code "symbol_ref") - (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_LOCAL_EXEC"))) - -;; Returns true if OP is any general operand except for an -;; auto-incrementing address operand. -(define_predicate "nonautoinc_operand" - (and (match_operand 0 "general_operand") - (not (ior (match_code "pre_dec") (match_code "pre_inc") - (match_code "post_dec") (match_code "post_inc") - (match_code "post_modify") (match_code "pre_modify"))))) - -;; Returns true if OP is a non-auto-incrementing memory operand. -(define_predicate "nonautoincmem_operand" - (match_operand 0 "memory_operand") -{ - return nonautoinc_operand (XEXP (op, 0), GET_MODE (XEXP (op, 0))); -}) - -;; Returns true if OP is a non-auto-incrementing memory, general -;; operand. -(define_predicate "nonautoincmem_general_operand" - (match_operand 0 "general_operand") -{ - if (memory_operand (op, mode)) - return nonautoinc_operand (XEXP (op, 0), GET_MODE (XEXP (op, 0))); - else - return true; -}) - -;; Returns true if OP is a non-auto-incrementing memory, non-immediate -;; operand. -(define_predicate "nonautoincmem_nonimmediate_operand" - (match_operand 0 "nonimmediate_operand") -{ - if (memory_operand (op, mode)) - return nonautoinc_operand (XEXP (op, 0), GET_MODE (XEXP (op, 0))); - else - return true; -}) - -;; Return true if OP is a valid operand for the source of a move insn. -(define_predicate "move_operand" - (match_operand 0 "general_operand") -{ - /* If both modes are non-void they must be the same. */ - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return false; - - switch (GET_CODE (op)) - { - case CONST_INT: - return (satisfies_constraint_J (op) - || satisfies_constraint_K (op) - || (mode == DImode && - (satisfies_constraint_N (op) - || satisfies_constraint_P (op)))); - - case MEM: - return memory_address_p (mode, XEXP (op, 0)); - - case CONST: - return const_last_symbolic_operand (op, mode); - - default: - return register_operand (op, mode); - } -}) - -;; Returns 1 if OP is a symbolic operand, i.e. a symbol_ref or a label_ref, -;; possibly with an offset. -(define_predicate "symbolic_operand" - (ior (match_code "symbol_ref,label_ref") - (and (match_code "const") - (match_test "GET_CODE (XEXP (op,0)) == PLUS - && (GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF - || GET_CODE (XEXP (XEXP (op,0), 0)) == LABEL_REF) - && CONST_INT_P (XEXP (XEXP (op,0), 1))")))) - -;; Return 1 for an unsigned 16 bit or a const symbolc operand. -(define_predicate "u16bit_or_const_symbolic_operand" - (ior (match_operand 0 "u16bit_cint_operand") - (match_operand 0 "const_symbolic_operand"))) - -;; Return true if OP is an address suitable for a call insn. -;; Call insn on TILE can take a PC-relative constant address -;; or any regular memory address. -(define_predicate "call_address_operand" - (ior (match_operand 0 "symbolic_operand") - (match_test "memory_address_p (Pmode, op)"))) - -;; Return true if OP is an operand suitable for a call insn. -(define_predicate "call_operand" - (and (match_code "mem") - (match_test "call_address_operand (XEXP (op, 0), mode)"))) - -;; Return 1 if OP is a signed comparison operation. -;; We can use these directly in compares against zero. -(define_predicate "signed_comparison_operator" - (match_code "eq,ne,le,lt,ge,gt")) - -;; Return 1 if OP is a equal or not-equal operation. -(define_predicate "eqne_operator" - (match_code "eq,ne")) diff --git a/gcc/config/tilegx/sync.md b/gcc/config/tilegx/sync.md deleted file mode 100644 index 74be4c9..0000000 --- a/gcc/config/tilegx/sync.md +++ /dev/null @@ -1,227 +0,0 @@ -;; GCC machine description for Tilera TILE-Gx synchronization -;; instructions. -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Contributed by Walter Lee (walt@tilera.com) -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; . - -(define_code_iterator fetchop [plus ior and]) -(define_code_attr fetchop_name [(plus "add") (ior "or") (and "and")]) - -(define_insn "mtspr_cmpexch" - [(set (reg:I48MODE TILEGX_CMPEXCH_REG) - (unspec_volatile:I48MODE - [(match_operand:I48MODE 0 "reg_or_0_operand" "rO")] - UNSPEC_SPR_MOVE))] - "" - "mtspr\tCMPEXCH_VALUE, %r0" - [(set_attr "type" "X1")]) - - -(define_expand "atomic_compare_and_swap" - [(match_operand:DI 0 "register_operand" "") ;; bool output - (match_operand:I48MODE 1 "register_operand" "") ;; val output - (match_operand:I48MODE 2 "nonautoincmem_operand" "") ;; memory - (match_operand:I48MODE 3 "reg_or_0_operand" "") ;; expected value - (match_operand:I48MODE 4 "reg_or_0_operand" "") ;; desired value - (match_operand:SI 5 "const_int_operand" "") ;; is_weak - (match_operand:SI 6 "const_int_operand" "") ;; mod_s - (match_operand:SI 7 "const_int_operand" "")] ;; mod_f - "" -{ - enum memmodel mod_s = (enum memmodel) INTVAL (operands[6]); - - if (operands[3] != const0_rtx) - operands[3] = force_reg (mode, operands[3]); - if (operands[4] != const0_rtx) - operands[4] = force_reg (mode, operands[4]); - - tilegx_pre_atomic_barrier (mod_s); - emit_insn (gen_mtspr_cmpexch (operands[3])); - emit_insn (gen_atomic_compare_and_swap_bare (operands[1], operands[2], - operands[4])); - tilegx_post_atomic_barrier (mod_s); - emit_insn (gen_insn_cmpeq_di (operands[0], operands[1], operands[3])); - DONE; -}) - - -(define_insn "atomic_compare_and_swap_bare" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (match_operand:I48MODE 1 "nonautoincmem_operand" "+U")) - (set (match_dup 1) - (unspec_volatile:I48MODE - [(match_dup 1) - (reg:I48MODE TILEGX_CMPEXCH_REG) - (match_operand:I48MODE 2 "reg_or_0_operand" "rO")] - UNSPEC_CMPXCHG))] - "" - "cmpexch\t%0, %1, %r2" - [(set_attr "type" "X1_remote")]) - - -(define_expand "atomic_exchange" - [(match_operand:I48MODE 0 "register_operand" "") ;; result - (match_operand:I48MODE 1 "nonautoincmem_operand" "") ;; memory - (match_operand:I48MODE 2 "reg_or_0_operand" "") ;; input - (match_operand:SI 3 "const_int_operand" "")] ;; model - "" -{ - enum memmodel model = (enum memmodel) INTVAL (operands[3]); - - tilegx_pre_atomic_barrier (model); - emit_insn (gen_atomic_exchange_bare (operands[0], operands[1], - operands[2])); - tilegx_post_atomic_barrier (model); - DONE; -}) - - -(define_insn "atomic_exchange_bare" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (match_operand:I48MODE 1 "nonautoincmem_operand" "+U")) - (set (match_dup 1) - (unspec_volatile:I48MODE - [(match_operand:I48MODE 2 "reg_or_0_operand" "rO")] - UNSPEC_XCHG))] - "" - "exch\t%0, %1, %r2" - [(set_attr "type" "X1_remote")]) - - -(define_expand "atomic_fetch_" - [(match_operand:I48MODE 0 "register_operand" "") ;; result - (match_operand:I48MODE 1 "nonautoincmem_operand" "") ;; memory - (unspec_volatile:I48MODE - [(fetchop:I48MODE - (match_dup 1) - (match_operand:I48MODE 2 "reg_or_0_operand" ""))] ;; value - UNSPEC_ATOMIC) - (match_operand:SI 3 "const_int_operand" "")] ;; model - "" -{ - enum memmodel model = (enum memmodel) INTVAL (operands[3]); - - tilegx_pre_atomic_barrier (model); - emit_insn (gen_atomic_fetch__bare (operands[0], - operands[1], - operands[2])); - tilegx_post_atomic_barrier (model); - DONE; -}) - - -(define_insn "atomic_fetch__bare" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (match_operand:I48MODE 1 "nonautoincmem_operand" "+U")) - (set (match_dup 1) - (unspec_volatile:I48MODE - [(fetchop:I48MODE - (match_dup 1) - (match_operand:I48MODE 2 "reg_or_0_operand" "rO"))] - UNSPEC_ATOMIC))] - "" - "fetch\t%0, %1, %r2" - [(set_attr "type" "X1_remote")]) - - -(define_expand "atomic_fetch_sub" - [(match_operand:I48MODE 0 "register_operand" "") ;; result - (match_operand:I48MODE 1 "nonautoincmem_operand" "") ;; memory - (unspec_volatile:I48MODE - [(minus:I48MODE - (match_dup 1) - (match_operand:I48MODE 2 "reg_or_0_operand" ""))] ;; value - UNSPEC_ATOMIC) - (match_operand:SI 3 "const_int_operand" "")] ;; model - "" -{ - rtx addend; - enum memmodel model = (enum memmodel) INTVAL (operands[3]); - - if (operands[2] != const0_rtx) - { - addend = gen_reg_rtx (mode); - emit_move_insn (addend, - gen_rtx_MINUS (mode, const0_rtx, operands[2])); - } - else - addend = operands[2]; - - tilegx_pre_atomic_barrier (model); - emit_insn (gen_atomic_fetch_add_bare (operands[0], - operands[1], - addend)); - tilegx_post_atomic_barrier (model); - DONE; -}) - - -(define_expand "atomic_test_and_set" - [(match_operand:QI 0 "register_operand" "") ;; bool output - (match_operand:QI 1 "nonautoincmem_operand" "+U") ;; memory - (match_operand:SI 2 "const_int_operand" "")] ;; model - "" -{ - rtx addr, aligned_addr, aligned_mem, offset, word, shmt, tmp; - rtx result = operands[0]; - rtx mem = operands[1]; - enum memmodel model = (enum memmodel) INTVAL (operands[2]); - - addr = force_reg (Pmode, XEXP (mem, 0)); - - aligned_addr = gen_reg_rtx (Pmode); - emit_move_insn (aligned_addr, gen_rtx_AND (Pmode, addr, GEN_INT (-8))); - - aligned_mem = change_address (mem, DImode, aligned_addr); - set_mem_alias_set (aligned_mem, 0); - - tmp = gen_reg_rtx (Pmode); - if (BYTES_BIG_ENDIAN) - { - emit_move_insn (gen_lowpart (DImode, tmp), - gen_rtx_NOT (DImode, gen_lowpart (DImode, addr))); - } - else - { - tmp = addr; - } - - offset = gen_reg_rtx (DImode); - emit_move_insn (offset, gen_rtx_AND (DImode, gen_lowpart (DImode, tmp), - GEN_INT (7))); - - tmp = gen_reg_rtx (DImode); - emit_move_insn (tmp, GEN_INT (1)); - - shmt = gen_reg_rtx (DImode); - emit_move_insn (shmt, gen_rtx_ASHIFT (DImode, offset, GEN_INT (3))); - - word = gen_reg_rtx (DImode); - emit_move_insn (word, gen_rtx_ASHIFT (DImode, tmp, - gen_lowpart (SImode, shmt))); - - tmp = gen_reg_rtx (DImode); - tilegx_pre_atomic_barrier (model); - emit_insn (gen_atomic_fetch_or_baredi (tmp, aligned_mem, word)); - tilegx_post_atomic_barrier (model); - - emit_move_insn (gen_lowpart (DImode, result), - gen_rtx_LSHIFTRT (DImode, tmp, - gen_lowpart (SImode, shmt))); - DONE; -}) diff --git a/gcc/config/tilegx/t-tilegx b/gcc/config/tilegx/t-tilegx deleted file mode 100644 index f357194..0000000 --- a/gcc/config/tilegx/t-tilegx +++ /dev/null @@ -1,21 +0,0 @@ -MULTILIB_OPTIONS = m64/m32 -MULTILIB_DIRNAMES = 64 32 -MULTILIB_OSDIRNAMES = ../lib ../lib32 - -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib - -tilegx-c.o: $(srcdir)/config/tilegx/tilegx-c.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(MACHMODE_H) \ - $(TM_H) $(TM_P_H) $(CPPLIB_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - -$(srcdir)/config/tilegx/mul-tables.cc: \ - $(srcdir)/config/tilepro/gen-mul-tables.cc - $(CXX_FOR_BUILD) $(BUILD_CPPFLAGS) -O2 -o gen-mul-tables $<; - ./gen-mul-tables > $@ - -mul-tables.o: $(srcdir)/config/tilegx/mul-tables.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(EXPR_H) $(OPTABS_H) \ - $(srcdir)/config/tilegx/tilegx-multiply.h - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/tilegx/tilegx-builtins.h b/gcc/config/tilegx/tilegx-builtins.h deleted file mode 100644 index 22fdf84..0000000 --- a/gcc/config/tilegx/tilegx-builtins.h +++ /dev/null @@ -1,325 +0,0 @@ -/* Enum for builtin intrinsics for TILE-Gx. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#ifndef GCC_TILEGX_BUILTINS_H -#define GCC_TILEGX_BUILTINS_H - -enum tilegx_builtin -{ - TILEGX_INSN_ADD, - TILEGX_INSN_ADDX, - TILEGX_INSN_ADDXSC, - TILEGX_INSN_AND, - TILEGX_INSN_BFEXTS, - TILEGX_INSN_BFEXTU, - TILEGX_INSN_BFINS, - TILEGX_INSN_CLZ, - TILEGX_INSN_CMOVEQZ, - TILEGX_INSN_CMOVNEZ, - TILEGX_INSN_CMPEQ, - TILEGX_INSN_CMPEXCH, - TILEGX_INSN_CMPEXCH4, - TILEGX_INSN_CMPLES, - TILEGX_INSN_CMPLEU, - TILEGX_INSN_CMPLTS, - TILEGX_INSN_CMPLTU, - TILEGX_INSN_CMPNE, - TILEGX_INSN_CMUL, - TILEGX_INSN_CMULA, - TILEGX_INSN_CMULAF, - TILEGX_INSN_CMULF, - TILEGX_INSN_CMULFR, - TILEGX_INSN_CMULH, - TILEGX_INSN_CMULHR, - TILEGX_INSN_CRC32_32, - TILEGX_INSN_CRC32_8, - TILEGX_INSN_CTZ, - TILEGX_INSN_DBLALIGN, - TILEGX_INSN_DBLALIGN2, - TILEGX_INSN_DBLALIGN4, - TILEGX_INSN_DBLALIGN6, - TILEGX_INSN_DRAIN, - TILEGX_INSN_DTLBPR, - TILEGX_INSN_EXCH, - TILEGX_INSN_EXCH4, - TILEGX_INSN_FDOUBLE_ADD_FLAGS, - TILEGX_INSN_FDOUBLE_ADDSUB, - TILEGX_INSN_FDOUBLE_MUL_FLAGS, - TILEGX_INSN_FDOUBLE_PACK1, - TILEGX_INSN_FDOUBLE_PACK2, - TILEGX_INSN_FDOUBLE_SUB_FLAGS, - TILEGX_INSN_FDOUBLE_UNPACK_MAX, - TILEGX_INSN_FDOUBLE_UNPACK_MIN, - TILEGX_INSN_FETCHADD, - TILEGX_INSN_FETCHADD4, - TILEGX_INSN_FETCHADDGEZ, - TILEGX_INSN_FETCHADDGEZ4, - TILEGX_INSN_FETCHAND, - TILEGX_INSN_FETCHAND4, - TILEGX_INSN_FETCHOR, - TILEGX_INSN_FETCHOR4, - TILEGX_INSN_FINV, - TILEGX_INSN_FLUSH, - TILEGX_INSN_FLUSHWB, - TILEGX_INSN_FNOP, - TILEGX_INSN_FSINGLE_ADD1, - TILEGX_INSN_FSINGLE_ADDSUB2, - TILEGX_INSN_FSINGLE_MUL1, - TILEGX_INSN_FSINGLE_MUL2, - TILEGX_INSN_FSINGLE_PACK1, - TILEGX_INSN_FSINGLE_PACK2, - TILEGX_INSN_FSINGLE_SUB1, - TILEGX_INSN_ICOH, - TILEGX_INSN_ILL, - TILEGX_INSN_INFO, - TILEGX_INSN_INFOL, - TILEGX_INSN_INV, - TILEGX_INSN_LD, - TILEGX_INSN_LD1S, - TILEGX_INSN_LD1U, - TILEGX_INSN_LD2S, - TILEGX_INSN_LD2U, - TILEGX_INSN_LD4S, - TILEGX_INSN_LD4U, - TILEGX_INSN_LDNA, - TILEGX_INSN_LDNT, - TILEGX_INSN_LDNT1S, - TILEGX_INSN_LDNT1U, - TILEGX_INSN_LDNT2S, - TILEGX_INSN_LDNT2U, - TILEGX_INSN_LDNT4S, - TILEGX_INSN_LDNT4U, - TILEGX_INSN_LD_L2, - TILEGX_INSN_LD1S_L2, - TILEGX_INSN_LD1U_L2, - TILEGX_INSN_LD2S_L2, - TILEGX_INSN_LD2U_L2, - TILEGX_INSN_LD4S_L2, - TILEGX_INSN_LD4U_L2, - TILEGX_INSN_LDNA_L2, - TILEGX_INSN_LDNT_L2, - TILEGX_INSN_LDNT1S_L2, - TILEGX_INSN_LDNT1U_L2, - TILEGX_INSN_LDNT2S_L2, - TILEGX_INSN_LDNT2U_L2, - TILEGX_INSN_LDNT4S_L2, - TILEGX_INSN_LDNT4U_L2, - TILEGX_INSN_LD_MISS, - TILEGX_INSN_LD1S_MISS, - TILEGX_INSN_LD1U_MISS, - TILEGX_INSN_LD2S_MISS, - TILEGX_INSN_LD2U_MISS, - TILEGX_INSN_LD4S_MISS, - TILEGX_INSN_LD4U_MISS, - TILEGX_INSN_LDNA_MISS, - TILEGX_INSN_LDNT_MISS, - TILEGX_INSN_LDNT1S_MISS, - TILEGX_INSN_LDNT1U_MISS, - TILEGX_INSN_LDNT2S_MISS, - TILEGX_INSN_LDNT2U_MISS, - TILEGX_INSN_LDNT4S_MISS, - TILEGX_INSN_LDNT4U_MISS, - TILEGX_INSN_LNK, - TILEGX_INSN_MF, - TILEGX_INSN_MFSPR, - TILEGX_INSN_MM, - TILEGX_INSN_MNZ, - TILEGX_INSN_MOVE, - TILEGX_INSN_MTSPR, - TILEGX_INSN_MUL_HS_HS, - TILEGX_INSN_MUL_HS_HU, - TILEGX_INSN_MUL_HS_LS, - TILEGX_INSN_MUL_HS_LU, - TILEGX_INSN_MUL_HU_HU, - TILEGX_INSN_MUL_HU_LS, - TILEGX_INSN_MUL_HU_LU, - TILEGX_INSN_MUL_LS_LS, - TILEGX_INSN_MUL_LS_LU, - TILEGX_INSN_MUL_LU_LU, - TILEGX_INSN_MULA_HS_HS, - TILEGX_INSN_MULA_HS_HU, - TILEGX_INSN_MULA_HS_LS, - TILEGX_INSN_MULA_HS_LU, - TILEGX_INSN_MULA_HU_HU, - TILEGX_INSN_MULA_HU_LS, - TILEGX_INSN_MULA_HU_LU, - TILEGX_INSN_MULA_LS_LS, - TILEGX_INSN_MULA_LS_LU, - TILEGX_INSN_MULA_LU_LU, - TILEGX_INSN_MULAX, - TILEGX_INSN_MULX, - TILEGX_INSN_MZ, - TILEGX_INSN_NAP, - TILEGX_INSN_NOP, - TILEGX_INSN_NOR, - TILEGX_INSN_OR, - TILEGX_INSN_PCNT, - TILEGX_INSN_PREFETCH_L1, - TILEGX_INSN_PREFETCH_L1_FAULT, - TILEGX_INSN_PREFETCH_L2, - TILEGX_INSN_PREFETCH_L2_FAULT, - TILEGX_INSN_PREFETCH_L3, - TILEGX_INSN_PREFETCH_L3_FAULT, - TILEGX_INSN_REVBITS, - TILEGX_INSN_REVBYTES, - TILEGX_INSN_ROTL, - TILEGX_INSN_SHL, - TILEGX_INSN_SHL16INSLI, - TILEGX_INSN_SHL1ADD, - TILEGX_INSN_SHL1ADDX, - TILEGX_INSN_SHL2ADD, - TILEGX_INSN_SHL2ADDX, - TILEGX_INSN_SHL3ADD, - TILEGX_INSN_SHL3ADDX, - TILEGX_INSN_SHLX, - TILEGX_INSN_SHRS, - TILEGX_INSN_SHRU, - TILEGX_INSN_SHRUX, - TILEGX_INSN_SHUFFLEBYTES, - TILEGX_INSN_SHUFFLEBYTES1, - TILEGX_INSN_ST, - TILEGX_INSN_ST1, - TILEGX_INSN_ST2, - TILEGX_INSN_ST4, - TILEGX_INSN_STNT, - TILEGX_INSN_STNT1, - TILEGX_INSN_STNT2, - TILEGX_INSN_STNT4, - TILEGX_INSN_SUB, - TILEGX_INSN_SUBX, - TILEGX_INSN_SUBXSC, - TILEGX_INSN_TBLIDXB0, - TILEGX_INSN_TBLIDXB1, - TILEGX_INSN_TBLIDXB2, - TILEGX_INSN_TBLIDXB3, - TILEGX_INSN_V1ADD, - TILEGX_INSN_V1ADDI, - TILEGX_INSN_V1ADDUC, - TILEGX_INSN_V1ADIFFU, - TILEGX_INSN_V1AVGU, - TILEGX_INSN_V1CMPEQ, - TILEGX_INSN_V1CMPEQI, - TILEGX_INSN_V1CMPLES, - TILEGX_INSN_V1CMPLEU, - TILEGX_INSN_V1CMPLTS, - TILEGX_INSN_V1CMPLTSI, - TILEGX_INSN_V1CMPLTU, - TILEGX_INSN_V1CMPLTUI, - TILEGX_INSN_V1CMPNE, - TILEGX_INSN_V1DDOTPU, - TILEGX_INSN_V1DDOTPUA, - TILEGX_INSN_V1DDOTPUS, - TILEGX_INSN_V1DDOTPUSA, - TILEGX_INSN_V1DOTP, - TILEGX_INSN_V1DOTPA, - TILEGX_INSN_V1DOTPU, - TILEGX_INSN_V1DOTPUA, - TILEGX_INSN_V1DOTPUS, - TILEGX_INSN_V1DOTPUSA, - TILEGX_INSN_V1INT_H, - TILEGX_INSN_V1INT_L, - TILEGX_INSN_V1MAXU, - TILEGX_INSN_V1MAXUI, - TILEGX_INSN_V1MINU, - TILEGX_INSN_V1MINUI, - TILEGX_INSN_V1MNZ, - TILEGX_INSN_V1MULTU, - TILEGX_INSN_V1MULU, - TILEGX_INSN_V1MULUS, - TILEGX_INSN_V1MZ, - TILEGX_INSN_V1SADAU, - TILEGX_INSN_V1SADU, - TILEGX_INSN_V1SHL, - TILEGX_INSN_V1SHLI, - TILEGX_INSN_V1SHRS, - TILEGX_INSN_V1SHRSI, - TILEGX_INSN_V1SHRU, - TILEGX_INSN_V1SHRUI, - TILEGX_INSN_V1SUB, - TILEGX_INSN_V1SUBUC, - TILEGX_INSN_V2ADD, - TILEGX_INSN_V2ADDI, - TILEGX_INSN_V2ADDSC, - TILEGX_INSN_V2ADIFFS, - TILEGX_INSN_V2AVGS, - TILEGX_INSN_V2CMPEQ, - TILEGX_INSN_V2CMPEQI, - TILEGX_INSN_V2CMPLES, - TILEGX_INSN_V2CMPLEU, - TILEGX_INSN_V2CMPLTS, - TILEGX_INSN_V2CMPLTSI, - TILEGX_INSN_V2CMPLTU, - TILEGX_INSN_V2CMPLTUI, - TILEGX_INSN_V2CMPNE, - TILEGX_INSN_V2DOTP, - TILEGX_INSN_V2DOTPA, - TILEGX_INSN_V2INT_H, - TILEGX_INSN_V2INT_L, - TILEGX_INSN_V2MAXS, - TILEGX_INSN_V2MAXSI, - TILEGX_INSN_V2MINS, - TILEGX_INSN_V2MINSI, - TILEGX_INSN_V2MNZ, - TILEGX_INSN_V2MULFSC, - TILEGX_INSN_V2MULS, - TILEGX_INSN_V2MULTS, - TILEGX_INSN_V2MZ, - TILEGX_INSN_V2PACKH, - TILEGX_INSN_V2PACKL, - TILEGX_INSN_V2PACKUC, - TILEGX_INSN_V2SADAS, - TILEGX_INSN_V2SADAU, - TILEGX_INSN_V2SADS, - TILEGX_INSN_V2SADU, - TILEGX_INSN_V2SHL, - TILEGX_INSN_V2SHLI, - TILEGX_INSN_V2SHLSC, - TILEGX_INSN_V2SHRS, - TILEGX_INSN_V2SHRSI, - TILEGX_INSN_V2SHRU, - TILEGX_INSN_V2SHRUI, - TILEGX_INSN_V2SUB, - TILEGX_INSN_V2SUBSC, - TILEGX_INSN_V4ADD, - TILEGX_INSN_V4ADDSC, - TILEGX_INSN_V4INT_H, - TILEGX_INSN_V4INT_L, - TILEGX_INSN_V4PACKSC, - TILEGX_INSN_V4SHL, - TILEGX_INSN_V4SHLSC, - TILEGX_INSN_V4SHRS, - TILEGX_INSN_V4SHRU, - TILEGX_INSN_V4SUB, - TILEGX_INSN_V4SUBSC, - TILEGX_INSN_WH64, - TILEGX_INSN_XOR, - TILEGX_NETWORK_BARRIER, - TILEGX_IDN0_RECEIVE, - TILEGX_IDN1_RECEIVE, - TILEGX_IDN_SEND, - TILEGX_UDN0_RECEIVE, - TILEGX_UDN1_RECEIVE, - TILEGX_UDN2_RECEIVE, - TILEGX_UDN3_RECEIVE, - TILEGX_UDN_SEND, - TILEGX_BUILTIN_max -}; - -#endif /* !GCC_TILEGX_BUILTINS_H */ diff --git a/gcc/config/tilegx/tilegx-c.cc b/gcc/config/tilegx/tilegx-c.cc deleted file mode 100644 index 6ef6808..0000000 --- a/gcc/config/tilegx/tilegx-c.cc +++ /dev/null @@ -1,55 +0,0 @@ -/* Definitions of C specific functions for TILE-Gx. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#define IN_TARGET_CODE 1 - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "c-family/c-common.h" - -/* copy defines in c-cppbuiltin.cc */ -# define builtin_define(TXT) cpp_define (pfile, TXT) -# define builtin_assert(TXT) cpp_assert (pfile, TXT) - - -/* Implement TARGET_CPU_CPP_BUILTINS. */ -void -tilegx_cpu_cpp_builtins (struct cpp_reader *pfile) -{ - builtin_define ("__tile__"); - builtin_define ("__tilegx__"); - builtin_define ("__tile_chip__=10"); - builtin_define ("__tile_chip_rev__=0"); - builtin_assert ("cpu=tilegx"); - builtin_assert ("machine=tilegx"); - - if (TARGET_32BIT) - builtin_define ("__tilegx32__"); - - builtin_define ("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1"); - builtin_define ("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); - - TILEGX_CPU_CPP_ENDIAN_BUILTINS (); - GNU_USER_TARGET_OS_CPP_BUILTINS (); -} - - diff --git a/gcc/config/tilegx/tilegx-generic.md b/gcc/config/tilegx/tilegx-generic.md deleted file mode 100644 index debfe9d..0000000 --- a/gcc/config/tilegx/tilegx-generic.md +++ /dev/null @@ -1,115 +0,0 @@ -;; Scheduling description for Tilera TILE-Gx chip. -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Contributed by Walter Lee (walt@tilera.com) -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; . - -(define_automaton "tile") - -; Make the scheduling automaton an ndfa. -(automata_option "ndfa") - -; Name the three pipes. -(define_cpu_unit "X0" "tile") -(define_cpu_unit "X1" "tile") -(define_cpu_unit "Y0" "tile") -(define_cpu_unit "Y1" "tile") -(define_cpu_unit "Y2" "tile") - -(define_insn_reservation "X0" 1 - (eq_attr "type" "X0") - "X0") - -(define_insn_reservation "X0_2cycle" 2 - (eq_attr "type" "X0_2cycle") - "X0,nothing") - -(define_insn_reservation "X1" 1 - (eq_attr "type" "X1,X1_branch") - "X1") - -(define_insn_reservation "X1_2cycle" 2 - (eq_attr "type" "X1_2cycle") - "X1,nothing") - -(define_insn_reservation "X1_L2" 11 - (eq_attr "type" "X1_L2") - "X1") - -(define_insn_reservation "X1_remote" 50 - (eq_attr "type" "X1_remote") - "X1") - -(define_insn_reservation "X1_miss" 80 - (eq_attr "type" "X1_miss") - "X1") - -(define_insn_reservation "X01" 1 - (eq_attr "type" "X01") - "X0|X1") - -(define_insn_reservation "Y0" 1 - (eq_attr "type" "Y0") - "Y0|X0") - -(define_insn_reservation "Y0_2cycle" 2 - (eq_attr "type" "Y0_2cycle") - "Y0|X0,nothing") - -(define_insn_reservation "Y1" 1 - (eq_attr "type" "Y1") - "Y1|X1") - -(define_insn_reservation "Y2" 1 - (eq_attr "type" "Y2") - "Y2|X1") - -(define_insn_reservation "Y2_2cycle" 2 - (eq_attr "type" "Y2_2cycle") - "Y2|X1,nothing") - -(define_insn_reservation "Y2_L2" 11 - (eq_attr "type" "Y2_L2") - "Y2|X1") - -(define_insn_reservation "Y2_miss" 80 - (eq_attr "type" "Y2_miss") - "Y2|X1") - -(define_insn_reservation "Y01" 1 - (eq_attr "type" "Y01") - "Y0|Y1|X0|X1") - -(define_insn_reservation "nothing" 0 - (eq_attr "type" "nothing") - "nothing") - -(define_insn_reservation "cannot_bundle" 1 - (eq_attr "type" "cannot_bundle") - "X0+X1") - -(define_insn_reservation "cannot_bundle_3cycle" 3 - (eq_attr "type" "cannot_bundle_3cycle") - "X0+X1") - -(define_insn_reservation "cannot_bundle_4cycle" 4 - (eq_attr "type" "cannot_bundle_4cycle") - "X0+X1") - - -; A bundle must be in either X format or Y format. -(exclusion_set "X0,X1" "Y0,Y1,Y2") diff --git a/gcc/config/tilegx/tilegx-modes.def b/gcc/config/tilegx/tilegx-modes.def deleted file mode 100644 index d5fa23a..0000000 --- a/gcc/config/tilegx/tilegx-modes.def +++ /dev/null @@ -1,37 +0,0 @@ -/* TILE-Gx extra machine modes. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -/* Extra modes for handling struct returns in up to 10 registers. */ -INT_MODE (R3I, 24); -INT_MODE (R5I, 40); -INT_MODE (R6I, 48); -INT_MODE (R7I, 56); -INT_MODE (R8I, 64); -INT_MODE (R9I, 72); -INT_MODE (R10I, 80); - -/* Vector modes. */ -VECTOR_MODES (INT, 8); /* V8QI V4HI V2SI */ -VECTOR_MODE (INT, QI, 16); /* V16QI */ -VECTOR_MODE (INT, HI, 8); /* V8HI */ -VECTOR_MODE (INT, SI, 4); /* V4SI */ -VECTOR_MODE (INT, HI, 2); /* V2HI */ - -VECTOR_MODE (INT, QI, 4); /* V4QI */ diff --git a/gcc/config/tilegx/tilegx-multiply.h b/gcc/config/tilegx/tilegx-multiply.h deleted file mode 100644 index 766a638..0000000 --- a/gcc/config/tilegx/tilegx-multiply.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Header for constant multiple table for TILE-Gx. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#ifndef GCC_TILEGX_MULTIPLY_H -#define GCC_TILEGX_MULTIPLY_H - -/* A node of a tilegx_multiply_insn_seq, corresponding to a single - machine instruction such as 'add', 's1a', or an shl by a constant. */ -struct tilegx_multiply_insn_seq_entry -{ - /* Which operation this node performs (e.g. an add or sub). - Don't use this directly, call get_opcode() table to get a insn_code. */ - unsigned char compressed_opcode; - - /* The left-hand side of this expression tree. - If equal to 0, it refers to 'zero'. - If equal to 1, it refers to the original input to the multiply operation. - Otherwise, subtract two and it is an index into the containing - tilegx_multiply_insn_seq's 'op' array. Since it can only point to some - value that has already been computed it will always point to an - earlier entry in the array. */ - unsigned char lhs; - - /* This is like lhs, but for the right-hand side. However, for shift - opcodes this is a shift count rather than an operand index. */ - unsigned char rhs; -}; - -/* Maximum size of op array. */ -#define tilegx_multiply_insn_seq_MAX_OPERATIONS 4 - -/* This defines a DAG describing how to multiply by a constant in - terms of one or more machine instructions. */ -struct tilegx_multiply_insn_seq -{ - /* The constant factor by which this expression tree multiplies its input. */ - long long multiplier; - - /* The nodes of the parse tree. These are ordered so that instructions - can be emitted in the same order that they appear in this array. - Entry entry in this array can only refer to earlier entries in - the array. */ - struct tilegx_multiply_insn_seq_entry - op[tilegx_multiply_insn_seq_MAX_OPERATIONS]; - -}; - -/* A mapping from the compressed opcode to the corresponding enum - insn_code. */ -extern const enum insn_code tilegx_multiply_insn_seq_decode_opcode[]; - -/* Table mapping constant int multipliers to an expression - tree that efficiently performs that multiplication. - This is sorted by its 'multiplier' field so a binary search - can look for matches. */ -extern const struct tilegx_multiply_insn_seq tilegx_multiply_insn_seq_table[]; - -/* The number of elements in multiply_insn_seq_table. */ -extern const int tilegx_multiply_insn_seq_table_size; - -#endif /* !GCC_TILEGX_MULTIPLY_H */ diff --git a/gcc/config/tilegx/tilegx-opts.h b/gcc/config/tilegx/tilegx-opts.h deleted file mode 100644 index ecc06e2..0000000 --- a/gcc/config/tilegx/tilegx-opts.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Definitions for option handling for TILE-Gx. - Copyright (C) 2012-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#ifndef TILEGX_OPTS_H -#define TILEGX_OPTS_H - -enum cmodel { - CM_SMALL, /* Makes various assumpation about sizes of code and - data fits. */ - CM_LARGE, /* No assumptions. */ - CM_SMALL_PIC, /* Makes various assumpation about sizes of code and - data fits. */ - CM_LARGE_PIC /* No assumptions. */ -}; - -#endif diff --git a/gcc/config/tilegx/tilegx-protos.h b/gcc/config/tilegx/tilegx-protos.h deleted file mode 100644 index 7263524..0000000 --- a/gcc/config/tilegx/tilegx-protos.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Prototypes of target machine for TILE-Gx. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#ifndef GCC_TILEGX_PROTOS_H -#define GCC_TILEGX_PROTOS_H - -extern void tilegx_init_expanders (void); -extern void tilegx_compute_pcrel_address (rtx, rtx); -extern void tilegx_compute_pcrel_plt_address (rtx, rtx); -extern bool tilegx_legitimate_pic_operand_p (rtx); -extern rtx tilegx_simd_int (rtx, machine_mode); - -#ifdef RTX_CODE -extern bool tilegx_bitfield_operand_p (HOST_WIDE_INT, int *, int *); -extern void tilegx_expand_set_const64 (rtx, rtx); -extern bool tilegx_expand_mov (machine_mode, rtx *); -extern void tilegx_expand_unaligned_load (rtx, rtx, HOST_WIDE_INT, - HOST_WIDE_INT, bool); -extern void tilegx_expand_movmisalign (machine_mode, rtx *); -extern void tilegx_allocate_stack (rtx, rtx); -extern bool tilegx_expand_muldi (rtx, rtx, rtx); -extern void tilegx_expand_smuldi3_highpart (rtx, rtx, rtx); -extern void tilegx_expand_umuldi3_highpart (rtx, rtx, rtx); - -extern bool tilegx_emit_setcc (rtx[], machine_mode); -extern void tilegx_emit_conditional_branch (rtx[], machine_mode); -extern rtx tilegx_emit_conditional_move (rtx); -extern const char *tilegx_output_cbranch_with_opcode (rtx_insn *, rtx *, - const char *, - const char *, int); -extern const char *tilegx_output_cbranch (rtx_insn *, rtx *, bool); -extern void tilegx_expand_tablejump (rtx, rtx); -extern void tilegx_expand_builtin_vector_binop (rtx (*)(rtx, rtx, rtx), - machine_mode, rtx, - machine_mode, rtx, rtx, - bool); -extern void tilegx_pre_atomic_barrier (enum memmodel); -extern void tilegx_post_atomic_barrier (enum memmodel); -#endif /* RTX_CODE */ - -extern bool tilegx_can_use_return_insn_p (void); -extern void tilegx_expand_prologue (void); -extern void tilegx_expand_epilogue (bool); -extern int tilegx_initial_elimination_offset (int, int); -extern rtx tilegx_return_addr (int, rtx); -extern rtx tilegx_eh_return_handler_rtx (void); -extern int tilegx_adjust_insn_length (rtx_insn *, int); - -extern int tilegx_asm_preferred_eh_data_format (int, int); -extern void tilegx_final_prescan_insn (rtx_insn *); -extern const char *tilegx_asm_output_opcode (FILE *, const char *); -extern void tilegx_function_profiler (FILE *, int); - -/* Declare functions in tilegx-c.cc */ - -extern void tilegx_cpu_cpp_builtins (struct cpp_reader *); - -#endif /* GCC_TILEGX_PROTOS_H */ diff --git a/gcc/config/tilegx/tilegx.cc b/gcc/config/tilegx/tilegx.cc deleted file mode 100644 index c40fc74..0000000 --- a/gcc/config/tilegx/tilegx.cc +++ /dev/null @@ -1,5728 +0,0 @@ -/* Subroutines used for code generation on the Tilera TILE-Gx. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#define IN_TARGET_CODE 1 - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "memmodel.h" -#include "backend.h" -#include "target.h" -#include "rtl.h" -#include "tree.h" -#include "gimple.h" -#include "df.h" -#include "tm_p.h" -#include "stringpool.h" -#include "attribs.h" -#include "expmed.h" -#include "optabs.h" -#include "regs.h" -#include "emit-rtl.h" -#include "recog.h" -#include "diagnostic.h" -#include "output.h" -#include "insn-attr.h" -#include "alias.h" -#include "explow.h" -#include "calls.h" -#include "varasm.h" -#include "expr.h" -#include "langhooks.h" -#include "cfgrtl.h" -#include "tm-constrs.h" -#include "dwarf2.h" -#include "fold-const.h" -#include "stor-layout.h" -#include "gimplify.h" -#include "tilegx-builtins.h" -#include "tilegx-multiply.h" -#include "builtins.h" -#include "opts.h" - -/* This file should be included last. */ -#include "target-def.h" - -/* SYMBOL_REF for GOT */ -static GTY(()) rtx g_got_symbol = NULL; - -/* Report whether we're printing out the first address fragment of a - POST_INC or POST_DEC memory reference, from TARGET_PRINT_OPERAND to - TARGET_PRINT_OPERAND_ADDRESS. */ -static bool output_memory_autoinc_first; - - - -/* Option handling */ - -/* Implement TARGET_OPTION_OVERRIDE. */ -static void -tilegx_option_override (void) -{ - if (OPTION_SET_P (tilegx_cmodel)) - { - switch (tilegx_cmodel) - { - case CM_SMALL: - case CM_SMALL_PIC: - if (flag_pic) - tilegx_cmodel = CM_SMALL_PIC; - break; - - case CM_LARGE: - case CM_LARGE_PIC: - if (flag_pic) - tilegx_cmodel = CM_LARGE_PIC; - break; - - default: - gcc_unreachable (); - } - } - else - tilegx_cmodel = flag_pic ? CM_SMALL_PIC : CM_SMALL; - - /* When modulo scheduling is enabled, we still rely on regular - scheduler for bundling. */ - if (flag_modulo_sched) - flag_resched_modulo_sched = 1; -} - - - -/* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ -static bool -tilegx_scalar_mode_supported_p (scalar_mode mode) -{ - switch (mode) - { - case E_QImode: - case E_HImode: - case E_SImode: - case E_DImode: - case E_TImode: - return true; - - case E_SFmode: - case E_DFmode: - return true; - - default: - return false; - } -} - - -/* Implement TARGET_VECTOR_MODE_SUPPORTED_P. */ -static bool -tilegx_vector_mode_supported_p (machine_mode mode) -{ - return mode == V8QImode || mode == V4HImode || mode == V2SImode; -} - - -/* Implement TARGET_CANNOT_FORCE_CONST_MEM. */ -static bool -tilegx_cannot_force_const_mem (machine_mode mode ATTRIBUTE_UNUSED, - rtx x ATTRIBUTE_UNUSED) -{ - return true; -} - - -/* Implement TARGET_FUNCTION_OK_FOR_SIBCALL. */ -static bool -tilegx_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) -{ - return (tilegx_cmodel != CM_LARGE && tilegx_cmodel != CM_LARGE_PIC - && (decl != NULL)); -} - - -/* Implement TARGET_PASS_BY_REFERENCE. Variable sized types are - passed by reference. */ -static bool -tilegx_pass_by_reference (cumulative_args_t, const function_arg_info &arg) -{ - return (arg.type - && TYPE_SIZE (arg.type) - && TREE_CODE (TYPE_SIZE (arg.type)) != INTEGER_CST); -} - - -/* Implement TARGET_RETURN_IN_MSB. We return a value in the most - significant part of a register if: - - the target is big-endian; and - - the value has an aggregate type (e.g., structure or union). */ -static bool -tilegx_return_in_msb (const_tree valtype) -{ - return (TARGET_BIG_ENDIAN && AGGREGATE_TYPE_P (valtype)); -} - - -/* Implement TARGET_RETURN_IN_MEMORY. */ -static bool -tilegx_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED) -{ - return !IN_RANGE (int_size_in_bytes (type), - 0, TILEGX_NUM_RETURN_REGS * UNITS_PER_WORD); -} - - -/* Implement TARGET_MODE_REP_EXTENDED. */ -static int -tilegx_mode_rep_extended (scalar_int_mode mode, scalar_int_mode mode_rep) -{ - /* SImode register values are sign-extended to DImode. */ - if (mode == SImode && mode_rep == DImode) - return SIGN_EXTEND; - - return UNKNOWN; -} - - -/* Implement TARGET_FUNCTION_ARG_BOUNDARY. */ -static unsigned int -tilegx_function_arg_boundary (machine_mode mode, const_tree type) -{ - unsigned int alignment; - - alignment = type ? TYPE_ALIGN (type) : GET_MODE_ALIGNMENT (mode); - if (alignment < PARM_BOUNDARY) - alignment = PARM_BOUNDARY; - if (alignment > STACK_BOUNDARY) - alignment = STACK_BOUNDARY; - return alignment; -} - - -/* Implement TARGET_FUNCTION_ARG. */ -static rtx -tilegx_function_arg (cumulative_args_t cum_v, const function_arg_info &arg) -{ - CUMULATIVE_ARGS cum = *get_cumulative_args (cum_v); - int byte_size = arg.promoted_size_in_bytes (); - bool doubleword_aligned_p; - - if (cum >= TILEGX_NUM_ARG_REGS) - return NULL_RTX; - - /* See whether the argument has doubleword alignment. */ - doubleword_aligned_p = - tilegx_function_arg_boundary (arg.mode, arg.type) > BITS_PER_WORD; - - if (doubleword_aligned_p) - cum += cum & 1; - - /* The ABI does not allow parameters to be passed partially in reg - and partially in stack. */ - if ((cum + (byte_size + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - > TILEGX_NUM_ARG_REGS) - return NULL_RTX; - - return gen_rtx_REG (arg.mode, cum); -} - - -/* Implement TARGET_FUNCTION_ARG_ADVANCE. */ -static void -tilegx_function_arg_advance (cumulative_args_t cum_v, - const function_arg_info &arg) -{ - CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v); - - int byte_size = arg.promoted_size_in_bytes (); - int word_size = (byte_size + UNITS_PER_WORD - 1) / UNITS_PER_WORD; - bool doubleword_aligned_p; - - /* See whether the argument has doubleword alignment. */ - doubleword_aligned_p = - tilegx_function_arg_boundary (arg.mode, arg.type) > BITS_PER_WORD; - - if (doubleword_aligned_p) - *cum += *cum & 1; - - /* If the current argument does not fit in the pretend_args space, - skip over it. */ - if (*cum < TILEGX_NUM_ARG_REGS - && *cum + word_size > TILEGX_NUM_ARG_REGS) - *cum = TILEGX_NUM_ARG_REGS; - - *cum += word_size; -} - - -/* Implement TARGET_FUNCTION_VALUE. */ -static rtx -tilegx_function_value (const_tree valtype, const_tree fn_decl_or_type, - bool outgoing ATTRIBUTE_UNUSED) -{ - machine_mode mode; - int unsigned_p; - - mode = TYPE_MODE (valtype); - unsigned_p = TYPE_UNSIGNED (valtype); - - mode = promote_function_mode (valtype, mode, &unsigned_p, - fn_decl_or_type, 1); - - return gen_rtx_REG (mode, 0); -} - - -/* Implement TARGET_LIBCALL_VALUE. */ -static rtx -tilegx_libcall_value (machine_mode mode, - const_rtx fun ATTRIBUTE_UNUSED) -{ - return gen_rtx_REG (mode, 0); -} - - -/* Implement FUNCTION_VALUE_REGNO_P. */ -static bool -tilegx_function_value_regno_p (const unsigned int regno) -{ - return regno < TILEGX_NUM_RETURN_REGS; -} - - -/* Implement TARGET_BUILD_BUILTIN_VA_LIST. */ -static tree -tilegx_build_builtin_va_list (void) -{ - tree f_args, f_skip, record, type_decl; - bool owp; - - record = lang_hooks.types.make_type (RECORD_TYPE); - - type_decl = build_decl (BUILTINS_LOCATION, TYPE_DECL, - get_identifier ("__va_list_tag"), record); - - f_args = build_decl (BUILTINS_LOCATION, FIELD_DECL, - get_identifier ("__args"), ptr_type_node); - f_skip = build_decl (BUILTINS_LOCATION, FIELD_DECL, - get_identifier ("__skip"), ptr_type_node); - - DECL_FIELD_CONTEXT (f_args) = record; - - DECL_FIELD_CONTEXT (f_skip) = record; - - TREE_CHAIN (record) = type_decl; - TYPE_NAME (record) = type_decl; - TYPE_FIELDS (record) = f_args; - TREE_CHAIN (f_args) = f_skip; - - /* We know this is being padded and we want it too. It is an - internal type so hide the warnings from the user. */ - owp = warn_padded; - warn_padded = false; - - layout_type (record); - - warn_padded = owp; - - /* The correct type is an array type of one element. */ - return record; -} - - -/* Implement TARGET_EXPAND_BUILTIN_VA_START. */ -static void -tilegx_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) -{ - tree f_args, f_skip; - tree args, skip, t; - - f_args = TYPE_FIELDS (TREE_TYPE (valist)); - f_skip = TREE_CHAIN (f_args); - - args = - build3 (COMPONENT_REF, TREE_TYPE (f_args), valist, f_args, NULL_TREE); - skip = - build3 (COMPONENT_REF, TREE_TYPE (f_skip), valist, f_skip, NULL_TREE); - - /* Find the __args area. */ - t = make_tree (TREE_TYPE (args), virtual_incoming_args_rtx); - t = fold_build_pointer_plus_hwi (t, - UNITS_PER_WORD * - (crtl->args.info - TILEGX_NUM_ARG_REGS)); - - if (crtl->args.pretend_args_size > 0) - t = fold_build_pointer_plus_hwi (t, -STACK_POINTER_OFFSET); - - t = build2 (MODIFY_EXPR, TREE_TYPE (args), args, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - /* Find the __skip area. */ - t = make_tree (TREE_TYPE (skip), virtual_incoming_args_rtx); - t = fold_build_pointer_plus_hwi (t, -STACK_POINTER_OFFSET); - t = build2 (MODIFY_EXPR, TREE_TYPE (skip), skip, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); -} - - -/* Implement TARGET_SETUP_INCOMING_VARARGS. */ -static void -tilegx_setup_incoming_varargs (cumulative_args_t cum, - const function_arg_info &arg, - int *pretend_args, int no_rtl) -{ - CUMULATIVE_ARGS local_cum = *get_cumulative_args (cum); - int first_reg; - - /* The caller has advanced CUM up to, but not beyond, the last named - argument. Advance a local copy of CUM past the last "real" named - argument, to find out how many registers are left over. */ - targetm.calls.function_arg_advance (pack_cumulative_args (&local_cum), arg); - first_reg = local_cum; - - if (local_cum < TILEGX_NUM_ARG_REGS) - { - *pretend_args = UNITS_PER_WORD * (TILEGX_NUM_ARG_REGS - first_reg); - - if (!no_rtl) - { - alias_set_type set = get_varargs_alias_set (); - rtx tmp = - gen_rtx_MEM (BLKmode, plus_constant (Pmode, - virtual_incoming_args_rtx, - -STACK_POINTER_OFFSET - - UNITS_PER_WORD * - (TILEGX_NUM_ARG_REGS - - first_reg))); - MEM_NOTRAP_P (tmp) = 1; - set_mem_alias_set (tmp, set); - move_block_from_reg (first_reg, tmp, - TILEGX_NUM_ARG_REGS - first_reg); - } - } - else - *pretend_args = 0; -} - - -/* Implement TARGET_GIMPLIFY_VA_ARG_EXPR. Gimplify va_arg by updating - the va_list structure VALIST as required to retrieve an argument of - type TYPE, and returning that argument. - - ret = va_arg(VALIST, TYPE); - - generates code equivalent to: - - paddedsize = (sizeof(TYPE) + 7) & -8; - if ( (VALIST.__args + paddedsize > VALIST.__skip) - & (VALIST.__args <= VALIST.__skip)) - addr = VALIST.__skip + STACK_POINTER_OFFSET; - else - addr = VALIST.__args; - VALIST.__args = addr + paddedsize; - if (BYTES_BIG_ENDIAN) - ret = *(TYPE *)(addr + paddedsize - sizeof(TYPE)); - else - ret = *(TYPE *)addr; - */ -static tree -tilegx_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, - gimple_seq *post_p ATTRIBUTE_UNUSED) -{ - tree f_args, f_skip; - tree args, skip; - HOST_WIDE_INT size, rsize; - tree addr, tmp; - bool pass_by_reference_p; - - f_args = TYPE_FIELDS (va_list_type_node); - f_skip = TREE_CHAIN (f_args); - - args = - build3 (COMPONENT_REF, TREE_TYPE (f_args), valist, f_args, NULL_TREE); - skip = - build3 (COMPONENT_REF, TREE_TYPE (f_skip), valist, f_skip, NULL_TREE); - - addr = create_tmp_var (ptr_type_node, "va_arg"); - - /* If an object is dynamically sized, a pointer to it is passed - instead of the object itself. */ - pass_by_reference_p = pass_va_arg_by_reference (type); - - if (pass_by_reference_p) - type = build_pointer_type (type); - - size = int_size_in_bytes (type); - rsize = ((size + UNITS_PER_WORD - 1) / UNITS_PER_WORD) * UNITS_PER_WORD; - - /* If the alignment of the type is greater than the default for a - parameter, align to the STACK_BOUNDARY. */ - if (TYPE_ALIGN (type) > PARM_BOUNDARY) - { - /* Assert the only case we generate code for: when - stack boundary = 2 * parm boundary. */ - gcc_assert (STACK_BOUNDARY == PARM_BOUNDARY * 2); - - tmp = build2 (BIT_AND_EXPR, sizetype, - fold_convert (sizetype, unshare_expr (args)), - size_int (PARM_BOUNDARY / 8)); - tmp = build2 (POINTER_PLUS_EXPR, ptr_type_node, - unshare_expr (args), tmp); - - gimplify_assign (unshare_expr (args), tmp, pre_p); - } - - /* Build conditional expression to calculate addr. The expression - will be gimplified later. */ - tmp = fold_build_pointer_plus_hwi (unshare_expr (args), rsize); - tmp = build2 (TRUTH_AND_EXPR, boolean_type_node, - build2 (GT_EXPR, boolean_type_node, tmp, unshare_expr (skip)), - build2 (LE_EXPR, boolean_type_node, unshare_expr (args), - unshare_expr (skip))); - - tmp = build3 (COND_EXPR, ptr_type_node, tmp, - build2 (POINTER_PLUS_EXPR, ptr_type_node, unshare_expr (skip), - size_int (STACK_POINTER_OFFSET)), - unshare_expr (args)); - - /* Adjust the address of va_arg if it is in big endian mode. */ - if (BYTES_BIG_ENDIAN && rsize > size) - tmp = fold_build_pointer_plus_hwi (tmp, rsize - size); - gimplify_assign (addr, tmp, pre_p); - - /* Update VALIST.__args. */ - - if (BYTES_BIG_ENDIAN && rsize > size) - tmp = fold_build_pointer_plus_hwi (addr, size); - else - tmp = fold_build_pointer_plus_hwi (addr, rsize); - gimplify_assign (unshare_expr (args), tmp, pre_p); - - addr = fold_convert (build_pointer_type (type), addr); - - if (pass_by_reference_p) - addr = build_va_arg_indirect_ref (addr); - - return build_va_arg_indirect_ref (addr); -} - - - -/* Implement TARGET_RTX_COSTS. */ -static bool -tilegx_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno, - int *total, bool speed) -{ - int code = GET_CODE (x); - - switch (code) - { - case CONST_INT: - /* If this is an 8-bit constant, return zero since it can be - used nearly anywhere with no cost. If it is a valid operand - for an ADD or AND, likewise return 0 if we know it will be - used in that context. Otherwise, return 2 since it might be - used there later. All other constants take at least two - insns. */ - if (satisfies_constraint_I (x)) - { - *total = 0; - return true; - } - else if (outer_code == PLUS && add_operand (x, VOIDmode)) - { - /* Slightly penalize large constants even though we can add - them in one instruction, because it forces the use of - 2-wide bundling mode. */ - *total = 1; - return true; - } - else if (move_operand (x, SImode)) - { - /* We can materialize in one move. */ - *total = COSTS_N_INSNS (1); - return true; - } - else - { - /* We can materialize in two moves. */ - *total = COSTS_N_INSNS (2); - return true; - } - - return false; - - case CONST: - case LABEL_REF: - case SYMBOL_REF: - *total = COSTS_N_INSNS (2); - return true; - - case CONST_DOUBLE: - *total = COSTS_N_INSNS (4); - return true; - - case HIGH: - *total = 0; - return true; - - case MEM: - /* If outer-code was a sign or zero extension, a cost of - COSTS_N_INSNS (1) was already added in, so account for - that. */ - if (outer_code == ZERO_EXTEND || outer_code == SIGN_EXTEND) - *total = COSTS_N_INSNS (1); - else - *total = COSTS_N_INSNS (2); - return true; - - case PLUS: - /* Convey that shl[123]add are efficient. */ - if (GET_CODE (XEXP (x, 0)) == MULT - && cint_248_operand (XEXP (XEXP (x, 0), 1), VOIDmode)) - { - *total = (rtx_cost (XEXP (XEXP (x, 0), 0), mode, - (enum rtx_code) outer_code, opno, speed) - + rtx_cost (XEXP (x, 1), mode, - (enum rtx_code) outer_code, opno, speed) - + COSTS_N_INSNS (1)); - return true; - } - return false; - - case MULT: - *total = COSTS_N_INSNS (2); - return false; - - case DIV: - case UDIV: - case MOD: - case UMOD: - /* These are handled by software and are very expensive. */ - *total = COSTS_N_INSNS (100); - return false; - - case UNSPEC: - case UNSPEC_VOLATILE: - { - int num = XINT (x, 1); - - if (num <= TILEGX_LAST_LATENCY_1_INSN) - *total = COSTS_N_INSNS (1); - else if (num <= TILEGX_LAST_LATENCY_2_INSN) - *total = COSTS_N_INSNS (2); - else if (num > TILEGX_LAST_LATENCY_INSN) - { - if (num == UNSPEC_NON_TEMPORAL) - { - /* These are basically loads. */ - if (outer_code == ZERO_EXTEND || outer_code == SIGN_EXTEND) - *total = COSTS_N_INSNS (1); - else - *total = COSTS_N_INSNS (2); - } - else - { - if (outer_code == PLUS) - *total = 0; - else - *total = COSTS_N_INSNS (1); - } - } - else - { - switch (num) - { - case UNSPEC_BLOCKAGE: - case UNSPEC_NETWORK_BARRIER: - case UNSPEC_ATOMIC: - *total = 0; - break; - - case UNSPEC_LNK_AND_LABEL: - case UNSPEC_MF: - case UNSPEC_MOV_PCREL_STEP3: - case UNSPEC_NETWORK_RECEIVE: - case UNSPEC_NETWORK_SEND: - case UNSPEC_SPR_MOVE: - case UNSPEC_TLS_GD_ADD: - *total = COSTS_N_INSNS (1); - break; - - case UNSPEC_TLS_IE_LOAD: - case UNSPEC_XCHG: - *total = COSTS_N_INSNS (2); - break; - - case UNSPEC_SP_SET: - *total = COSTS_N_INSNS (3); - break; - - case UNSPEC_SP_TEST: - *total = COSTS_N_INSNS (4); - break; - - case UNSPEC_CMPXCHG: - case UNSPEC_INSN_CMPEXCH: - case UNSPEC_LATENCY_L2: - *total = COSTS_N_INSNS (11); - break; - - case UNSPEC_TLS_GD_CALL: - *total = COSTS_N_INSNS (30); - break; - - case UNSPEC_LATENCY_MISS: - *total = COSTS_N_INSNS (80); - break; - - default: - *total = COSTS_N_INSNS (1); - } - } - return true; - } - - default: - return false; - } -} - - - -/* Rtl lowering. */ - -/* Create a temporary variable to hold a partial result, to enable - CSE. */ -static rtx -create_temp_reg_if_possible (machine_mode mode, rtx default_reg) -{ - return can_create_pseudo_p () ? gen_reg_rtx (mode) : default_reg; -} - - -/* Functions to save and restore machine-specific function data. */ -static struct machine_function * -tilegx_init_machine_status (void) -{ - return ggc_cleared_alloc (); -} - - -/* Do anything needed before RTL is emitted for each function. */ -void -tilegx_init_expanders (void) -{ - /* Arrange to initialize and mark the machine per-function - status. */ - init_machine_status = tilegx_init_machine_status; - - if (cfun && cfun->machine && flag_pic) - { - static int label_num = 0; - - char text_label_name[32]; - - struct machine_function *machine = cfun->machine; - - ASM_GENERATE_INTERNAL_LABEL (text_label_name, "L_PICLNK", label_num++); - - machine->text_label_symbol = - gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (text_label_name)); - - machine->text_label_rtx = - gen_rtx_REG (Pmode, TILEGX_PIC_TEXT_LABEL_REGNUM); - - machine->got_rtx = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM); - - machine->calls_tls_get_addr = false; - } -} - - -/* Implement TARGET_EXPAND_TO_RTL_HOOK. */ -static void -tilegx_expand_to_rtl_hook (void) -{ - /* Exclude earlier sets of crtl->uses_pic_offset_table, because we - only care about uses actually emitted. */ - crtl->uses_pic_offset_table = 0; -} - - -/* Implement TARGET_SHIFT_TRUNCATION_MASK. DImode shifts use the mode - matching insns and therefore guarantee that the shift count is - modulo 64. SImode shifts sometimes use the 64 bit version so do - not hold such guarantee. */ -static unsigned HOST_WIDE_INT -tilegx_shift_truncation_mask (machine_mode mode) -{ - return mode == DImode ? 63 : 0; -} - - -/* Implement TARGET_INIT_LIBFUNCS. */ -static void -tilegx_init_libfuncs (void) -{ - /* We need to explicitly generate these libfunc's to support - conversion of divide by constant to multiply (the divide stubs in - tilegx.md exist also for this reason). Normally we'd expect gcc - to lazily generate them when they are needed, but for some reason - it's set up to only generate them if the mode is the word - mode. */ - set_optab_libfunc (sdiv_optab, SImode, "__divsi3"); - set_optab_libfunc (udiv_optab, SImode, "__udivsi3"); - set_optab_libfunc (smod_optab, SImode, "__modsi3"); - set_optab_libfunc (umod_optab, SImode, "__umodsi3"); -} - - -/* Return true if X contains a thread-local symbol. */ -static bool -tilegx_tls_referenced_p (rtx x) -{ - if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS) - x = XEXP (XEXP (x, 0), 0); - - if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (x)) - return true; - - /* That's all we handle in tilegx_legitimize_tls_address for - now. */ - return false; -} - - -/* Return true if X requires a scratch register. It is given that - flag_pic is on and that X satisfies CONSTANT_P. */ -static int -tilegx_pic_address_needs_scratch (rtx x) -{ - if (GET_CODE (x) == CONST - && GET_CODE (XEXP (x, 0)) == PLUS - && (GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF - || GET_CODE (XEXP (XEXP (x, 0), 0)) == LABEL_REF) - && (CONST_INT_P (XEXP (XEXP (x, 0), 1)))) - return true; - - return false; -} - - -/* Implement TARGET_LEGITIMATE_CONSTANT_P. This is all constants for - which we are willing to load the value into a register via a move - pattern. TLS cannot be treated as a constant because it can - include a function call. */ -static bool -tilegx_legitimate_constant_p (machine_mode mode ATTRIBUTE_UNUSED, rtx x) -{ - switch (GET_CODE (x)) - { - case CONST: - case SYMBOL_REF: - return !tilegx_tls_referenced_p (x); - - default: - return true; - } -} - - -/* Return true if the constant value X is a legitimate general operand - when generating PIC code. It is given that flag_pic is on and that - X satisfies CONSTANT_P. */ -bool -tilegx_legitimate_pic_operand_p (rtx x) -{ - if (tilegx_pic_address_needs_scratch (x)) - return false; - - if (tilegx_tls_referenced_p (x)) - return false; - - return true; -} - - -/* Return true if the rtx X can be used as an address operand. */ -static bool -tilegx_legitimate_address_p (machine_mode ARG_UNUSED (mode), rtx x, - bool strict) -{ - if (GET_CODE (x) == SUBREG) - x = SUBREG_REG (x); - - switch (GET_CODE (x)) - { - case POST_INC: - case POST_DEC: - if (GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD) - return false; - - x = XEXP (x, 0); - break; - - case POST_MODIFY: - if (GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD) - return false; - - if (GET_CODE (XEXP (x, 1)) != PLUS) - return false; - - if (!rtx_equal_p (XEXP (x, 0), XEXP (XEXP (x, 1), 0))) - return false; - - if (!satisfies_constraint_I (XEXP (XEXP (x, 1), 1))) - return false; - - x = XEXP (x, 0); - break; - - case REG: - break; - - default: - return false; - } - - /* Check if x is a valid reg. */ - if (!REG_P (x)) - return false; - - if (strict) - return REGNO_OK_FOR_BASE_P (REGNO (x)); - else - return true; -} - - -/* Return the rtx containing SYMBOL_REF to the text label. */ -static rtx -tilegx_text_label_symbol (void) -{ - return cfun->machine->text_label_symbol; -} - - -/* Return the register storing the value of the text label. */ -static rtx -tilegx_text_label_rtx (void) -{ - return cfun->machine->text_label_rtx; -} - - -/* Return the register storing the value of the global offset - table. */ -static rtx -tilegx_got_rtx (void) -{ - return cfun->machine->got_rtx; -} - - -/* Return the SYMBOL_REF for _GLOBAL_OFFSET_TABLE_. */ -static rtx -tilegx_got_symbol (void) -{ - if (g_got_symbol == NULL) - g_got_symbol = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); - - return g_got_symbol; -} - - -/* Return a reference to the got to be used by tls references. */ -static rtx -tilegx_tls_got (void) -{ - rtx temp; - if (flag_pic) - { - crtl->uses_pic_offset_table = 1; - return tilegx_got_rtx (); - } - - temp = gen_reg_rtx (Pmode); - emit_move_insn (temp, tilegx_got_symbol ()); - - return temp; -} - - -/* ADDR contains a thread-local SYMBOL_REF. Generate code to compute - this (thread-local) address. */ -static rtx -tilegx_legitimize_tls_address (rtx addr) -{ - rtx ret; - - gcc_assert (can_create_pseudo_p ()); - - if (GET_CODE (addr) == SYMBOL_REF) - switch (SYMBOL_REF_TLS_MODEL (addr)) - { - case TLS_MODEL_GLOBAL_DYNAMIC: - case TLS_MODEL_LOCAL_DYNAMIC: - { - rtx r0, temp, temp2, temp3, got; - - ret = gen_reg_rtx (Pmode); - r0 = gen_rtx_REG (Pmode, 0); - temp = gen_reg_rtx (Pmode); - temp2 = gen_reg_rtx (Pmode); - temp3 = gen_reg_rtx (Pmode); - - got = tilegx_tls_got (); - if (TARGET_32BIT) - { - emit_insn (gen_mov_tls_gd_step1_32bit (temp, addr)); - emit_insn (gen_mov_tls_gd_step2_32bit (temp2, temp, addr)); - emit_insn (gen_tls_add_32bit (temp2, got, temp2, addr)); - } - else - { - emit_insn (gen_mov_tls_gd_step1 (temp, addr)); - emit_insn (gen_mov_tls_gd_step2 (temp2, temp, addr)); - emit_insn (gen_tls_add (temp2, got, temp2, addr)); - } - - emit_move_insn (r0, temp2); - - if (TARGET_32BIT) - { - emit_insn (gen_tls_gd_call_32bit (addr)); - } - else - { - emit_insn (gen_tls_gd_call (addr)); - } - - emit_move_insn (temp3, r0); - - rtx_insn *last; - if (TARGET_32BIT) - last = emit_insn (gen_tls_gd_add_32bit (ret, temp3, addr)); - else - last = emit_insn (gen_tls_gd_add (ret, temp3, addr)); - - set_unique_reg_note (last, REG_EQUAL, copy_rtx (addr)); - break; - } - case TLS_MODEL_INITIAL_EXEC: - { - rtx temp, temp2, temp3, got; - rtx_insn *last; - - ret = gen_reg_rtx (Pmode); - temp = gen_reg_rtx (Pmode); - temp2 = gen_reg_rtx (Pmode); - temp3 = gen_reg_rtx (Pmode); - - got = tilegx_tls_got (); - if (TARGET_32BIT) - { - emit_insn (gen_mov_tls_ie_step1_32bit (temp, addr)); - emit_insn (gen_mov_tls_ie_step2_32bit (temp2, temp, addr)); - emit_insn (gen_tls_add_32bit (temp2, got, temp2, addr)); - emit_insn (gen_tls_ie_load_32bit (temp3, temp2, addr)); - } - else - { - emit_insn (gen_mov_tls_ie_step1 (temp, addr)); - emit_insn (gen_mov_tls_ie_step2 (temp2, temp, addr)); - emit_insn (gen_tls_add (temp2, got, temp2, addr)); - emit_insn (gen_tls_ie_load (temp3, temp2, addr)); - } - - last = - emit_move_insn(ret, - gen_rtx_PLUS (Pmode, - gen_rtx_REG (Pmode, - THREAD_POINTER_REGNUM), - temp3)); - set_unique_reg_note (last, REG_EQUAL, copy_rtx (addr)); - break; - } - case TLS_MODEL_LOCAL_EXEC: - { - rtx temp, temp2; - rtx_insn *last; - - ret = gen_reg_rtx (Pmode); - temp = gen_reg_rtx (Pmode); - temp2 = gen_reg_rtx (Pmode); - - if (TARGET_32BIT) - { - emit_insn (gen_mov_tls_le_step1_32bit (temp, addr)); - emit_insn (gen_mov_tls_le_step2_32bit (temp2, temp, addr)); - } - else - { - emit_insn (gen_mov_tls_le_step1 (temp, addr)); - emit_insn (gen_mov_tls_le_step2 (temp2, temp, addr)); - } - - last = - emit_move_insn (ret, - gen_rtx_PLUS (Pmode, - gen_rtx_REG (Pmode, - THREAD_POINTER_REGNUM), - temp2)); - set_unique_reg_note (last, REG_EQUAL, copy_rtx (addr)); - break; - } - default: - gcc_unreachable (); - } - else if (GET_CODE (addr) == CONST) - { - rtx base, offset; - - gcc_assert (GET_CODE (XEXP (addr, 0)) == PLUS); - - base = tilegx_legitimize_tls_address (XEXP (XEXP (addr, 0), 0)); - offset = XEXP (XEXP (addr, 0), 1); - - base = force_operand (base, NULL_RTX); - ret = force_reg (Pmode, gen_rtx_PLUS (Pmode, base, offset)); - } - else - gcc_unreachable (); - - return ret; -} - - -/* Returns a register that points to ADDR, a symbolic address, by - computing its address relative to tilegx_text_label_symbol. */ -void -tilegx_compute_pcrel_address (rtx result, rtx addr) -{ - rtx text_label_symbol = tilegx_text_label_symbol (); - rtx text_label_rtx = tilegx_text_label_rtx (); - rtx temp, temp2, temp3; - - temp = create_temp_reg_if_possible (Pmode, result); - temp2 = create_temp_reg_if_possible (Pmode, result); - - if (TARGET_32BIT) - { - emit_insn (gen_mov_pcrel_step1_32bit (temp, addr, text_label_symbol)); - emit_insn (gen_mov_pcrel_step2_32bit (temp2, temp, addr, - text_label_symbol)); - emit_insn (gen_mov_pcrel_step3_32bit (result, temp2, - text_label_rtx, - addr, text_label_symbol)); - } - else if (tilegx_cmodel == CM_LARGE_PIC) - { - temp3 = create_temp_reg_if_possible (Pmode, result); - emit_insn (gen_mov_large_pcrel_step1 (temp, addr, text_label_symbol)); - emit_insn (gen_mov_large_pcrel_step2 (temp2, temp, addr, - text_label_symbol)); - emit_insn (gen_mov_large_pcrel_step3 (temp3, temp2, addr, - text_label_symbol)); - emit_insn (gen_mov_large_pcrel_step4 (result, temp3, - text_label_rtx, - addr, text_label_symbol)); - } - else - { - emit_insn (gen_mov_pcrel_step1 (temp, addr, text_label_symbol)); - emit_insn (gen_mov_pcrel_step2 (temp2, temp, addr, text_label_symbol)); - emit_insn (gen_mov_pcrel_step3 (result, temp2, - text_label_rtx, - addr, text_label_symbol)); - } -} - - -/* Returns a register that points to the plt entry of ADDR, a symbolic - address, by computing its address relative to - tilegx_text_label_symbol. */ -void -tilegx_compute_pcrel_plt_address (rtx result, rtx addr) -{ - rtx text_label_symbol = tilegx_text_label_symbol (); - rtx text_label_rtx = tilegx_text_label_rtx (); - rtx temp, temp2, temp3; - - temp = create_temp_reg_if_possible (Pmode, result); - temp2 = create_temp_reg_if_possible (Pmode, result); - - if (TARGET_32BIT) - { - emit_insn (gen_mov_plt_pcrel_step1_32bit (temp, addr, - text_label_symbol)); - emit_insn (gen_mov_plt_pcrel_step2_32bit (temp2, temp, addr, - text_label_symbol)); - emit_move_insn (result, gen_rtx_PLUS (Pmode, temp2, text_label_rtx)); - } - else - { - temp3 = create_temp_reg_if_possible (Pmode, result); - - emit_insn (gen_mov_plt_pcrel_step1 (temp, addr, text_label_symbol)); - emit_insn (gen_mov_plt_pcrel_step2 (temp2, temp, addr, - text_label_symbol)); - emit_insn (gen_mov_plt_pcrel_step3 (temp3, temp2, addr, - text_label_symbol)); - emit_move_insn (result, gen_rtx_PLUS (Pmode, temp3, text_label_rtx)); - } -} - - -/* Legitimize PIC addresses. If the address is already - position-independent, we return ORIG. Newly generated - position-independent addresses go into a reg. This is REG if - nonzero, otherwise we allocate register(s) as necessary. */ -static rtx -tilegx_legitimize_pic_address (rtx orig, - machine_mode mode ATTRIBUTE_UNUSED, - rtx reg) -{ - if (GET_CODE (orig) == SYMBOL_REF) - { - rtx address, pic_ref; - - if (reg == 0) - { - gcc_assert (can_create_pseudo_p ()); - reg = gen_reg_rtx (Pmode); - } - - if (SYMBOL_REF_LOCAL_P (orig)) - { - /* If not during reload, allocate another temp reg here for - loading in the address, so that these instructions can be - optimized properly. */ - rtx temp_reg = create_temp_reg_if_possible (Pmode, reg); - tilegx_compute_pcrel_address (temp_reg, orig); - - /* Note: this is conservative. We use the text_label but we - don't use the pic_offset_table. However, in some cases - we may need the pic_offset_table (see - tilegx_fixup_pcrel_references). */ - crtl->uses_pic_offset_table = 1; - - address = temp_reg; - - emit_move_insn (reg, address); - return reg; - } - else - { - /* If not during reload, allocate another temp reg here for - loading in the address, so that these instructions can be - optimized properly. */ - rtx temp_reg = create_temp_reg_if_possible (Pmode, reg); - - gcc_assert (flag_pic); - if (flag_pic == 1) - { - if (TARGET_32BIT) - { - emit_insn (gen_add_got16_32bit (temp_reg, - tilegx_got_rtx (), - orig)); - } - else - { - emit_insn (gen_add_got16 (temp_reg, - tilegx_got_rtx (), orig)); - } - } - else - { - rtx temp_reg2 = create_temp_reg_if_possible (Pmode, reg); - rtx temp_reg3 = create_temp_reg_if_possible (Pmode, reg); - if (TARGET_32BIT) - { - emit_insn (gen_mov_got32_step1_32bit (temp_reg3, orig)); - emit_insn (gen_mov_got32_step2_32bit - (temp_reg2, temp_reg3, orig)); - } - else - { - emit_insn (gen_mov_got32_step1 (temp_reg3, orig)); - emit_insn (gen_mov_got32_step2 (temp_reg2, temp_reg3, - orig)); - } - emit_move_insn (temp_reg, - gen_rtx_PLUS (Pmode, - tilegx_got_rtx (), temp_reg2)); - } - - address = temp_reg; - - pic_ref = gen_const_mem (Pmode, address); - crtl->uses_pic_offset_table = 1; - emit_move_insn (reg, pic_ref); - /* The following put a REG_EQUAL note on this insn, so that - it can be optimized by loop. But it causes the label to - be optimized away. */ - /* set_unique_reg_note (insn, REG_EQUAL, orig); */ - return reg; - } - } - else if (GET_CODE (orig) == CONST) - { - rtx base, offset; - - if (GET_CODE (XEXP (orig, 0)) == PLUS - && XEXP (XEXP (orig, 0), 0) == tilegx_got_rtx ()) - return orig; - - if (reg == 0) - { - gcc_assert (can_create_pseudo_p ()); - reg = gen_reg_rtx (Pmode); - } - - gcc_assert (GET_CODE (XEXP (orig, 0)) == PLUS); - base = tilegx_legitimize_pic_address (XEXP (XEXP (orig, 0), 0), - Pmode, reg); - offset = tilegx_legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode, - base == reg ? 0 : reg); - - if (CONST_INT_P (offset)) - { - if (can_create_pseudo_p ()) - offset = force_reg (Pmode, offset); - else - /* If we reach here, then something is seriously wrong. */ - gcc_unreachable (); - } - - if (can_create_pseudo_p ()) - return force_reg (Pmode, gen_rtx_PLUS (Pmode, base, offset)); - else - gcc_unreachable (); - } - else if (GET_CODE (orig) == LABEL_REF) - { - rtx address; - rtx temp_reg; - - if (reg == 0) - { - gcc_assert (can_create_pseudo_p ()); - reg = gen_reg_rtx (Pmode); - } - - /* If not during reload, allocate another temp reg here for - loading in the address, so that these instructions can be - optimized properly. */ - temp_reg = create_temp_reg_if_possible (Pmode, reg); - tilegx_compute_pcrel_address (temp_reg, orig); - - /* Note: this is conservative. We use the text_label but we - don't use the pic_offset_table. */ - crtl->uses_pic_offset_table = 1; - - address = temp_reg; - - emit_move_insn (reg, address); - - return reg; - } - - return orig; -} - - -/* Implement TARGET_LEGITIMIZE_ADDRESS. */ -static rtx -tilegx_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, - machine_mode mode) -{ - if (GET_MODE_SIZE (mode) <= UNITS_PER_WORD - && symbolic_operand (x, Pmode) && tilegx_tls_referenced_p (x)) - { - return tilegx_legitimize_tls_address (x); - } - else if (flag_pic) - { - return tilegx_legitimize_pic_address (x, mode, 0); - } - else - return x; -} - - -/* Implement TARGET_DELEGITIMIZE_ADDRESS. */ -static rtx -tilegx_delegitimize_address (rtx x) -{ - x = delegitimize_mem_from_attrs (x); - - if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == UNSPEC) - { - switch (XINT (XEXP (x, 0), 1)) - { - case UNSPEC_HW0: - case UNSPEC_HW1: - case UNSPEC_HW2: - case UNSPEC_HW3: - case UNSPEC_HW0_LAST: - case UNSPEC_HW1_LAST: - case UNSPEC_HW2_LAST: - case UNSPEC_HW0_PCREL: - case UNSPEC_HW1_PCREL: - case UNSPEC_HW1_LAST_PCREL: - case UNSPEC_HW2_LAST_PCREL: - case UNSPEC_HW0_PLT_PCREL: - case UNSPEC_HW1_PLT_PCREL: - case UNSPEC_HW1_LAST_PLT_PCREL: - case UNSPEC_HW2_LAST_PLT_PCREL: - case UNSPEC_HW0_GOT: - case UNSPEC_HW0_LAST_GOT: - case UNSPEC_HW1_LAST_GOT: - case UNSPEC_HW0_TLS_GD: - case UNSPEC_HW1_LAST_TLS_GD: - case UNSPEC_HW0_TLS_IE: - case UNSPEC_HW1_LAST_TLS_IE: - case UNSPEC_HW0_TLS_LE: - case UNSPEC_HW1_LAST_TLS_LE: - x = XVECEXP (XEXP (x, 0), 0, 0); - break; - } - } - - return x; -} - - -/* Emit code to load the PIC register. */ -static void -load_pic_register (bool delay_pic_helper ATTRIBUTE_UNUSED) -{ - int orig_flag_pic = flag_pic; - - rtx got_symbol = tilegx_got_symbol (); - rtx text_label_symbol = tilegx_text_label_symbol (); - rtx text_label_rtx = tilegx_text_label_rtx (); - flag_pic = 0; - - if (TARGET_32BIT) - { - emit_insn (gen_insn_lnk_and_label_32bit (text_label_rtx, - text_label_symbol)); - } - else - { - emit_insn (gen_insn_lnk_and_label (text_label_rtx, text_label_symbol)); - } - - tilegx_compute_pcrel_address (tilegx_got_rtx (), got_symbol); - - flag_pic = orig_flag_pic; - - /* Need to emit this whether or not we obey regdecls, since - setjmp/longjmp can cause life info to screw up. ??? In the case - where we don't obey regdecls, this is not sufficient since we may - not fall out the bottom. */ - emit_use (tilegx_got_rtx ()); -} - - -/* Return the simd variant of the constant NUM of mode MODE, by - replicating it to fill an interger of mode DImode. NUM is first - truncated to fit in MODE. */ -rtx -tilegx_simd_int (rtx num, machine_mode mode) -{ - HOST_WIDE_INT n = 0; - - gcc_assert (CONST_INT_P (num)); - - n = INTVAL (num); - - switch (mode) - { - case E_QImode: - n = 0x0101010101010101LL * (n & 0x000000FF); - break; - case E_HImode: - n = 0x0001000100010001LL * (n & 0x0000FFFF); - break; - case E_SImode: - n = 0x0000000100000001LL * (n & 0xFFFFFFFF); - break; - case E_DImode: - break; - default: - gcc_unreachable (); - } - - return GEN_INT (n); -} - - -/* Returns true iff VAL can be moved into a register in one - instruction. And if it can, it emits the code to move the constant - into DEST_REG. - - If THREE_WIDE_ONLY is true, this insists on an instruction that - works in a bundle containing three instructions. */ -static bool -expand_set_cint64_one_inst (rtx dest_reg, - HOST_WIDE_INT val, bool three_wide_only) -{ - if (val == trunc_int_for_mode (val, QImode)) - { - /* Success! */ - emit_move_insn (dest_reg, GEN_INT (val)); - return true; - } - else if (!three_wide_only) - { - /* Test for the following constraints: J, K, N, P. We avoid - generating an rtx and using existing predicates because we - can be testing and rejecting a lot of constants, and GEN_INT - is O(N). */ - if ((val >= -32768 && val <= 65535) - || ((val == (val & 0xFF) * 0x0101010101010101LL)) - || (val == ((trunc_int_for_mode (val, QImode) & 0xFFFF) - * 0x0001000100010001LL))) - { - emit_move_insn (dest_reg, GEN_INT (val)); - return true; - } - } - - return false; -} - - -/* Implement DImode rotatert. */ -static HOST_WIDE_INT -rotate_right (HOST_WIDE_INT n, int count) -{ - unsigned HOST_WIDE_INT x = n & 0xFFFFFFFFFFFFFFFFULL; - if (count == 0) - return x; - return ((x >> count) | (x << (64 - count))) & 0xFFFFFFFFFFFFFFFFULL; -} - - -/* Return true iff n contains exactly one contiguous sequence of 1 - bits, possibly wrapping around from high bits to low bits. */ -bool -tilegx_bitfield_operand_p (HOST_WIDE_INT n, int *first_bit, int *last_bit) -{ - int i; - - if (n == 0) - return false; - - for (i = 0; i < 64; i++) - { - unsigned HOST_WIDE_INT x = rotate_right (n, i); - if (!(x & 1)) - continue; - - /* See if x is a power of two minus one, i.e. only consecutive 1 - bits starting from bit 0. */ - if ((x & (x + 1)) == 0) - { - if (first_bit != NULL) - *first_bit = i; - if (last_bit != NULL) - *last_bit = (i + exact_log2 (x ^ (x >> 1))) & 63; - - return true; - } - } - - return false; -} - - -/* Create code to move the CONST_INT value in src_val to dest_reg. */ -static void -expand_set_cint64 (rtx dest_reg, rtx src_val) -{ - HOST_WIDE_INT val; - int leading_zeroes, trailing_zeroes; - int three_wide_only; - int shift, ins_shift, zero_cluster_shift; - rtx temp, subreg; - - gcc_assert (CONST_INT_P (src_val)); - val = trunc_int_for_mode (INTVAL (src_val), GET_MODE (dest_reg)); - - /* See if we can generate the constant in one instruction. */ - if (expand_set_cint64_one_inst (dest_reg, val, false)) - return; - - /* Force the destination to DImode so we can use DImode instructions - to create it. This both allows instructions like rotl, and - certain efficient 3-wide instructions. */ - subreg = simplify_gen_subreg (DImode, dest_reg, GET_MODE (dest_reg), 0); - gcc_assert (subreg != NULL); - dest_reg = subreg; - - temp = create_temp_reg_if_possible (DImode, dest_reg); - - leading_zeroes = 63 - floor_log2 (val & 0xFFFFFFFFFFFFFFFFULL); - trailing_zeroes = exact_log2 (val & -val); - - /* First try all three-wide instructions that generate a constant - (i.e. movei) followed by various shifts and rotates. If none of - those work, try various two-wide ways of generating a constant - followed by various shifts and rotates. */ - for (three_wide_only = 1; three_wide_only >= 0; three_wide_only--) - { - int count; - - if (expand_set_cint64_one_inst (temp, val >> trailing_zeroes, - three_wide_only)) - { - /* 0xFFFFFFFFFFFFA500 becomes: - movei temp, 0xFFFFFFFFFFFFFFA5 - shli dest, temp, 8 */ - emit_move_insn (dest_reg, - gen_rtx_ASHIFT (DImode, temp, - GEN_INT (trailing_zeroes))); - return; - } - - if (expand_set_cint64_one_inst (temp, val << leading_zeroes, - three_wide_only)) - { - /* 0x7FFFFFFFFFFFFFFF becomes: - movei temp, -2 - shrui dest, temp, 1 */ - emit_move_insn (dest_reg, - gen_rtx_LSHIFTRT (DImode, temp, - GEN_INT (leading_zeroes))); - return; - } - - /* Try rotating a one-instruction immediate. */ - for (count = 1; count < 64; count++) - { - HOST_WIDE_INT r = rotate_right (val, count); - if (expand_set_cint64_one_inst (temp, r, three_wide_only)) - { - /* 0xFFFFFFFFFFA5FFFF becomes: - movei temp, 0xFFFFFFFFFFFFFFA5 - rotli dest, temp, 16 */ - emit_move_insn (dest_reg, - gen_rtx_ROTATE (DImode, temp, GEN_INT (count))); - return; - } - } - } - - /* There are two cases here to produce a large constant. - In the most general case, we do this: - - moveli x, hw3(NUM) - shl16insli x, x, hw2(NUM) - shl16insli x, x, hw1(NUM) - shl16insli x, x, hw0(NUM) - - However, we can sometimes do better. shl16insli is a poor way to - insert 16 zero bits, because simply shifting left by 16 has more - bundling freedom. So if we see any contiguous aligned sequence - of 16 or more zero bits (below the highest set bit), it is always - more efficient to materialize the bits above the zero bits, then - left shift to put in the zeroes, then insert whatever bits - remain. For example, we might end up with: - - movei x, NUM >> (37 + 16) - shli x, x, 37 - shl16insli x, x, hw0(NUM) */ - - zero_cluster_shift = -1; - - for (shift = 0; shift < 48 - leading_zeroes; shift += 16) - { - HOST_WIDE_INT x = val >> shift; - - /* Find the least significant group of 16 aligned zero bits. */ - if ((x & 0xFFFF) == 0x0000) - { - /* Grab any following zero bits as well. */ - zero_cluster_shift = exact_log2 (x & -x); - shift += zero_cluster_shift; - break; - } - } - - if (zero_cluster_shift >= 0) - { - unsigned HOST_WIDE_INT leftover; - - /* Recursively create the constant above the lowest 16 zero - bits. */ - expand_set_cint64 (temp, GEN_INT (val >> shift)); - - /* See if we can easily insert the remaining bits, or if we need - to fall through to the more general case. */ - leftover = val - ((val >> shift) << shift); - if (leftover == 0) - { - /* A simple left shift is enough. */ - emit_move_insn (dest_reg, - gen_rtx_ASHIFT (DImode, temp, GEN_INT (shift))); - return; - } - else if (leftover <= 32767) - { - /* Left shift into position then add in the leftover. */ - rtx temp2 = create_temp_reg_if_possible (DImode, temp); - emit_move_insn (temp2, - gen_rtx_ASHIFT (DImode, temp, GEN_INT (shift))); - emit_move_insn (dest_reg, - gen_rtx_PLUS (DImode, temp2, GEN_INT (leftover))); - return; - } - else - { - /* Shift in the batch of >= 16 zeroes we detected earlier. - After this, shift will be aligned mod 16 so the final - loop can use shl16insli. */ - rtx temp2 = create_temp_reg_if_possible (DImode, temp); - rtx shift_count_rtx = GEN_INT (zero_cluster_shift); - - emit_move_insn (temp2, - gen_rtx_ASHIFT (DImode, temp, shift_count_rtx)); - - shift -= zero_cluster_shift; - temp = temp2; - } - } - else - { - /* Set as many high 16-bit blocks as we can with a single - instruction. We'll insert the remaining 16-bit blocks - below. */ - for (shift = 16;; shift += 16) - { - gcc_assert (shift < 64); - if (expand_set_cint64_one_inst (temp, val >> shift, false)) - break; - } - } - - /* At this point, temp == val >> shift, shift % 16 == 0, and we - still need to insert any bits of 'val' below 'shift'. Those bits - are guaranteed to not have 16 contiguous zeroes. */ - - gcc_assert ((shift & 15) == 0); - - for (ins_shift = shift - 16; ins_shift >= 0; ins_shift -= 16) - { - rtx result; - HOST_WIDE_INT bits = (val >> ins_shift) & 0xFFFF; - gcc_assert (bits != 0); - - /* On the last iteration we need to store into dest_reg. */ - if (ins_shift == 0) - result = dest_reg; - else - result = create_temp_reg_if_possible (DImode, dest_reg); - - emit_insn (gen_insn_shl16insli (result, temp, GEN_INT (bits))); - - temp = result; - } -} - - -/* Load OP1, a 64-bit constant, into OP0, a register. We know it - can't be done in one insn when we get here, the move expander - guarantees this. */ -void -tilegx_expand_set_const64 (rtx op0, rtx op1) -{ - if (CONST_INT_P (op1)) - { - /* TODO: I don't know if we want to split large constants - now, or wait until later (with a define_split). - - Does splitting early help CSE? Does it harm other - optimizations that might fold loads? */ - expand_set_cint64 (op0, op1); - } - else - { - rtx temp = create_temp_reg_if_possible (Pmode, op0); - - if (TARGET_32BIT) - { - /* Generate the 2-insn sequence to materialize a symbolic - address. */ - emit_insn (gen_mov_address_32bit_step1 (temp, op1)); - emit_insn (gen_mov_address_32bit_step2 (op0, temp, op1)); - } - else - { - /* Generate the 3-insn sequence to materialize a symbolic - address. Note that this assumes that virtual addresses - fit in 48 signed bits, which is currently true. */ - rtx temp2 = create_temp_reg_if_possible (Pmode, op0); - emit_insn (gen_mov_address_step1 (temp, op1)); - emit_insn (gen_mov_address_step2 (temp2, temp, op1)); - emit_insn (gen_mov_address_step3 (op0, temp2, op1)); - } - } -} - - -/* Expand a move instruction. Return true if all work is done. */ -bool -tilegx_expand_mov (machine_mode mode, rtx *operands) -{ - /* Handle sets of MEM first. */ - if (MEM_P (operands[0])) - { - if (can_create_pseudo_p ()) - operands[0] = validize_mem (operands[0]); - - if (reg_or_0_operand (operands[1], mode)) - return false; - - if (!reload_in_progress) - operands[1] = force_reg (mode, operands[1]); - } - - /* Fixup TLS cases. */ - if (CONSTANT_P (operands[1]) && tilegx_tls_referenced_p (operands[1])) - { - operands[1] = tilegx_legitimize_tls_address (operands[1]); - return false; - } - - /* Fixup PIC cases. */ - if (flag_pic && CONSTANT_P (operands[1])) - { - if (tilegx_pic_address_needs_scratch (operands[1])) - operands[1] = tilegx_legitimize_pic_address (operands[1], mode, 0); - - if (symbolic_operand (operands[1], mode)) - { - operands[1] = tilegx_legitimize_pic_address (operands[1], - mode, - (reload_in_progress ? - operands[0] : - NULL_RTX)); - return false; - } - } - - /* Accept non-constants and valid constants unmodified. */ - if (!CONSTANT_P (operands[1]) || move_operand (operands[1], mode)) - return false; - - /* Split large integers. */ - tilegx_expand_set_const64 (operands[0], operands[1]); - return true; -} - - -/* Expand unaligned loads. */ -void -tilegx_expand_unaligned_load (rtx dest_reg, rtx mem, HOST_WIDE_INT bitsize, - HOST_WIDE_INT bit_offset, bool sign) -{ - machine_mode mode; - rtx addr_lo, addr_hi; - rtx mem_lo, mem_hi, hi; - rtx mema, wide_result; - int last_byte_offset; - HOST_WIDE_INT byte_offset = bit_offset / BITS_PER_UNIT; - - mode = GET_MODE (dest_reg); - - if (bitsize == 2 * BITS_PER_UNIT && (bit_offset % BITS_PER_UNIT) == 0) - { - rtx mem_left, mem_right; - rtx left = gen_reg_rtx (mode); - - /* When just loading a two byte value, we can load the two bytes - individually and combine them efficiently. */ - - mem_lo = adjust_address (mem, QImode, byte_offset); - mem_hi = adjust_address (mem, QImode, byte_offset + 1); - - if (BYTES_BIG_ENDIAN) - { - mem_left = mem_lo; - mem_right = mem_hi; - } - else - { - mem_left = mem_hi; - mem_right = mem_lo; - } - - if (sign) - { - /* Do a signed load of the second byte and use bfins to set - the high bits of the result. */ - emit_insn (gen_zero_extendqidi2 (gen_lowpart (DImode, dest_reg), - mem_right)); - emit_insn (gen_extendqidi2 (gen_lowpart (DImode, left), mem_left)); - emit_insn (gen_insv (gen_lowpart (DImode, dest_reg), - GEN_INT (64 - 8), GEN_INT (8), - gen_lowpart (DImode, left))); - } - else - { - /* Do two unsigned loads and use v1int_l to interleave - them. */ - rtx right = gen_reg_rtx (mode); - emit_insn (gen_zero_extendqidi2 (gen_lowpart (DImode, right), - mem_right)); - emit_insn (gen_zero_extendqidi2 (gen_lowpart (DImode, left), - mem_left)); - emit_insn (gen_insn_v1int_l (gen_lowpart (DImode, dest_reg), - gen_lowpart (DImode, left), - gen_lowpart (DImode, right))); - } - - return; - } - - mema = XEXP (mem, 0); - - /* AND addresses cannot be in any alias set, since they may - implicitly alias surrounding code. Ideally we'd have some alias - set that covered all types except those with alignment 8 or - higher. */ - addr_lo = force_reg (Pmode, plus_constant (Pmode, mema, byte_offset)); - mem_lo = change_address (mem, mode, - gen_rtx_AND (GET_MODE (mema), addr_lo, - GEN_INT (-8))); - set_mem_alias_set (mem_lo, 0); - - /* Load the high word at an address that will not fault if the low - address is aligned and at the very end of a page. */ - last_byte_offset = (bit_offset + bitsize - 1) / BITS_PER_UNIT; - addr_hi = force_reg (Pmode, plus_constant (Pmode, mema, last_byte_offset)); - mem_hi = change_address (mem, mode, - gen_rtx_AND (GET_MODE (mema), addr_hi, - GEN_INT (-8))); - set_mem_alias_set (mem_hi, 0); - - if (bitsize == 64) - { - addr_lo = make_safe_from (addr_lo, dest_reg); - wide_result = dest_reg; - } - else - { - wide_result = gen_reg_rtx (mode); - } - - /* Load hi first in case dest_reg is used in mema. */ - hi = gen_reg_rtx (mode); - emit_move_insn (hi, mem_hi); - emit_move_insn (wide_result, mem_lo); - - emit_insn (gen_insn_dblalign (gen_lowpart (DImode, wide_result), - gen_lowpart (DImode, wide_result), - gen_lowpart (DImode, hi), addr_lo)); - - if (bitsize != 64) - { - rtx extracted = - extract_bit_field (gen_lowpart (DImode, wide_result), - bitsize, bit_offset % BITS_PER_UNIT, - !sign, gen_lowpart (DImode, dest_reg), - DImode, DImode, false, NULL); - - if (extracted != dest_reg) - emit_move_insn (dest_reg, gen_lowpart (DImode, extracted)); - } -} - - -/* Expand unaligned stores. */ -static void -tilegx_expand_unaligned_store (rtx mem, rtx src, HOST_WIDE_INT bitsize, - HOST_WIDE_INT bit_offset) -{ - HOST_WIDE_INT byte_offset = bit_offset / BITS_PER_UNIT; - HOST_WIDE_INT bytesize = bitsize / BITS_PER_UNIT; - HOST_WIDE_INT shift_init, shift_increment, shift_amt; - HOST_WIDE_INT i; - rtx mem_addr; - rtx store_val; - - shift_init = BYTES_BIG_ENDIAN ? (bitsize - BITS_PER_UNIT) : 0; - shift_increment = BYTES_BIG_ENDIAN ? -BITS_PER_UNIT : BITS_PER_UNIT; - - for (i = 0, shift_amt = shift_init; - i < bytesize; - i++, shift_amt += shift_increment) - { - mem_addr = adjust_address (mem, QImode, byte_offset + i); - - if (shift_amt) - { - store_val = expand_simple_binop (DImode, LSHIFTRT, - gen_lowpart (DImode, src), - GEN_INT (shift_amt), NULL, 1, - OPTAB_LIB_WIDEN); - store_val = gen_lowpart (QImode, store_val); - } - else - { - store_val = gen_lowpart (QImode, src); - } - - emit_move_insn (mem_addr, store_val); - } -} - - -/* Implement the movmisalign patterns. One of the operands is a - memory that is not naturally aligned. Emit instructions to load - it. */ -void -tilegx_expand_movmisalign (machine_mode mode, rtx *operands) -{ - if (MEM_P (operands[1])) - { - rtx tmp; - - if (register_operand (operands[0], mode)) - tmp = operands[0]; - else - tmp = gen_reg_rtx (mode); - - tilegx_expand_unaligned_load (tmp, operands[1], GET_MODE_BITSIZE (mode), - 0, true); - - if (tmp != operands[0]) - emit_move_insn (operands[0], tmp); - } - else if (MEM_P (operands[0])) - { - if (!reg_or_0_operand (operands[1], mode)) - operands[1] = force_reg (mode, operands[1]); - - tilegx_expand_unaligned_store (operands[0], operands[1], - GET_MODE_BITSIZE (mode), 0); - } - else - gcc_unreachable (); - -} - - -/* Implement the allocate_stack pattern (alloca). */ -void -tilegx_allocate_stack (rtx op0, rtx op1) -{ - /* Technically the correct way to initialize chain_loc is with - * gen_frame_mem() instead of gen_rtx_MEM(), but gen_frame_mem() - * sets the alias_set to that of a frame reference. Some of our - * tests rely on some unsafe assumption about when the chaining - * update is done, we need to be conservative about reordering the - * chaining instructions. - */ - rtx fp_addr = gen_reg_rtx (Pmode); - rtx fp_value = gen_reg_rtx (Pmode); - rtx fp_loc; - - emit_move_insn (fp_addr, gen_rtx_PLUS (Pmode, stack_pointer_rtx, - GEN_INT (UNITS_PER_WORD))); - - fp_loc = gen_frame_mem (Pmode, fp_addr); - - emit_move_insn (fp_value, fp_loc); - - op1 = force_reg (Pmode, op1); - - emit_move_insn (stack_pointer_rtx, - gen_rtx_MINUS (Pmode, stack_pointer_rtx, op1)); - - emit_move_insn (fp_addr, gen_rtx_PLUS (Pmode, stack_pointer_rtx, - GEN_INT (UNITS_PER_WORD))); - - fp_loc = gen_frame_mem (Pmode, fp_addr); - - emit_move_insn (fp_loc, fp_value); - - emit_move_insn (op0, virtual_stack_dynamic_rtx); -} - - - -/* Multiplies */ - - -/* Returns the insn_code in ENTRY. */ -static enum insn_code -tilegx_multiply_get_opcode (const struct tilegx_multiply_insn_seq_entry - *entry) -{ - return tilegx_multiply_insn_seq_decode_opcode[entry->compressed_opcode]; -} - - -/* Returns the length of the 'op' array. */ -static int -tilegx_multiply_get_num_ops (const struct tilegx_multiply_insn_seq *seq) -{ - /* The array either uses all of its allocated slots or is terminated - by a bogus opcode. Either way, the array size is the index of the - last valid opcode plus one. */ - int i; - for (i = tilegx_multiply_insn_seq_MAX_OPERATIONS - 1; i >= 0; i--) - if (tilegx_multiply_get_opcode (&seq->op[i]) != CODE_FOR_nothing) - return i + 1; - - /* An empty array is not allowed. */ - gcc_unreachable (); -} - - -/* We precompute a number of expression trees for multiplying by - constants. This generates code for such an expression tree by - walking through the nodes in the tree (which are conveniently - pre-linearized) and emitting an instruction for each one. */ -static void -tilegx_expand_constant_multiply_given_sequence (rtx result, rtx src, - const struct - tilegx_multiply_insn_seq *seq) -{ - int i; - int num_ops; - - /* Keep track of the subexpressions computed so far, so later - instructions can refer to them. We seed the array with zero and - the value being multiplied. */ - int num_subexprs = 2; - rtx subexprs[tilegx_multiply_insn_seq_MAX_OPERATIONS + 2]; - subexprs[0] = const0_rtx; - subexprs[1] = src; - - /* Determine how many instructions we are going to generate. */ - num_ops = tilegx_multiply_get_num_ops (seq); - gcc_assert (num_ops > 0 - && num_ops <= tilegx_multiply_insn_seq_MAX_OPERATIONS); - - for (i = 0; i < num_ops; i++) - { - const struct tilegx_multiply_insn_seq_entry *entry = &seq->op[i]; - - /* Figure out where to store the output of this instruction. */ - const bool is_last_op = (i + 1 == num_ops); - rtx out = is_last_op ? result : gen_reg_rtx (DImode); - - enum insn_code opcode = tilegx_multiply_get_opcode (entry); - if (opcode == CODE_FOR_ashldi3) - { - /* Handle shift by immediate. This is a special case because - the meaning of the second operand is a constant shift - count rather than an operand index. */ - - /* Make sure the shift count is in range. Zero should not - happen. */ - const int shift_count = entry->rhs; - gcc_assert (shift_count > 0 && shift_count < 64); - - /* Emit the actual instruction. */ - emit_insn (GEN_FCN (opcode) - (out, subexprs[entry->lhs], - gen_rtx_CONST_INT (DImode, shift_count))); - } - else - { - /* Handle a normal two-operand instruction, such as add or - shl1add. */ - - /* Make sure we are referring to a previously computed - subexpression. */ - gcc_assert (entry->rhs < num_subexprs); - - /* Emit the actual instruction. */ - emit_insn (GEN_FCN (opcode) - (out, subexprs[entry->lhs], subexprs[entry->rhs])); - } - - /* Record this subexpression for use by later expressions. */ - subexprs[num_subexprs++] = out; - } -} - - -/* bsearch helper function. */ -static int -tilegx_compare_multipliers (const void *key, const void *t) -{ - long long delta = - (*(const long long *) key - - ((const struct tilegx_multiply_insn_seq *) t)->multiplier); - return (delta < 0) ? -1 : (delta > 0); -} - - -/* Returns the tilegx_multiply_insn_seq for multiplier, or NULL if none - exists. */ -static const struct tilegx_multiply_insn_seq * -tilegx_find_multiply_insn_seq_for_constant (long long multiplier) -{ - return ((const struct tilegx_multiply_insn_seq *) - bsearch (&multiplier, tilegx_multiply_insn_seq_table, - tilegx_multiply_insn_seq_table_size, - sizeof tilegx_multiply_insn_seq_table[0], - tilegx_compare_multipliers)); -} - - -/* Try to a expand constant multiply in DImode by looking it up in a - precompiled table. OP0 is the result operand, OP1 is the source - operand, and MULTIPLIER is the value of the constant. Return true - if it succeeds. */ -static bool -tilegx_expand_const_muldi (rtx op0, rtx op1, long long multiplier) -{ - /* See if we have precomputed an efficient way to multiply by this - constant. */ - const struct tilegx_multiply_insn_seq *seq = - tilegx_find_multiply_insn_seq_for_constant (multiplier); - if (seq != NULL) - { - tilegx_expand_constant_multiply_given_sequence (op0, op1, seq); - return true; - } - else - return false; -} - - -/* Expand the muldi pattern. */ -bool -tilegx_expand_muldi (rtx op0, rtx op1, rtx op2) -{ - if (CONST_INT_P (op2)) - { - HOST_WIDE_INT n = trunc_int_for_mode (INTVAL (op2), DImode); - return tilegx_expand_const_muldi (op0, op1, n); - } - return false; -} - - -/* Expand a high multiply pattern in DImode. RESULT, OP1, OP2 are the - operands, and SIGN is true if it's a signed multiply, and false if - it's an unsigned multiply. */ -static void -tilegx_expand_high_multiply (rtx result, rtx op1, rtx op2, bool sign) -{ - rtx tmp0 = gen_reg_rtx (DImode); - rtx tmp1 = gen_reg_rtx (DImode); - rtx tmp2 = gen_reg_rtx (DImode); - rtx tmp3 = gen_reg_rtx (DImode); - rtx tmp4 = gen_reg_rtx (DImode); - rtx tmp5 = gen_reg_rtx (DImode); - rtx tmp6 = gen_reg_rtx (DImode); - rtx tmp7 = gen_reg_rtx (DImode); - rtx tmp8 = gen_reg_rtx (DImode); - rtx tmp9 = gen_reg_rtx (DImode); - rtx tmp10 = gen_reg_rtx (DImode); - rtx tmp11 = gen_reg_rtx (DImode); - rtx tmp12 = gen_reg_rtx (DImode); - rtx tmp13 = gen_reg_rtx (DImode); - rtx result_lo = gen_reg_rtx (DImode); - - if (sign) - { - emit_insn (gen_insn_mul_hs_lu (tmp0, op1, op2)); - emit_insn (gen_insn_mul_hs_lu (tmp1, op2, op1)); - emit_insn (gen_insn_mul_lu_lu (tmp2, op1, op2)); - emit_insn (gen_insn_mul_hs_hs (tmp3, op1, op2)); - } - else - { - emit_insn (gen_insn_mul_hu_lu (tmp0, op1, op2)); - emit_insn (gen_insn_mul_hu_lu (tmp1, op2, op1)); - emit_insn (gen_insn_mul_lu_lu (tmp2, op1, op2)); - emit_insn (gen_insn_mul_hu_hu (tmp3, op1, op2)); - } - - emit_move_insn (tmp4, (gen_rtx_ASHIFT (DImode, tmp0, GEN_INT (32)))); - - emit_move_insn (tmp5, (gen_rtx_ASHIFT (DImode, tmp1, GEN_INT (32)))); - - emit_move_insn (tmp6, (gen_rtx_PLUS (DImode, tmp4, tmp5))); - emit_move_insn (result_lo, (gen_rtx_PLUS (DImode, tmp2, tmp6))); - - emit_move_insn (tmp7, gen_rtx_LTU (DImode, tmp6, tmp4)); - emit_move_insn (tmp8, gen_rtx_LTU (DImode, result_lo, tmp2)); - - if (sign) - { - emit_move_insn (tmp9, (gen_rtx_ASHIFTRT (DImode, tmp0, GEN_INT (32)))); - emit_move_insn (tmp10, (gen_rtx_ASHIFTRT (DImode, tmp1, GEN_INT (32)))); - } - else - { - emit_move_insn (tmp9, (gen_rtx_LSHIFTRT (DImode, tmp0, GEN_INT (32)))); - emit_move_insn (tmp10, (gen_rtx_LSHIFTRT (DImode, tmp1, GEN_INT (32)))); - } - - emit_move_insn (tmp11, (gen_rtx_PLUS (DImode, tmp3, tmp7))); - emit_move_insn (tmp12, (gen_rtx_PLUS (DImode, tmp8, tmp9))); - emit_move_insn (tmp13, (gen_rtx_PLUS (DImode, tmp11, tmp12))); - emit_move_insn (result, (gen_rtx_PLUS (DImode, tmp13, tmp10))); -} - - -/* Implement smuldi3_highpart. */ -void -tilegx_expand_smuldi3_highpart (rtx op0, rtx op1, rtx op2) -{ - tilegx_expand_high_multiply (op0, op1, op2, true); -} - - -/* Implement umuldi3_highpart. */ -void -tilegx_expand_umuldi3_highpart (rtx op0, rtx op1, rtx op2) -{ - tilegx_expand_high_multiply (op0, op1, op2, false); -} - - - -/* Compare and branches */ - -/* Produce the rtx yielding a bool for a floating point - comparison. */ -static bool -tilegx_emit_fp_setcc (rtx res, enum rtx_code code, machine_mode mode, - rtx op0, rtx op1) -{ - /* TODO: Certain compares again constants can be done using entirely - integer operations. But you have to get the special cases right - e.g. NaN, +0 == -0, etc. */ - - rtx flags; - int flag_index; - rtx a = force_reg (DImode, gen_lowpart (DImode, op0)); - rtx b = force_reg (DImode, gen_lowpart (DImode, op1)); - - flags = gen_reg_rtx (DImode); - - if (mode == SFmode) - { - emit_insn (gen_insn_fsingle_add1 (flags, a, b)); - } - else - { - gcc_assert (mode == DFmode); - emit_insn (gen_insn_fdouble_add_flags (flags, a, b)); - } - - switch (code) - { - case EQ: flag_index = 30; break; - case NE: flag_index = 31; break; - case LE: flag_index = 27; break; - case LT: flag_index = 26; break; - case GE: flag_index = 29; break; - case GT: flag_index = 28; break; - default: gcc_unreachable (); - } - - gcc_assert (GET_MODE (res) == DImode); - emit_move_insn (res, gen_rtx_ZERO_EXTRACT (DImode, flags, GEN_INT (1), - GEN_INT (flag_index))); - return true; -} - - -/* Certain simplifications can be done to make invalid setcc - operations valid. Return the final comparison, or NULL if we can't - work. */ -static bool -tilegx_emit_setcc_internal (rtx res, enum rtx_code code, rtx op0, rtx op1, - machine_mode cmp_mode) -{ - rtx tmp; - bool swap = false; - - if (cmp_mode == SFmode || cmp_mode == DFmode) - return tilegx_emit_fp_setcc (res, code, cmp_mode, op0, op1); - - /* The general case: fold the comparison code to the types of - compares that we have, choosing the branch as necessary. */ - - switch (code) - { - case EQ: - case NE: - case LE: - case LT: - case LEU: - case LTU: - /* We have these compares. */ - break; - - case GE: - case GT: - case GEU: - case GTU: - /* We do not have these compares, so we reverse the - operands. */ - swap = true; - break; - - default: - /* We should not have called this with any other code. */ - gcc_unreachable (); - } - - if (swap) - { - code = swap_condition (code); - tmp = op0, op0 = op1, op1 = tmp; - } - - if (!reg_or_0_operand (op0, cmp_mode)) - op0 = force_reg (cmp_mode, op0); - - if (!CONST_INT_P (op1) && !register_operand (op1, cmp_mode)) - op1 = force_reg (cmp_mode, op1); - - /* Return the setcc comparison. */ - emit_insn (gen_rtx_SET (res, gen_rtx_fmt_ee (code, DImode, op0, op1))); - - return true; -} - - -/* Implement cstore patterns. */ -bool -tilegx_emit_setcc (rtx operands[], machine_mode cmp_mode) -{ - return - tilegx_emit_setcc_internal (operands[0], GET_CODE (operands[1]), - operands[2], operands[3], cmp_mode); -} - - -/* Return whether CODE is a signed comparison. */ -static bool -signed_compare_p (enum rtx_code code) -{ - return (code == EQ || code == NE || code == LT || code == LE - || code == GT || code == GE); -} - - -/* Generate the comparison for a DImode conditional branch. */ -static rtx -tilegx_emit_cc_test (enum rtx_code code, rtx op0, rtx op1, - machine_mode cmp_mode, bool eq_ne_only) -{ - enum rtx_code branch_code; - rtx temp; - - if (cmp_mode == SFmode || cmp_mode == DFmode) - { - /* Compute a boolean saying whether the comparison is true. */ - temp = gen_reg_rtx (DImode); - tilegx_emit_setcc_internal (temp, code, op0, op1, cmp_mode); - - /* Test that flag. */ - return gen_rtx_fmt_ee (NE, VOIDmode, temp, const0_rtx); - } - - /* Check for a compare against zero using a comparison we can do - directly. */ - if (op1 == const0_rtx - && (code == EQ || code == NE - || (!eq_ne_only && signed_compare_p (code)))) - { - op0 = force_reg (cmp_mode, op0); - return gen_rtx_fmt_ee (code, VOIDmode, op0, const0_rtx); - } - - /* The general case: fold the comparison code to the types of - compares that we have, choosing the branch as necessary. */ - switch (code) - { - case EQ: - case LE: - case LT: - case LEU: - case LTU: - /* We have these compares. */ - branch_code = NE; - break; - - case NE: - case GE: - case GT: - case GEU: - case GTU: - /* These must be reversed (except NE, but let's - canonicalize). */ - code = reverse_condition (code); - branch_code = EQ; - break; - - default: - gcc_unreachable (); - } - - if (CONST_INT_P (op1) && (!satisfies_constraint_I (op1) || code == LEU)) - { - HOST_WIDE_INT n = INTVAL (op1); - - switch (code) - { - case EQ: - /* Subtract off the value we want to compare against and see - if we get zero. This is cheaper than creating a constant - in a register. Except that subtracting -128 is more - expensive than seqi to -128, so we leave that alone. */ - /* ??? Don't do this when comparing against symbols, - otherwise we'll reduce (&x == 0x1234) to (&x-0x1234 == - 0), which will be declared false out of hand (at least - for non-weak). */ - if (n != -128 - && add_operand (GEN_INT (-n), DImode) - && !(symbolic_operand (op0, VOIDmode) - || (REG_P (op0) && REG_POINTER (op0)))) - { - /* TODO: Use a SIMD add immediate to hit zero for tiled - constants in a single instruction. */ - if (GET_MODE (op0) != DImode) - { - /* Convert to DImode so we can use addli. Note that - this will not actually generate any code because - sign extension from SI -> DI is a no-op. I don't - know if it's safe just to make a paradoxical - subreg here though. */ - rtx temp2 = gen_reg_rtx (DImode); - emit_insn (gen_extendsidi2 (temp2, op0)); - op0 = temp2; - } - else - { - op0 = force_reg (DImode, op0); - } - temp = gen_reg_rtx (DImode); - emit_move_insn (temp, gen_rtx_PLUS (DImode, op0, GEN_INT (-n))); - return gen_rtx_fmt_ee (reverse_condition (branch_code), - VOIDmode, temp, const0_rtx); - } - break; - - case LEU: - if (n == -1) - break; - /* FALLTHRU */ - - case LTU: - /* Change ((unsigned)x < 0x1000) into !((int)x >> 12), etc. - We use arithmetic shift right because it's a 3-wide op, - while logical shift right is not. */ - { - int first = exact_log2 (code == LTU ? n : n + 1); - if (first != -1) - { - op0 = force_reg (cmp_mode, op0); - temp = gen_reg_rtx (cmp_mode); - emit_move_insn (temp, - gen_rtx_ASHIFTRT (cmp_mode, op0, - GEN_INT (first))); - return gen_rtx_fmt_ee (reverse_condition (branch_code), - VOIDmode, temp, const0_rtx); - } - } - break; - - default: - break; - } - } - - /* Compute a flag saying whether we should branch. */ - temp = gen_reg_rtx (DImode); - tilegx_emit_setcc_internal (temp, code, op0, op1, cmp_mode); - - /* Return the branch comparison. */ - return gen_rtx_fmt_ee (branch_code, VOIDmode, temp, const0_rtx); -} - - -/* Generate the comparison for a conditional branch. */ -void -tilegx_emit_conditional_branch (rtx operands[], machine_mode cmp_mode) -{ - rtx cmp_rtx = - tilegx_emit_cc_test (GET_CODE (operands[0]), operands[1], operands[2], - cmp_mode, false); - rtx branch_rtx = gen_rtx_SET (pc_rtx, - gen_rtx_IF_THEN_ELSE (VOIDmode, cmp_rtx, - gen_rtx_LABEL_REF - (VOIDmode, - operands[3]), - pc_rtx)); - emit_jump_insn (branch_rtx); -} - - -/* Implement the movcc pattern. */ -rtx -tilegx_emit_conditional_move (rtx cmp) -{ - return - tilegx_emit_cc_test (GET_CODE (cmp), XEXP (cmp, 0), XEXP (cmp, 1), - GET_MODE (XEXP (cmp, 0)), true); -} - - -/* Return true if INSN is annotated with a REG_BR_PROB note that - indicates it's a branch that's predicted taken. */ -static bool -cbranch_predicted_p (rtx_insn *insn) -{ - rtx x = find_reg_note (insn, REG_BR_PROB, 0); - - if (x) - { - return profile_probability::from_reg_br_prob_note (XINT (x, 0)) - >= profile_probability::even (); - } - - return false; -} - - -/* Output assembly code for a specific branch instruction, appending - the branch prediction flag to the opcode if appropriate. */ -static const char * -tilegx_output_simple_cbranch_with_opcode (rtx_insn *insn, const char *opcode, - int regop, bool reverse_predicted) -{ - static char buf[64]; - sprintf (buf, "%s%s\t%%r%d, %%l0", opcode, - (cbranch_predicted_p (insn) ^ reverse_predicted) ? "t" : "", - regop); - return buf; -} - - -/* Output assembly code for a specific branch instruction, appending - the branch prediction flag to the opcode if appropriate. */ -const char * -tilegx_output_cbranch_with_opcode (rtx_insn *insn, rtx *operands, - const char *opcode, - const char *rev_opcode, int regop) -{ - const char *branch_if_false; - rtx taken, not_taken; - bool is_simple_branch; - - gcc_assert (LABEL_P (operands[0])); - - is_simple_branch = true; - if (INSN_ADDRESSES_SET_P ()) - { - int from_addr = INSN_ADDRESSES (INSN_UID (insn)); - int to_addr = INSN_ADDRESSES (INSN_UID (operands[0])); - int delta = to_addr - from_addr; - is_simple_branch = IN_RANGE (delta, -524288, 524280); - } - - if (is_simple_branch) - { - /* Just a simple conditional branch. */ - return - tilegx_output_simple_cbranch_with_opcode (insn, opcode, regop, false); - } - - /* Generate a reversed branch around a direct jump. This fallback - does not use branch-likely instructions. */ - not_taken = gen_label_rtx (); - taken = operands[0]; - - /* Generate the reversed branch to NOT_TAKEN. */ - operands[0] = not_taken; - branch_if_false = - tilegx_output_simple_cbranch_with_opcode (insn, rev_opcode, regop, true); - output_asm_insn (branch_if_false, operands); - - output_asm_insn ("j\t%l0", &taken); - - /* Output NOT_TAKEN. */ - targetm.asm_out.internal_label (asm_out_file, "L", - CODE_LABEL_NUMBER (not_taken)); - return ""; -} - - -/* Output assembly code for a conditional branch instruction. */ -const char * -tilegx_output_cbranch (rtx_insn *insn, rtx *operands, bool reversed) -{ - enum rtx_code code = GET_CODE (operands[1]); - const char *opcode; - const char *rev_opcode; - - if (reversed) - code = reverse_condition (code); - - switch (code) - { - case NE: - opcode = "bnez"; - rev_opcode = "beqz"; - break; - case EQ: - opcode = "beqz"; - rev_opcode = "bnez"; - break; - case GE: - opcode = "bgez"; - rev_opcode = "bltz"; - break; - case GT: - opcode = "bgtz"; - rev_opcode = "blez"; - break; - case LE: - opcode = "blez"; - rev_opcode = "bgtz"; - break; - case LT: - opcode = "bltz"; - rev_opcode = "bgez"; - break; - default: - gcc_unreachable (); - } - - return tilegx_output_cbranch_with_opcode (insn, operands, opcode, - rev_opcode, 2); -} - - -/* Implement the tablejump pattern. */ -void -tilegx_expand_tablejump (rtx op0, rtx op1) -{ - if (flag_pic) - { - rtx temp = gen_reg_rtx (Pmode); - rtx temp2 = gen_reg_rtx (Pmode); - - tilegx_compute_pcrel_address (temp, gen_rtx_LABEL_REF (Pmode, op1)); - emit_move_insn (temp2, - gen_rtx_PLUS (Pmode, - convert_to_mode (Pmode, op0, false), - temp)); - op0 = temp2; - } - - emit_jump_insn (gen_tablejump_aux (op0, op1)); -} - - -/* Emit barrier before an atomic, as needed for the memory MODEL. */ -void -tilegx_pre_atomic_barrier (enum memmodel model) -{ - if (need_atomic_barrier_p (model, true)) - emit_insn (gen_memory_barrier ()); -} - - -/* Emit barrier after an atomic, as needed for the memory MODEL. */ -void -tilegx_post_atomic_barrier (enum memmodel model) -{ - if (need_atomic_barrier_p (model, false)) - emit_insn (gen_memory_barrier ()); -} - - - -/* Expand a builtin vector binary op, by calling gen function GEN with - operands in the proper modes. DEST is converted to DEST_MODE, and - src0 and src1 (if DO_SRC1 is true) is converted to SRC_MODE. */ -void -tilegx_expand_builtin_vector_binop (rtx (*gen) (rtx, rtx, rtx), - machine_mode dest_mode, - rtx dest, - machine_mode src_mode, - rtx src0, rtx src1, bool do_src1) -{ - dest = gen_lowpart (dest_mode, dest); - - if (src0 == const0_rtx) - src0 = CONST0_RTX (src_mode); - else - src0 = gen_lowpart (src_mode, src0); - - if (do_src1) - { - if (src1 == const0_rtx) - src1 = CONST0_RTX (src_mode); - else - src1 = gen_lowpart (src_mode, src1); - } - - emit_insn ((*gen) (dest, src0, src1)); -} - - - -/* Intrinsics */ - - -struct tile_builtin_info -{ - enum insn_code icode; - tree fndecl; -}; - -static struct tile_builtin_info tilegx_builtin_info[TILEGX_BUILTIN_max] = { - { CODE_FOR_adddi3, NULL }, /* add */ - { CODE_FOR_addsi3, NULL }, /* addx */ - { CODE_FOR_ssaddsi3, NULL }, /* addxsc */ - { CODE_FOR_anddi3, NULL }, /* and */ - { CODE_FOR_insn_bfexts, NULL }, /* bfexts */ - { CODE_FOR_insn_bfextu, NULL }, /* bfextu */ - { CODE_FOR_insn_bfins, NULL }, /* bfins */ - { CODE_FOR_clzdi2, NULL }, /* clz */ - { CODE_FOR_insn_cmoveqz, NULL }, /* cmoveqz */ - { CODE_FOR_insn_cmovnez, NULL }, /* cmovnez */ - { CODE_FOR_insn_cmpeq_didi, NULL }, /* cmpeq */ - { CODE_FOR_insn_cmpexch, NULL }, /* cmpexch */ - { CODE_FOR_insn_cmpexch4, NULL }, /* cmpexch4 */ - { CODE_FOR_insn_cmples_didi, NULL }, /* cmples */ - { CODE_FOR_insn_cmpleu_didi, NULL }, /* cmpleu */ - { CODE_FOR_insn_cmplts_didi, NULL }, /* cmplts */ - { CODE_FOR_insn_cmpltu_didi, NULL }, /* cmpltu */ - { CODE_FOR_insn_cmpne_didi, NULL }, /* cmpne */ - { CODE_FOR_insn_cmul, NULL }, /* cmul */ - { CODE_FOR_insn_cmula, NULL }, /* cmula */ - { CODE_FOR_insn_cmulaf, NULL }, /* cmulaf */ - { CODE_FOR_insn_cmulf, NULL }, /* cmulf */ - { CODE_FOR_insn_cmulfr, NULL }, /* cmulfr */ - { CODE_FOR_insn_cmulh, NULL }, /* cmulh */ - { CODE_FOR_insn_cmulhr, NULL }, /* cmulhr */ - { CODE_FOR_insn_crc32_32, NULL }, /* crc32_32 */ - { CODE_FOR_insn_crc32_8, NULL }, /* crc32_8 */ - { CODE_FOR_ctzdi2, NULL }, /* ctz */ - { CODE_FOR_insn_dblalign, NULL }, /* dblalign */ - { CODE_FOR_insn_dblalign2, NULL }, /* dblalign2 */ - { CODE_FOR_insn_dblalign4, NULL }, /* dblalign4 */ - { CODE_FOR_insn_dblalign6, NULL }, /* dblalign6 */ - { CODE_FOR_insn_drain, NULL }, /* drain */ - { CODE_FOR_insn_dtlbpr, NULL }, /* dtlbpr */ - { CODE_FOR_insn_exch, NULL }, /* exch */ - { CODE_FOR_insn_exch4, NULL }, /* exch4 */ - { CODE_FOR_insn_fdouble_add_flags, NULL }, /* fdouble_add_flags */ - { CODE_FOR_insn_fdouble_addsub, NULL }, /* fdouble_addsub */ - { CODE_FOR_insn_fdouble_mul_flags, NULL }, /* fdouble_mul_flags */ - { CODE_FOR_insn_fdouble_pack1, NULL }, /* fdouble_pack1 */ - { CODE_FOR_insn_fdouble_pack2, NULL }, /* fdouble_pack2 */ - { CODE_FOR_insn_fdouble_sub_flags, NULL }, /* fdouble_sub_flags */ - { CODE_FOR_insn_fdouble_unpack_max, NULL }, /* fdouble_unpack_max */ - { CODE_FOR_insn_fdouble_unpack_min, NULL }, /* fdouble_unpack_min */ - { CODE_FOR_insn_fetchadd, NULL }, /* fetchadd */ - { CODE_FOR_insn_fetchadd4, NULL }, /* fetchadd4 */ - { CODE_FOR_insn_fetchaddgez, NULL }, /* fetchaddgez */ - { CODE_FOR_insn_fetchaddgez4, NULL }, /* fetchaddgez4 */ - { CODE_FOR_insn_fetchand, NULL }, /* fetchand */ - { CODE_FOR_insn_fetchand4, NULL }, /* fetchand4 */ - { CODE_FOR_insn_fetchor, NULL }, /* fetchor */ - { CODE_FOR_insn_fetchor4, NULL }, /* fetchor4 */ - { CODE_FOR_insn_finv, NULL }, /* finv */ - { CODE_FOR_insn_flush, NULL }, /* flush */ - { CODE_FOR_insn_flushwb, NULL }, /* flushwb */ - { CODE_FOR_insn_fnop, NULL }, /* fnop */ - { CODE_FOR_insn_fsingle_add1, NULL }, /* fsingle_add1 */ - { CODE_FOR_insn_fsingle_addsub2, NULL }, /* fsingle_addsub2 */ - { CODE_FOR_insn_fsingle_mul1, NULL }, /* fsingle_mul1 */ - { CODE_FOR_insn_fsingle_mul2, NULL }, /* fsingle_mul2 */ - { CODE_FOR_insn_fsingle_pack1, NULL }, /* fsingle_pack1 */ - { CODE_FOR_insn_fsingle_pack2, NULL }, /* fsingle_pack2 */ - { CODE_FOR_insn_fsingle_sub1, NULL }, /* fsingle_sub1 */ - { CODE_FOR_insn_icoh, NULL }, /* icoh */ - { CODE_FOR_insn_ill, NULL }, /* ill */ - { CODE_FOR_insn_info, NULL }, /* info */ - { CODE_FOR_insn_infol, NULL }, /* infol */ - { CODE_FOR_insn_inv, NULL }, /* inv */ - { CODE_FOR_insn_ld, NULL }, /* ld */ - { CODE_FOR_insn_ld1s, NULL }, /* ld1s */ - { CODE_FOR_insn_ld1u, NULL }, /* ld1u */ - { CODE_FOR_insn_ld2s, NULL }, /* ld2s */ - { CODE_FOR_insn_ld2u, NULL }, /* ld2u */ - { CODE_FOR_insn_ld4s, NULL }, /* ld4s */ - { CODE_FOR_insn_ld4u, NULL }, /* ld4u */ - { CODE_FOR_insn_ldna, NULL }, /* ldna */ - { CODE_FOR_insn_ldnt, NULL }, /* ldnt */ - { CODE_FOR_insn_ldnt1s, NULL }, /* ldnt1s */ - { CODE_FOR_insn_ldnt1u, NULL }, /* ldnt1u */ - { CODE_FOR_insn_ldnt2s, NULL }, /* ldnt2s */ - { CODE_FOR_insn_ldnt2u, NULL }, /* ldnt2u */ - { CODE_FOR_insn_ldnt4s, NULL }, /* ldnt4s */ - { CODE_FOR_insn_ldnt4u, NULL }, /* ldnt4u */ - { CODE_FOR_insn_ld_L2, NULL }, /* ld_L2 */ - { CODE_FOR_insn_ld1s_L2, NULL }, /* ld1s_L2 */ - { CODE_FOR_insn_ld1u_L2, NULL }, /* ld1u_L2 */ - { CODE_FOR_insn_ld2s_L2, NULL }, /* ld2s_L2 */ - { CODE_FOR_insn_ld2u_L2, NULL }, /* ld2u_L2 */ - { CODE_FOR_insn_ld4s_L2, NULL }, /* ld4s_L2 */ - { CODE_FOR_insn_ld4u_L2, NULL }, /* ld4u_L2 */ - { CODE_FOR_insn_ldna_L2, NULL }, /* ldna_L2 */ - { CODE_FOR_insn_ldnt_L2, NULL }, /* ldnt_L2 */ - { CODE_FOR_insn_ldnt1s_L2, NULL }, /* ldnt1s_L2 */ - { CODE_FOR_insn_ldnt1u_L2, NULL }, /* ldnt1u_L2 */ - { CODE_FOR_insn_ldnt2s_L2, NULL }, /* ldnt2s_L2 */ - { CODE_FOR_insn_ldnt2u_L2, NULL }, /* ldnt2u_L2 */ - { CODE_FOR_insn_ldnt4s_L2, NULL }, /* ldnt4s_L2 */ - { CODE_FOR_insn_ldnt4u_L2, NULL }, /* ldnt4u_L2 */ - { CODE_FOR_insn_ld_miss, NULL }, /* ld_miss */ - { CODE_FOR_insn_ld1s_miss, NULL }, /* ld1s_miss */ - { CODE_FOR_insn_ld1u_miss, NULL }, /* ld1u_miss */ - { CODE_FOR_insn_ld2s_miss, NULL }, /* ld2s_miss */ - { CODE_FOR_insn_ld2u_miss, NULL }, /* ld2u_miss */ - { CODE_FOR_insn_ld4s_miss, NULL }, /* ld4s_miss */ - { CODE_FOR_insn_ld4u_miss, NULL }, /* ld4u_miss */ - { CODE_FOR_insn_ldna_miss, NULL }, /* ldna_miss */ - { CODE_FOR_insn_ldnt_miss, NULL }, /* ldnt_miss */ - { CODE_FOR_insn_ldnt1s_miss, NULL }, /* ldnt1s_miss */ - { CODE_FOR_insn_ldnt1u_miss, NULL }, /* ldnt1u_miss */ - { CODE_FOR_insn_ldnt2s_miss, NULL }, /* ldnt2s_miss */ - { CODE_FOR_insn_ldnt2u_miss, NULL }, /* ldnt2u_miss */ - { CODE_FOR_insn_ldnt4s_miss, NULL }, /* ldnt4s_miss */ - { CODE_FOR_insn_ldnt4u_miss, NULL }, /* ldnt4u_miss */ - { CODE_FOR_insn_lnk, NULL }, /* lnk */ - { CODE_FOR_memory_barrier, NULL }, /* mf */ - { CODE_FOR_insn_mfspr, NULL }, /* mfspr */ - { CODE_FOR_insn_mm, NULL }, /* mm */ - { CODE_FOR_insn_mnz, NULL }, /* mnz */ - { CODE_FOR_movdi, NULL }, /* move */ - { CODE_FOR_insn_mtspr, NULL }, /* mtspr */ - { CODE_FOR_insn_mul_hs_hs, NULL }, /* mul_hs_hs */ - { CODE_FOR_insn_mul_hs_hu, NULL }, /* mul_hs_hu */ - { CODE_FOR_insn_mul_hs_ls, NULL }, /* mul_hs_ls */ - { CODE_FOR_insn_mul_hs_lu, NULL }, /* mul_hs_lu */ - { CODE_FOR_insn_mul_hu_hu, NULL }, /* mul_hu_hu */ - { CODE_FOR_insn_mul_hu_ls, NULL }, /* mul_hu_ls */ - { CODE_FOR_insn_mul_hu_lu, NULL }, /* mul_hu_lu */ - { CODE_FOR_insn_mul_ls_ls, NULL }, /* mul_ls_ls */ - { CODE_FOR_insn_mul_ls_lu, NULL }, /* mul_ls_lu */ - { CODE_FOR_insn_mul_lu_lu, NULL }, /* mul_lu_lu */ - { CODE_FOR_insn_mula_hs_hs, NULL }, /* mula_hs_hs */ - { CODE_FOR_insn_mula_hs_hu, NULL }, /* mula_hs_hu */ - { CODE_FOR_insn_mula_hs_ls, NULL }, /* mula_hs_ls */ - { CODE_FOR_insn_mula_hs_lu, NULL }, /* mula_hs_lu */ - { CODE_FOR_insn_mula_hu_hu, NULL }, /* mula_hu_hu */ - { CODE_FOR_insn_mula_hu_ls, NULL }, /* mula_hu_ls */ - { CODE_FOR_insn_mula_hu_lu, NULL }, /* mula_hu_lu */ - { CODE_FOR_insn_mula_ls_ls, NULL }, /* mula_ls_ls */ - { CODE_FOR_insn_mula_ls_lu, NULL }, /* mula_ls_lu */ - { CODE_FOR_insn_mula_lu_lu, NULL }, /* mula_lu_lu */ - { CODE_FOR_insn_mulax, NULL }, /* mulax */ - { CODE_FOR_mulsi3, NULL }, /* mulx */ - { CODE_FOR_insn_mz, NULL }, /* mz */ - { CODE_FOR_insn_nap, NULL }, /* nap */ - { CODE_FOR_nop, NULL }, /* nop */ - { CODE_FOR_insn_nor_di, NULL }, /* nor */ - { CODE_FOR_iordi3, NULL }, /* or */ - { CODE_FOR_popcountdi2, NULL }, /* pcnt */ - { CODE_FOR_insn_prefetch_l1, NULL }, /* prefetch_l1 */ - { CODE_FOR_insn_prefetch_l1_fault, NULL }, /* prefetch_l1_fault */ - { CODE_FOR_insn_prefetch_l2, NULL }, /* prefetch_l2 */ - { CODE_FOR_insn_prefetch_l2_fault, NULL }, /* prefetch_l2_fault */ - { CODE_FOR_insn_prefetch_l3, NULL }, /* prefetch_l3 */ - { CODE_FOR_insn_prefetch_l3_fault, NULL }, /* prefetch_l3_fault */ - { CODE_FOR_insn_revbits, NULL }, /* revbits */ - { CODE_FOR_bswapdi2, NULL }, /* revbytes */ - { CODE_FOR_rotldi3, NULL }, /* rotl */ - { CODE_FOR_ashldi3, NULL }, /* shl */ - { CODE_FOR_insn_shl16insli, NULL }, /* shl16insli */ - { CODE_FOR_insn_shl1add, NULL }, /* shl1add */ - { CODE_FOR_insn_shl1addx, NULL }, /* shl1addx */ - { CODE_FOR_insn_shl2add, NULL }, /* shl2add */ - { CODE_FOR_insn_shl2addx, NULL }, /* shl2addx */ - { CODE_FOR_insn_shl3add, NULL }, /* shl3add */ - { CODE_FOR_insn_shl3addx, NULL }, /* shl3addx */ - { CODE_FOR_ashlsi3, NULL }, /* shlx */ - { CODE_FOR_ashrdi3, NULL }, /* shrs */ - { CODE_FOR_lshrdi3, NULL }, /* shru */ - { CODE_FOR_lshrsi3, NULL }, /* shrux */ - { CODE_FOR_insn_shufflebytes, NULL }, /* shufflebytes */ - { CODE_FOR_insn_shufflebytes1, NULL }, /* shufflebytes1 */ - { CODE_FOR_insn_st, NULL }, /* st */ - { CODE_FOR_insn_st1, NULL }, /* st1 */ - { CODE_FOR_insn_st2, NULL }, /* st2 */ - { CODE_FOR_insn_st4, NULL }, /* st4 */ - { CODE_FOR_insn_stnt, NULL }, /* stnt */ - { CODE_FOR_insn_stnt1, NULL }, /* stnt1 */ - { CODE_FOR_insn_stnt2, NULL }, /* stnt2 */ - { CODE_FOR_insn_stnt4, NULL }, /* stnt4 */ - { CODE_FOR_subdi3, NULL }, /* sub */ - { CODE_FOR_subsi3, NULL }, /* subx */ - { CODE_FOR_sssubsi3, NULL }, /* subxsc */ - { CODE_FOR_insn_tblidxb0, NULL }, /* tblidxb0 */ - { CODE_FOR_insn_tblidxb1, NULL }, /* tblidxb1 */ - { CODE_FOR_insn_tblidxb2, NULL }, /* tblidxb2 */ - { CODE_FOR_insn_tblidxb3, NULL }, /* tblidxb3 */ - { CODE_FOR_insn_v1add, NULL }, /* v1add */ - { CODE_FOR_insn_v1addi, NULL }, /* v1addi */ - { CODE_FOR_insn_v1adduc, NULL }, /* v1adduc */ - { CODE_FOR_insn_v1adiffu, NULL }, /* v1adiffu */ - { CODE_FOR_insn_v1avgu, NULL }, /* v1avgu */ - { CODE_FOR_insn_v1cmpeq, NULL }, /* v1cmpeq */ - { CODE_FOR_insn_v1cmpeqi, NULL }, /* v1cmpeqi */ - { CODE_FOR_insn_v1cmples, NULL }, /* v1cmples */ - { CODE_FOR_insn_v1cmpleu, NULL }, /* v1cmpleu */ - { CODE_FOR_insn_v1cmplts, NULL }, /* v1cmplts */ - { CODE_FOR_insn_v1cmpltsi, NULL }, /* v1cmpltsi */ - { CODE_FOR_insn_v1cmpltu, NULL }, /* v1cmpltu */ - { CODE_FOR_insn_v1cmpltui, NULL }, /* v1cmpltui */ - { CODE_FOR_insn_v1cmpne, NULL }, /* v1cmpne */ - { CODE_FOR_insn_v1ddotpu, NULL }, /* v1ddotpu */ - { CODE_FOR_insn_v1ddotpua, NULL }, /* v1ddotpua */ - { CODE_FOR_insn_v1ddotpus, NULL }, /* v1ddotpus */ - { CODE_FOR_insn_v1ddotpusa, NULL }, /* v1ddotpusa */ - { CODE_FOR_insn_v1dotp, NULL }, /* v1dotp */ - { CODE_FOR_insn_v1dotpa, NULL }, /* v1dotpa */ - { CODE_FOR_insn_v1dotpu, NULL }, /* v1dotpu */ - { CODE_FOR_insn_v1dotpua, NULL }, /* v1dotpua */ - { CODE_FOR_insn_v1dotpus, NULL }, /* v1dotpus */ - { CODE_FOR_insn_v1dotpusa, NULL }, /* v1dotpusa */ - { CODE_FOR_insn_v1int_h, NULL }, /* v1int_h */ - { CODE_FOR_insn_v1int_l, NULL }, /* v1int_l */ - { CODE_FOR_insn_v1maxu, NULL }, /* v1maxu */ - { CODE_FOR_insn_v1maxui, NULL }, /* v1maxui */ - { CODE_FOR_insn_v1minu, NULL }, /* v1minu */ - { CODE_FOR_insn_v1minui, NULL }, /* v1minui */ - { CODE_FOR_insn_v1mnz, NULL }, /* v1mnz */ - { CODE_FOR_insn_v1multu, NULL }, /* v1multu */ - { CODE_FOR_insn_v1mulu, NULL }, /* v1mulu */ - { CODE_FOR_insn_v1mulus, NULL }, /* v1mulus */ - { CODE_FOR_insn_v1mz, NULL }, /* v1mz */ - { CODE_FOR_insn_v1sadau, NULL }, /* v1sadau */ - { CODE_FOR_insn_v1sadu, NULL }, /* v1sadu */ - { CODE_FOR_insn_v1shl, NULL }, /* v1shl */ - { CODE_FOR_insn_v1shl, NULL }, /* v1shli */ - { CODE_FOR_insn_v1shrs, NULL }, /* v1shrs */ - { CODE_FOR_insn_v1shrs, NULL }, /* v1shrsi */ - { CODE_FOR_insn_v1shru, NULL }, /* v1shru */ - { CODE_FOR_insn_v1shru, NULL }, /* v1shrui */ - { CODE_FOR_insn_v1sub, NULL }, /* v1sub */ - { CODE_FOR_insn_v1subuc, NULL }, /* v1subuc */ - { CODE_FOR_insn_v2add, NULL }, /* v2add */ - { CODE_FOR_insn_v2addi, NULL }, /* v2addi */ - { CODE_FOR_insn_v2addsc, NULL }, /* v2addsc */ - { CODE_FOR_insn_v2adiffs, NULL }, /* v2adiffs */ - { CODE_FOR_insn_v2avgs, NULL }, /* v2avgs */ - { CODE_FOR_insn_v2cmpeq, NULL }, /* v2cmpeq */ - { CODE_FOR_insn_v2cmpeqi, NULL }, /* v2cmpeqi */ - { CODE_FOR_insn_v2cmples, NULL }, /* v2cmples */ - { CODE_FOR_insn_v2cmpleu, NULL }, /* v2cmpleu */ - { CODE_FOR_insn_v2cmplts, NULL }, /* v2cmplts */ - { CODE_FOR_insn_v2cmpltsi, NULL }, /* v2cmpltsi */ - { CODE_FOR_insn_v2cmpltu, NULL }, /* v2cmpltu */ - { CODE_FOR_insn_v2cmpltui, NULL }, /* v2cmpltui */ - { CODE_FOR_insn_v2cmpne, NULL }, /* v2cmpne */ - { CODE_FOR_insn_v2dotp, NULL }, /* v2dotp */ - { CODE_FOR_insn_v2dotpa, NULL }, /* v2dotpa */ - { CODE_FOR_insn_v2int_h, NULL }, /* v2int_h */ - { CODE_FOR_insn_v2int_l, NULL }, /* v2int_l */ - { CODE_FOR_insn_v2maxs, NULL }, /* v2maxs */ - { CODE_FOR_insn_v2maxsi, NULL }, /* v2maxsi */ - { CODE_FOR_insn_v2mins, NULL }, /* v2mins */ - { CODE_FOR_insn_v2minsi, NULL }, /* v2minsi */ - { CODE_FOR_insn_v2mnz, NULL }, /* v2mnz */ - { CODE_FOR_insn_v2mulfsc, NULL }, /* v2mulfsc */ - { CODE_FOR_insn_v2muls, NULL }, /* v2muls */ - { CODE_FOR_insn_v2mults, NULL }, /* v2mults */ - { CODE_FOR_insn_v2mz, NULL }, /* v2mz */ - { CODE_FOR_insn_v2packh, NULL }, /* v2packh */ - { CODE_FOR_insn_v2packl, NULL }, /* v2packl */ - { CODE_FOR_insn_v2packuc, NULL }, /* v2packuc */ - { CODE_FOR_insn_v2sadas, NULL }, /* v2sadas */ - { CODE_FOR_insn_v2sadau, NULL }, /* v2sadau */ - { CODE_FOR_insn_v2sads, NULL }, /* v2sads */ - { CODE_FOR_insn_v2sadu, NULL }, /* v2sadu */ - { CODE_FOR_insn_v2shl, NULL }, /* v2shl */ - { CODE_FOR_insn_v2shl, NULL }, /* v2shli */ - { CODE_FOR_insn_v2shlsc, NULL }, /* v2shlsc */ - { CODE_FOR_insn_v2shrs, NULL }, /* v2shrs */ - { CODE_FOR_insn_v2shrs, NULL }, /* v2shrsi */ - { CODE_FOR_insn_v2shru, NULL }, /* v2shru */ - { CODE_FOR_insn_v2shru, NULL }, /* v2shrui */ - { CODE_FOR_insn_v2sub, NULL }, /* v2sub */ - { CODE_FOR_insn_v2subsc, NULL }, /* v2subsc */ - { CODE_FOR_insn_v4add, NULL }, /* v4add */ - { CODE_FOR_insn_v4addsc, NULL }, /* v4addsc */ - { CODE_FOR_insn_v4int_h, NULL }, /* v4int_h */ - { CODE_FOR_insn_v4int_l, NULL }, /* v4int_l */ - { CODE_FOR_insn_v4packsc, NULL }, /* v4packsc */ - { CODE_FOR_insn_v4shl, NULL }, /* v4shl */ - { CODE_FOR_insn_v4shlsc, NULL }, /* v4shlsc */ - { CODE_FOR_insn_v4shrs, NULL }, /* v4shrs */ - { CODE_FOR_insn_v4shru, NULL }, /* v4shru */ - { CODE_FOR_insn_v4sub, NULL }, /* v4sub */ - { CODE_FOR_insn_v4subsc, NULL }, /* v4subsc */ - { CODE_FOR_insn_wh64, NULL }, /* wh64 */ - { CODE_FOR_xordi3, NULL }, /* xor */ - { CODE_FOR_tilegx_network_barrier, NULL }, /* network_barrier */ - { CODE_FOR_tilegx_idn0_receive, NULL }, /* idn0_receive */ - { CODE_FOR_tilegx_idn1_receive, NULL }, /* idn1_receive */ - { CODE_FOR_tilegx_idn_send, NULL }, /* idn_send */ - { CODE_FOR_tilegx_udn0_receive, NULL }, /* udn0_receive */ - { CODE_FOR_tilegx_udn1_receive, NULL }, /* udn1_receive */ - { CODE_FOR_tilegx_udn2_receive, NULL }, /* udn2_receive */ - { CODE_FOR_tilegx_udn3_receive, NULL }, /* udn3_receive */ - { CODE_FOR_tilegx_udn_send, NULL }, /* udn_send */ -}; - - -struct tilegx_builtin_def -{ - const char *name; - enum tilegx_builtin code; - bool is_const; - /* The first character is the return type. Subsequent characters - are the argument types. See char_to_type. */ - const char *type; -}; - - -static const struct tilegx_builtin_def tilegx_builtins[] = { - { "__insn_add", TILEGX_INSN_ADD, true, "lll" }, - { "__insn_addi", TILEGX_INSN_ADD, true, "lll" }, - { "__insn_addli", TILEGX_INSN_ADD, true, "lll" }, - { "__insn_addx", TILEGX_INSN_ADDX, true, "iii" }, - { "__insn_addxi", TILEGX_INSN_ADDX, true, "iii" }, - { "__insn_addxli", TILEGX_INSN_ADDX, true, "iii" }, - { "__insn_addxsc", TILEGX_INSN_ADDXSC, true, "iii" }, - { "__insn_and", TILEGX_INSN_AND, true, "lll" }, - { "__insn_andi", TILEGX_INSN_AND, true, "lll" }, - { "__insn_bfexts", TILEGX_INSN_BFEXTS, true, "llll" }, - { "__insn_bfextu", TILEGX_INSN_BFEXTU, true, "llll" }, - { "__insn_bfins", TILEGX_INSN_BFINS, true, "lllll"}, - { "__insn_clz", TILEGX_INSN_CLZ, true, "ll" }, - { "__insn_cmoveqz", TILEGX_INSN_CMOVEQZ, true, "llll" }, - { "__insn_cmovnez", TILEGX_INSN_CMOVNEZ, true, "llll" }, - { "__insn_cmpeq", TILEGX_INSN_CMPEQ, true, "lll" }, - { "__insn_cmpeqi", TILEGX_INSN_CMPEQ, true, "lll" }, - { "__insn_cmpexch", TILEGX_INSN_CMPEXCH, false, "lpl" }, - { "__insn_cmpexch4", TILEGX_INSN_CMPEXCH4, false, "ipi" }, - { "__insn_cmples", TILEGX_INSN_CMPLES, true, "lll" }, - { "__insn_cmpleu", TILEGX_INSN_CMPLEU, true, "lll" }, - { "__insn_cmplts", TILEGX_INSN_CMPLTS, true, "lll" }, - { "__insn_cmpltsi", TILEGX_INSN_CMPLTS, true, "lll" }, - { "__insn_cmpltu", TILEGX_INSN_CMPLTU, true, "lll" }, - { "__insn_cmpltui", TILEGX_INSN_CMPLTU, true, "lll" }, - { "__insn_cmpne", TILEGX_INSN_CMPNE, true, "lll" }, - { "__insn_cmul", TILEGX_INSN_CMUL, true, "lll" }, - { "__insn_cmula", TILEGX_INSN_CMULA, true, "llll" }, - { "__insn_cmulaf", TILEGX_INSN_CMULAF, true, "llll" }, - { "__insn_cmulf", TILEGX_INSN_CMULF, true, "lll" }, - { "__insn_cmulfr", TILEGX_INSN_CMULFR, true, "lll" }, - { "__insn_cmulh", TILEGX_INSN_CMULH, true, "lll" }, - { "__insn_cmulhr", TILEGX_INSN_CMULHR, true, "lll" }, - { "__insn_crc32_32", TILEGX_INSN_CRC32_32, true, "lll" }, - { "__insn_crc32_8", TILEGX_INSN_CRC32_8, true, "lll" }, - { "__insn_ctz", TILEGX_INSN_CTZ, true, "ll" }, - { "__insn_dblalign", TILEGX_INSN_DBLALIGN, true, "lllk" }, - { "__insn_dblalign2", TILEGX_INSN_DBLALIGN2, true, "lll" }, - { "__insn_dblalign4", TILEGX_INSN_DBLALIGN4, true, "lll" }, - { "__insn_dblalign6", TILEGX_INSN_DBLALIGN6, true, "lll" }, - { "__insn_drain", TILEGX_INSN_DRAIN, false, "v" }, - { "__insn_dtlbpr", TILEGX_INSN_DTLBPR, false, "vl" }, - { "__insn_exch", TILEGX_INSN_EXCH, false, "lpl" }, - { "__insn_exch4", TILEGX_INSN_EXCH4, false, "ipi" }, - { "__insn_fdouble_add_flags", TILEGX_INSN_FDOUBLE_ADD_FLAGS, true, "lll" }, - { "__insn_fdouble_addsub", TILEGX_INSN_FDOUBLE_ADDSUB, true, "llll" }, - { "__insn_fdouble_mul_flags", TILEGX_INSN_FDOUBLE_MUL_FLAGS, true, "lll" }, - { "__insn_fdouble_pack1", TILEGX_INSN_FDOUBLE_PACK1, true, "lll" }, - { "__insn_fdouble_pack2", TILEGX_INSN_FDOUBLE_PACK2, true, "llll" }, - { "__insn_fdouble_sub_flags", TILEGX_INSN_FDOUBLE_SUB_FLAGS, true, "lll" }, - { "__insn_fdouble_unpack_max", TILEGX_INSN_FDOUBLE_UNPACK_MAX, true, "lll" }, - { "__insn_fdouble_unpack_min", TILEGX_INSN_FDOUBLE_UNPACK_MIN, true, "lll" }, - { "__insn_fetchadd", TILEGX_INSN_FETCHADD, false, "lpl" }, - { "__insn_fetchadd4", TILEGX_INSN_FETCHADD4, false, "ipi" }, - { "__insn_fetchaddgez", TILEGX_INSN_FETCHADDGEZ, false, "lpl" }, - { "__insn_fetchaddgez4", TILEGX_INSN_FETCHADDGEZ4, false, "ipi" }, - { "__insn_fetchand", TILEGX_INSN_FETCHAND, false, "lpl" }, - { "__insn_fetchand4", TILEGX_INSN_FETCHAND4, false, "ipi" }, - { "__insn_fetchor", TILEGX_INSN_FETCHOR, false, "lpl" }, - { "__insn_fetchor4", TILEGX_INSN_FETCHOR4, false, "ipi" }, - { "__insn_finv", TILEGX_INSN_FINV, false, "vk" }, - { "__insn_flush", TILEGX_INSN_FLUSH, false, "vk" }, - { "__insn_flushwb", TILEGX_INSN_FLUSHWB, false, "v" }, - { "__insn_fnop", TILEGX_INSN_FNOP, false, "v" }, - { "__insn_fsingle_add1", TILEGX_INSN_FSINGLE_ADD1, true, "lll" }, - { "__insn_fsingle_addsub2", TILEGX_INSN_FSINGLE_ADDSUB2, true, "llll" }, - { "__insn_fsingle_mul1", TILEGX_INSN_FSINGLE_MUL1, true, "lll" }, - { "__insn_fsingle_mul2", TILEGX_INSN_FSINGLE_MUL2, true, "lll" }, - { "__insn_fsingle_pack1", TILEGX_INSN_FSINGLE_PACK1, true, "ll" }, - { "__insn_fsingle_pack2", TILEGX_INSN_FSINGLE_PACK2, true, "lll" }, - { "__insn_fsingle_sub1", TILEGX_INSN_FSINGLE_SUB1, true, "lll" }, - { "__insn_icoh", TILEGX_INSN_ICOH, false, "vk" }, - { "__insn_ill", TILEGX_INSN_ILL, false, "v" }, - { "__insn_info", TILEGX_INSN_INFO, false, "vl" }, - { "__insn_infol", TILEGX_INSN_INFOL, false, "vl" }, - { "__insn_inv", TILEGX_INSN_INV, false, "vp" }, - { "__insn_ld", TILEGX_INSN_LD, false, "lk" }, - { "__insn_ld1s", TILEGX_INSN_LD1S, false, "lk" }, - { "__insn_ld1u", TILEGX_INSN_LD1U, false, "lk" }, - { "__insn_ld2s", TILEGX_INSN_LD2S, false, "lk" }, - { "__insn_ld2u", TILEGX_INSN_LD2U, false, "lk" }, - { "__insn_ld4s", TILEGX_INSN_LD4S, false, "lk" }, - { "__insn_ld4u", TILEGX_INSN_LD4U, false, "lk" }, - { "__insn_ldna", TILEGX_INSN_LDNA, false, "lk" }, - { "__insn_ldnt", TILEGX_INSN_LDNT, false, "lk" }, - { "__insn_ldnt1s", TILEGX_INSN_LDNT1S, false, "lk" }, - { "__insn_ldnt1u", TILEGX_INSN_LDNT1U, false, "lk" }, - { "__insn_ldnt2s", TILEGX_INSN_LDNT2S, false, "lk" }, - { "__insn_ldnt2u", TILEGX_INSN_LDNT2U, false, "lk" }, - { "__insn_ldnt4s", TILEGX_INSN_LDNT4S, false, "lk" }, - { "__insn_ldnt4u", TILEGX_INSN_LDNT4U, false, "lk" }, - { "__insn_ld_L2", TILEGX_INSN_LD_L2, false, "lk" }, - { "__insn_ld1s_L2", TILEGX_INSN_LD1S_L2, false, "lk" }, - { "__insn_ld1u_L2", TILEGX_INSN_LD1U_L2, false, "lk" }, - { "__insn_ld2s_L2", TILEGX_INSN_LD2S_L2, false, "lk" }, - { "__insn_ld2u_L2", TILEGX_INSN_LD2U_L2, false, "lk" }, - { "__insn_ld4s_L2", TILEGX_INSN_LD4S_L2, false, "lk" }, - { "__insn_ld4u_L2", TILEGX_INSN_LD4U_L2, false, "lk" }, - { "__insn_ldna_L2", TILEGX_INSN_LDNA_L2, false, "lk" }, - { "__insn_ldnt_L2", TILEGX_INSN_LDNT_L2, false, "lk" }, - { "__insn_ldnt1s_L2", TILEGX_INSN_LDNT1S_L2, false, "lk" }, - { "__insn_ldnt1u_L2", TILEGX_INSN_LDNT1U_L2, false, "lk" }, - { "__insn_ldnt2s_L2", TILEGX_INSN_LDNT2S_L2, false, "lk" }, - { "__insn_ldnt2u_L2", TILEGX_INSN_LDNT2U_L2, false, "lk" }, - { "__insn_ldnt4s_L2", TILEGX_INSN_LDNT4S_L2, false, "lk" }, - { "__insn_ldnt4u_L2", TILEGX_INSN_LDNT4U_L2, false, "lk" }, - { "__insn_ld_miss", TILEGX_INSN_LD_MISS, false, "lk" }, - { "__insn_ld1s_miss", TILEGX_INSN_LD1S_MISS, false, "lk" }, - { "__insn_ld1u_miss", TILEGX_INSN_LD1U_MISS, false, "lk" }, - { "__insn_ld2s_miss", TILEGX_INSN_LD2S_MISS, false, "lk" }, - { "__insn_ld2u_miss", TILEGX_INSN_LD2U_MISS, false, "lk" }, - { "__insn_ld4s_miss", TILEGX_INSN_LD4S_MISS, false, "lk" }, - { "__insn_ld4u_miss", TILEGX_INSN_LD4U_MISS, false, "lk" }, - { "__insn_ldna_miss", TILEGX_INSN_LDNA_MISS, false, "lk" }, - { "__insn_ldnt_miss", TILEGX_INSN_LDNT_MISS, false, "lk" }, - { "__insn_ldnt1s_miss", TILEGX_INSN_LDNT1S_MISS, false, "lk" }, - { "__insn_ldnt1u_miss", TILEGX_INSN_LDNT1U_MISS, false, "lk" }, - { "__insn_ldnt2s_miss", TILEGX_INSN_LDNT2S_MISS, false, "lk" }, - { "__insn_ldnt2u_miss", TILEGX_INSN_LDNT2U_MISS, false, "lk" }, - { "__insn_ldnt4s_miss", TILEGX_INSN_LDNT4S_MISS, false, "lk" }, - { "__insn_ldnt4u_miss", TILEGX_INSN_LDNT4U_MISS, false, "lk" }, - { "__insn_lnk", TILEGX_INSN_LNK, true, "l" }, - { "__insn_mf", TILEGX_INSN_MF, false, "v" }, - { "__insn_mfspr", TILEGX_INSN_MFSPR, false, "ll" }, - { "__insn_mm", TILEGX_INSN_MM, true, "lllll"}, - { "__insn_mnz", TILEGX_INSN_MNZ, true, "lll" }, - { "__insn_move", TILEGX_INSN_MOVE, true, "ll" }, - { "__insn_movei", TILEGX_INSN_MOVE, true, "ll" }, - { "__insn_moveli", TILEGX_INSN_MOVE, true, "ll" }, - { "__insn_mtspr", TILEGX_INSN_MTSPR, false, "vll" }, - { "__insn_mul_hs_hs", TILEGX_INSN_MUL_HS_HS, true, "lll" }, - { "__insn_mul_hs_hu", TILEGX_INSN_MUL_HS_HU, true, "lll" }, - { "__insn_mul_hs_ls", TILEGX_INSN_MUL_HS_LS, true, "lll" }, - { "__insn_mul_hs_lu", TILEGX_INSN_MUL_HS_LU, true, "lll" }, - { "__insn_mul_hu_hu", TILEGX_INSN_MUL_HU_HU, true, "lll" }, - { "__insn_mul_hu_ls", TILEGX_INSN_MUL_HU_LS, true, "lll" }, - { "__insn_mul_hu_lu", TILEGX_INSN_MUL_HU_LU, true, "lll" }, - { "__insn_mul_ls_ls", TILEGX_INSN_MUL_LS_LS, true, "lll" }, - { "__insn_mul_ls_lu", TILEGX_INSN_MUL_LS_LU, true, "lll" }, - { "__insn_mul_lu_lu", TILEGX_INSN_MUL_LU_LU, true, "lll" }, - { "__insn_mula_hs_hs", TILEGX_INSN_MULA_HS_HS, true, "llll" }, - { "__insn_mula_hs_hu", TILEGX_INSN_MULA_HS_HU, true, "llll" }, - { "__insn_mula_hs_ls", TILEGX_INSN_MULA_HS_LS, true, "llll" }, - { "__insn_mula_hs_lu", TILEGX_INSN_MULA_HS_LU, true, "llll" }, - { "__insn_mula_hu_hu", TILEGX_INSN_MULA_HU_HU, true, "llll" }, - { "__insn_mula_hu_ls", TILEGX_INSN_MULA_HU_LS, true, "llll" }, - { "__insn_mula_hu_lu", TILEGX_INSN_MULA_HU_LU, true, "llll" }, - { "__insn_mula_ls_ls", TILEGX_INSN_MULA_LS_LS, true, "llll" }, - { "__insn_mula_ls_lu", TILEGX_INSN_MULA_LS_LU, true, "llll" }, - { "__insn_mula_lu_lu", TILEGX_INSN_MULA_LU_LU, true, "llll" }, - { "__insn_mulax", TILEGX_INSN_MULAX, true, "iiii" }, - { "__insn_mulx", TILEGX_INSN_MULX, true, "iii" }, - { "__insn_mz", TILEGX_INSN_MZ, true, "lll" }, - { "__insn_nap", TILEGX_INSN_NAP, false, "v" }, - { "__insn_nop", TILEGX_INSN_NOP, true, "v" }, - { "__insn_nor", TILEGX_INSN_NOR, true, "lll" }, - { "__insn_or", TILEGX_INSN_OR, true, "lll" }, - { "__insn_ori", TILEGX_INSN_OR, true, "lll" }, - { "__insn_pcnt", TILEGX_INSN_PCNT, true, "ll" }, - { "__insn_prefetch", TILEGX_INSN_PREFETCH_L1, false, "vk" }, - { "__insn_prefetch_l1", TILEGX_INSN_PREFETCH_L1, false, "vk" }, - { "__insn_prefetch_l1_fault", TILEGX_INSN_PREFETCH_L1_FAULT, false, "vk" }, - { "__insn_prefetch_l2", TILEGX_INSN_PREFETCH_L2, false, "vk" }, - { "__insn_prefetch_l2_fault", TILEGX_INSN_PREFETCH_L2_FAULT, false, "vk" }, - { "__insn_prefetch_l3", TILEGX_INSN_PREFETCH_L3, false, "vk" }, - { "__insn_prefetch_l3_fault", TILEGX_INSN_PREFETCH_L3_FAULT, false, "vk" }, - { "__insn_revbits", TILEGX_INSN_REVBITS, true, "ll" }, - { "__insn_revbytes", TILEGX_INSN_REVBYTES, true, "ll" }, - { "__insn_rotl", TILEGX_INSN_ROTL, true, "lli" }, - { "__insn_rotli", TILEGX_INSN_ROTL, true, "lli" }, - { "__insn_shl", TILEGX_INSN_SHL, true, "lli" }, - { "__insn_shl16insli", TILEGX_INSN_SHL16INSLI, true, "lll" }, - { "__insn_shl1add", TILEGX_INSN_SHL1ADD, true, "lll" }, - { "__insn_shl1addx", TILEGX_INSN_SHL1ADDX, true, "iii" }, - { "__insn_shl2add", TILEGX_INSN_SHL2ADD, true, "lll" }, - { "__insn_shl2addx", TILEGX_INSN_SHL2ADDX, true, "iii" }, - { "__insn_shl3add", TILEGX_INSN_SHL3ADD, true, "lll" }, - { "__insn_shl3addx", TILEGX_INSN_SHL3ADDX, true, "iii" }, - { "__insn_shli", TILEGX_INSN_SHL, true, "lli" }, - { "__insn_shlx", TILEGX_INSN_SHLX, true, "iii" }, - { "__insn_shlxi", TILEGX_INSN_SHLX, true, "iii" }, - { "__insn_shrs", TILEGX_INSN_SHRS, true, "lli" }, - { "__insn_shrsi", TILEGX_INSN_SHRS, true, "lli" }, - { "__insn_shru", TILEGX_INSN_SHRU, true, "lli" }, - { "__insn_shrui", TILEGX_INSN_SHRU, true, "lli" }, - { "__insn_shrux", TILEGX_INSN_SHRUX, true, "iii" }, - { "__insn_shruxi", TILEGX_INSN_SHRUX, true, "iii" }, - { "__insn_shufflebytes", TILEGX_INSN_SHUFFLEBYTES, true, "llll" }, - { "__insn_shufflebytes1", TILEGX_INSN_SHUFFLEBYTES1, true, "lll" }, - { "__insn_st", TILEGX_INSN_ST, false, "vpl" }, - { "__insn_st1", TILEGX_INSN_ST1, false, "vpl" }, - { "__insn_st2", TILEGX_INSN_ST2, false, "vpl" }, - { "__insn_st4", TILEGX_INSN_ST4, false, "vpl" }, - { "__insn_stnt", TILEGX_INSN_STNT, false, "vpl" }, - { "__insn_stnt1", TILEGX_INSN_STNT1, false, "vpl" }, - { "__insn_stnt2", TILEGX_INSN_STNT2, false, "vpl" }, - { "__insn_stnt4", TILEGX_INSN_STNT4, false, "vpl" }, - { "__insn_sub", TILEGX_INSN_SUB, true, "lll" }, - { "__insn_subx", TILEGX_INSN_SUBX, true, "iii" }, - { "__insn_subxsc", TILEGX_INSN_SUBXSC, true, "iii" }, - { "__insn_tblidxb0", TILEGX_INSN_TBLIDXB0, true, "lll" }, - { "__insn_tblidxb1", TILEGX_INSN_TBLIDXB1, true, "lll" }, - { "__insn_tblidxb2", TILEGX_INSN_TBLIDXB2, true, "lll" }, - { "__insn_tblidxb3", TILEGX_INSN_TBLIDXB3, true, "lll" }, - { "__insn_v1add", TILEGX_INSN_V1ADD, true, "lll" }, - { "__insn_v1addi", TILEGX_INSN_V1ADDI, true, "lll" }, - { "__insn_v1adduc", TILEGX_INSN_V1ADDUC, true, "lll" }, - { "__insn_v1adiffu", TILEGX_INSN_V1ADIFFU, true, "lll" }, - { "__insn_v1avgu", TILEGX_INSN_V1AVGU, true, "lll" }, - { "__insn_v1cmpeq", TILEGX_INSN_V1CMPEQ, true, "lll" }, - { "__insn_v1cmpeqi", TILEGX_INSN_V1CMPEQI, true, "lll" }, - { "__insn_v1cmples", TILEGX_INSN_V1CMPLES, true, "lll" }, - { "__insn_v1cmpleu", TILEGX_INSN_V1CMPLEU, true, "lll" }, - { "__insn_v1cmplts", TILEGX_INSN_V1CMPLTS, true, "lll" }, - { "__insn_v1cmpltsi", TILEGX_INSN_V1CMPLTSI, true, "lll" }, - { "__insn_v1cmpltu", TILEGX_INSN_V1CMPLTU, true, "lll" }, - { "__insn_v1cmpltui", TILEGX_INSN_V1CMPLTUI, true, "lll" }, - { "__insn_v1cmpne", TILEGX_INSN_V1CMPNE, true, "lll" }, - { "__insn_v1ddotpu", TILEGX_INSN_V1DDOTPU, true, "lll" }, - { "__insn_v1ddotpua", TILEGX_INSN_V1DDOTPUA, true, "llll" }, - { "__insn_v1ddotpus", TILEGX_INSN_V1DDOTPUS, true, "lll" }, - { "__insn_v1ddotpusa", TILEGX_INSN_V1DDOTPUSA, true, "llll" }, - { "__insn_v1dotp", TILEGX_INSN_V1DOTP, true, "lll" }, - { "__insn_v1dotpa", TILEGX_INSN_V1DOTPA, true, "llll" }, - { "__insn_v1dotpu", TILEGX_INSN_V1DOTPU, true, "lll" }, - { "__insn_v1dotpua", TILEGX_INSN_V1DOTPUA, true, "llll" }, - { "__insn_v1dotpus", TILEGX_INSN_V1DOTPUS, true, "lll" }, - { "__insn_v1dotpusa", TILEGX_INSN_V1DOTPUSA, true, "llll" }, - { "__insn_v1int_h", TILEGX_INSN_V1INT_H, true, "lll" }, - { "__insn_v1int_l", TILEGX_INSN_V1INT_L, true, "lll" }, - { "__insn_v1maxu", TILEGX_INSN_V1MAXU, true, "lll" }, - { "__insn_v1maxui", TILEGX_INSN_V1MAXUI, true, "lll" }, - { "__insn_v1minu", TILEGX_INSN_V1MINU, true, "lll" }, - { "__insn_v1minui", TILEGX_INSN_V1MINUI, true, "lll" }, - { "__insn_v1mnz", TILEGX_INSN_V1MNZ, true, "lll" }, - { "__insn_v1multu", TILEGX_INSN_V1MULTU, true, "lll" }, - { "__insn_v1mulu", TILEGX_INSN_V1MULU, true, "lll" }, - { "__insn_v1mulus", TILEGX_INSN_V1MULUS, true, "lll" }, - { "__insn_v1mz", TILEGX_INSN_V1MZ, true, "lll" }, - { "__insn_v1sadau", TILEGX_INSN_V1SADAU, true, "llll" }, - { "__insn_v1sadu", TILEGX_INSN_V1SADU, true, "lll" }, - { "__insn_v1shl", TILEGX_INSN_V1SHL, true, "lll" }, - { "__insn_v1shli", TILEGX_INSN_V1SHLI, true, "lll" }, - { "__insn_v1shrs", TILEGX_INSN_V1SHRS, true, "lll" }, - { "__insn_v1shrsi", TILEGX_INSN_V1SHRSI, true, "lll" }, - { "__insn_v1shru", TILEGX_INSN_V1SHRU, true, "lll" }, - { "__insn_v1shrui", TILEGX_INSN_V1SHRUI, true, "lll" }, - { "__insn_v1sub", TILEGX_INSN_V1SUB, true, "lll" }, - { "__insn_v1subuc", TILEGX_INSN_V1SUBUC, true, "lll" }, - { "__insn_v2add", TILEGX_INSN_V2ADD, true, "lll" }, - { "__insn_v2addi", TILEGX_INSN_V2ADDI, true, "lll" }, - { "__insn_v2addsc", TILEGX_INSN_V2ADDSC, true, "lll" }, - { "__insn_v2adiffs", TILEGX_INSN_V2ADIFFS, true, "lll" }, - { "__insn_v2avgs", TILEGX_INSN_V2AVGS, true, "lll" }, - { "__insn_v2cmpeq", TILEGX_INSN_V2CMPEQ, true, "lll" }, - { "__insn_v2cmpeqi", TILEGX_INSN_V2CMPEQI, true, "lll" }, - { "__insn_v2cmples", TILEGX_INSN_V2CMPLES, true, "lll" }, - { "__insn_v2cmpleu", TILEGX_INSN_V2CMPLEU, true, "lll" }, - { "__insn_v2cmplts", TILEGX_INSN_V2CMPLTS, true, "lll" }, - { "__insn_v2cmpltsi", TILEGX_INSN_V2CMPLTSI, true, "lll" }, - { "__insn_v2cmpltu", TILEGX_INSN_V2CMPLTU, true, "lll" }, - { "__insn_v2cmpltui", TILEGX_INSN_V2CMPLTUI, true, "lll" }, - { "__insn_v2cmpne", TILEGX_INSN_V2CMPNE, true, "lll" }, - { "__insn_v2dotp", TILEGX_INSN_V2DOTP, true, "lll" }, - { "__insn_v2dotpa", TILEGX_INSN_V2DOTPA, true, "llll" }, - { "__insn_v2int_h", TILEGX_INSN_V2INT_H, true, "lll" }, - { "__insn_v2int_l", TILEGX_INSN_V2INT_L, true, "lll" }, - { "__insn_v2maxs", TILEGX_INSN_V2MAXS, true, "lll" }, - { "__insn_v2maxsi", TILEGX_INSN_V2MAXSI, true, "lll" }, - { "__insn_v2mins", TILEGX_INSN_V2MINS, true, "lll" }, - { "__insn_v2minsi", TILEGX_INSN_V2MINSI, true, "lll" }, - { "__insn_v2mnz", TILEGX_INSN_V2MNZ, true, "lll" }, - { "__insn_v2mulfsc", TILEGX_INSN_V2MULFSC, true, "lll" }, - { "__insn_v2muls", TILEGX_INSN_V2MULS, true, "lll" }, - { "__insn_v2mults", TILEGX_INSN_V2MULTS, true, "lll" }, - { "__insn_v2mz", TILEGX_INSN_V2MZ, true, "lll" }, - { "__insn_v2packh", TILEGX_INSN_V2PACKH, true, "lll" }, - { "__insn_v2packl", TILEGX_INSN_V2PACKL, true, "lll" }, - { "__insn_v2packuc", TILEGX_INSN_V2PACKUC, true, "lll" }, - { "__insn_v2sadas", TILEGX_INSN_V2SADAS, true, "llll" }, - { "__insn_v2sadau", TILEGX_INSN_V2SADAU, true, "llll" }, - { "__insn_v2sads", TILEGX_INSN_V2SADS, true, "lll" }, - { "__insn_v2sadu", TILEGX_INSN_V2SADU, true, "lll" }, - { "__insn_v2shl", TILEGX_INSN_V2SHL, true, "lll" }, - { "__insn_v2shli", TILEGX_INSN_V2SHLI, true, "lll" }, - { "__insn_v2shlsc", TILEGX_INSN_V2SHLSC, true, "lll" }, - { "__insn_v2shrs", TILEGX_INSN_V2SHRS, true, "lll" }, - { "__insn_v2shrsi", TILEGX_INSN_V2SHRSI, true, "lll" }, - { "__insn_v2shru", TILEGX_INSN_V2SHRU, true, "lll" }, - { "__insn_v2shrui", TILEGX_INSN_V2SHRUI, true, "lll" }, - { "__insn_v2sub", TILEGX_INSN_V2SUB, true, "lll" }, - { "__insn_v2subsc", TILEGX_INSN_V2SUBSC, true, "lll" }, - { "__insn_v4add", TILEGX_INSN_V4ADD, true, "lll" }, - { "__insn_v4addsc", TILEGX_INSN_V4ADDSC, true, "lll" }, - { "__insn_v4int_h", TILEGX_INSN_V4INT_H, true, "lll" }, - { "__insn_v4int_l", TILEGX_INSN_V4INT_L, true, "lll" }, - { "__insn_v4packsc", TILEGX_INSN_V4PACKSC, true, "lll" }, - { "__insn_v4shl", TILEGX_INSN_V4SHL, true, "lll" }, - { "__insn_v4shlsc", TILEGX_INSN_V4SHLSC, true, "lll" }, - { "__insn_v4shrs", TILEGX_INSN_V4SHRS, true, "lll" }, - { "__insn_v4shru", TILEGX_INSN_V4SHRU, true, "lll" }, - { "__insn_v4sub", TILEGX_INSN_V4SUB, true, "lll" }, - { "__insn_v4subsc", TILEGX_INSN_V4SUBSC, true, "lll" }, - { "__insn_wh64", TILEGX_INSN_WH64, false, "vp" }, - { "__insn_xor", TILEGX_INSN_XOR, true, "lll" }, - { "__insn_xori", TILEGX_INSN_XOR, true, "lll" }, - { "__tile_network_barrier", TILEGX_NETWORK_BARRIER, false, "v" }, - { "__tile_idn0_receive", TILEGX_IDN0_RECEIVE, false, "l" }, - { "__tile_idn1_receive", TILEGX_IDN1_RECEIVE, false, "l" }, - { "__tile_idn_send", TILEGX_IDN_SEND, false, "vl" }, - { "__tile_udn0_receive", TILEGX_UDN0_RECEIVE, false, "l" }, - { "__tile_udn1_receive", TILEGX_UDN1_RECEIVE, false, "l" }, - { "__tile_udn2_receive", TILEGX_UDN2_RECEIVE, false, "l" }, - { "__tile_udn3_receive", TILEGX_UDN3_RECEIVE, false, "l" }, - { "__tile_udn_send", TILEGX_UDN_SEND, false, "vl" }, -}; - - -/* Convert a character in a builtin type string to a tree type. */ -static tree -char_to_type (char c) -{ - static tree volatile_ptr_type_node = NULL; - static tree volatile_const_ptr_type_node = NULL; - - if (volatile_ptr_type_node == NULL) - { - volatile_ptr_type_node = - build_pointer_type (build_qualified_type (void_type_node, - TYPE_QUAL_VOLATILE)); - volatile_const_ptr_type_node = - build_pointer_type (build_qualified_type (void_type_node, - TYPE_QUAL_CONST - | TYPE_QUAL_VOLATILE)); - } - - switch (c) - { - case 'v': - return void_type_node; - case 'i': - return unsigned_type_node; - case 'l': - return long_long_unsigned_type_node; - case 'p': - return volatile_ptr_type_node; - case 'k': - return volatile_const_ptr_type_node; - default: - gcc_unreachable (); - } -} - - -/* Implement TARGET_INIT_BUILTINS. */ -static void -tilegx_init_builtins (void) -{ - size_t i; - - for (i = 0; i < ARRAY_SIZE (tilegx_builtins); i++) - { - const struct tilegx_builtin_def *p = &tilegx_builtins[i]; - tree ftype, ret_type, arg_type_list = void_list_node; - tree decl; - int j; - - for (j = strlen (p->type) - 1; j > 0; j--) - { - arg_type_list = - tree_cons (NULL_TREE, char_to_type (p->type[j]), arg_type_list); - } - - ret_type = char_to_type (p->type[0]); - - ftype = build_function_type (ret_type, arg_type_list); - - decl = add_builtin_function (p->name, ftype, p->code, BUILT_IN_MD, - NULL, NULL); - - if (p->is_const) - TREE_READONLY (decl) = 1; - TREE_NOTHROW (decl) = 1; - - if (tilegx_builtin_info[p->code].fndecl == NULL) - tilegx_builtin_info[p->code].fndecl = decl; - } -} - - -/* Implement TARGET_EXPAND_BUILTIN. */ -static rtx -tilegx_expand_builtin (tree exp, - rtx target, - rtx subtarget ATTRIBUTE_UNUSED, - machine_mode mode ATTRIBUTE_UNUSED, - int ignore ATTRIBUTE_UNUSED) -{ -#define MAX_BUILTIN_ARGS 4 - - tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0); - unsigned int fcode = DECL_MD_FUNCTION_CODE (fndecl); - tree arg; - call_expr_arg_iterator iter; - enum insn_code icode; - rtx op[MAX_BUILTIN_ARGS + 1], pat; - int opnum; - bool nonvoid; - insn_gen_fn fn; - - if (fcode >= TILEGX_BUILTIN_max) - internal_error ("bad builtin fcode"); - icode = tilegx_builtin_info[fcode].icode; - if (icode == 0) - internal_error ("bad builtin icode"); - - nonvoid = TREE_TYPE (TREE_TYPE (fndecl)) != void_type_node; - - opnum = nonvoid; - FOR_EACH_CALL_EXPR_ARG (arg, iter, exp) - { - const struct insn_operand_data *insn_op; - - if (arg == error_mark_node) - return NULL_RTX; - if (opnum > MAX_BUILTIN_ARGS) - return NULL_RTX; - - insn_op = &insn_data[icode].operand[opnum]; - - op[opnum] = expand_expr (arg, NULL_RTX, insn_op->mode, EXPAND_NORMAL); - - if (!(*insn_op->predicate) (op[opnum], insn_op->mode)) - { - machine_mode opmode = insn_op->mode; - - /* pointer_operand and pmode_register_operand operands do - not specify a mode, so use the operand's mode instead - (which should always be right by the time we get here, - except for constants, which are VOIDmode). */ - if (opmode == VOIDmode) - { - machine_mode m = GET_MODE (op[opnum]); - gcc_assert (m == Pmode || m == VOIDmode); - opmode = Pmode; - } - - op[opnum] = copy_to_mode_reg (opmode, op[opnum]); - } - - if (!(*insn_op->predicate) (op[opnum], insn_op->mode)) - { - /* We still failed to meet the predicate even after moving - into a register. Assume we needed an immediate. */ - error_at (EXPR_LOCATION (exp), - "operand must be an immediate of the right size"); - return const0_rtx; - } - - opnum++; - } - - if (nonvoid) - { - machine_mode tmode = insn_data[icode].operand[0].mode; - if (!target - || GET_MODE (target) != tmode - || !(*insn_data[icode].operand[0].predicate) (target, tmode)) - { - if (tmode == VOIDmode) - { - /* get the mode from the return type. */ - tmode = TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl))); - } - target = gen_reg_rtx (tmode); - } - op[0] = target; - } - - fn = GEN_FCN (icode); - switch (opnum) - { - case 0: - pat = fn (NULL_RTX); - break; - case 1: - pat = fn (op[0]); - break; - case 2: - pat = fn (op[0], op[1]); - break; - case 3: - pat = fn (op[0], op[1], op[2]); - break; - case 4: - pat = fn (op[0], op[1], op[2], op[3]); - break; - case 5: - pat = fn (op[0], op[1], op[2], op[3], op[4]); - break; - default: - gcc_unreachable (); - } - if (!pat) - return NULL_RTX; - - /* If we are generating a prefetch, tell the scheduler not to move - it around. */ - if (GET_CODE (pat) == PREFETCH) - PREFETCH_SCHEDULE_BARRIER_P (pat) = true; - - emit_insn (pat); - - if (nonvoid) - return target; - else - return const0_rtx; -} - - -/* Implement TARGET_BUILTIN_DECL. */ -static tree -tilegx_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED) -{ - if (code >= TILEGX_BUILTIN_max) - return error_mark_node; - - return tilegx_builtin_info[code].fndecl; -} - - - -/* Stack frames */ - -/* Return whether REGNO needs to be saved in the stack frame. */ -static bool -need_to_save_reg (unsigned int regno) -{ - if (!call_used_or_fixed_reg_p (regno) - && df_regs_ever_live_p (regno)) - return true; - - if (flag_pic - && (regno == PIC_OFFSET_TABLE_REGNUM - || regno == TILEGX_PIC_TEXT_LABEL_REGNUM) - && (crtl->uses_pic_offset_table || crtl->saves_all_registers)) - return true; - - if (crtl->calls_eh_return) - { - unsigned i; - for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM; i++) - { - if (regno == EH_RETURN_DATA_REGNO (i)) - return true; - } - } - - return false; -} - - -/* Return the size of the register savev area. This function is only - correct starting with local register allocation */ -static int -tilegx_saved_regs_size (void) -{ - int reg_save_size = 0; - int regno; - int offset_to_frame; - int align_mask; - - for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) - if (need_to_save_reg (regno)) - reg_save_size += UNITS_PER_WORD; - - /* Pad out the register save area if necessary to make - frame_pointer_rtx be as aligned as the stack pointer. */ - offset_to_frame = crtl->args.pretend_args_size + reg_save_size; - align_mask = (STACK_BOUNDARY / BITS_PER_UNIT) - 1; - reg_save_size += (-offset_to_frame) & align_mask; - - return reg_save_size; -} - - -/* Round up frame size SIZE. */ -static int -round_frame_size (int size) -{ - return ((size + STACK_BOUNDARY / BITS_PER_UNIT - 1) - & -STACK_BOUNDARY / BITS_PER_UNIT); -} - - -/* Emit a store in the stack frame to save REGNO at address ADDR, and - emit the corresponding REG_CFA_OFFSET note described by CFA and - CFA_OFFSET. Return the emitted insn. */ -static rtx -frame_emit_store (int regno, int regno_note, rtx addr, rtx cfa, - int cfa_offset) -{ - rtx reg = gen_rtx_REG (DImode, regno); - rtx mem = gen_frame_mem (DImode, addr); - rtx mov = gen_movdi (mem, reg); - - /* Describe what just happened in a way that dwarf understands. We - use temporary registers to hold the address to make scheduling - easier, and use the REG_CFA_OFFSET to describe the address as an - offset from the CFA. */ - rtx reg_note = gen_rtx_REG (DImode, regno_note); - rtx cfa_relative_addr = gen_rtx_PLUS (Pmode, cfa, GEN_INT (cfa_offset)); - rtx cfa_relative_mem = gen_frame_mem (DImode, cfa_relative_addr); - rtx real = gen_rtx_SET (cfa_relative_mem, reg_note); - add_reg_note (mov, REG_CFA_OFFSET, real); - - return emit_insn (mov); -} - - -/* Emit a load in the stack frame to load REGNO from address ADDR. - Add a REG_CFA_RESTORE note to CFA_RESTORES if CFA_RESTORES is - non-null. Return the emitted insn. */ -static rtx_insn * -frame_emit_load (int regno, rtx addr, rtx *cfa_restores) -{ - rtx reg = gen_rtx_REG (DImode, regno); - rtx mem = gen_frame_mem (DImode, addr); - if (cfa_restores) - *cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, *cfa_restores); - return emit_insn (gen_movdi (reg, mem)); -} - - -/* Helper function to set RTX_FRAME_RELATED_P on instructions, - including sequences. */ -static rtx -set_frame_related_p (void) -{ - rtx_insn *seq = get_insns (); - rtx_insn *insn; - - end_sequence (); - - if (!seq) - return NULL_RTX; - - if (INSN_P (seq)) - { - insn = seq; - while (insn != NULL_RTX) - { - RTX_FRAME_RELATED_P (insn) = 1; - insn = NEXT_INSN (insn); - } - seq = emit_insn (seq); - } - else - { - seq = emit_insn (seq); - RTX_FRAME_RELATED_P (seq) = 1; - } - return seq; -} - - -#define FRP(exp) (start_sequence (), exp, set_frame_related_p ()) - -/* This emits code for 'sp += offset'. - - The ABI only allows us to modify 'sp' in a single 'addi' or - 'addli', so the backtracer understands it. Larger amounts cannot - use those instructions, so are added by placing the offset into a - large register and using 'add'. - - This happens after reload, so we need to expand it ourselves. */ -static rtx_insn * -emit_sp_adjust (int offset, int *next_scratch_regno, bool frame_related, - rtx reg_notes) -{ - rtx to_add; - rtx imm_rtx = GEN_INT (offset); - rtx pat; - rtx_insn *insn; - - if (satisfies_constraint_J (imm_rtx)) - { - /* We can add this using a single immediate add. */ - to_add = imm_rtx; - } - else - { - rtx tmp = gen_rtx_REG (Pmode, (*next_scratch_regno)--); - tilegx_expand_set_const64 (tmp, imm_rtx); - to_add = tmp; - } - - /* Actually adjust the stack pointer. */ - if (TARGET_32BIT) - pat = gen_sp_adjust_32bit (stack_pointer_rtx, stack_pointer_rtx, to_add); - else - pat = gen_sp_adjust (stack_pointer_rtx, stack_pointer_rtx, to_add); - - insn = emit_insn (pat); - REG_NOTES (insn) = reg_notes; - - /* Describe what just happened in a way that dwarf understands. */ - if (frame_related) - { - rtx real = gen_rtx_SET (stack_pointer_rtx, - gen_rtx_PLUS (Pmode, stack_pointer_rtx, - imm_rtx)); - RTX_FRAME_RELATED_P (insn) = 1; - add_reg_note (insn, REG_CFA_ADJUST_CFA, real); - } - - return insn; -} - - -/* Return whether the current function is leaf. This takes into - account whether the function calls tls_get_addr. */ -static bool -tilegx_current_function_is_leaf (void) -{ - return crtl->is_leaf && !cfun->machine->calls_tls_get_addr; -} - - -/* Return the frame size. */ -static int -compute_total_frame_size (void) -{ - int total_size = (get_frame_size () + tilegx_saved_regs_size () - + crtl->outgoing_args_size - + crtl->args.pretend_args_size); - - if (!tilegx_current_function_is_leaf () || cfun->calls_alloca) - { - /* Make room for save area in callee. */ - total_size += STACK_POINTER_OFFSET; - } - - return round_frame_size (total_size); -} - - -/* Return nonzero if this function is known to have a null epilogue. - This allows the optimizer to omit jumps to jumps if no stack was - created. */ -bool -tilegx_can_use_return_insn_p (void) -{ - return (reload_completed - && !cfun->static_chain_decl - && !compute_total_frame_size () - && tilegx_current_function_is_leaf () - && !crtl->profile && !df_regs_ever_live_p (TILEGX_LINK_REGNUM)); -} - - -/* Returns an rtx for a stack slot at 'FP + offset_from_fp'. If there - is a frame pointer, it computes the value relative to - that. Otherwise it uses the stack pointer. */ -static rtx -compute_frame_addr (int offset_from_fp, int *next_scratch_regno) -{ - rtx base_reg_rtx, tmp_reg_rtx, offset_rtx; - int offset_from_base; - - if (frame_pointer_needed) - { - base_reg_rtx = hard_frame_pointer_rtx; - offset_from_base = offset_from_fp; - } - else - { - int offset_from_sp = compute_total_frame_size () + offset_from_fp; - offset_from_base = offset_from_sp; - base_reg_rtx = stack_pointer_rtx; - } - - if (offset_from_base == 0) - return base_reg_rtx; - - /* Compute the new value of the stack pointer. */ - tmp_reg_rtx = gen_rtx_REG (Pmode, (*next_scratch_regno)--); - offset_rtx = GEN_INT (offset_from_base); - - if (!add_operand (offset_rtx, Pmode)) - { - expand_set_cint64 (tmp_reg_rtx, offset_rtx); - offset_rtx = tmp_reg_rtx; - } - - emit_insn (gen_rtx_SET (tmp_reg_rtx, - gen_rtx_PLUS (Pmode, base_reg_rtx, offset_rtx))); - - return tmp_reg_rtx; -} - - -/* The stack frame looks like this: - +-------------+ - | ... | - | incoming | - | stack args | - AP -> +-------------+ - | caller's HFP| - +-------------+ - | lr save | - HFP -> +-------------+ - | var args | - | reg save | crtl->args.pretend_args_size bytes - +-------------+ - | ... | - | saved regs | tilegx_saved_regs_size() bytes - FP -> +-------------+ - | ... | - | vars | get_frame_size() bytes - +-------------+ - | ... | - | outgoing | - | stack args | crtl->outgoing_args_size bytes - +-------------+ - | HFP | ptr_size bytes (only here if nonleaf / alloca) - +-------------+ - | callee lr | ptr_size bytes (only here if nonleaf / alloca) - | save | - SP -> +-------------+ - - HFP == incoming SP. - - For functions with a frame larger than 32767 bytes, or which use - alloca (), r52 is used as a frame pointer. Otherwise there is no - frame pointer. - - FP is saved at SP+ptr_size before calling a subroutine so the callee - can chain. */ -void -tilegx_expand_prologue (void) -{ -#define ROUND_ROBIN_SIZE 4 - /* We round-robin through four scratch registers to hold temporary - addresses for saving registers, to make instruction scheduling - easier. */ - rtx reg_save_addr[ROUND_ROBIN_SIZE] = { - NULL_RTX, NULL_RTX, NULL_RTX, NULL_RTX - }; - rtx insn, cfa; - unsigned int which_scratch; - int offset, start_offset, regno; - - /* A register that holds a copy of the incoming fp. */ - int fp_copy_regno = -1; - - /* A register that holds a copy of the incoming sp. */ - int sp_copy_regno = -1; - - /* Next scratch register number to hand out (postdecrementing). */ - int next_scratch_regno = 29; - - int total_size = compute_total_frame_size (); - - if (flag_stack_usage_info) - current_function_static_stack_size = total_size; - - /* Save lr first in its special location because code after this - might use the link register as a scratch register. */ - if (df_regs_ever_live_p (TILEGX_LINK_REGNUM) || crtl->calls_eh_return) - { - FRP (frame_emit_store (TILEGX_LINK_REGNUM, TILEGX_LINK_REGNUM, - stack_pointer_rtx, stack_pointer_rtx, 0)); - emit_insn (gen_blockage ()); - } - - if (total_size == 0) - { - /* Load the PIC register if needed. */ - if (flag_pic && crtl->uses_pic_offset_table) - load_pic_register (false); - - return; - } - - cfa = stack_pointer_rtx; - - if (frame_pointer_needed) - { - fp_copy_regno = next_scratch_regno--; - - /* Copy the old frame pointer aside so we can save it later. */ - insn = - FRP (emit_move_insn (gen_rtx_REG (word_mode, fp_copy_regno), - gen_lowpart (word_mode, hard_frame_pointer_rtx))); - add_reg_note (insn, REG_CFA_REGISTER, NULL_RTX); - - /* Set up the frame pointer. */ - insn = FRP (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx)); - add_reg_note (insn, REG_CFA_DEF_CFA, hard_frame_pointer_rtx); - cfa = hard_frame_pointer_rtx; - REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = STACK_BOUNDARY; - - /* fp holds a copy of the incoming sp, in case we need to store - it. */ - sp_copy_regno = HARD_FRAME_POINTER_REGNUM; - } - else if (!tilegx_current_function_is_leaf ()) - { - /* Copy the old stack pointer aside so we can save it later. */ - sp_copy_regno = next_scratch_regno--; - emit_move_insn (gen_rtx_REG (Pmode, sp_copy_regno), - stack_pointer_rtx); - } - - if (tilegx_current_function_is_leaf ()) - { - /* No need to store chain pointer to caller's frame. */ - emit_sp_adjust (-total_size, &next_scratch_regno, - !frame_pointer_needed, NULL_RTX); - } - else - { - /* Save the frame pointer (incoming sp value) to support - backtracing. First we need to create an rtx with the store - address. */ - rtx chain_addr = gen_rtx_REG (Pmode, next_scratch_regno--); - rtx size_rtx = GEN_INT (-(total_size - UNITS_PER_WORD)); - - if (add_operand (size_rtx, Pmode)) - { - /* Expose more parallelism by computing this value from the - original stack pointer, not the one after we have pushed - the frame. */ - rtx p = gen_rtx_PLUS (Pmode, stack_pointer_rtx, size_rtx); - emit_insn (gen_rtx_SET (chain_addr, p)); - emit_sp_adjust (-total_size, &next_scratch_regno, - !frame_pointer_needed, NULL_RTX); - } - else - { - /* The stack frame is large, so just store the incoming sp - value at *(new_sp + UNITS_PER_WORD). */ - rtx p; - emit_sp_adjust (-total_size, &next_scratch_regno, - !frame_pointer_needed, NULL_RTX); - p = gen_rtx_PLUS (Pmode, stack_pointer_rtx, - GEN_INT (UNITS_PER_WORD)); - emit_insn (gen_rtx_SET (chain_addr, p)); - } - - /* Save our frame pointer for backtrace chaining. */ - emit_insn (gen_movdi (gen_frame_mem (DImode, chain_addr), - gen_rtx_REG (DImode, sp_copy_regno))); - } - - /* Compute where to start storing registers we need to save. */ - start_offset = -crtl->args.pretend_args_size - UNITS_PER_WORD; - offset = start_offset; - - /* Store all registers that need saving. */ - which_scratch = 0; - for (regno = FIRST_PSEUDO_REGISTER - 1; regno >= 0; regno--) - if (need_to_save_reg (regno)) - { - rtx r = reg_save_addr[which_scratch]; - int from_regno; - int cfa_offset = frame_pointer_needed ? offset : total_size + offset; - - if (r == NULL_RTX) - { - int prev_scratch_regno = next_scratch_regno; - r = compute_frame_addr (offset, &next_scratch_regno); - if (prev_scratch_regno != next_scratch_regno) - reg_save_addr[which_scratch] = r; - } - else - { - /* Advance to the next stack slot to store this - register. */ - int stride = ROUND_ROBIN_SIZE * -UNITS_PER_WORD; - rtx p = gen_rtx_PLUS (Pmode, r, GEN_INT (stride)); - emit_insn (gen_rtx_SET (r, p)); - } - - /* Save this register to the stack (but use the old fp value - we copied aside if appropriate). */ - from_regno = - (fp_copy_regno >= 0 && regno == HARD_FRAME_POINTER_REGNUM) - ? fp_copy_regno : regno; - FRP (frame_emit_store (from_regno, regno, r, cfa, cfa_offset)); - - offset -= UNITS_PER_WORD; - which_scratch = (which_scratch + 1) % ROUND_ROBIN_SIZE; - } - - /* If profiling, force that to happen after the frame is set up. */ - if (crtl->profile) - emit_insn (gen_blockage ()); - - /* Load the PIC register if needed. */ - if (flag_pic && crtl->uses_pic_offset_table) - load_pic_register (false); -} - - -/* Implement the epilogue and sibcall_epilogue patterns. SIBCALL_P is - true for a sibcall_epilogue pattern, and false for an epilogue - pattern. */ -void -tilegx_expand_epilogue (bool sibcall_p) -{ - /* We round-robin through four scratch registers to hold temporary - addresses for saving registers, to make instruction scheduling - easier. */ - rtx reg_save_addr[ROUND_ROBIN_SIZE] = { - NULL_RTX, NULL_RTX, NULL_RTX, NULL_RTX - }; - rtx_insn *last_insn, *insn; - unsigned int which_scratch; - int offset, start_offset, regno; - rtx cfa_restores = NULL_RTX; - - /* A register that holds a copy of the incoming fp. */ - int fp_copy_regno = -1; - - /* Next scratch register number to hand out (postdecrementing). */ - int next_scratch_regno = 29; - - int total_size = compute_total_frame_size (); - - last_insn = get_last_insn (); - - /* Load lr first since we are going to need it first. */ - insn = NULL; - if (df_regs_ever_live_p (TILEGX_LINK_REGNUM)) - { - insn = frame_emit_load (TILEGX_LINK_REGNUM, - compute_frame_addr (0, &next_scratch_regno), - &cfa_restores); - } - - if (total_size == 0) - { - if (insn) - { - RTX_FRAME_RELATED_P (insn) = 1; - REG_NOTES (insn) = cfa_restores; - } - goto done; - } - - /* Compute where to start restoring registers. */ - start_offset = -crtl->args.pretend_args_size - UNITS_PER_WORD; - offset = start_offset; - - if (frame_pointer_needed) - fp_copy_regno = next_scratch_regno--; - - /* Restore all callee-saved registers. */ - which_scratch = 0; - for (regno = FIRST_PSEUDO_REGISTER - 1; regno >= 0; regno--) - if (need_to_save_reg (regno)) - { - rtx r = reg_save_addr[which_scratch]; - if (r == NULL_RTX) - { - r = compute_frame_addr (offset, &next_scratch_regno); - reg_save_addr[which_scratch] = r; - } - else - { - /* Advance to the next stack slot to store this register. */ - int stride = ROUND_ROBIN_SIZE * -UNITS_PER_WORD; - rtx p = gen_rtx_PLUS (Pmode, r, GEN_INT (stride)); - emit_insn (gen_rtx_SET (r, p)); - } - - if (fp_copy_regno >= 0 && regno == HARD_FRAME_POINTER_REGNUM) - frame_emit_load (fp_copy_regno, r, NULL); - else - frame_emit_load (regno, r, &cfa_restores); - - offset -= UNITS_PER_WORD; - which_scratch = (which_scratch + 1) % ROUND_ROBIN_SIZE; - } - - if (!tilegx_current_function_is_leaf ()) - cfa_restores = - alloc_reg_note (REG_CFA_RESTORE, stack_pointer_rtx, cfa_restores); - - emit_insn (gen_blockage ()); - - if (frame_pointer_needed) - { - /* Restore the old stack pointer by copying from the frame - pointer. */ - if (TARGET_32BIT) - { - insn = emit_insn (gen_sp_restore_32bit (stack_pointer_rtx, - hard_frame_pointer_rtx)); - } - else - { - insn = emit_insn (gen_sp_restore (stack_pointer_rtx, - hard_frame_pointer_rtx)); - } - RTX_FRAME_RELATED_P (insn) = 1; - REG_NOTES (insn) = cfa_restores; - add_reg_note (insn, REG_CFA_DEF_CFA, stack_pointer_rtx); - } - else - { - insn = emit_sp_adjust (total_size, &next_scratch_regno, true, - cfa_restores); - } - - if (crtl->calls_eh_return) - { - if (TARGET_32BIT) - emit_insn (gen_sp_adjust_32bit (stack_pointer_rtx, stack_pointer_rtx, - EH_RETURN_STACKADJ_RTX)); - else - emit_insn (gen_sp_adjust (stack_pointer_rtx, stack_pointer_rtx, - EH_RETURN_STACKADJ_RTX)); - } - - /* Restore the old frame pointer. */ - if (frame_pointer_needed) - { - insn = emit_move_insn (gen_lowpart (DImode, hard_frame_pointer_rtx), - gen_rtx_REG (DImode, fp_copy_regno)); - add_reg_note (insn, REG_CFA_RESTORE, hard_frame_pointer_rtx); - } - - /* Mark the pic registers as live outside of the function. */ - if (flag_pic) - { - emit_use (cfun->machine->text_label_rtx); - emit_use (cfun->machine->got_rtx); - } - -done: - if (!sibcall_p) - { - emit_jump_insn (gen__return ()); - } - else - { - emit_use (gen_rtx_REG (Pmode, TILEGX_LINK_REGNUM)); - } - - /* Mark all insns we just emitted as frame-related. */ - for (; last_insn != NULL_RTX; last_insn = next_insn (last_insn)) - RTX_FRAME_RELATED_P (last_insn) = 1; -} - -#undef ROUND_ROBIN_SIZE - - -/* Implement INITIAL_ELIMINATION_OFFSET. */ -int -tilegx_initial_elimination_offset (int from, int to) -{ - int total_size = compute_total_frame_size (); - - if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) - { - return (total_size - crtl->args.pretend_args_size - - tilegx_saved_regs_size ()); - } - else if (from == FRAME_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) - { - return -(crtl->args.pretend_args_size + tilegx_saved_regs_size ()); - } - else if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) - { - return STACK_POINTER_OFFSET + total_size; - } - else if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) - { - return STACK_POINTER_OFFSET; - } - else - gcc_unreachable (); -} - - -/* Return an RTX indicating where the return address to the calling - function can be found. */ -rtx -tilegx_return_addr (int count, rtx frame ATTRIBUTE_UNUSED) -{ - if (count != 0) - return const0_rtx; - - return get_hard_reg_initial_val (Pmode, TILEGX_LINK_REGNUM); -} - - -/* Implement EH_RETURN_HANDLER_RTX. The MEM needs to be volatile to - prevent it from being deleted. */ -rtx -tilegx_eh_return_handler_rtx (void) -{ - rtx tmp = gen_frame_mem (Pmode, hard_frame_pointer_rtx); - MEM_VOLATILE_P (tmp) = true; - return tmp; -} - - - -/* Registers */ - -/* Implemnet TARGET_CONDITIONAL_REGISTER_USAGE. */ -static void -tilegx_conditional_register_usage (void) -{ - global_regs[TILEGX_NETORDER_REGNUM] = 1; - /* TILEGX_PIC_TEXT_LABEL_REGNUM is conditionally used. */ - if (TILEGX_PIC_TEXT_LABEL_REGNUM != INVALID_REGNUM) - fixed_regs[TILEGX_PIC_TEXT_LABEL_REGNUM] = 1; - if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) - fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; -} - - -/* Implement TARGET_FRAME_POINTER_REQUIRED. */ -static bool -tilegx_frame_pointer_required (void) -{ - return crtl->calls_eh_return || cfun->calls_alloca; -} - - - -/* Scheduling and reorg */ - -/* Return the length of INSN. LENGTH is the initial length computed - by attributes in the machine-description file. This is where we - account for bundles. */ -int -tilegx_adjust_insn_length (rtx_insn *insn, int length) -{ - machine_mode mode = GET_MODE (insn); - - /* A non-termininating instruction in a bundle has length 0. */ - if (mode == SImode) - return 0; - - /* By default, there is not length adjustment. */ - return length; -} - - -/* Implement TARGET_SCHED_ISSUE_RATE. */ -static int -tilegx_issue_rate (void) -{ - return 3; -} - - -/* Return the rtx for the jump target. */ -static rtx -get_jump_target (rtx branch) -{ - if (CALL_P (branch)) - { - rtx call; - call = PATTERN (branch); - - if (GET_CODE (call) == PARALLEL) - call = XVECEXP (call, 0, 0); - - if (GET_CODE (call) == SET) - call = SET_SRC (call); - - if (GET_CODE (call) == CALL) - return XEXP (XEXP (call, 0), 0); - } - return 0; -} - - -/* Implement TARGET_SCHED_ADJUST_COST. */ -static int -tilegx_sched_adjust_cost (rtx_insn *insn, int dep_type, rtx_insn *dep_insn, - int cost, unsigned int) -{ - /* If we have a true dependence, INSN is a call, and DEP_INSN - defines a register that is needed by the call (argument or stack - pointer) , set its latency to 0 so that it can be bundled with - the call. Explicitly check for and exclude the case when - DEP_INSN defines the target of the jump. */ - if (CALL_P (insn) && dep_type == REG_DEP_TRUE) - { - rtx target = get_jump_target (insn); - if (!REG_P (target) || !set_of (target, dep_insn)) - return 0; - } - - return cost; -} - - -/* Skip over irrelevant NOTEs and such and look for the next insn we - would consider bundling. */ -static rtx_insn * -next_insn_to_bundle (rtx_insn *r, rtx_insn *end) -{ - for (; r != end; r = NEXT_INSN (r)) - { - if (NONDEBUG_INSN_P (r) - && GET_CODE (PATTERN (r)) != USE - && GET_CODE (PATTERN (r)) != CLOBBER) - return r; - } - - return NULL; -} - - -/* Go through all insns, and use the information generated during - scheduling to generate SEQUENCEs to represent bundles of - instructions issued simultaneously. */ -static void -tilegx_gen_bundles (void) -{ - basic_block bb; - FOR_EACH_BB_FN (bb, cfun) - { - rtx_insn *insn, *next, *prev; - rtx_insn *end = NEXT_INSN (BB_END (bb)); - - prev = NULL; - for (insn = next_insn_to_bundle (BB_HEAD (bb), end); insn; insn = next) - { - next = next_insn_to_bundle (NEXT_INSN (insn), end); - - /* Never wrap {} around inline asm. */ - if (GET_CODE (PATTERN (insn)) != ASM_INPUT) - { - if (next == NULL_RTX || GET_MODE (next) == TImode - /* NOTE: The scheduler incorrectly believes a call - insn can execute in the same cycle as the insn - after the call. This is of course impossible. - Really we need to fix the scheduler somehow, so - the code after the call gets scheduled - optimally. */ - || CALL_P (insn)) - { - /* Mark current insn as the end of a bundle. */ - PUT_MODE (insn, QImode); - } - else - { - /* Mark it as part of a bundle. */ - PUT_MODE (insn, SImode); - } - } - - /* Delete barrier insns, because they can mess up the - emitting of bundle braces. If it is end-of-bundle, then - the previous insn must be marked end-of-bundle. */ - if (get_attr_type (insn) == TYPE_NOTHING) { - if (GET_MODE (insn) == QImode && prev != NULL - && GET_MODE (prev) == SImode) - { - PUT_MODE (prev, QImode); - } - delete_insn (insn); - - // Note: prev remains the same for next iteration. - } - else - prev = insn; - } - } -} - - -/* Replace OLD_INSN with NEW_INSN. */ -static void -replace_insns (rtx_insn *old_insn, rtx_insn *new_insns) -{ - if (new_insns) - emit_insn_before (new_insns, old_insn); - - delete_insn (old_insn); -} - - -/* Returns true if INSN is the first instruction of a pc-relative - address compuatation. */ -static bool -match_pcrel_step1 (rtx insn) -{ - rtx pattern = PATTERN (insn); - rtx src; - - if (GET_CODE (pattern) != SET) - return false; - - src = SET_SRC (pattern); - - return (GET_CODE (src) == CONST - && GET_CODE (XEXP (src, 0)) == UNSPEC - && XINT (XEXP (src, 0), 1) == UNSPEC_HW1_LAST_PCREL); -} - - -/* Do the first replacement step in tilegx_fixup_pcrel_references. */ -static void -replace_mov_pcrel_step1 (rtx_insn *insn) -{ - rtx pattern = PATTERN (insn); - rtx unspec; - rtx opnds[2]; - rtx_insn *new_insns; - - gcc_assert (GET_CODE (pattern) == SET); - opnds[0] = SET_DEST (pattern); - - gcc_assert (GET_CODE (SET_SRC (pattern)) == CONST); - - unspec = XEXP (SET_SRC (pattern), 0); - gcc_assert (GET_CODE (unspec) == UNSPEC); - gcc_assert (XINT (unspec, 1) == UNSPEC_HW1_LAST_PCREL); - opnds[1] = XVECEXP (unspec, 0, 0); - - /* We only need to replace SYMBOL_REFs, not LABEL_REFs. */ - if (GET_CODE (opnds[1]) != SYMBOL_REF) - return; - - start_sequence (); - - if (flag_pic != 1) - { - if (TARGET_32BIT) - emit_insn (gen_mov_got32_step1_32bit (opnds[0], opnds[1])); - else - emit_insn (gen_mov_got32_step1 (opnds[0], opnds[1])); - } - - new_insns = get_insns (); - end_sequence (); - - replace_insns (insn, new_insns); -} - - -/* Returns true if INSN is the second instruction of a pc-relative - address compuatation. */ -static bool -match_pcrel_step2 (rtx_insn *insn) -{ - rtx unspec; - rtx addr; - - if (TARGET_32BIT) - { - if (recog_memoized (insn) != CODE_FOR_insn_addr_shl16insli_32bit) - return false; - } - else - { - if (recog_memoized (insn) != CODE_FOR_insn_addr_shl16insli) - return false; - } - - unspec = SET_SRC (PATTERN (insn)); - addr = XVECEXP (unspec, 0, 1); - - return (GET_CODE (addr) == CONST - && GET_CODE (XEXP (addr, 0)) == UNSPEC - && XINT (XEXP (addr, 0), 1) == UNSPEC_HW0_PCREL); -} - - -/* Do the second replacement step in tilegx_fixup_pcrel_references. */ -static void -replace_mov_pcrel_step2 (rtx_insn *insn) -{ - rtx pattern = PATTERN (insn); - rtx unspec; - rtx addr; - rtx opnds[3]; - rtx_insn *new_insns; - rtx got_rtx = tilegx_got_rtx (); - - gcc_assert (GET_CODE (pattern) == SET); - opnds[0] = SET_DEST (pattern); - - unspec = SET_SRC (pattern); - gcc_assert (GET_CODE (unspec) == UNSPEC); - gcc_assert (XINT (unspec, 1) == UNSPEC_INSN_ADDR_SHL16INSLI); - - opnds[1] = XVECEXP (unspec, 0, 0); - - addr = XVECEXP (unspec, 0, 1); - gcc_assert (GET_CODE (addr) == CONST); - - unspec = XEXP (addr, 0); - gcc_assert (GET_CODE (unspec) == UNSPEC); - gcc_assert (XINT (unspec, 1) == UNSPEC_HW0_PCREL); - opnds[2] = XVECEXP (unspec, 0, 0); - - /* We only need to replace SYMBOL_REFs, not LABEL_REFs. */ - if (GET_CODE (opnds[2]) != SYMBOL_REF) - return; - - start_sequence (); - - if (flag_pic == 1) - { - if (TARGET_32BIT) - emit_insn (gen_add_got16_32bit (opnds[0], got_rtx, opnds[2])); - else - emit_insn (gen_add_got16 (opnds[0], got_rtx, opnds[2])); - } - else - { - if (TARGET_32BIT) - emit_insn (gen_mov_got32_step2_32bit - (opnds[0], opnds[1], opnds[2])); - else - emit_insn (gen_mov_got32_step2 (opnds[0], opnds[1], opnds[2])); - } - - new_insns = get_insns (); - end_sequence (); - - replace_insns (insn, new_insns); -} - - -/* Do the third replacement step in tilegx_fixup_pcrel_references. */ -static void -replace_mov_pcrel_step3 (rtx_insn *insn) -{ - rtx pattern = PATTERN (insn); - rtx unspec; - rtx opnds[4]; - rtx_insn *new_insns; - rtx got_rtx = tilegx_got_rtx (); - rtx text_label_rtx = tilegx_text_label_rtx (); - - gcc_assert (GET_CODE (pattern) == SET); - opnds[0] = SET_DEST (pattern); - - unspec = SET_SRC (pattern); - gcc_assert (GET_CODE (unspec) == UNSPEC); - gcc_assert (XINT (unspec, 1) == UNSPEC_MOV_PCREL_STEP3); - - opnds[1] = got_rtx; - - if (XVECEXP (unspec, 0, 0) == text_label_rtx) - opnds[2] = XVECEXP (unspec, 0, 1); - else - { - gcc_assert (XVECEXP (unspec, 0, 1) == text_label_rtx); - opnds[2] = XVECEXP (unspec, 0, 0); - } - - opnds[3] = XVECEXP (unspec, 0, 2); - - /* We only need to replace SYMBOL_REFs, not LABEL_REFs. */ - if (GET_CODE (opnds[3]) != SYMBOL_REF) - return; - - start_sequence (); - - if (flag_pic == 1) - { - emit_move_insn (opnds[0], gen_const_mem (Pmode, opnds[2])); - } - else - { - emit_move_insn (opnds[0], gen_rtx_PLUS (Pmode, opnds[1], opnds[2])); - emit_move_insn (opnds[0], gen_const_mem (Pmode, opnds[0])); - } - - new_insns = get_insns (); - end_sequence (); - - replace_insns (insn, new_insns); -} - - -/* We generate PC relative SYMBOL_REFs as an optimization, to avoid - going through the GOT when the symbol is local to the compilation - unit. But such a symbol requires that the common text_label that - we generate at the beginning of the function be in the same section - as the reference to the SYMBOL_REF. This may not be true if we - generate hot/cold sections. This function looks for such cases and - replaces such references with the longer sequence going through the - GOT. - - We expect following instruction sequence: - moveli tmp1, hw1_last(x-.L_PICLNK) [1] - shl16insli tmp2, tmp1, hw0(x-.L_PICLNK) [2] - add tmp3, txt_label_reg, tmp2 [3] - - If we're compiling -fpic, we replace with the following sequence - (the numbers in brackets match the instructions they're replacing - above). - - addli tmp2, got_reg, hw0_last_got(x) [2] - ld<4> tmp3, tmp2 [3] - - If we're compiling -fPIC, we replace the first instruction with: - - moveli tmp1, hw1_last_got(x) [1] - shl16insli tmp2, tmp1, hw0_got(x) [2] - add tmp3, got_reg, tmp2 [3] - ld<4> tmp3, tmp3 [3] - - Note that we're careful to disturb the instruction sequence as - little as possible, since it's very late in the compilation - process. */ -static void -tilegx_fixup_pcrel_references (void) -{ - rtx_insn *insn, *next_insn; - bool same_section_as_entry = true; - - for (insn = get_insns (); insn; insn = next_insn) - { - next_insn = NEXT_INSN (insn); - - if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_SWITCH_TEXT_SECTIONS) - { - same_section_as_entry = !same_section_as_entry; - continue; - } - - if (same_section_as_entry) - continue; - - if (!(INSN_P (insn) - && GET_CODE (PATTERN (insn)) != USE - && GET_CODE (PATTERN (insn)) != CLOBBER)) - continue; - - if (TARGET_32BIT) - { - if (match_pcrel_step1 (insn)) - replace_mov_pcrel_step1 (insn); - else if (match_pcrel_step2 (insn)) - replace_mov_pcrel_step2 (insn); - else if (recog_memoized (insn) == CODE_FOR_mov_pcrel_step3_32bit) - replace_mov_pcrel_step3 (insn); - } - else - { - if (match_pcrel_step1 (insn)) - replace_mov_pcrel_step1 (insn); - else if (match_pcrel_step2 (insn)) - replace_mov_pcrel_step2 (insn); - else if (recog_memoized (insn) == CODE_FOR_mov_pcrel_step3) - replace_mov_pcrel_step3 (insn); - } - } -} - - -/* Ensure that no var tracking notes are emitted in the middle of a - three-instruction bundle. */ -static void -reorder_var_tracking_notes (void) -{ - basic_block bb; - FOR_EACH_BB_FN (bb, cfun) - { - rtx_insn *insn, *next; - rtx_insn *queue = NULL; - bool in_bundle = false; - - for (insn = BB_HEAD (bb); insn != BB_END (bb); insn = next) - { - next = NEXT_INSN (insn); - - if (INSN_P (insn)) - { - /* Emit queued up notes at the last instruction of a - bundle. */ - if (GET_MODE (insn) == QImode) - { - while (queue) - { - rtx_insn *next_queue = PREV_INSN (queue); - SET_PREV_INSN (NEXT_INSN (insn)) = queue; - SET_NEXT_INSN (queue) = NEXT_INSN (insn); - SET_NEXT_INSN (insn) = queue; - SET_PREV_INSN (queue) = insn; - queue = next_queue; - } - in_bundle = false; - } - else if (GET_MODE (insn) == SImode) - in_bundle = true; - } - else if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_VAR_LOCATION) - { - if (in_bundle) - { - rtx_insn *prev = PREV_INSN (insn); - SET_PREV_INSN (next) = prev; - SET_NEXT_INSN (prev) = next; - - SET_PREV_INSN (insn) = queue; - queue = insn; - } - } - } - } -} - - -/* Perform machine dependent operations on the rtl chain INSNS. */ -static void -tilegx_reorg (void) -{ - /* We are freeing block_for_insn in the toplev to keep compatibility - with old MDEP_REORGS that are not CFG based. Recompute it - now. */ - compute_bb_for_insn (); - - if (flag_reorder_blocks_and_partition) - { - tilegx_fixup_pcrel_references (); - } - - if (flag_schedule_insns_after_reload) - { - split_all_insns (); - - timevar_push (TV_SCHED2); - schedule_insns (); - timevar_pop (TV_SCHED2); - - /* Examine the schedule to group into bundles. */ - tilegx_gen_bundles (); - } - - df_analyze (); - - if (flag_var_tracking) - { - timevar_push (TV_VAR_TRACKING); - variable_tracking_main (); - reorder_var_tracking_notes (); - timevar_pop (TV_VAR_TRACKING); - } - - df_finish_pass (false); -} - - - -/* Assembly */ - -/* Select a format to encode pointers in exception handling data. - CODE is 0 for data, 1 for code labels, 2 for function pointers. - GLOBAL is true if the symbol may be affected by dynamic - relocations. */ -int -tilegx_asm_preferred_eh_data_format (int code ATTRIBUTE_UNUSED, int global) -{ - int type = TARGET_32BIT ? DW_EH_PE_sdata4 : DW_EH_PE_sdata8; - return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | type; -} - - -/* Implement TARGET_ASM_OUTPUT_MI_THUNK. */ -static void -tilegx_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, - HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset, - tree function) -{ - const char *fnname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (thunk_fndecl)); - rtx this_rtx, funexp, addend; - rtx_insn *insn; - - /* Pretend to be a post-reload pass while generating rtl. */ - reload_completed = 1; - - /* Mark the end of the (empty) prologue. */ - emit_note (NOTE_INSN_PROLOGUE_END); - - /* Find the "this" pointer. If the function returns a structure, - the structure return pointer is in $1. */ - if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function)) - this_rtx = gen_rtx_REG (Pmode, 1); - else - this_rtx = gen_rtx_REG (Pmode, 0); - - /* Add DELTA to THIS_RTX. */ - if (!(delta >= -32868 && delta <= 32767)) - { - addend = gen_rtx_REG (Pmode, 29); - emit_move_insn (addend, GEN_INT (delta)); - } - else - addend = GEN_INT (delta); - - if (TARGET_32BIT) - emit_insn (gen_addsi3 (this_rtx, this_rtx, addend)); - else - emit_insn (gen_adddi3 (this_rtx, this_rtx, addend)); - - /* If needed, add *(*THIS_RTX + VCALL_OFFSET) to THIS_RTX. */ - if (vcall_offset) - { - rtx tmp; - - tmp = gen_rtx_REG (Pmode, 29); - emit_move_insn (tmp, gen_rtx_MEM (Pmode, this_rtx)); - - if (!(vcall_offset >= -32868 && vcall_offset <= 32767)) - { - addend = gen_rtx_REG (Pmode, 28); - emit_move_insn (addend, GEN_INT (vcall_offset)); - } - else - addend = GEN_INT (vcall_offset); - - if (TARGET_32BIT) - emit_insn (gen_addsi3 (tmp, tmp, addend)); - else - emit_insn (gen_adddi3 (tmp, tmp, addend)); - - emit_move_insn (tmp, gen_rtx_MEM (Pmode, tmp)); - - if (TARGET_32BIT) - emit_insn (gen_addsi3 (this_rtx, this_rtx, tmp)); - else - emit_insn (gen_adddi3 (this_rtx, this_rtx, tmp)); - } - - /* Generate a tail call to the target function. */ - if (!TREE_USED (function)) - { - assemble_external (function); - TREE_USED (function) = 1; - } - funexp = XEXP (DECL_RTL (function), 0); - funexp = gen_rtx_MEM (FUNCTION_MODE, funexp); - insn = emit_call_insn (gen_sibcall (funexp, const0_rtx)); - SIBLING_CALL_P (insn) = 1; - - /* Run just enough of rest_of_compilation to get the insns emitted. - There's not really enough bulk here to make other passes such as - instruction scheduling worth while. - - We don't currently bundle, but the instruciton sequence is all - serial except for the tail call, so we're only wasting one cycle. - */ - insn = get_insns (); - shorten_branches (insn); - assemble_start_function (thunk_fndecl, fnname); - final_start_function (insn, file, 1); - final (insn, file, 1); - final_end_function (); - assemble_end_function (thunk_fndecl, fnname); - - /* Stop pretending to be a post-reload pass. */ - reload_completed = 0; -} - - -/* Implement TARGET_ASM_TRAMPOLINE_TEMPLATE. */ -static void -tilegx_asm_trampoline_template (FILE *file) -{ - int ptr_mode_size = GET_MODE_SIZE (ptr_mode); - if (TARGET_32BIT) - { - fprintf (file, "\tlnk r10\n"); - fprintf (file, "\taddxi r10, r10, 32\n"); - fprintf (file, "\tld4s_add r11, r10, %d\n", ptr_mode_size); - fprintf (file, "\tld4s r10, r10\n"); - fprintf (file, "\tjr r11\n"); - fprintf (file, "\t.word 0 # \n"); - fprintf (file, "\t.word 0 # \n"); - } - else - { - fprintf (file, "\tlnk r10\n"); - fprintf (file, "\taddi r10, r10, 32\n"); - fprintf (file, "\tld_add r11, r10, %d\n", ptr_mode_size); - fprintf (file, "\tld r10, r10\n"); - fprintf (file, "\tjr r11\n"); - fprintf (file, "\t.quad 0 # \n"); - fprintf (file, "\t.quad 0 # \n"); - } -} - - -/* Implement TARGET_TRAMPOLINE_INIT. */ -static void -tilegx_trampoline_init (rtx m_tramp, tree fndecl, rtx static_chain) -{ - rtx fnaddr, chaddr; - rtx mem; - rtx begin_addr, end_addr; - int ptr_mode_size = GET_MODE_SIZE (ptr_mode); - - fnaddr = copy_to_reg (XEXP (DECL_RTL (fndecl), 0)); - chaddr = copy_to_reg (static_chain); - - emit_block_move (m_tramp, assemble_trampoline_template (), - GEN_INT (TRAMPOLINE_SIZE), BLOCK_OP_NORMAL); - - mem = adjust_address (m_tramp, ptr_mode, - TRAMPOLINE_SIZE - 2 * ptr_mode_size); - emit_move_insn (mem, fnaddr); - mem = adjust_address (m_tramp, ptr_mode, - TRAMPOLINE_SIZE - ptr_mode_size); - emit_move_insn (mem, chaddr); - - /* Get pointers to the beginning and end of the code block. */ - begin_addr = force_reg (Pmode, XEXP (m_tramp, 0)); - end_addr = force_reg (Pmode, plus_constant (Pmode, XEXP (m_tramp, 0), - TRAMPOLINE_SIZE)); - - maybe_emit_call_builtin___clear_cache (begin_addr, end_addr); -} - - -/* Implement TARGET_PRINT_OPERAND. */ -static void -tilegx_print_operand (FILE *file, rtx x, int code) -{ - switch (code) - { - case 'c': - /* Print the compare operator opcode for conditional moves. */ - switch (GET_CODE (x)) - { - case EQ: - fputs ("z", file); - break; - case NE: - fputs ("nz", file); - break; - default: - output_operand_lossage ("invalid %%c operand"); - } - return; - - case 'C': - /* Print the compare operator opcode for conditional moves. */ - switch (GET_CODE (x)) - { - case EQ: - fputs ("nz", file); - break; - case NE: - fputs ("z", file); - break; - default: - output_operand_lossage ("invalid %%C operand"); - } - return; - - case 'd': - { - /* Print the compare operator opcode for conditional moves. */ - switch (GET_CODE (x)) - { - case EQ: - fputs ("eq", file); - break; - case NE: - fputs ("ne", file); - break; - default: - output_operand_lossage ("invalid %%d operand"); - } - return; - } - - case 'D': - { - /* Print the compare operator opcode for conditional moves. */ - switch (GET_CODE (x)) - { - case EQ: - fputs ("ne", file); - break; - case NE: - fputs ("eq", file); - break; - default: - output_operand_lossage ("invalid %%D operand"); - } - return; - } - - case 'H': - { - if (GET_CODE (x) == CONST - && GET_CODE (XEXP (x, 0)) == UNSPEC) - { - rtx addr = XVECEXP (XEXP (x, 0), 0, 0); - int unspec = XINT (XEXP (x, 0), 1); - const char *opstr = NULL; - switch (unspec) - { - case UNSPEC_HW0: - case UNSPEC_HW0_PCREL: - opstr = "hw0"; - break; - case UNSPEC_HW1: - case UNSPEC_HW1_PCREL: - opstr = "hw1"; - break; - case UNSPEC_HW2: - opstr = "hw2"; - break; - case UNSPEC_HW3: - opstr = "hw3"; - break; - case UNSPEC_HW0_LAST: - opstr = "hw0_last"; - break; - case UNSPEC_HW1_LAST: - case UNSPEC_HW1_LAST_PCREL: - opstr = "hw1_last"; - break; - case UNSPEC_HW2_LAST: - case UNSPEC_HW2_LAST_PCREL: - opstr = "hw2_last"; - break; - case UNSPEC_HW0_GOT: - opstr = "hw0_got"; - break; - case UNSPEC_HW0_LAST_GOT: - opstr = "hw0_last_got"; - break; - case UNSPEC_HW1_LAST_GOT: - opstr = "hw1_last_got"; - break; - case UNSPEC_HW0_TLS_GD: - opstr = "hw0_tls_gd"; - break; - case UNSPEC_HW1_LAST_TLS_GD: - opstr = "hw1_last_tls_gd"; - break; - case UNSPEC_HW0_TLS_IE: - opstr = "hw0_tls_ie"; - break; - case UNSPEC_HW1_LAST_TLS_IE: - opstr = "hw1_last_tls_ie"; - break; - case UNSPEC_HW0_TLS_LE: - opstr = "hw0_tls_le"; - break; - case UNSPEC_HW1_LAST_TLS_LE: - opstr = "hw1_last_tls_le"; - break; - case UNSPEC_HW0_PLT_PCREL: - opstr = "hw0_plt"; - break; - case UNSPEC_HW1_PLT_PCREL: - opstr = "hw1_plt"; - break; - case UNSPEC_HW1_LAST_PLT_PCREL: - opstr = "hw1_last_plt"; - break; - case UNSPEC_HW2_LAST_PLT_PCREL: - opstr = "hw2_last_plt"; - break; - default: - output_operand_lossage ("invalid %%H specifier"); - } - - fputs (opstr, file); - fputc ('(', file); - output_addr_const (file, addr); - - if (unspec == UNSPEC_HW0_PCREL - || unspec == UNSPEC_HW1_PCREL - || unspec == UNSPEC_HW1_LAST_PCREL - || unspec == UNSPEC_HW2_LAST_PCREL - || unspec == UNSPEC_HW0_PLT_PCREL - || unspec == UNSPEC_HW1_PLT_PCREL - || unspec == UNSPEC_HW1_LAST_PLT_PCREL - || unspec == UNSPEC_HW2_LAST_PLT_PCREL) - { - rtx addr2 = XVECEXP (XEXP (x, 0), 0, 1); - fputs (" - " , file); - output_addr_const (file, addr2); - } - - fputc (')', file); - return; - } - else if (symbolic_operand (x, VOIDmode)) - { - output_addr_const (file, x); - return; - } - } - /* FALLTHRU */ - - case 'h': - { - /* Print the low 16 bits of a constant. */ - HOST_WIDE_INT i; - if (CONST_INT_P (x)) - i = INTVAL (x); - else if (GET_CODE (x) == CONST_DOUBLE) - i = CONST_DOUBLE_LOW (x); - else - { - output_operand_lossage ("invalid %%h operand"); - return; - } - i = trunc_int_for_mode (i, HImode); - fprintf (file, HOST_WIDE_INT_PRINT_DEC, i); - return; - } - - case 'I': - /* Print an auto-inc memory operand. */ - if (!MEM_P (x)) - { - output_operand_lossage ("invalid %%I operand"); - return; - } - - output_memory_autoinc_first = true; - output_address (GET_MODE (x), XEXP (x, 0)); - return; - - case 'i': - /* Print an auto-inc memory operand. */ - if (!MEM_P (x)) - { - output_operand_lossage ("invalid %%i operand"); - return; - } - - output_memory_autoinc_first = false; - output_address (GET_MODE (x), XEXP (x, 0)); - return; - - case 'j': - { - /* Print the low 8 bits of a constant. */ - HOST_WIDE_INT i; - if (CONST_INT_P (x)) - i = INTVAL (x); - else if (GET_CODE (x) == CONST_DOUBLE) - i = CONST_DOUBLE_LOW (x); - else if (GET_CODE (x) == CONST_VECTOR - && CONST_INT_P (CONST_VECTOR_ELT (x, 0))) - i = INTVAL (CONST_VECTOR_ELT (x, 0)); - else - { - output_operand_lossage ("invalid %%j operand"); - return; - } - i = trunc_int_for_mode (i, QImode); - fprintf (file, HOST_WIDE_INT_PRINT_DEC, i); - return; - } - - case 'P': - { - /* Print a constant plus one. */ - if (!CONST_INT_P (x)) - { - output_operand_lossage ("invalid %%P operand"); - return; - } - fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) + 1); - return; - } - - case 'm': - case 'M': - { - /* Print a bfextu-style bit range. */ - int first_bit, last_bit; - HOST_WIDE_INT flip = (code == 'm') ? ~0 : 0; - - if (!CONST_INT_P (x) - || !tilegx_bitfield_operand_p (INTVAL (x) ^ flip, - &first_bit, &last_bit)) - { - output_operand_lossage ("invalid %%%c operand", code); - return; - } - - fprintf (file, "%d, %d", first_bit, last_bit); - return; - } - - case 'N': - { - const char *reg = NULL; - - /* Print a network register. */ - if (!CONST_INT_P (x)) - { - output_operand_lossage ("invalid %%N operand"); - return; - } - - switch (INTVAL (x)) - { - case TILEGX_NETREG_IDN0: reg = "idn0"; break; - case TILEGX_NETREG_IDN1: reg = "idn1"; break; - case TILEGX_NETREG_UDN0: reg = "udn0"; break; - case TILEGX_NETREG_UDN1: reg = "udn1"; break; - case TILEGX_NETREG_UDN2: reg = "udn2"; break; - case TILEGX_NETREG_UDN3: reg = "udn3"; break; - default: - gcc_unreachable (); - } - - fprintf (file, reg); - return; - } - - case 'p': - if (GET_CODE (x) == SYMBOL_REF) - { - if (flag_pic && !SYMBOL_REF_LOCAL_P (x)) - fprintf (file, "plt("); - output_addr_const (file, x); - if (flag_pic && !SYMBOL_REF_LOCAL_P (x)) - fprintf (file, ")"); - } - else - output_addr_const (file, x); - return; - - case 'r': - /* In this case we need a register. Use 'zero' if the operand - is const0_rtx. */ - if (x == const0_rtx - || (GET_MODE (x) != VOIDmode && x == CONST0_RTX (GET_MODE (x)))) - { - fputs ("zero", file); - return; - } - else if (!REG_P (x)) - { - output_operand_lossage ("invalid operand for 'r' specifier"); - return; - } - /* FALLTHRU */ - - case 0: - if (REG_P (x)) - { - fprintf (file, "%s", reg_names[REGNO (x)]); - return; - } - else if (MEM_P (x)) - { - output_address (VOIDmode, XEXP (x, 0)); - return; - } - else - { - output_addr_const (file, x); - return; - } - } - - debug_rtx (x); - output_operand_lossage ("unable to print out operand yet; code == %d (%c)", - code, code); -} - - -/* Implement TARGET_PRINT_OPERAND_ADDRESS. */ -static void -tilegx_print_operand_address (FILE *file, machine_mode mode, rtx addr) -{ - if (GET_CODE (addr) == POST_DEC - || GET_CODE (addr) == POST_INC) - { - int offset = GET_MODE_SIZE (mode); - - gcc_assert (mode != VOIDmode); - - if (output_memory_autoinc_first) - fprintf (file, "%s", reg_names[REGNO (XEXP (addr, 0))]); - else - fprintf (file, "%d", - GET_CODE (addr) == POST_DEC ? -offset : offset); - } - else if (GET_CODE (addr) == POST_MODIFY) - { - gcc_assert (mode != VOIDmode); - - gcc_assert (GET_CODE (XEXP (addr, 1)) == PLUS); - - if (output_memory_autoinc_first) - fprintf (file, "%s", reg_names[REGNO (XEXP (addr, 0))]); - else - fprintf (file, HOST_WIDE_INT_PRINT_DEC, - INTVAL (XEXP (XEXP (addr, 1), 1))); - } - else - tilegx_print_operand (file, addr, 'r'); -} - - -/* Machine mode of current insn, for determining curly brace - placement. */ -static machine_mode insn_mode; - - -/* Implement FINAL_PRESCAN_INSN. This is used to emit bundles. */ -void -tilegx_final_prescan_insn (rtx_insn *insn) -{ - /* Record this for tilegx_asm_output_opcode to examine. */ - insn_mode = GET_MODE (insn); -} - - -/* While emitting asm, are we currently inside '{' for a bundle? */ -static bool tilegx_in_bundle = false; - -/* Implement ASM_OUTPUT_OPCODE. Prepend/append curly braces as - appropriate given the bundling information recorded by - tilegx_gen_bundles. */ -const char * -tilegx_asm_output_opcode (FILE *stream, const char *code) -{ - bool pseudo = !strcmp (code, "pseudo"); - - if (!tilegx_in_bundle && insn_mode == SImode) - { - /* Start a new bundle. */ - fprintf (stream, "{\n\t"); - tilegx_in_bundle = true; - } - - if (tilegx_in_bundle && insn_mode == QImode) - { - /* Close an existing bundle. */ - static char buf[100]; - - gcc_assert (strlen (code) + 3 + 1 < sizeof (buf)); - - strcpy (buf, pseudo ? "" : code); - strcat (buf, "\n\t}"); - tilegx_in_bundle = false; - - return buf; - } - else - { - return pseudo ? "" : code; - } -} - - -/* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ -void -tilegx_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED) -{ - if (tilegx_in_bundle) - { - fprintf (file, "\t}\n"); - } - - if (cfun->static_chain_decl) - { - fprintf (file, - "\t{\n" - "\taddi\tsp, sp, -16\n" - "\tst\tsp, r10\n" - "\t}\n"); - } - - if (flag_pic) - { - fprintf (file, - "\t{\n" - "\tmove\tr10, lr\n" - "\tjal\tplt(%s)\n" - "\t}\n", MCOUNT_NAME); - } - else - { - fprintf (file, - "\t{\n" - "\tmove\tr10, lr\n" - "\tjal\t%s\n" - "\t}\n", MCOUNT_NAME); - } - - if (cfun->static_chain_decl) - { - fprintf (file, - "\taddi\tsp, sp, 16\n" - "\tld\tr10, sp\n"); - } - - tilegx_in_bundle = false; -} - - -/* Implement TARGET_ASM_FILE_END. */ -static void -tilegx_file_end (void) -{ - if (NEED_INDICATE_EXEC_STACK) - file_end_indicate_exec_stack (); -} - -/* Implement TARGET_TRULY_NOOP_TRUNCATION. We represent all SI values - as sign-extended DI values in registers. */ - -static bool -tilegx_truly_noop_truncation (poly_uint64 outprec, poly_uint64 inprec) -{ - return inprec <= 32 || outprec > 32; -} - -#undef TARGET_HAVE_TLS -#define TARGET_HAVE_TLS HAVE_AS_TLS - -#undef TARGET_OPTION_OVERRIDE -#define TARGET_OPTION_OVERRIDE tilegx_option_override - -#ifdef TARGET_THREAD_SSP_OFFSET -#undef TARGET_STACK_PROTECT_GUARD -#define TARGET_STACK_PROTECT_GUARD hook_tree_void_null -#endif - -#undef TARGET_SCALAR_MODE_SUPPORTED_P -#define TARGET_SCALAR_MODE_SUPPORTED_P tilegx_scalar_mode_supported_p - -#undef TARGET_VECTOR_MODE_SUPPORTED_P -#define TARGET_VECTOR_MODE_SUPPORTED_P tilegx_vector_mode_supported_p - -#undef TARGET_CANNOT_FORCE_CONST_MEM -#define TARGET_CANNOT_FORCE_CONST_MEM tilegx_cannot_force_const_mem - -#undef TARGET_FUNCTION_OK_FOR_SIBCALL -#define TARGET_FUNCTION_OK_FOR_SIBCALL tilegx_function_ok_for_sibcall - -#undef TARGET_PASS_BY_REFERENCE -#define TARGET_PASS_BY_REFERENCE tilegx_pass_by_reference - -#undef TARGET_RETURN_IN_MSB -#define TARGET_RETURN_IN_MSB tilegx_return_in_msb - -#undef TARGET_RETURN_IN_MEMORY -#define TARGET_RETURN_IN_MEMORY tilegx_return_in_memory - -#undef TARGET_MODE_REP_EXTENDED -#define TARGET_MODE_REP_EXTENDED tilegx_mode_rep_extended - -#undef TARGET_FUNCTION_ARG_BOUNDARY -#define TARGET_FUNCTION_ARG_BOUNDARY tilegx_function_arg_boundary - -#undef TARGET_FUNCTION_ARG -#define TARGET_FUNCTION_ARG tilegx_function_arg - -#undef TARGET_FUNCTION_ARG_ADVANCE -#define TARGET_FUNCTION_ARG_ADVANCE tilegx_function_arg_advance - -#undef TARGET_FUNCTION_VALUE -#define TARGET_FUNCTION_VALUE tilegx_function_value - -#undef TARGET_LIBCALL_VALUE -#define TARGET_LIBCALL_VALUE tilegx_libcall_value - -#undef TARGET_FUNCTION_VALUE_REGNO_P -#define TARGET_FUNCTION_VALUE_REGNO_P tilegx_function_value_regno_p - -#undef TARGET_PROMOTE_FUNCTION_MODE -#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote - -#undef TARGET_PROMOTE_PROTOTYPES -#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_false - -#undef TARGET_BUILD_BUILTIN_VA_LIST -#define TARGET_BUILD_BUILTIN_VA_LIST tilegx_build_builtin_va_list - -#undef TARGET_EXPAND_BUILTIN_VA_START -#define TARGET_EXPAND_BUILTIN_VA_START tilegx_va_start - -#undef TARGET_SETUP_INCOMING_VARARGS -#define TARGET_SETUP_INCOMING_VARARGS tilegx_setup_incoming_varargs - -#undef TARGET_GIMPLIFY_VA_ARG_EXPR -#define TARGET_GIMPLIFY_VA_ARG_EXPR tilegx_gimplify_va_arg_expr - -#undef TARGET_RTX_COSTS -#define TARGET_RTX_COSTS tilegx_rtx_costs - -#undef TARGET_EXPAND_TO_RTL_HOOK -#define TARGET_EXPAND_TO_RTL_HOOK tilegx_expand_to_rtl_hook - -#undef TARGET_SHIFT_TRUNCATION_MASK -#define TARGET_SHIFT_TRUNCATION_MASK tilegx_shift_truncation_mask - -#undef TARGET_INIT_LIBFUNCS -#define TARGET_INIT_LIBFUNCS tilegx_init_libfuncs - -/* Limit to what we can reach in one addli. */ -#undef TARGET_MIN_ANCHOR_OFFSET -#define TARGET_MIN_ANCHOR_OFFSET -32768 -#undef TARGET_MAX_ANCHOR_OFFSET -#define TARGET_MAX_ANCHOR_OFFSET 32767 - -#undef TARGET_LEGITIMATE_CONSTANT_P -#define TARGET_LEGITIMATE_CONSTANT_P tilegx_legitimate_constant_p - -#undef TARGET_LRA_P -#define TARGET_LRA_P hook_bool_void_false - -#undef TARGET_LEGITIMATE_ADDRESS_P -#define TARGET_LEGITIMATE_ADDRESS_P tilegx_legitimate_address_p - -#undef TARGET_LEGITIMIZE_ADDRESS -#define TARGET_LEGITIMIZE_ADDRESS tilegx_legitimize_address - -#undef TARGET_DELEGITIMIZE_ADDRESS -#define TARGET_DELEGITIMIZE_ADDRESS tilegx_delegitimize_address - -#undef TARGET_INIT_BUILTINS -#define TARGET_INIT_BUILTINS tilegx_init_builtins - -#undef TARGET_BUILTIN_DECL -#define TARGET_BUILTIN_DECL tilegx_builtin_decl - -#undef TARGET_EXPAND_BUILTIN -#define TARGET_EXPAND_BUILTIN tilegx_expand_builtin - -#undef TARGET_CONDITIONAL_REGISTER_USAGE -#define TARGET_CONDITIONAL_REGISTER_USAGE tilegx_conditional_register_usage - -#undef TARGET_FRAME_POINTER_REQUIRED -#define TARGET_FRAME_POINTER_REQUIRED tilegx_frame_pointer_required - -#undef TARGET_DELAY_SCHED2 -#define TARGET_DELAY_SCHED2 true - -#undef TARGET_DELAY_VARTRACK -#define TARGET_DELAY_VARTRACK true - -#undef TARGET_SCHED_ISSUE_RATE -#define TARGET_SCHED_ISSUE_RATE tilegx_issue_rate - -#undef TARGET_SCHED_ADJUST_COST -#define TARGET_SCHED_ADJUST_COST tilegx_sched_adjust_cost - -#undef TARGET_MACHINE_DEPENDENT_REORG -#define TARGET_MACHINE_DEPENDENT_REORG tilegx_reorg - -#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK -#define TARGET_ASM_CAN_OUTPUT_MI_THUNK \ - hook_bool_const_tree_hwi_hwi_const_tree_true - -#undef TARGET_ASM_OUTPUT_MI_THUNK -#define TARGET_ASM_OUTPUT_MI_THUNK tilegx_output_mi_thunk - -#undef TARGET_ASM_TRAMPOLINE_TEMPLATE -#define TARGET_ASM_TRAMPOLINE_TEMPLATE tilegx_asm_trampoline_template - -#undef TARGET_TRAMPOLINE_INIT -#define TARGET_TRAMPOLINE_INIT tilegx_trampoline_init - -#undef TARGET_PRINT_OPERAND -#define TARGET_PRINT_OPERAND tilegx_print_operand - -#undef TARGET_PRINT_OPERAND_ADDRESS -#define TARGET_PRINT_OPERAND_ADDRESS tilegx_print_operand_address - -#undef TARGET_ASM_FILE_END -#define TARGET_ASM_FILE_END tilegx_file_end - -#undef TARGET_ASM_ALIGNED_DI_OP -#define TARGET_ASM_ALIGNED_DI_OP "\t.quad\t" - -#undef TARGET_CAN_USE_DOLOOP_P -#define TARGET_CAN_USE_DOLOOP_P can_use_doloop_if_innermost - -#undef TARGET_TRULY_NOOP_TRUNCATION -#define TARGET_TRULY_NOOP_TRUNCATION tilegx_truly_noop_truncation - -#undef TARGET_CONSTANT_ALIGNMENT -#define TARGET_CONSTANT_ALIGNMENT constant_alignment_word_strings - -struct gcc_target targetm = TARGET_INITIALIZER; - -#include "gt-tilegx.h" diff --git a/gcc/config/tilegx/tilegx.h b/gcc/config/tilegx/tilegx.h deleted file mode 100644 index 3f1c25d..0000000 --- a/gcc/config/tilegx/tilegx.h +++ /dev/null @@ -1,530 +0,0 @@ -/* Definitions of target machine for GNU compiler for TILE-Gx. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -/* Default target_flags if no switches are specified */ -#ifndef TARGET_DEFAULT -#define TARGET_DEFAULT 0 -#endif - -#ifndef TARGET_BIG_ENDIAN_DEFAULT -#define TARGET_BIG_ENDIAN_DEFAULT 0 -#endif - -#ifndef TARGET_ENDIAN_DEFAULT -#if TARGET_BIG_ENDIAN_DEFAULT -#define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN -#else -#define TARGET_ENDIAN_DEFAULT 0 -#endif -#endif - -/* This is used by tilegx_cpu_cpp_builtins to indicate the byte order - we're compiling for. */ -#define TILEGX_CPU_CPP_ENDIAN_BUILTINS() \ - do \ - { \ - if (TARGET_BIG_ENDIAN) \ - builtin_define ("__BIG_ENDIAN__"); \ - else \ - builtin_define ("__LITTLE_ENDIAN__"); \ - } \ - while (0) - -#include "config/tilegx/tilegx-opts.h" - - -/* Target CPU builtins. */ -#define TARGET_CPU_CPP_BUILTINS() \ - tilegx_cpu_cpp_builtins (pfile) - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE (TARGET_32BIT ? "int" : "long int") - -#undef SIZE_TYPE -#define SIZE_TYPE (TARGET_32BIT ? "unsigned int" : "long unsigned int") - -#undef WCHAR_TYPE -#define WCHAR_TYPE "int" - -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE 32 - - -/* Target machine storage layout */ - -#define BITS_BIG_ENDIAN 0 -#define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) -#define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) -#define FLOAT_WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) - -#define UNITS_PER_WORD 8 -#define PARM_BOUNDARY BITS_PER_WORD -#define STACK_BOUNDARY 128 -#define FUNCTION_BOUNDARY 64 -#define BIGGEST_ALIGNMENT 128 -#define STRICT_ALIGNMENT 1 - -#define INT_TYPE_SIZE 32 -#define LONG_TYPE_SIZE (TARGET_32BIT ? 32 : 64) -#define LONG_LONG_TYPE_SIZE 64 -#define FLOAT_TYPE_SIZE 32 -#define DOUBLE_TYPE_SIZE 64 -#define LONG_DOUBLE_TYPE_SIZE 64 -#define POINTER_SIZE LONG_TYPE_SIZE - -#define PCC_BITFIELD_TYPE_MATTERS 1 -#define FASTEST_ALIGNMENT 64 -#define BIGGEST_FIELD_ALIGNMENT 128 -#define WIDEST_HARDWARE_FP_SIZE 64 - -/* Make arrays of chars word-aligned for the same reasons. */ -#define DATA_ALIGNMENT(TYPE, ALIGN) \ - (TREE_CODE (TYPE) == ARRAY_TYPE \ - && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ - && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN)) - -/* Make local arrays of chars word-aligned for the same reasons. */ -#define LOCAL_ALIGNMENT(TYPE, ALIGN) DATA_ALIGNMENT (TYPE, ALIGN) - - -/* Standard register usage. */ - -#define FIRST_PSEUDO_REGISTER (64 + 4) - -#define FIXED_REGISTERS \ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1} -#define CALL_REALLY_USED_REGISTERS \ - {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1} - -#define REG_ALLOC_ORDER { \ - 10, 11, 12, 13, 14, /* call used */ \ - 15, 16, 17, 18, 19, \ - 20, 21, 22, 23, 24, \ - 25, 26, 27, 28, 29, \ - \ - 9, 8, 7, 6, 5, /* argument */ \ - 4, 3, 2, 1, 0, \ - \ - 55, /* return address */ \ - \ - 30, 31, 32, 33, 34, /* call saved registers */ \ - 35, 36, 37, 38, 39, \ - 40, 41, 42, 43, 44, \ - 45, 46, 47, 48, 49, \ - 50, 51, \ - \ - 52, /* hard frame pointer */ \ - 53, 54, /* tp, sp */ \ - \ - 56, 57, 58, 59, 60, /* special purpose */ \ - 61, 62, 63, 64, 65, /* or fake registers */ \ - 66, 67 \ -} - -/* Register that holds an address into the text segment that can be - used by pic code. */ -#define TILEGX_PIC_TEXT_LABEL_REGNUM (flag_pic ? 50 : INVALID_REGNUM) -#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 51 : INVALID_REGNUM) -#define HARD_FRAME_POINTER_REGNUM 52 -#define THREAD_POINTER_REGNUM 53 -#define STACK_POINTER_REGNUM 54 -#define TILEGX_LINK_REGNUM 55 -#define FRAME_POINTER_REGNUM 64 -#define ARG_POINTER_REGNUM 65 -/* SPR storing the comparison value for compare and exchange. */ -#define TILEGX_CMPEXCH_REGNUM 66 -/* Pseudo registers used to enforce order between instructions that - touch the networks. */ -#define TILEGX_NETORDER_REGNUM 67 -#define STATIC_CHAIN_REGNUM 10 - - -enum reg_class -{ - NO_REGS, - R0_REGS, - R1_REGS, - R2_REGS, - R3_REGS, - R4_REGS, - R5_REGS, - R6_REGS, - R7_REGS, - R8_REGS, - R9_REGS, - R10_REGS, - ALL_REGS, - LIM_REG_CLASSES -}; - -#define N_REG_CLASSES (int) LIM_REG_CLASSES - -/* Since GENERAL_REGS is the same class as ALL_REGS, don't give it a - different class number; just make it an alias. */ -#define GENERAL_REGS ALL_REGS - -#define REG_CLASS_NAMES \ - { \ - "NO_REGS", \ - "R0_REGS", \ - "R1_REGS", \ - "R2_REGS", \ - "R3_REGS", \ - "R4_REGS", \ - "R5_REGS", \ - "R6_REGS", \ - "R7_REGS", \ - "R8_REGS", \ - "R9_REGS", \ - "R10_REGS", \ - "ALL_REGS" \ - } - -#define REG_CLASS_CONTENTS \ - { \ - { 0 }, \ - { 1 << 0 }, \ - { 1 << 1 }, \ - { 1 << 2 }, \ - { 1 << 3 }, \ - { 1 << 4 }, \ - { 1 << 5 }, \ - { 1 << 6 }, \ - { 1 << 7 }, \ - { 1 << 8 }, \ - { 1 << 9 }, \ - { 1 << 10 }, \ - { 0xffffffff, 0xffffffff } \ - } - -#define REGNO_REG_CLASS(REGNO) \ - ((unsigned)(REGNO) <= 10 ? \ - (enum reg_class)(R0_REGS + (REGNO)) : ALL_REGS) - -#define INDEX_REG_CLASS NO_REGS -#define BASE_REG_CLASS ALL_REGS - -#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS) - -#define CLASS_MAX_NREGS(CLASS, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - -/* Stack layout; function entry, exit and calling. */ - -#define STACK_GROWS_DOWNWARD 1 -#define FRAME_GROWS_DOWNWARD 1 - -#define DYNAMIC_CHAIN_ADDRESS(FRAME) \ - plus_constant (Pmode, (FRAME), UNITS_PER_WORD) - -#define FIRST_PARM_OFFSET(FNDECL) 0 - -#define ACCUMULATE_OUTGOING_ARGS 1 - -#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1 - -#define INCOMING_FRAME_SP_OFFSET 0 - -#define STACK_POINTER_OFFSET (2 * UNITS_PER_WORD) - -#define ARG_POINTER_CFA_OFFSET(FNDECL) (-STACK_POINTER_OFFSET) - -#define DEFAULT_PCC_STRUCT_RETURN 0 - -/* The first 10 registers may hold return value. */ -#define TILEGX_NUM_RETURN_REGS 10 - -/* The first 10 registers hold function arguments. */ -#define TILEGX_NUM_ARG_REGS 10 - -#define FUNCTION_ARG_REGNO_P(N) ((N) < TILEGX_NUM_ARG_REGS) - -/* The type used to store the number of words of arguments scanned so - far during argument scanning. This includes any space that is - skipped. */ -#define CUMULATIVE_ARGS int - -#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ - ((CUM) = 0) - - -#define ELIMINABLE_REGS \ - {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ - {ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ - {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ - {FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}} - -#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ - ((OFFSET) = tilegx_initial_elimination_offset((FROM),(TO))) - -#define PROFILE_BEFORE_PROLOGUE 1 - -#define FUNCTION_PROFILER(FILE, LABELNO) \ - tilegx_function_profiler (FILE, LABELNO) - -#define TRAMPOLINE_SIZE (TARGET_32BIT ? 48 : 56) -#define TRAMPOLINE_ALIGNMENT 64 -#define TRAMPOLINE_SECTION text_section - - -/* Call frame debugging information. */ - -#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, TILEGX_LINK_REGNUM) - -#define RETURN_ADDR_RTX tilegx_return_addr - -#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (TILEGX_LINK_REGNUM) - -#define DWARF_ZERO_REG 63 - -#define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N + 12) : INVALID_REGNUM) -#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 11) -#define EH_RETURN_HANDLER_RTX tilegx_eh_return_handler_rtx () - -#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ - tilegx_asm_preferred_eh_data_format ((CODE), (GLOBAL)) - - -/* Addressing modes, and classification of registers for them. */ - -#define HAVE_POST_INCREMENT 1 -#define HAVE_POST_DECREMENT 1 -#define HAVE_POST_MODIFY_DISP 1 - -#define REGNO_OK_FOR_INDEX_P(regno) 0 -#define REGNO_OK_FOR_BASE_P(regno) \ - ((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0) - -#define MAX_REGS_PER_ADDRESS 1 - -#define CONSTANT_ADDRESS_P(X) 0 - -#define LEGITIMATE_PIC_OPERAND_P(X) tilegx_legitimate_pic_operand_p (X) - - -#define CASE_VECTOR_MODE Pmode -#define CASE_VECTOR_PC_RELATIVE 0 -#define JUMP_TABLES_IN_TEXT_SECTION 0 - -#define DEFAULT_SIGNED_CHAR 1 - -#define MOVE_MAX UNITS_PER_WORD - -/* Use a value of 11 for MOVE_RATIO and friends, because TILEPro - returns structs as large as 10 words in registers. Because of some - some code generation inefficiency, we never get smaller code for - turning that into a memcpy, so pick a value that guarantees this - doesn't happen. */ -#define TILEGX_CALL_RATIO 11 -#define MOVE_RATIO(speed) ((speed) ? 15 : TILEGX_CALL_RATIO) -#define CLEAR_RATIO(speed) ((speed) ? 15 : TILEGX_CALL_RATIO) -#define SET_RATIO(speed) ((speed) ? 15 : TILEGX_CALL_RATIO) - -#define WORD_REGISTER_OPERATIONS 1 - -#define LOAD_EXTEND_OP(MODE) ((MODE) == SImode ? SIGN_EXTEND : ZERO_EXTEND) - -#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ - if (GET_MODE_CLASS (MODE) == MODE_INT \ - && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ - { \ - if ((MODE) == SImode) \ - (UNSIGNEDP) = 0; \ - (MODE) = DImode; \ - } - -/* Define SLOW_BYTE_ACCESS to avoid making a QI or HI mode - register. */ -#define SLOW_BYTE_ACCESS 1 - -#define SHIFT_COUNT_TRUNCATED 0 - -#define SHORT_IMMEDIATES_SIGN_EXTEND 1 - -#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 64, 1) -#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 64, 1) - -#define Pmode (TARGET_32BIT ? SImode : DImode) - -#define STACK_SIZE_MODE Pmode - -#define STORE_FLAG_VALUE 1 - -#define FUNCTION_MODE DImode - -#define NO_FUNCTION_CSE 1 - -#define ADJUST_INSN_LENGTH(INSN, LENGTH) \ - ((LENGTH) = tilegx_adjust_insn_length ((INSN), (LENGTH))) - -#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - -#define BRANCH_COST(speed_p, predictable_p) ((predictable_p) ? 2 : 6) - - -/* Control the assembler format that we output. */ - -#undef NO_DOLLAR_IN_LABEL - -#define ASM_COMMENT_START "##" - -#define TEXT_SECTION_ASM_OP "\t.text" - -#define DATA_SECTION_ASM_OP "\t.data" - -#undef READONLY_DATA_SECTION_ASM_OP -#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata, \"a\"" - -#undef BSS_SECTION_ASM_OP -#define BSS_SECTION_ASM_OP "\t.section\t.bss, \"wa\"" - -#undef INIT_SECTION_ASM_OP -#define INIT_SECTION_ASM_OP "\t.section\t.init, \"ax\"" - -#undef FINI_SECTION_ASM_OP -#define FINI_SECTION_ASM_OP "\t.section\t.fini, \"ax\"" - -#define GLOBAL_ASM_OP ".global " - -#define SUPPORTS_WEAK 1 - -#define USER_LABEL_PREFIX "" - -#define REGISTER_PREFIX "" -#define REGISTER_NAMES \ - { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ - "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ - "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ - "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \ - "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \ - "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \ - "r48", "r49", "r50", "r51", "r52", "tp", "sp", "lr", \ - "?r56?","idn0", "idn1", "udn0", "udn1", "udn2", "udn3", "zero", \ - "?FRAME?", "?ARG?", "?CMPEXCH?", "?NET?" } - -#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ - tilegx_final_prescan_insn (insn) - -#define ASM_OUTPUT_OPCODE(STREAM, PTR) \ - (PTR = tilegx_asm_output_opcode (STREAM, PTR)) - -#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - do \ - { \ - char label[256]; \ - ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \ - fprintf (FILE, "%s ", \ - integer_asm_op (GET_MODE_SIZE (Pmode), TRUE)); \ - assemble_name (FILE, label); \ - fprintf (FILE, "\n"); \ - } \ - while (0) - -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - do \ - { \ - char label[256]; \ - ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \ - fprintf (FILE, "%s ", \ - integer_asm_op (GET_MODE_SIZE (Pmode), TRUE)); \ - assemble_name (FILE, label); \ - ASM_GENERATE_INTERNAL_LABEL (label, "L", (REL)); \ - fprintf (FILE, "-"); \ - assemble_name (FILE, label); \ - fprintf (FILE, "\n"); \ - } \ - while (0) - -#define ASM_OUTPUT_ALIGN(FILE,LOG) \ - do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0) - -#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (unsigned int)(ROUNDED))) - -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (unsigned int)(ROUNDED))) - -#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \ -static void __attribute__((__used__)) \ -call_ ## FUNC (void) \ -{ \ - asm (SECTION_OP); \ - asm ("{ moveli r0, hw2_last(" #FUNC " - . - 8); lnk r1 }\n"); \ - asm ("shl16insli r0, r0, hw1(" #FUNC " - .)\n"); \ - asm ("shl16insli r0, r0, hw0(" #FUNC " - . + 8)\n"); \ - asm ("add r0, r1, r0\n"); \ - asm ("jalr r0\n"); \ - asm (TEXT_SECTION_ASM_OP); \ -} - - - -#define INIT_EXPANDERS tilegx_init_expanders () - -/* A C structure for machine-specific, per-function data. This is - added to the cfun structure. */ -typedef struct GTY(()) machine_function -{ - /* Symbol for the text label used for pic. */ - rtx text_label_symbol; - - /* Register for the text label. */ - rtx text_label_rtx; - - /* Register for the pic offset table. */ - rtx got_rtx; - - /* The function calls tls_get_addr. */ - int calls_tls_get_addr; -} machine_function; - -#ifndef HAVE_AS_TLS -#define HAVE_AS_TLS 0 -#endif - -#ifndef ENDIAN_SPEC -#if TARGET_BIG_ENDIAN_DEFAULT -#define ENDIAN_SPEC \ - "%{!mlittle-endian:-EB} \ - %{mlittle-endian:%{mbig-endian: \ - %e-mbig-endian and -mlittle-endian may not be used together}-EL}" -#else -#define ENDIAN_SPEC \ - "%{!mbig-endian:-EL} \ - %{mbig-endian:%{mlittle-endian: \ - %e-mbig-endian and -mlittle-endian may not be used together}-EB}" -#endif -#endif - -#define EXTRA_SPECS \ - { "endian_spec", ENDIAN_SPEC } diff --git a/gcc/config/tilegx/tilegx.md b/gcc/config/tilegx/tilegx.md deleted file mode 100644 index 7f89ae5..0000000 --- a/gcc/config/tilegx/tilegx.md +++ /dev/null @@ -1,5664 +0,0 @@ -;; Machine description for Tilera TILE-Gx chip for GCC. -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Contributed by Walter Lee (walt@tilera.com) -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; . - -(define_constants [ - ;; - ;; The following represent intrinsic insns, organized by latency. - ;; - - ;; single cycle - (UNSPEC_INSN_ADDR_SHL16INSLI 1) - (UNSPEC_INSN_BFEXTS 2) - (UNSPEC_INSN_BFEXTU 3) - (UNSPEC_INSN_BFINS 4) - (UNSPEC_INSN_CRC32_32 5) - (UNSPEC_INSN_CRC32_8 6) - (UNSPEC_INSN_DBLALIGN 7) - (UNSPEC_INSN_DBLALIGN2 8) - (UNSPEC_INSN_DBLALIGN4 9) - (UNSPEC_INSN_DBLALIGN6 10) - (UNSPEC_INSN_DRAIN 11) - (UNSPEC_INSN_DTLBPR 12) - (UNSPEC_INSN_FINV 13) - (UNSPEC_INSN_FLUSH 14) - (UNSPEC_INSN_FLUSHWB 15) - (UNSPEC_INSN_FNOP 16) - (UNSPEC_INSN_ICOH 17) - (UNSPEC_INSN_ILL 18) - (UNSPEC_INSN_INFO 19) - (UNSPEC_INSN_INFOL 20) - (UNSPEC_INSN_INV 21) - (UNSPEC_INSN_LNK 22) - (UNSPEC_INSN_MFSPR 23) - (UNSPEC_INSN_MM 24) - (UNSPEC_INSN_MTSPR 25) - (UNSPEC_INSN_NAP 26) - (UNSPEC_INSN_PREFETCH_L1_FAULT 27) - (UNSPEC_INSN_PREFETCH_L2_FAULT 28) - (UNSPEC_INSN_PREFETCH_L3_FAULT 29) - (UNSPEC_INSN_REVBITS 30) - (UNSPEC_INSN_SHUFFLEBYTES 31) - (UNSPEC_INSN_TBLIDXB0 32) - (UNSPEC_INSN_TBLIDXB1 33) - (UNSPEC_INSN_TBLIDXB2 34) - (UNSPEC_INSN_TBLIDXB3 35) - (UNSPEC_INSN_V1AVGU 36) - (UNSPEC_INSN_V2AVGS 37) - (UNSPEC_INSN_WH64 38) - - ;; 2 cycles - (UNSPEC_INSN_CMUL 100) - (UNSPEC_INSN_CMULA 101) - (UNSPEC_INSN_CMULAF 102) - (UNSPEC_INSN_CMULFR 103) - (UNSPEC_INSN_CMULHR 104) - (UNSPEC_INSN_CMULF 105) - (UNSPEC_INSN_CMULH 106) - (UNSPEC_INSN_EXCH 107) - (UNSPEC_INSN_FDOUBLE_ADDSUB 108) - (UNSPEC_INSN_FDOUBLE_ADD_FLAGS 109) - (UNSPEC_INSN_FDOUBLE_MUL_FLAGS 110) - (UNSPEC_INSN_FDOUBLE_PACK1 111) - (UNSPEC_INSN_FDOUBLE_PACK2 112) - (UNSPEC_INSN_FDOUBLE_SUB_FLAGS 113) - (UNSPEC_INSN_FDOUBLE_UNPACK_MAX 114) - (UNSPEC_INSN_FDOUBLE_UNPACK_MIN 115) - (UNSPEC_INSN_FETCHADDGEZ 116) - (UNSPEC_INSN_FSINGLE_ADD1 117) - (UNSPEC_INSN_FSINGLE_ADDSUB2 118) - (UNSPEC_INSN_FSINGLE_MUL1 119) - (UNSPEC_INSN_FSINGLE_MUL2 120) - (UNSPEC_INSN_FSINGLE_PACK1 121) - (UNSPEC_INSN_FSINGLE_PACK2 122) - (UNSPEC_INSN_FSINGLE_SUB1 123) - (UNSPEC_INSN_MULAX 124) - (UNSPEC_INSN_MULA_HS_HS 125) - (UNSPEC_INSN_MULA_HS_HU 126) - (UNSPEC_INSN_MULA_HS_LS 127) - (UNSPEC_INSN_MULA_HS_LU 128) - (UNSPEC_INSN_MULA_HU_HU 129) - (UNSPEC_INSN_MULA_HU_LS 130) - (UNSPEC_INSN_MULA_HU_LU 131) - (UNSPEC_INSN_MULA_LS_LS 132) - (UNSPEC_INSN_MULA_LS_LU 133) - (UNSPEC_INSN_MULA_LU_LU 134) - (UNSPEC_INSN_MUL_HS_HS 135) - (UNSPEC_INSN_MUL_HS_HU 136) - (UNSPEC_INSN_MUL_HS_LS 137) - (UNSPEC_INSN_MUL_HS_LU 138) - (UNSPEC_INSN_MUL_HU_HU 139) - (UNSPEC_INSN_MUL_HU_LS 140) - (UNSPEC_INSN_MUL_HU_LU 141) - (UNSPEC_INSN_MUL_LS_LS 142) - (UNSPEC_INSN_MUL_LS_LU 143) - (UNSPEC_INSN_MUL_LU_LU 144) - (UNSPEC_INSN_V1ADIFFU 145) - (UNSPEC_INSN_V1DDOTPU 146) - (UNSPEC_INSN_V1DDOTPUA 147) - (UNSPEC_INSN_V1DDOTPUS 148) - (UNSPEC_INSN_V1DDOTPUSA 149) - (UNSPEC_INSN_V1DOTP 150) - (UNSPEC_INSN_V1DOTPA 151) - (UNSPEC_INSN_V1DOTPU 152) - (UNSPEC_INSN_V1DOTPUA 153) - (UNSPEC_INSN_V1DOTPUS 154) - (UNSPEC_INSN_V1DOTPUSA 155) - (UNSPEC_INSN_V1SADAU 156) - (UNSPEC_INSN_V1SADU 157) - (UNSPEC_INSN_V2ADIFFS 158) - (UNSPEC_INSN_V2DOTP 159) - (UNSPEC_INSN_V2DOTPA 160) - (UNSPEC_INSN_V2MULFSC 161) - (UNSPEC_INSN_V2SADAS 162) - (UNSPEC_INSN_V2SADAU 163) - (UNSPEC_INSN_V2SADS 164) - (UNSPEC_INSN_V2SADU 165) - - ;; 11 cycles - (UNSPEC_INSN_CMPEXCH 200) - - ;; - ;; The following are special insns. - ;; - - ;; Blockage - (UNSPEC_BLOCKAGE 201) - - ;; Lnk and its label - (UNSPEC_LNK_AND_LABEL 202) - - ;; Memory fence - (UNSPEC_MF 203) - - ;; Insns generating difference of two labels - (UNSPEC_MOV_PCREL_STEP3 204) - (UNSPEC_MOV_LARGE_PCREL_STEP4 205) - - ;; Latency specifying loads. - (UNSPEC_LATENCY_L2 206) - (UNSPEC_LATENCY_MISS 207) - - ;; A pseudo-op that prevents network operations from being ordered. - (UNSPEC_NETWORK_BARRIER 208) - - ;; Operations that access network registers. - (UNSPEC_NETWORK_RECEIVE 209) - (UNSPEC_NETWORK_SEND 210) - - ;; Stack protector operations - (UNSPEC_SP_SET 211) - (UNSPEC_SP_TEST 212) - - ;; This is used to move a value to a SPR. - (UNSPEC_SPR_MOVE 213) - - ;; A call to __tls_get_addr - (UNSPEC_TLS_GD_CALL 214) - - ;; An opaque TLS "add" operation for TLS general dynamic model - ;; access. - (UNSPEC_TLS_GD_ADD 215) - - ;; An opaque TLS "load" operation for TLS initial exec model access. - (UNSPEC_TLS_IE_LOAD 216) - - ;; An opaque TLS "add" operation for TLS access. - (UNSPEC_TLS_ADD 217) - - ;; Atomics - (UNSPEC_ATOMIC 218) - (UNSPEC_CMPXCHG 219) - (UNSPEC_XCHG 220) - - ;; - ;; The following are operands. - ;; - (UNSPEC_HW0 300) - (UNSPEC_HW1 301) - (UNSPEC_HW2 302) - (UNSPEC_HW3 303) - (UNSPEC_HW0_LAST 304) - (UNSPEC_HW1_LAST 305) - (UNSPEC_HW2_LAST 306) - - (UNSPEC_HW0_PCREL 307) - (UNSPEC_HW1_PCREL 308) - (UNSPEC_HW1_LAST_PCREL 309) - (UNSPEC_HW2_LAST_PCREL 310) - - (UNSPEC_HW0_GOT 311) - (UNSPEC_HW0_LAST_GOT 312) - (UNSPEC_HW1_LAST_GOT 313) - - (UNSPEC_HW0_TLS_GD 314) - (UNSPEC_HW1_LAST_TLS_GD 315) - - (UNSPEC_HW0_TLS_IE 316) - (UNSPEC_HW1_LAST_TLS_IE 317) - - (UNSPEC_HW0_TLS_LE 318) - (UNSPEC_HW1_LAST_TLS_LE 319) - - (UNSPEC_HW0_PLT_PCREL 320) - (UNSPEC_HW1_PLT_PCREL 321) - - (UNSPEC_HW1_LAST_PLT_PCREL 322) - (UNSPEC_HW2_LAST_PLT_PCREL 323) - - ;; This is used to wrap around the addresses of non-temporal load/store - ;; intrinsics. - (UNSPEC_NON_TEMPORAL 324) -]) - -;; Mark the last instruction of various latencies, used to -;; determine the rtx costs of unspec insns. -(define_constants [ - (TILEGX_LAST_LATENCY_1_INSN 99) - (TILEGX_LAST_LATENCY_2_INSN 199) - (TILEGX_LAST_LATENCY_INSN 299) -]) - -(define_constants [ - (TILEGX_NETREG_IDN0 0) - (TILEGX_NETREG_IDN1 1) - (TILEGX_NETREG_UDN0 2) - (TILEGX_NETREG_UDN1 3) - (TILEGX_NETREG_UDN2 4) - (TILEGX_NETREG_UDN3 5) -]) - -(define_constants [ - (TILEGX_CMPEXCH_REG 66) - (TILEGX_NETORDER_REG 67) -]) - - -;; Operand and operator predicates and constraints - -(include "predicates.md") -(include "constraints.md") -(include "tilegx-generic.md") - -;; Define an insn type attribute. This defines what pipes things can go in. -(define_attr "type" - "X0,X0_2cycle,X1,X1_branch,X1_2cycle,X1_L2,X1_remote,X1_miss,X01,Y0,Y0_2cycle,Y1,Y2,Y2_2cycle,Y2_L2,Y2_miss,Y01,cannot_bundle,cannot_bundle_3cycle,cannot_bundle_4cycle,nothing" - (const_string "Y01")) - -(define_attr "length" "" - (cond [(eq_attr "type" "X1_branch") - (if_then_else - (and (le (minus (match_dup 0) (pc)) (const_int 524280)) - (le (minus (pc) (match_dup 0)) (const_int 524288))) - (const_int 8) - (const_int 16)) - ] - (const_int 8))) - - -;; Define some iterators. -(define_mode_iterator IVMODE [SI DI V8QI V4HI V2SI]) -(define_mode_iterator IVNMODE [SI V8QI V4HI V2SI]) -(define_mode_iterator I48MODE [SI DI]) -(define_mode_iterator I48MODE2 [SI DI]) -(define_mode_iterator I124MODE [QI HI SI]) -(define_mode_iterator FI48MODE [SF DF SI DI]) -(define_mode_iterator VEC48MODE [V8QI V4HI]) -(define_mode_iterator VEC248MODE [V8QI V4HI V2SI]) - -(define_mode_attr n [(QI "1") (HI "2") (SI "4") (DI "") - (V8QI "1") (V4HI "2") (V2SI "4")]) -(define_mode_attr x [(SI "x") (DI "")]) -(define_mode_attr bitsuffix [(SI "_32bit") (DI "")]) -(define_mode_attr four_if_si [(SI "4") (DI "")]) -(define_mode_attr four_s_if_si [(SI "4s") (DI "")]) -(define_mode_attr nbits [(SI "5") (DI "6")]) -(define_mode_attr shift_pipe [(SI "X01") (DI "*")]) - -;; Code iterator for either extend. -(define_code_iterator any_extend [sign_extend zero_extend]) - -;; Code iterator for all three shifts. -(define_code_iterator any_shift [ashift ashiftrt lshiftrt]) - -;; Code iterator for all byte ops without immediate variants. -(define_code_iterator v1op [us_minus us_plus minus ne le leu mult]) - -;; Code iterator for all 2-byte vector ops without immediate variants. -(define_code_iterator v2op [ss_minus ss_plus minus ne le leu]) - -;; Code iterator for all 4-byte vector ops without immediate variants. -(define_code_iterator v4op [ss_minus ss_plus minus plus]) - -;; Code iterator for all byte vector ops with immediate variants. -(define_code_iterator v1op_immed [plus umax umin eq lt ltu]) - -;; Code iterator for all 2-byte vector ops with immediate variants. -(define_code_iterator v2op_immed [plus smax smin eq lt ltu]) - -;; Code iterator for all 2-byte vector shifts without immediate variants. -(define_code_iterator v2shift [ss_ashift]) - -;; Code iterator for all 4-byte vector shifts without immediate variants. -(define_code_iterator v4shift [ashift ashiftrt lshiftrt ss_ashift]) - -;; expands to the name of the optab for a particular code. -(define_code_attr optab [(ashift "ashl") - (ashiftrt "ashr") - (lshiftrt "lshr") - (ss_ashift "ssashl") - (eq "seq") - (ne "sne") - (lt "slt") - (ltu "sltu") - (le "sle") - (leu "sleu") - (minus "sub") - (plus "add") - (mult "mul") - (smax "smax") - (smin "smin") - (ss_minus "sssub") - (ss_plus "ssadd") - (umax "umax") - (umin "umin") - (us_minus "ussub") - (us_plus "usadd") - ]) - -;; expands to the name of the insn that implements a particular -;; code. -(define_code_attr insn [(ashift "shl") - (ashiftrt "shrs") - (lshiftrt "shru") - (ss_ashift "shlsc") - (eq "cmpeq") - (ne "cmpne") - (lt "cmplts") - (ltu "cmpltu") - (le "cmples") - (leu "cmpleu") - (minus "sub") - (plus "add") - (mult "multu") - (smax "maxs") - (smin "mins") - (umax "maxu") - (umin "minu") - (ss_minus "subsc") - (ss_plus "addsc") - (us_minus "subuc") - (us_plus "adduc") - ]) - -;; expands to the pipeline resource that contains the -;; particular code. -(define_code_attr pipe [(ashift "X01") - (ashiftrt "X01") - (lshiftrt "X01") - (ss_ashift "X01") - (eq "X01") - (ne "X01") - (lt "X01") - (ltu "X01") - (le "X01") - (leu "X01") - (minus "X01") - (plus "X01") - (mult "X0_2cycle") - (smax "X01") - (smin "X01") - (umax "X01") - (umin "X01") - (ss_minus "X01") - (ss_plus "X01") - (us_minus "X01") - (us_plus "X01") - ]) - -;; indicates whether a particular code is commutative, using -;; the "%" commutative opterator constraint. -(define_code_attr comm [(ashift "") - (ashiftrt "") - (lshiftrt "") - (ss_ashift "") - (eq "%") - (ne "%") - (lt "") - (ltu "") - (le "") - (leu "") - (minus "") - (plus "%") - (mult "%") - (smin "%") - (umin "%") - (smax "%") - (umax "%") - (ss_plus "%") - (us_plus "%") - (ss_minus "") - (us_minus "") - ]) - -;; is the load/store extension suffix. -(define_code_attr s [(zero_extend "u") - (sign_extend "s")]) - -;; Code for packing two 2-byte vectors. -(define_code_iterator v2pack [truncate us_truncate]) - -;; expands to the part of the optab name describing how -;; two vectors are packed. -(define_code_attr pack_optab [(truncate "trunc") - (us_truncate "usat") - (ss_truncate "ssat")]) - -;; expands to the insn that implements a particular vector -;; packing code. -(define_code_attr pack_insn [(truncate "packl") - (us_truncate "packuc") - (ss_truncate "packsc")]) - -;; -;; The basic data move insns. -;; - -(define_expand "movqi" - [(set (match_operand:QI 0 "nonimmediate_operand" "") - (match_operand:QI 1 "nonautoinc_operand" ""))] - "" -{ - if (tilegx_expand_mov (QImode, operands)) - DONE; -}) - -(define_insn "*movqi_insn" - [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,r,U,m") - (match_operand:QI 1 "move_operand" "r,I,U,m,rO,rO"))] - "(register_operand (operands[0], QImode) - || reg_or_0_operand (operands[1], QImode))" - "@ - move\t%0, %r1 - movei\t%0, %1 - ld1u\t%0, %1 - ld1u_add\t%0, %I1, %i1 - st1\t%0, %r1 - st1_add\t%I0, %r1, %i0" - [(set_attr "type" "*,*,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_expand "movhi" - [(set (match_operand:HI 0 "nonimmediate_operand" "") - (match_operand:HI 1 "nonautoinc_operand" ""))] - "" -{ - if (tilegx_expand_mov (HImode, operands)) - DONE; -}) - -(define_insn "*movhi_insn" - [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,r,r,U,m") - (match_operand:HI 1 "move_operand" "r,I,JT,U,m,rO,rO"))] - "(register_operand (operands[0], HImode) - || reg_or_0_operand (operands[1], HImode))" - "@ - move\t%0, %r1 - movei\t%0, %1 - moveli\t%0, %H1 - ld2u\t%0, %1 - ld2u_add\t%0, %I1, %i1 - st2\t%0, %r1 - st2_add\t%I0, %r1, %i0" - [(set_attr "type" "*,*,X01,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_expand "movsi" - [(set (match_operand:SI 0 "nonimmediate_operand" "") - (match_operand:SI 1 "nonautoinc_operand" ""))] - "" -{ - if (tilegx_expand_mov (SImode, operands)) - DONE; -}) - -(define_insn "*movsi_insn" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,U,m") - (match_operand:SI 1 "move_operand" "r,I,JT,K,U,m,rO,rO"))] - "(register_operand (operands[0], SImode) - || reg_or_0_operand (operands[1], SImode))" - "@ - move\t%0, %r1 - movei\t%0, %1 - moveli\t%0, %H1 - shl16insli\t%0, zero, %h1 - ld4s\t%0, %1 - ld4s_add\t%0, %I1, %i1 - st4\t%0, %r1 - st4_add\t%I0, %r1, %i0" - [(set_attr "type" "*,*,X01,X01,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_expand "movdi" - [(set (match_operand:DI 0 "nonimmediate_operand" "") - (match_operand:DI 1 "nonautoinc_operand" ""))] - "" -{ - if (tilegx_expand_mov (DImode, operands)) - DONE; -}) - -(define_insn "*movdi_insn" - [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,r,r,r,r,r,U,m") - (match_operand:DI 1 "move_operand" "r,I,JT,K,N,P,U,m,rO,rO"))] - "(register_operand (operands[0], DImode) - || reg_or_0_operand (operands[1], DImode))" - "@ - move\t%0, %r1 - movei\t%0, %1 - moveli\t%0, %H1 - shl16insli\t%0, zero, %h1 - v1addi\t%0, zero, %j1 - v2addi\t%0, zero, %h1 - ld\t%0, %1 - ld_add\t%0, %I1, %i1 - st\t%0, %r1 - st_add\t%I0, %r1, %i0" - [(set_attr "type" "*,*,X01,X01,X01,X01,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_expand "movmisalign" - [(set (match_operand:VEC248MODE 0 "nonautoincmem_nonimmediate_operand" "") - (match_operand:VEC248MODE 1 "nonautoincmem_general_operand" ""))] - "" -{ - tilegx_expand_movmisalign (mode, operands); - DONE; -}) - -(define_expand "movsf" - [(set (match_operand:SF 0 "nonimmediate_operand" "") - (match_operand:SF 1 "general_operand" ""))] - "" -{ - /* Materialize immediates using clever SImode code, but don't - do this after reload starts, since gen_lowpart will choke - during reload if given an illegitimate address. */ - if (immediate_operand (operands[1], SFmode) - && operands[1] != const0_rtx - && (register_operand (operands[0], SFmode) - || (!reload_in_progress && !reload_completed))) - { - emit_insn (gen_movsi (gen_lowpart (SImode, operands[0]), - gen_lowpart (SImode, operands[1]))); - DONE; - } -}) - -(define_insn "*movsf" - [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,U,m") - (match_operand:SF 1 "general_operand" "rO,U,m,rO,rO"))] - "" - "@ - move\t%0, %r1 - ld4s\t%0, %1 - ld4s_add\t%0, %I1, %i1 - st4\t%0, %r1 - st4_add\t%I0, %r1, %i0" - [(set_attr "type" "*,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_expand "movdf" - [(set (match_operand:DF 0 "nonimmediate_operand" "") - (match_operand:DF 1 "general_operand" ""))] - "" -{ - /* Materialize immediates using clever DImode code, but don't - do this after reload starts, since gen_lowpart will choke - during reload if given an illegitimate address. */ - if (immediate_operand (operands[1], DFmode) - && operands[1] != const0_rtx - && (register_operand (operands[0], DFmode) - || (!reload_in_progress && !reload_completed))) - { - emit_insn (gen_movdi (gen_lowpart (DImode, operands[0]), - gen_lowpart (DImode, operands[1]))); - DONE; - } -}) - -(define_insn "*movdf" - [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,r,U,m") - (match_operand:DF 1 "general_operand" "rO,U,m,rO,rO"))] - "" - "@ - move\t%0, %r1 - ld\t%0, %1 - ld_add\t%0, %I1, %i1 - st\t%0, %r1 - st_add\t%I0, %r1, %i0" - [(set_attr "type" "*,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_expand "mov" - [(set (match_operand:VEC248MODE 0 "nonimmediate_operand" "") - (match_operand:VEC248MODE 1 "general_operand" ""))] - "" -{ - /* Materialize immediates using clever DImode code, but don't - do this after reload starts, since gen_lowpart will choke - during reload if given an illegitimate address. */ - if (immediate_operand (operands[1], mode) - && operands[1] != const0_rtx - && (register_operand (operands[0], mode) - || (!reload_in_progress && !reload_completed))) - { - emit_insn (gen_movdi (gen_lowpart (DImode, operands[0]), - gen_lowpart (DImode, operands[1]))); - DONE; - } -}) - -(define_insn "*mov" - [(set (match_operand:VEC248MODE 0 "nonimmediate_operand" "=r,r,r,U,m") - (match_operand:VEC248MODE 1 "general_operand" "rO,U,m,rO,rO"))] - "" - "@ - move\t%0, %r1 - ld\t%0, %1 - ld_add\t%0, %I1, %i1 - st\t%0, %r1 - st_add\t%I0, %r1, %i0" - [(set_attr "type" "*,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_insn "movstrictqi" - [(set (strict_low_part (match_operand:QI 0 "register_operand" "+r")) - (match_operand:QI 1 "reg_or_0_operand" "rO"))] - "" - "bfins\t%0, %r1, 0, 7" - [(set_attr "type" "X0")]) - -(define_insn "movstricthi" - [(set (strict_low_part (match_operand:HI 0 "register_operand" "+r")) - (match_operand:HI 1 "reg_or_0_operand" "rO"))] - "" - "bfins\t%0, %r1, 0, 15" - [(set_attr "type" "X0")]) - -(define_insn "movstrictsi" - [(set (strict_low_part (match_operand:SI 0 "register_operand" "+r")) - (match_operand:SI 1 "reg_or_0_operand" "rO"))] - "" - "bfins\t%0, %r1, 0, 31" - [(set_attr "type" "X0")]) - - -;; -;; Bit-field extracts/inserts -;; - -(define_expand "insv" - [(set (zero_extract:DI (match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "u6bit_cint_operand" "") - (match_operand:DI 2 "u6bit_cint_operand" "")) - (match_operand:DI 3 "reg_or_cint_operand" ""))] - "" -{ - rtx first_rtx = operands[2]; - HOST_WIDE_INT first = INTVAL (first_rtx); - HOST_WIDE_INT width = INTVAL (operands[1]); - rtx v = operands[3]; - - if (CONST_INT_P (v)) - { - /* Which bits are we affecting? */ - HOST_WIDE_INT mask = ((((HOST_WIDE_INT) 1) << width) - 1) << first; - - /* Extract just the bits we need, sign extending them to make the - constant easier to materialize in a register. */ - int shift = sizeof(HOST_WIDE_INT) * 8 - width; - HOST_WIDE_INT n = (INTVAL (v) << shift) >> shift; - - if (n == 0) - { - /* We are setting every bit in the bitfield to zero. Try to use - andi instead, since that is more efficient. */ - rtx mask_rtx = GEN_INT (~mask); - if (satisfies_constraint_I (mask_rtx)) - { - emit_insn (gen_anddi3 (operands[0], operands[0], mask_rtx)); - DONE; - } - - operands[3] = const0_rtx; - } - else - { - if (n == -1) - { - /* We are setting every bit in the bitfield to one. Try to use - ori instead, since that is more efficient. */ - rtx mask_rtx = GEN_INT (mask); - if (satisfies_constraint_I (mask_rtx)) - { - emit_insn (gen_iordi3 (operands[0], operands[0], mask_rtx)); - DONE; - } - } - - if (!can_create_pseudo_p ()) - FAIL; - - operands[3] = force_reg (DImode, GEN_INT (n)); - } - } -}) - -(define_insn "*insv_tblidxb0" - [(set (zero_extract:DI - (match_operand:DI 0 "register_operand" "+r") - (const_int 8) - (const_int 2)) - (match_operand:DI 1 "register_operand" "rO"))] - "" - "tblidxb0\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "*insv_tblidxb1" - [(set (zero_extract:DI - (match_operand:DI 0 "register_operand" "+r") - (const_int 8) - (const_int 2)) - (zero_extract:DI - (const_int 8) - (const_int 8) - (match_operand:DI 1 "register_operand" "rO")))] - "" - "tblidxb1\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "*insv_tblidxb2" - [(set (zero_extract:DI - (match_operand:DI 0 "register_operand" "+r") - (const_int 8) - (const_int 2)) - (zero_extract:DI - (const_int 8) - (const_int 16) - (match_operand:DI 1 "register_operand" "rO")))] - "" - "tblidxb2\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "*insv_tblidxb3" - [(set (zero_extract:DI - (match_operand:DI 0 "register_operand" "+r") - (const_int 8) - (const_int 2)) - (zero_extract:DI - (const_int 8) - (const_int 24) - (match_operand:DI 1 "register_operand" "rO")))] - "" - "tblidxb3\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "*insv_bfins" - [(set (zero_extract:DI - (match_operand:DI 0 "register_operand" "+r") - (match_operand:DI 1 "u6bit_cint_operand" "n") - (match_operand:DI 2 "u6bit_cint_operand" "n")) - (match_operand:DI 3 "reg_or_cint_operand" "rO"))] - "" - "bfins\t%0, %r3, %2, %2+%1-1" - [(set_attr "type" "X0")]) - -(define_insn "*insv_mm" - [(set (zero_extract:DI - (match_operand:DI 0 "register_operand" "+r") - (match_operand:DI 1 "u6bit_cint_operand" "n") - (match_operand:DI 2 "u6bit_cint_operand" "n")) - (zero_extract:DI - (match_operand:DI 3 "register_operand" "rO") - (match_dup 1) - (match_dup 2)))] - "" -{ - int n; - - operands[1] = GEN_INT (INTVAL (operands[1]) + INTVAL (operands[2])); - - n = INTVAL (operands[2]); - n = (n == 0) ? 63 : n - 1; - operands[2] = GEN_INT (n); - - return "mm\t%0, %r3, %1, %2"; -} - [(set_attr "type" "X0")]) - -(define_expand "extv" - [(set (match_operand:DI 0 "register_operand" "") - (sign_extract:DI (match_operand 1 "nonautoincmem_general_operand" "") - (match_operand:DI 2 "immediate_operand" "") - (match_operand:DI 3 "immediate_operand" "")))] - "" -{ - if (MEM_P (operands[1])) - { - HOST_WIDE_INT bit_offset, bit_width; - HOST_WIDE_INT first_byte_offset, last_byte_offset; - - if (GET_MODE (operands[1]) != QImode) - FAIL; - - bit_width = INTVAL (operands[2]); - bit_offset = INTVAL (operands[3]); - - /* NOTE: bit_offset is relative to the mode of operand - 1 (QImode). It will be negative in big-endian mode - here. Convert that back to the real offset. */ - if (BYTES_BIG_ENDIAN) - bit_offset = GET_MODE_BITSIZE (QImode) - bit_width - bit_offset; - - /* Reject bitfields that can be done with a normal load. */ - if (MEM_ALIGN (operands[1]) >= bit_offset + bit_width) - FAIL; - - /* The value in memory cannot span more than 8 bytes. */ - first_byte_offset = bit_offset / BITS_PER_UNIT; - last_byte_offset = (bit_offset + bit_width - 1) / BITS_PER_UNIT; - if (last_byte_offset - first_byte_offset > 7) - FAIL; - - tilegx_expand_unaligned_load (operands[0], operands[1], - bit_width, bit_offset, 1); - - DONE; - } - - operands[1] = force_reg (DImode, operands[1]); -}) - -(define_expand "extzv" - [(set (match_operand:DI 0 "register_operand" "") - (zero_extract:DI (match_operand 1 "nonautoincmem_general_operand" "") - (match_operand:DI 2 "immediate_operand" "") - (match_operand:DI 3 "immediate_operand" "")))] - "" -{ - HOST_WIDE_INT bit_width = INTVAL (operands[2]); - HOST_WIDE_INT bit_offset = INTVAL (operands[3]); - - if (MEM_P (operands[1])) - { - HOST_WIDE_INT first_byte_offset, last_byte_offset; - - if (GET_MODE (operands[1]) != QImode) - FAIL; - - /* NOTE: bit_offset is relative to the mode of operand - 1 (QImode). It will be negative in big-endian mode - here. */ - if (BYTES_BIG_ENDIAN) - bit_offset = GET_MODE_BITSIZE (QImode) - bit_width - bit_offset; - - /* Reject bitfields that can be done with a normal load. */ - if (MEM_ALIGN (operands[1]) >= bit_offset + bit_width) - FAIL; - - /* The value in memory cannot span more than 8 bytes. */ - first_byte_offset = bit_offset / BITS_PER_UNIT; - last_byte_offset = (bit_offset + bit_width - 1) / BITS_PER_UNIT; - if (last_byte_offset - first_byte_offset > 7) - FAIL; - - tilegx_expand_unaligned_load (operands[0], operands[1], - bit_width, bit_offset, 0); - - DONE; - } - - operands[1] = force_reg (DImode, operands[1]); - - if (bit_offset == 0) - { - /* Extracting the low bits is just a bitwise AND. */ - HOST_WIDE_INT mask = ((HOST_WIDE_INT)1 << bit_width) - 1; - emit_insn (gen_anddi3 (operands[0], operands[1], GEN_INT (mask))); - DONE; - } -}) - - -;; -;; Addresses -;; - -;; The next three patterns are used to materialize a position -;; independent address by adding the difference of two labels to a base -;; label in the text segment, assuming that the difference fits in 32 -;; signed bits. -(define_expand "mov_address_step1" - [(set (match_operand:DI 0 "register_operand" "") - (const:DI (unspec:DI [(match_operand:DI 1 "symbolic_operand" "")] - UNSPEC_HW2_LAST)))]) - -(define_expand "mov_address_step2" - [(set (match_operand:DI 0 "register_operand" "") - (unspec:DI - [(match_operand:DI 1 "reg_or_0_operand" "") - (const:DI (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] - UNSPEC_HW1))] - UNSPEC_INSN_ADDR_SHL16INSLI))]) - -(define_expand "mov_address_step3" - [(set (match_operand:DI 0 "register_operand" "") - (unspec:DI - [(match_operand:DI 1 "reg_or_0_operand" "") - (const:DI (unspec:DI [(match_operand:DI 2 "symbolic_operand" "")] - UNSPEC_HW0))] - UNSPEC_INSN_ADDR_SHL16INSLI))]) - -;; First step of the 2-insn sequence to materialize a 32-bit symbolic -;; address. -(define_expand "mov_address_32bit_step1" - [(set (match_operand:SI 0 "register_operand" "") - (const:SI (unspec:SI [(match_operand:SI 1 "symbolic_operand" "")] - UNSPEC_HW1_LAST)))]) - -;; Second step of the 2-insn sequence to materialize a 32-bit symbolic -;; address. -(define_expand "mov_address_32bit_step2" - [(set (match_operand:SI 0 "register_operand" "") - (unspec:SI - [(match_operand:SI 1 "reg_or_0_operand" "") - (const:SI (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")] - UNSPEC_HW0))] - UNSPEC_INSN_ADDR_SHL16INSLI))]) - - -;; -;; pic related instructions -;; - -;; NOTE: We compute the label in this unusual way because if we place -;; the label after the lnk, whether it is at the same address as the -;; lnk will vary depending on whether the optimization level chooses -;; to insert bundling braces. -(define_insn "insn_lnk_and_label" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec_volatile:I48MODE - [(match_operand:I48MODE 1 "symbolic_operand" "")] - UNSPEC_LNK_AND_LABEL))] - "" - "%1 = . + 8\n\tlnk\t%0" - [(set_attr "type" "Y1")]) - -;; The next three patterns are used to materialize a position -;; independent address by adding the difference of two labels to a -;; base label in the text segment, assuming that the difference fits -;; in 32 signed bits. -(define_expand "mov_pcrel_step1" - [(set (match_operand:I48MODE 0 "register_operand" "") - (const:I48MODE (unspec:I48MODE - [(match_operand:I48MODE 1 "symbolic_operand" "") - (match_operand:I48MODE 2 "symbolic_operand" "")] - UNSPEC_HW1_LAST_PCREL)))] - "flag_pic") - -(define_expand "mov_pcrel_step2" - [(set (match_operand:I48MODE 0 "register_operand" "") - (unspec:I48MODE - [(match_operand:I48MODE 1 "reg_or_0_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 2 "symbolic_operand" "") - (match_operand:I48MODE 3 "symbolic_operand" "")] - UNSPEC_HW0_PCREL))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "flag_pic") - -(define_insn "mov_pcrel_step3" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec:I48MODE [(match_operand:I48MODE 1 "reg_or_0_operand" "rO") - (match_operand:I48MODE 2 "reg_or_0_operand" "rO") - (match_operand:I48MODE 3 "symbolic_operand" "in") - (match_operand:I48MODE 4 "symbolic_operand" "in")] - UNSPEC_MOV_PCREL_STEP3))] - "flag_pic" - "add\t%0, %r1, %r2") - -;; The next three patterns are used to materialize a position -;; independent 64-bit address by adding the difference of two labels to -;; a base label in the text segment, without any limitation on the size -;; of the difference. -(define_expand "mov_large_pcrel_step1" - [(set (match_operand:DI 0 "register_operand" "") - (const:DI (unspec:DI - [(match_operand:DI 1 "symbolic_operand" "") - (match_operand:DI 2 "symbolic_operand" "")] - UNSPEC_HW2_LAST_PCREL)))] - "flag_pic") - -(define_expand "mov_large_pcrel_step2" - [(set (match_operand:DI 0 "register_operand" "") - (unspec:DI - [(match_operand:DI 1 "reg_or_0_operand" "") - (const:DI - (unspec:DI [(match_operand:DI 2 "symbolic_operand" "") - (match_operand:DI 3 "symbolic_operand" "")] - UNSPEC_HW1_PCREL))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "flag_pic") - -;; Note: step 3 is same as move_pcrel_step2. -(define_expand "mov_large_pcrel_step3" - [(set (match_operand:DI 0 "register_operand" "") - (unspec:DI - [(match_operand:DI 1 "reg_or_0_operand" "") - (const:DI - (unspec:DI [(match_operand:DI 2 "symbolic_operand" "") - (match_operand:DI 3 "symbolic_operand" "")] - UNSPEC_HW0_PCREL))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "flag_pic") - -(define_insn "mov_large_pcrel_step4" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "symbolic_operand" "in") - (match_operand:DI 4 "symbolic_operand" "in")] - UNSPEC_MOV_LARGE_PCREL_STEP4))] - "flag_pic" - "add\t%0, %r1, %r2") - -;; The next three patterns are used to materialize a position -;; independent 64-bit plt address by adding the difference of two -;; labels to a base label in the text segment. -(define_expand "mov_plt_pcrel_step1" - [(set (match_operand:DI 0 "register_operand" "") - (const:DI (unspec:DI - [(match_operand:DI 1 "symbolic_operand" "") - (match_operand:DI 2 "symbolic_operand" "")] - UNSPEC_HW2_LAST_PLT_PCREL)))] - "flag_pic") - -(define_expand "mov_plt_pcrel_step2" - [(set (match_operand:DI 0 "register_operand" "") - (unspec:DI - [(match_operand:DI 1 "reg_or_0_operand" "") - (const:DI - (unspec:DI [(match_operand:DI 2 "symbolic_operand" "") - (match_operand:DI 3 "symbolic_operand" "")] - UNSPEC_HW1_PLT_PCREL))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "flag_pic") - -(define_expand "mov_plt_pcrel_step3" - [(set (match_operand:DI 0 "register_operand" "") - (unspec:DI - [(match_operand:DI 1 "reg_or_0_operand" "") - (const:DI - (unspec:DI [(match_operand:DI 2 "symbolic_operand" "") - (match_operand:DI 3 "symbolic_operand" "")] - UNSPEC_HW0_PLT_PCREL))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "flag_pic") - -;; The next two patterns are used to materialize a position independent -;; 32-bit plt address by adding the difference of two labels to a base -;; label in the text segment. -(define_expand "mov_plt_pcrel_step1_32bit" - [(set (match_operand:SI 0 "register_operand" "") - (const:SI (unspec:SI - [(match_operand:SI 1 "symbolic_operand" "") - (match_operand:SI 2 "symbolic_operand" "")] - UNSPEC_HW1_LAST_PLT_PCREL)))] - "flag_pic") - -(define_expand "mov_plt_pcrel_step2_32bit" - [(set (match_operand:SI 0 "register_operand" "") - (unspec:SI - [(match_operand:SI 1 "reg_or_0_operand" "") - (const:SI - (unspec:SI [(match_operand:SI 2 "symbolic_operand" "") - (match_operand:SI 3 "symbolic_operand" "")] - UNSPEC_HW0_PLT_PCREL))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "flag_pic") - -(define_expand "add_got16" - [(set (match_operand:I48MODE 0 "register_operand" "") - (plus:I48MODE - (match_operand:I48MODE 1 "reg_or_0_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 2 "symbolic_operand" "")] - UNSPEC_HW0_LAST_GOT))))] - "flag_pic == 1") - -(define_expand "mov_got32_step1" - [(set (match_operand:I48MODE 0 "register_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 1 "symbolic_operand" "")] - UNSPEC_HW1_LAST_GOT)))] - "flag_pic == 2") - -(define_expand "mov_got32_step2" - [(set (match_operand:I48MODE 0 "register_operand" "") - (unspec:I48MODE - [(match_operand:I48MODE 1 "reg_or_0_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 2 "symbolic_operand" "")] - UNSPEC_HW0_GOT))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "flag_pic == 2") - - -;; -;; TLS -;; - -(define_expand "mov_tls_gd_step1" - [(set (match_operand:I48MODE 0 "register_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 1 "tls_symbolic_operand" "")] - UNSPEC_HW1_LAST_TLS_GD)))] - "HAVE_AS_TLS") - -(define_expand "mov_tls_gd_step2" - [(set (match_operand:I48MODE 0 "register_operand" "") - (unspec:I48MODE - [(match_operand:I48MODE 1 "reg_or_0_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 2 "tls_symbolic_operand" "")] - UNSPEC_HW0_TLS_GD))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "HAVE_AS_TLS") - -(define_expand "mov_tls_ie_step1" - [(set (match_operand:I48MODE 0 "register_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 1 "tls_symbolic_operand" "")] - UNSPEC_HW1_LAST_TLS_IE)))] - "HAVE_AS_TLS") - -(define_expand "mov_tls_ie_step2" - [(set (match_operand:I48MODE 0 "register_operand" "") - (unspec:I48MODE - [(match_operand:I48MODE 1 "reg_or_0_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 2 "tls_symbolic_operand" "")] - UNSPEC_HW0_TLS_IE))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "HAVE_AS_TLS") - -(define_expand "mov_tls_le_step1" - [(set (match_operand:I48MODE 0 "register_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 1 "tls_symbolic_operand" "")] - UNSPEC_HW1_LAST_TLS_LE)))] - "HAVE_AS_TLS") - -(define_expand "mov_tls_le_step2" - [(set (match_operand:I48MODE 0 "register_operand" "") - (unspec:I48MODE - [(match_operand:I48MODE 1 "reg_or_0_operand" "") - (const:I48MODE - (unspec:I48MODE [(match_operand:I48MODE 2 "tls_symbolic_operand" "")] - UNSPEC_HW0_TLS_LE))] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "HAVE_AS_TLS") - -(define_expand "tls_gd_call" - [(parallel - [(set (reg:I48MODE 0) - (unspec:I48MODE [(match_operand:I48MODE 0 "tls_symbolic_operand" "") - (reg:I48MODE 0)] - UNSPEC_TLS_GD_CALL)) - (clobber (reg:I48MODE 25)) - (clobber (reg:I48MODE 26)) - (clobber (reg:I48MODE 27)) - (clobber (reg:I48MODE 28)) - (clobber (reg:I48MODE 29)) - (clobber (reg:I48MODE 55))])] - "" -{ - cfun->machine->calls_tls_get_addr = true; -}) - -(define_insn "*tls_gd_call" - [(set (reg:I48MODE 0) - (unspec:I48MODE [(match_operand:I48MODE 0 "tls_symbolic_operand" "") - (reg:I48MODE 0)] - UNSPEC_TLS_GD_CALL)) - (clobber (reg:I48MODE 25)) - (clobber (reg:I48MODE 26)) - (clobber (reg:I48MODE 27)) - (clobber (reg:I48MODE 28)) - (clobber (reg:I48MODE 29)) - (clobber (reg:I48MODE 55))] - "" - "jal\ttls_gd_call(%0)" - [(set_attr "type" "X1")]) - -(define_insn "tls_gd_add" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec:I48MODE [(match_operand:I48MODE 1 "register_operand" "r") - (match_operand:I48MODE 2 "tls_symbolic_operand" "")] - UNSPEC_TLS_GD_ADD))] - "HAVE_AS_TLS" - "addi\t%0, %1, tls_gd_add(%2)") - -(define_insn "tls_add" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec:I48MODE [(match_operand:I48MODE 1 "register_operand" "r") - (match_operand:I48MODE 2 "register_operand" "0") - (match_operand:I48MODE 3 "tls_symbolic_operand" "")] - UNSPEC_TLS_ADD))] - "HAVE_AS_TLS" - "addi\t%0, %1, tls_add(%3)") - -(define_insn "tls_ie_load" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec:I48MODE [(match_operand:I48MODE 1 "register_operand" "r") - (match_operand:I48MODE 2 "tls_symbolic_operand" "")] - UNSPEC_TLS_IE_LOAD))] - "HAVE_AS_TLS" - "ld_tls\t%0, %1, tls_ie_load(%2)" - [(set_attr "type" "X1_2cycle")]) - -(define_insn_and_split "*zero_extract" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (zero_extract:I48MODE - (match_operand:I48MODE 1 "reg_or_0_operand" "r") - (match_operand:I48MODE 2 "u6bit_cint_operand" "n") - (match_operand:I48MODE 3 "u6bit_cint_operand" "n")))] - "" - "bfextu\t%0, %r1, %3, %3+%2-1" - "&& reload_completed" - [(set (match_dup 0) (zero_extract:I48MODE - (match_dup 1) - (match_dup 2) - (match_dup 3)))] -{ - HOST_WIDE_INT bit_width = INTVAL (operands[2]); - HOST_WIDE_INT bit_offset = INTVAL (operands[3]); - - if (bit_offset + bit_width > 64) - operands[2] = GEN_INT (64 - bit_offset); -} - [(set_attr "type" "X0")]) - -(define_insn "*sign_extract_low32" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extract:DI - (match_operand:DI 1 "reg_or_0_operand" "r") - (match_operand:DI 2 "u6bit_cint_operand" "n") - (match_operand:DI 3 "u6bit_cint_operand" "n")))] - "INTVAL (operands[3]) == 0 && INTVAL (operands[2]) == 32" - "addxi\t%0, %r1, 0") - -(define_insn_and_split "*sign_extract" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (sign_extract:I48MODE - (match_operand:I48MODE 1 "reg_or_0_operand" "r") - (match_operand:I48MODE 2 "u6bit_cint_operand" "n") - (match_operand:I48MODE 3 "u6bit_cint_operand" "n")))] - "" - "bfexts\t%0, %r1, %3, %3+%2-1" - "&& reload_completed" - [(set (match_dup 0) (sign_extract:I48MODE - (match_dup 1) - (match_dup 2) - (match_dup 3)))] -{ - HOST_WIDE_INT bit_width = INTVAL (operands[2]); - HOST_WIDE_INT bit_offset = INTVAL (operands[3]); - - if (bit_offset + bit_width > 64) - operands[2] = GEN_INT (64 - bit_offset); -} - [(set_attr "type" "X0")]) - - -;; -;; Arithmetic ops -;; - -(define_insn "add3" - [(set (match_operand:I48MODE 0 "register_operand" "=r,r,r") - (plus:I48MODE (match_operand:I48MODE 1 "reg_or_0_operand" "%rO,rO,rO") - (match_operand:I48MODE 2 "add_operand" "r,I,JT")))] - "" - "@ - add\t%0, %r1, %r2 - addi\t%0, %r1, %2 - addli\t%0, %r1, %H2" - [(set_attr "type" "*,*,X01")]) - -(define_insn "*addsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (sign_extend:DI - (plus:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO,rO") - (match_operand:SI 2 "add_operand" "r,I,JT"))))] - "" - "@ - addx\t%0, %r1, %r2 - addxi\t%0, %r1, %2 - addxli\t%0, %r1, %H2" - [(set_attr "type" "*,*,X01")]) - -(define_insn "sub3" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (minus:I48MODE (match_operand:I48MODE 1 "reg_or_0_operand" "rO") - (match_operand:I48MODE 2 "reg_or_0_operand" "rO")))] - "" - "sub\t%0, %r1, %r2") - -(define_insn "*subsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO"))))] - "" - "subx\t%0, %r1, %r2") - -(define_insn "neg2" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (neg:I48MODE (match_operand:I48MODE 1 "reg_or_0_operand" "rO")))] - "" - "sub\t%0, zero, %r1") - -(define_insn "*negsi2_sext" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (neg:SI (match_operand:SI 1 "reg_or_0_operand" "rO"))))] - "" - "subx\t%0, zero, %r1") - -(define_insn "ssaddsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (ss_plus:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")))] - "" - "addxsc\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "*ssaddsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (ss_plus:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO"))))] - "" - "addxsc\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "sssubsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (ss_minus:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")))] - "" - "subxsc\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "*sssubsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r") - (sign_extend:DI - (ss_minus:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO"))))] - "" - "subxsc\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_expand "addsf3" - [(set (match_operand:SF 0 "register_operand" "") - (plus:SF (match_operand:SF 1 "register_operand" "") - (match_operand:SF 2 "register_operand" "")))] - "" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = gen_lowpart (DImode, operands[1]); - rtx b = gen_lowpart (DImode, operands[2]); - - rtx tmp = gen_reg_rtx (DImode); - rtx flags = gen_reg_rtx (DImode); - - emit_insn (gen_insn_fsingle_add1 (tmp, a, b)); - emit_insn (gen_insn_fsingle_addsub2 (tmp, tmp, a, b)); - emit_insn (gen_insn_fsingle_pack1 (flags, tmp)); - emit_insn (gen_insn_fsingle_pack2 (result, tmp, flags)); - - DONE; -}) - -(define_expand "subsf3" - [(set (match_operand:SF 0 "register_operand" "") - (minus:SF (match_operand:SF 1 "register_operand" "") - (match_operand:SF 2 "register_operand" "")))] - "" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = gen_lowpart (DImode, operands[1]); - rtx b = gen_lowpart (DImode, operands[2]); - - rtx tmp = gen_reg_rtx (DImode); - rtx flags = gen_reg_rtx (DImode); - - emit_insn (gen_insn_fsingle_sub1 (tmp, a, b)); - emit_insn (gen_insn_fsingle_addsub2 (tmp, tmp, a, b)); - emit_insn (gen_insn_fsingle_pack1 (flags, tmp)); - emit_insn (gen_insn_fsingle_pack2 (result, tmp, flags)); - - DONE; -}) - -(define_expand "mulsf3" - [(set (match_operand:SF 0 "register_operand" "") - (mult:SF (match_operand:SF 1 "register_operand" "") - (match_operand:SF 2 "register_operand" "")))] - "" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = gen_lowpart (DImode, operands[1]); - rtx b = gen_lowpart (DImode, operands[2]); - - rtx tmp1 = gen_reg_rtx (DImode); - rtx tmp2 = gen_reg_rtx (DImode); - rtx flags = gen_reg_rtx (DImode); - - emit_insn (gen_insn_fsingle_mul1 (tmp1, a, b)); - emit_insn (gen_insn_fsingle_mul2 (tmp2, tmp1, b)); - emit_insn (gen_insn_fsingle_pack1 (flags, tmp2)); - emit_insn (gen_insn_fsingle_pack2 (result, tmp2, flags)); - - DONE; -}) - -(define_expand "adddf3" - [(set (match_operand:DF 0 "register_operand" "") - (plus:DF (match_operand:DF 1 "register_operand" "") - (match_operand:DF 2 "register_operand" "")))] - "" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = gen_lowpart (DImode, operands[1]); - rtx b = gen_lowpart (DImode, operands[2]); - - rtx min = gen_reg_rtx (DImode); - rtx max = gen_reg_rtx (DImode); - rtx flags = gen_reg_rtx (DImode); - - emit_insn (gen_insn_fdouble_unpack_min (min, a, b)); - emit_insn (gen_insn_fdouble_unpack_max (max, a, b)); - emit_insn (gen_insn_fdouble_add_flags (flags, a, b)); - emit_insn (gen_insn_fdouble_addsub (max, max, min, flags)); - emit_insn (gen_insn_fdouble_pack1 (result, max, flags)); - emit_insn (gen_insn_fdouble_pack2 (result, result, max, const0_rtx)); - - DONE; -}) - -(define_expand "subdf3" - [(set (match_operand:DF 0 "register_operand" "") - (minus:DF (match_operand:DF 1 "register_operand" "") - (match_operand:DF 2 "register_operand" "")))] - "" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = gen_lowpart (DImode, operands[1]); - rtx b = gen_lowpart (DImode, operands[2]); - - rtx min = gen_reg_rtx (DImode); - rtx max = gen_reg_rtx (DImode); - rtx flags = gen_reg_rtx (DImode); - - emit_insn (gen_insn_fdouble_unpack_min (min, a, b)); - emit_insn (gen_insn_fdouble_unpack_max (max, a, b)); - emit_insn (gen_insn_fdouble_sub_flags (flags, a, b)); - emit_insn (gen_insn_fdouble_addsub (max, max, min, flags)); - emit_insn (gen_insn_fdouble_pack1 (result, max, flags)); - emit_insn (gen_insn_fdouble_pack2 (result, result, max, const0_rtx)); - - DONE; -}) - -(define_expand "muldf3" - [(set (match_operand:DF 0 "register_operand" "") - (mult:DF (match_operand:DF 1 "register_operand" "") - (match_operand:DF 2 "register_operand" "")))] - "" - ;; TODO: Decide if we should not inline this with -Os. - ;; "optimize_function_for_speed_p (cfun)" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = gen_lowpart (DImode, operands[1]); - rtx b = gen_lowpart (DImode, operands[2]); - - rtx a_unpacked = gen_reg_rtx (DImode); - rtx b_unpacked = gen_reg_rtx (DImode); - rtx flags = gen_reg_rtx (DImode); - - rtx low1 = gen_reg_rtx (DImode); - rtx low = gen_reg_rtx (DImode); - rtx low_carry = gen_reg_rtx (DImode); - - rtx mid = gen_reg_rtx (DImode); - rtx mid_l32 = gen_reg_rtx (DImode); - rtx mid_r32 = gen_reg_rtx (DImode); - - rtx high1 = gen_reg_rtx (DImode); - rtx high = gen_reg_rtx (DImode); - rtx high1_plus_mid_r32 = gen_reg_rtx (DImode); - - /* NOTE: We compute using max(a, 0) and max(b, 0) rather than - min(a, b) and max(a, b) because for multiply we just need to unpack, - we don't actually care which is min and which is max. And this - formulation gives the scheduler more freedom in case one of a or b - would stall at the start of this code sequence. */ - emit_insn (gen_insn_fdouble_unpack_max (a_unpacked, a, const0_rtx)); - emit_insn (gen_insn_fdouble_unpack_max (b_unpacked, b, const0_rtx)); - emit_insn (gen_insn_fdouble_mul_flags (flags, a, b)); - - /* This depends on the fact that the high few bits of the unpacked - mantissa are zero, so we can't have a carry out from the mid sum. */ - emit_insn (gen_insn_mul_lu_lu (low1, a_unpacked, b_unpacked)); - emit_insn (gen_insn_mul_hu_lu (mid, a_unpacked, b_unpacked)); - emit_insn (gen_insn_mula_hu_lu (mid, mid, b_unpacked, a_unpacked)); - emit_insn (gen_insn_mul_hu_hu (high1, a_unpacked, b_unpacked)); - - emit_insn (gen_ashldi3 (mid_l32, mid, GEN_INT (32))); - emit_insn (gen_lshrdi3 (mid_r32, mid, GEN_INT (32))); - - emit_insn (gen_adddi3 (high1_plus_mid_r32, high1, mid_r32)); - - emit_insn (gen_adddi3 (low, low1, mid_l32)); - emit_insn (gen_insn_cmpltu_didi (low_carry, low, mid_l32)); - - emit_insn (gen_adddi3 (high, high1_plus_mid_r32, low_carry)); - - emit_insn (gen_insn_fdouble_pack1 (result, high, flags)); - emit_insn (gen_insn_fdouble_pack2 (result, result, high, low)); - - DONE; -}) - - -;; -;; Shifts -;; - -(define_insn "ashl3" - [(set (match_operand:I48MODE 0 "register_operand" "=r,r") - (ashift:I48MODE - (match_operand:I48MODE 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_ubit_operand" "I,rO")))] - "" - "@ - shli\t%0, %r1, %2 - shl\t%0, %r1, %r2" - [(set_attr "type" ",")]) - -(define_insn "*ashlsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI - (ashift:SI - (match_operand:SI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_u5bit_operand" "I,rO"))))] - "" - "@ - shlxi\t%0, %r1, %2 - shlx\t%0, %r1, %r2" - [(set_attr "type" "X01,X01")]) - -(define_insn "ashr3" - [(set (match_operand:I48MODE 0 "register_operand" "=r,r") - (ashiftrt:I48MODE - (match_operand:I48MODE 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_ubit_operand" "I,rO")))] - "" - "@ - shrsi\t%0, %r1, %2 - shrs\t%0, %r1, %r2") - -(define_insn "*ashrsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI - (ashiftrt:SI (match_operand:SI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_u5bit_operand" "I,rO"))))] - "" - "@ - shrsi\t%0, %r1, %2 - shrs\t%0, %r1, %r2") - -(define_insn "lshr3" - [(set (match_operand:I48MODE 0 "register_operand" "=r,r") - (lshiftrt:I48MODE - (match_operand:I48MODE 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_ubit_operand" "I,rO")))] - "" - "@ - shrui\t%0, %r1, %2 - shru\t%0, %r1, %r2" - [(set_attr "type" ",")]) - -(define_insn "*lshrsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI - (lshiftrt:SI - (match_operand:SI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_u5bit_operand" "I,rO"))))] - "" - "@ - shruxi\t%0, %r1, %2 - shrux\t%0, %r1, %r2" - [(set_attr "type" "X01,X01")]) - -(define_insn "rotldi3" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (rotate:DI (match_operand:DI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_u6bit_operand" "I,rO")))] - "" - "@ - rotli\t%0, %r1, %2 - rotl\t%0, %r1, %r2") - -(define_insn "insn_shl16insli" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (ior:DI - (ashift:DI - (match_operand:DI 1 "reg_or_0_operand" "rO,rO") - (const_int 16)) - (match_operand:DI 2 "u16bit_or_const_symbolic_operand" "O,KT")))] - "" - "@ - shli\t%0, %r1, 16 - shl16insli\t%0, %r1, %H2" - [(set_attr "type" "*,X01")]) - -(define_insn "insn_addr_shl16insli" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec:I48MODE - [(match_operand:I48MODE 1 "reg_or_0_operand" "rO") - (match_operand:I48MODE 2 "const_symbolic_operand" "T")] - UNSPEC_INSN_ADDR_SHL16INSLI))] - "" - "shl16insli\t%0, %r1, %H2" - [(set_attr "type" "X01")]) - - -;; -;; Compares -;; - -(define_expand "cstore4" - [(set (match_operand:DI 0 "register_operand" "") - (match_operator:DI 1 "ordered_comparison_operator" - [(match_operand:FI48MODE 2 "reg_or_cint_operand" "") - (match_operand:FI48MODE 3 "reg_or_cint_operand" "")]))] - "" -{ - if (!tilegx_emit_setcc (operands, GET_MODE (operands[2]))) - FAIL; - else - DONE; -}) - - -(define_insn "insn_cmpne_" - [(set (match_operand:I48MODE2 0 "register_operand" "=r") - (ne:I48MODE2 (match_operand:I48MODE 1 "reg_or_0_operand" "rO") - (match_operand:I48MODE 2 "reg_or_cint_operand" "rO")))] - "" - "cmpne\t%0, %r1, %r2") - -(define_insn "insn_cmpeq_" - [(set (match_operand:I48MODE2 0 "register_operand" "=r,r") - (eq:I48MODE2 (match_operand:I48MODE 1 "reg_or_0_operand" "%rO,rO") - (match_operand:I48MODE 2 "reg_or_cint_operand" "I,rO")))] - "" - "@ - cmpeqi\t%0, %r1, %2 - cmpeq\t%0, %r1, %r2") - -(define_insn "insn_cmplts_" - [(set (match_operand:I48MODE2 0 "register_operand" "=r,r") - (lt:I48MODE2 (match_operand:I48MODE 1 "reg_or_0_operand" "rO,rO") - (match_operand:I48MODE 2 "reg_or_cint_operand" "I,rO")))] - "" - "@ - cmpltsi\t%0, %r1, %2 - cmplts\t%0, %r1, %r2") - -(define_insn "insn_cmpltu_" - [(set (match_operand:I48MODE2 0 "register_operand" "=r,r") - (ltu:I48MODE2 (match_operand:I48MODE 1 "reg_or_0_operand" "rO,rO") - (match_operand:I48MODE 2 "reg_or_cint_operand" "I,rO")))] - "" - "@ - cmpltui\t%0, %r1, %2 - cmpltu\t%0, %r1, %r2" - [(set_attr "type" "X01,*")]) - -(define_insn "insn_cmples_" - [(set (match_operand:I48MODE2 0 "register_operand" "=r,r") - (le:I48MODE2 (match_operand:I48MODE 1 "reg_or_0_operand" "rO,rO") - (match_operand:I48MODE 2 "reg_or_cint_operand" "L,rO")))] - "" - "@ - cmpltsi\t%0, %r1, %P2 - cmples\t%0, %r1, %r2") - -(define_insn "insn_cmpleu_" - [(set (match_operand:I48MODE2 0 "register_operand" "=r,r") - (leu:I48MODE2 (match_operand:I48MODE 1 "reg_or_0_operand" "rO,rO") - (match_operand:I48MODE 2 "reg_or_cint_operand" "Q,rO")))] - "" - "@ - cmpltui\t%0, %r1, %P2 - cmpleu\t%0, %r1, %r2" - [(set_attr "type" "X01,*")]) - - -;; -;; Logical ops -;; - -(define_insn "and3" - [(set (match_operand:IVNMODE 0 "register_operand" "=r,r,r,r") - (and:IVNMODE (match_operand:IVNMODE 1 "reg_or_0_operand" "%rO,rO,0,rO") - (match_operand:IVNMODE 2 "and_operand" "I,S,M,rO")))] - "" - "@ - andi\t%0, %r1, %2 - bfextu\t%0, %r1, %M2 - bfins\t%0, zero, %m2 - and\t%0, %r1, %r2" - [(set_attr "type" "*,X0,X0,*")]) - -(define_insn "*andsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r,r,r,r") - (sign_extend:DI - (and:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO,0,rO") - (match_operand:SI 2 "and_operand" "I,S,M,rO"))))] - "" - "@ - andi\t%0, %r1, %2 - bfextu\t%0, %r1, %M2 - bfins\t%0, zero, %m2 - and\t%0, %r1, %r2" - [(set_attr "type" "*,X0,X0,*")]) - -(define_insn "anddi3" - [(set (match_operand:DI 0 "register_operand" "=r,r,r,r,r,r") - (and:DI (match_operand:DI 1 "reg_or_0_operand" "%rO,rO,rO,rO,0,rO") - (match_operand:DI 2 "and_operand" "I,Z0,Z1,S,M,rO")))] - "" - "@ - andi\t%0, %r1, %2 - v4int_l\t%0, zero, %r1 - v4int_h\t%0, %r1, zero - bfextu\t%0, %r1, %M2 - bfins\t%0, zero, %m2 - and\t%0, %r1, %r2" - [(set_attr "type" "*,X01,X01,X0,X0,*")]) - -(define_insn "ior3" - [(set (match_operand:IVMODE 0 "register_operand" "=r,r") - (ior:IVMODE (match_operand:IVMODE 1 "reg_or_0_operand" "%rO,rO") - (match_operand:IVMODE 2 "reg_or_s8bit_operand" "rO,I")))] - "" - "@ - or\t%0, %r1, %r2 - ori\t%0, %r1, %2" - [(set_attr "type" "*,X01")]) - -(define_insn "*iorsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI - (ior:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO") - (match_operand:SI 2 "reg_or_s8bit_operand" "rO,I"))))] - "" - "@ - or\t%0, %r1, %r2 - ori\t%0, %r1, %2" - [(set_attr "type" "*,X01")]) - -(define_insn "xor3" - [(set (match_operand:IVMODE 0 "register_operand" "=r,r") - (xor:IVMODE (match_operand:IVMODE 1 "reg_or_0_operand" "%rO,rO") - (match_operand:IVMODE 2 "reg_or_s8bit_operand" "rO,I")))] - "" - "@ - xor\t%0, %r1, %r2 - xori\t%0, %r1, %2" - [(set_attr "type" "*,X01")]) - -(define_insn "*xorsi3_sext" - [(set (match_operand:DI 0 "register_operand" "=r,r") - (sign_extend:DI - (xor:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO") - (match_operand:SI 2 "reg_or_s8bit_operand" "rO,I"))))] - "" - "@ - xor\t%0, %r1, %r2 - xori\t%0, %r1, %2" - [(set_attr "type" "*,X01")]) - -(define_insn "clzdi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (clz:DI (match_operand:DI 1 "reg_or_0_operand" "rO")))] - "" - "clz\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_expand "clzsi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (clz:SI (match_operand:SI 1 "reg_or_0_operand" "rO")))] - "" - { - rtx tmp1 = gen_reg_rtx (DImode); - rtx tmp2 = gen_reg_rtx (DImode); - rtx tmp3 = gen_reg_rtx (DImode); - - emit_insn (gen_zero_extendsidi2 (tmp1, operands[1])); - emit_insn (gen_ashldi3 (tmp2, tmp1, (GEN_INT (32)))); - emit_insn (gen_clzdi2 (tmp3, tmp2)); - emit_move_insn (operands[0], gen_lowpart (SImode, tmp3)); - DONE; - }) - -(define_insn "ctz2" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (ctz:I48MODE (match_operand:DI 1 "reg_or_0_operand" "rO")))] - "" - "ctz\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "popcount2" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (popcount:I48MODE (match_operand:DI 1 "reg_or_0_operand" "rO")))] - "" - "pcnt\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_expand "parity2" - [(set (match_operand:I48MODE 0 "register_operand" "") - (parity:I48MODE (match_operand:DI 1 "reg_or_0_operand" "")))] - "" - { - rtx tmp = gen_reg_rtx (mode); - emit_insn (gen_popcount2 (tmp, operands[1])); - emit_insn (gen_and3 (operands[0], tmp, const1_rtx)); - DONE; - }) - -(define_insn "bswapdi2" - [(set (match_operand:DI 0 "register_operand" "=r") - (bswap:DI (match_operand:DI 1 "reg_or_0_operand" "rO")))] - "" - "revbytes\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_expand "bswapsi2" - [(set (match_operand:SI 0 "register_operand" "") - (bswap:SI (match_operand:SI 1 "reg_or_0_operand" "")))] - "" - { - rtx tmp = gen_reg_rtx (DImode); - emit_insn (gen_bswapdi2 (tmp, gen_lowpart (DImode, operands[1]))); - emit_insn (gen_ashrdi3 (gen_lowpart (DImode, operands[0]), - tmp, GEN_INT (32))); - DONE; - }) - -(define_insn "one_cmpl2" - [(set (match_operand:IVMODE 0 "register_operand" "=r") - (not:IVMODE (match_operand:IVMODE 1 "reg_or_0_operand" "rO")))] - "" - "nor\t%0, %r1, zero") - - -;; -;; Conditional moves -;; - -(define_expand "movcc" - [(set (match_operand:I48MODE 0 "register_operand" "") - (if_then_else:I48MODE - (match_operand 1 "comparison_operator" "") - (match_operand:I48MODE 2 "reg_or_0_operand" "") - (match_operand:I48MODE 3 "reg_or_0_operand" "")))] - "" - { operands[1] = tilegx_emit_conditional_move (operands[1]); }) - -(define_insn "movcc_insn_" - [(set (match_operand:I48MODE 0 "register_operand" "=r,r,r,r") - (if_then_else:I48MODE - (match_operator 4 "eqne_operator" - [(match_operand:I48MODE2 1 "reg_or_0_operand" "rO,rO,rO,rO") - (const_int 0)]) - (match_operand:I48MODE 2 "reg_or_0_operand" "rO,O,rO,0") - (match_operand:I48MODE 3 "reg_or_0_operand" "O,rO,0,rO")))] - "" - "@ - m%c4\t%0, %r1, %r2 - m%C4\t%0, %r1, %r3 - cmov%d4z\t%0, %r1, %r2 - cmov%D4z\t%0, %r1, %r3" - [(set_attr "type" "*,*,Y0,Y0")]) - -(define_expand "insn_mz" - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI - (eq (match_operand:DI 1 "reg_or_0_operand" "") - (const_int 0)) - (match_operand:DI 2 "reg_or_0_operand" "") - (const_int 0)))]) - -(define_expand "insn_mnz" - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI - (ne (match_operand:DI 1 "reg_or_0_operand" "") - (const_int 0)) - (match_operand:DI 2 "reg_or_0_operand" "") - (const_int 0)))]) - -(define_expand "insn_cmoveqz" - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI - (eq (match_operand:DI 2 "reg_or_0_operand" "") - (const_int 0)) - (match_operand:DI 3 "reg_or_0_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "")))]) - -(define_expand "insn_cmovnez" - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:DI - (ne (match_operand:DI 2 "reg_or_0_operand" "") - (const_int 0)) - (match_operand:DI 3 "reg_or_0_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "")))]) - - -;; -;; Conversions -;; - -(define_insn "zero_extendqi2" - [(set (match_operand:I48MODE 0 "register_operand" "=r,r,r") - (zero_extend:I48MODE (match_operand:QI 1 "move_operand" "rO,U,m")))] - "" - "@ - bfextu\t%0, %r1, 0, 7 - ld1u\t%0, %1 - ld1u_add\t%0, %I1, %i1" - [(set_attr "type" "X0,Y2_2cycle,X1_2cycle")]) - -(define_insn "zero_extendhi2" - [(set (match_operand:I48MODE 0 "register_operand" "=r,r,r") - (zero_extend:I48MODE (match_operand:HI 1 "move_operand" "rO,U,m")))] - "" - "@ - bfextu\t%0, %r1, 0, 15 - ld2u\t%0, %1 - ld2u_add\t%0, %I1, %i1" - [(set_attr "type" "X0,Y2_2cycle,X1_2cycle")]) - -(define_insn "zero_extendsidi2" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (zero_extend:DI (match_operand:SI 1 "move_operand" "rO,U,m")))] - "" - "@ - v4int_l\t%0, zero, %r1 - ld4u\t%0, %1 - ld4u_add\t%0, %I1, %i1" - [(set_attr "type" "X01,Y2_2cycle,X1_2cycle")]) - -(define_insn "extendqi2" - [(set (match_operand:I48MODE 0 "register_operand" "=r,r,r") - (sign_extend:I48MODE (match_operand:QI 1 "move_operand" "rO,U,m")))] - "" - "@ - bfexts\t%0, %r1, 0, 7 - ld1s\t%0, %1 - ld1s_add\t%0, %I1, %i1" - [(set_attr "type" "X0,Y2_2cycle,X1_2cycle")]) - -(define_insn "extendhi2" - [(set (match_operand:I48MODE 0 "register_operand" "=r,r,r") - (sign_extend:I48MODE (match_operand:HI 1 "move_operand" "rO,U,m")))] - "" - "@ - bfexts\t%0, %r1, 0, 15 - ld2s\t%0, %1 - ld2s_add\t%0, %I1, %i1" - [(set_attr "type" "X0,Y2_2cycle,X1_2cycle")]) - -;; All SImode integer registers should already be in sign-extended form -;; (see TARGET_TRULY_NOOP_TRUNCATION and truncdisi2). We can therefore -;; get rid of register->register instructions if we constrain the -;; source to be in the same register as the destination. -(define_insn_and_split "extendsidi2" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "0,U,m")))] - "" - "@ - # - ld4s\t%0, %1 - ld4s_add\t%0, %I1, %i1" - "&& reload_completed && register_operand (operands[1], VOIDmode)" - [(const_int 0)] -{ - emit_note (NOTE_INSN_DELETED); - DONE; -} - [(set_attr "type" "*,Y2_2cycle,X1_2cycle")]) - -;; Integer truncation patterns. Truncating SImode values to smaller -;; modes is a no-op, as it is for most other GCC ports. Truncating -;; DImode values to SImode is not a no-op since we -;; need to make sure that the lower 32 bits are properly sign-extended -;; (see TARGET_TRULY_NOOP_TRUNCATION). Truncating DImode values into modes -;; smaller than SImode is equivalent to two separate truncations: -;; -;; A B -;; DI ---> HI == DI ---> SI ---> HI -;; DI ---> QI == DI ---> SI ---> QI -;; -;; Step A needs a real instruction but step B does not. - -(define_insn "truncdisi2" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r,U,m") - (truncate:SI (match_operand:DI 1 "reg_or_0_operand" "rO,rO,rO")))] - "" - "@ - addxi\t%0, %r1, 0 - st4\t%0, %r1 - st4_add\t%I0, %r1, %i0" - [(set_attr "type" "Y01,Y2,X1")]) - -(define_insn "truncdihi2" - [(set (match_operand:HI 0 "nonimmediate_operand" "=r,U,m") - (truncate:HI (match_operand:DI 1 "reg_or_0_operand" "rO,rO,rO")))] - "" - "@ - addxi\t%0, %r1, 0 - st2\t%0, %r1 - st2_add\t%I0, %r1, %i0" - [(set_attr "type" "Y01,Y2,X1")]) - -(define_insn "truncdiqi2" - [(set (match_operand:QI 0 "nonimmediate_operand" "=r,U,m") - (truncate:QI (match_operand:DI 1 "reg_or_0_operand" "rO,rO,rO")))] - "" - "@ - addxi\t%0, %r1, 0 - st1\t%0, %r1 - st1_add\t%I0, %r1, %i0" - [(set_attr "type" "Y01,Y2,X1")]) - -;; Combiner patterns to optimize away unnecessary truncates. - -(define_insn "*zero_extendsidi_truncdisi" - [(set (match_operand:DI 0 "register_operand" "=r") - (zero_extend:DI - (truncate:SI (match_operand:DI 1 "reg_or_0_operand" "rO"))))] - "" - "v4int_l\t%0, zero, %r1" - [(set_attr "type" "X01")]) - -(define_insn "*addsi_truncdisi" - [(set (match_operand:SI 0 "register_operand" "=r,r,r") - (plus:SI - (truncate:SI (match_operand:DI 1 "reg_or_0_operand" "%rO,rO,rO")) - (match_operand:SI 2 "add_operand" "r,I,JT")))] - "" - "@ - addx\t%0, %r1, %r2 - addxi\t%0, %r1, %2 - addxli\t%0, %r1, %H2" - [(set_attr "type" "*,*,X01")]) - -(define_insn "*addsi_truncdisi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI - (truncate:SI (match_operand:DI 1 "reg_or_0_operand" "rO")) - (truncate:SI (match_operand:DI 2 "reg_or_0_operand" "rO"))))] - "" - "addx\t%0, %r1, %r2") - -(define_insn "*ashldi_truncdisi" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashift:DI - (match_operand:DI 1 "reg_or_0_operand" "rO") - (truncate:SI (match_operand:DI 2 "reg_or_u6bit_operand" "rO"))))] - "" - "shl\t%0, %r1, %r2") - -(define_insn "*ashlsi_truncdisi" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ashift:SI - (truncate:SI (match_operand:DI 1 "reg_or_0_operand" "rO,rO")) - (match_operand:SI 2 "reg_or_u5bit_operand" "I,rO")))] - "" - "@ - shlxi\t%0, %r1, %2 - shlx\t%0, %r1, %r2" - [(set_attr "type" "X01,X01")]) - -(define_insn "*ashlsi_truncdisi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashift:SI - (truncate:SI (match_operand:DI 1 "reg_or_0_operand" "rO")) - (truncate:SI (match_operand:DI 2 "reg_or_0_operand" "rO"))))] - "" - "shlx\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "*ashrdi3_truncdisi" - [(set (match_operand:DI 0 "register_operand" "=r") - (ashiftrt:DI - (match_operand:DI 1 "reg_or_0_operand" "rO") - (truncate:SI (match_operand:DI 2 "reg_or_u6bit_operand" "rO"))))] - "" - "shrs\t%0, %r1, %r2") - -(define_insn "*lshrsi_truncdisi" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (lshiftrt:SI - (truncate:SI (match_operand:DI 1 "reg_or_0_operand" "rO,rO")) - (match_operand:SI 2 "reg_or_u5bit_operand" "I,rO")))] - "" - "@ - shruxi\t%0, %r1, %2 - shrux\t%0, %r1, %r2" - [(set_attr "type" "X01,X01")]) - -(define_insn "*lshrsi_truncdisi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (lshiftrt:SI - (truncate:SI (match_operand:DI 1 "reg_or_0_operand" "rO")) - (truncate:SI (match_operand:DI 2 "reg_or_0_operand" "rO"))))] - "" - "shrux\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "*lshrdi_truncdisi" - [(set (match_operand:DI 0 "register_operand" "=r") - (lshiftrt:DI - (match_operand:DI 1 "reg_or_0_operand" "rO") - (truncate:SI (match_operand:DI 2 "reg_or_u6bit_operand" "rO"))))] - "" - "shru\t%0, %r1, %r2") - -(define_insn "*rotldi_truncdisi" - [(set (match_operand:DI 0 "register_operand" "=r") - (rotate:DI - (match_operand:DI 1 "reg_or_0_operand" "rO") - (truncate:SI (match_operand:DI 2 "reg_or_u6bit_operand" "rO"))))] - "" - "rotl\t%0, %r1, %r2") - -;; Integer to floating point conversions - -(define_expand "floatsisf2" - [(set (match_operand:SF 0 "register_operand" "") - (float:SI (match_operand:SI 1 "register_operand" "")))] - "" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = operands[1]; - - rtx nega = gen_reg_rtx (SImode); - rtx exp = gen_reg_rtx (DImode); - rtx sign = gen_reg_rtx (DImode); - rtx abs = gen_reg_rtx (DImode); - rtx flags = gen_reg_rtx (DImode); - rtx tmp1 = gen_reg_rtx (DImode); - rtx tmp2 = gen_reg_rtx (DImode); - - emit_move_insn (exp, GEN_INT (0x9e)); - - emit_insn (gen_negsi2 (nega, a)); - - emit_insn (gen_insn_cmplts_sisi (gen_lowpart (SImode, sign), a, const0_rtx)); - emit_insn (gen_insn_cmoveqz (abs, gen_lowpart (DImode, nega), sign, - gen_lowpart (DImode, a))); - - emit_insn (gen_insn_bfins (tmp1, exp, sign, GEN_INT (10), GEN_INT (10))); - emit_insn (gen_insn_bfins (tmp2, tmp1, abs, GEN_INT (32), GEN_INT (63))); - emit_insn (gen_insn_fsingle_pack1 (flags, tmp2)); - emit_insn (gen_insn_fsingle_pack2 (result, tmp2, flags)); - DONE; -}) - -(define_expand "floatunssisf2" - [(set (match_operand:SF 0 "register_operand" "") - (float:SI (match_operand:SI 1 "register_operand" "")))] - "" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = operands[1]; - - rtx exp = gen_reg_rtx (DImode); - rtx flags = gen_reg_rtx (DImode); - rtx tmp = gen_reg_rtx (DImode); - - emit_move_insn (exp, GEN_INT (0x9e)); - emit_insn (gen_insn_bfins (tmp, exp, gen_lowpart (DImode, a), - GEN_INT (32), GEN_INT (63))); - emit_insn (gen_insn_fsingle_pack1 (flags, tmp)); - emit_insn (gen_insn_fsingle_pack2 (result, tmp, flags)); - DONE; -}) - -(define_expand "floatsidf2" - [(set (match_operand:DF 0 "register_operand" "") - (float:SI (match_operand:SI 1 "register_operand" "")))] - "" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = gen_lowpart (DImode, operands[1]); - - rtx nega = gen_reg_rtx (DImode); - rtx exp = gen_reg_rtx (DImode); - rtx sign = gen_reg_rtx (DImode); - rtx abs = gen_reg_rtx (DImode); - rtx tmp1 = gen_reg_rtx (DImode); - rtx tmp2 = gen_reg_rtx (DImode); - rtx tmp3 = gen_reg_rtx (DImode); - - emit_move_insn (exp, GEN_INT (0x21b00)); - - emit_insn (gen_negdi2 (nega, a)); - - emit_insn (gen_insn_cmplts_didi (sign, a, const0_rtx)); - emit_insn (gen_insn_cmovnez (abs, a, sign, nega)); - - emit_insn (gen_ashldi3 (tmp1, abs, GEN_INT (4))); - emit_insn (gen_insn_bfins (tmp2, exp, sign, GEN_INT (20), GEN_INT (20))); - emit_insn (gen_insn_fdouble_pack1 (tmp3, tmp1, tmp2)); - emit_insn (gen_insn_fdouble_pack2 (result, tmp3, tmp1, const0_rtx)); - DONE; -}) - -(define_expand "floatunssidf2" - [(set (match_operand:DF 0 "register_operand" "") - (float:SI (match_operand:SI 1 "register_operand" "")))] - "" -{ - rtx result = gen_lowpart (DImode, operands[0]); - rtx a = gen_lowpart (DImode, operands[1]); - - rtx exp = gen_reg_rtx (DImode); - rtx tmp1 = gen_reg_rtx (DImode); - rtx tmp2 = gen_reg_rtx (DImode); - - emit_move_insn (exp, GEN_INT (0x21b00)); - emit_insn (gen_insn_bfins (tmp1, const0_rtx, a, GEN_INT (4), GEN_INT (35))); - emit_insn (gen_insn_fdouble_pack1 (tmp2, tmp1, exp)); - emit_insn (gen_insn_fdouble_pack2 (result, tmp2, tmp1, const0_rtx)); - DONE; -}) - - -;; -;; Multiplies -;; - -(define_insn "mulsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (mult:SI (match_operand:SI 1 "reg_or_0_operand" "%rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")))] - "" - "mulx\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "mulsidi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (mult:DI (sign_extend:DI - (match_operand:SI 1 "reg_or_0_operand" "%rO")) - (sign_extend:DI - (match_operand:SI 2 "reg_or_0_operand" "rO"))))] - "" - "mul_ls_ls\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "umulsidi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (mult:DI (zero_extend:DI - (match_operand:SI 1 "reg_or_0_operand" "%rO")) - (zero_extend:DI - (match_operand:SI 2 "reg_or_0_operand" "rO"))))] - "" - "mul_lu_lu\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_expand "muldi3" - [(set (match_operand:DI 0 "register_operand" "") - (unspec:DI [(match_operand:DI 1 "nonmemory_operand" "") - (match_operand:DI 2 "nonmemory_operand" "")] - UNSPEC_INSN_MUL_HU_LU)) - (set (match_dup 0) - (unspec:DI [(match_dup 0) (match_dup 2) (match_dup 1)] - UNSPEC_INSN_MULA_HU_LU)) - (set (match_dup 0) - (ashift:DI (match_dup 0) (const_int 32))) - (set (match_dup 0) - (unspec:DI [(match_dup 0) (match_dup 2) (match_dup 1)] - UNSPEC_INSN_MULA_LU_LU))] - "" - { - operands[1] = force_reg (DImode, operands[1]); - operands[1] = make_safe_from (operands[1], operands[0]); - - if (tilegx_expand_muldi (operands[0], operands[1], operands[2])) - DONE; - else - { - operands[2] = force_reg (DImode, operands[2]); - operands[2] = make_safe_from (operands[2], operands[0]); - } - }) - -(define_insn "usmulsidi3" - [(set (match_operand:DI 0 "register_operand" "=r") - (mult:DI (zero_extend:DI - (match_operand:SI 1 "reg_or_0_operand" "rO")) - (sign_extend:DI - (match_operand:SI 2 "reg_or_0_operand" "rO"))))] - "" - "mul_ls_lu\t%0, %r2, %r1" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "maddsidi4" - [(set (match_operand:DI 0 "register_operand" "=r") - (plus:DI - (mult:DI (sign_extend:DI - (match_operand:SI 1 "reg_or_0_operand" "rO")) - (sign_extend:DI - (match_operand:SI 2 "reg_or_0_operand" "rO"))) - (match_operand:DI 3 "register_operand" "0")))] - "" - "mula_ls_ls\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "umaddsidi4" - [(set (match_operand:DI 0 "register_operand" "=r") - (plus:DI - (mult:DI (zero_extend:DI - (match_operand:SI 1 "reg_or_0_operand" "rO")) - (zero_extend:DI - (match_operand:SI 2 "reg_or_0_operand" "rO"))) - (match_operand:DI 3 "register_operand" "0")))] - "" - "mula_lu_lu\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_expand "smulsi3_highpart" - [(set (match_dup 3) - (mult:DI (sign_extend:DI (match_operand:SI 1 "reg_or_0_operand" "")) - (sign_extend:DI (match_operand:SI 2 "reg_or_0_operand" "")))) - (set (match_dup 4) - (ashiftrt:DI (match_dup 3) (const_int 32))) - (set (match_operand:SI 0 "register_operand" "") - (truncate:SI (match_dup 4)))] - "" - { - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - }) - -(define_expand "umulsi3_highpart" - [(set (match_dup 3) - (mult:DI (zero_extend:DI (match_operand:SI 1 "reg_or_0_operand" "")) - (zero_extend:DI (match_operand:SI 2 "reg_or_0_operand" "")))) - (set (match_dup 4) - (lshiftrt:DI (match_dup 3) (const_int 32))) - (set (match_operand:SI 0 "register_operand" "") - (truncate:SI (match_dup 4)))] - "" - { - operands[3] = gen_reg_rtx (DImode); - operands[4] = gen_reg_rtx (DImode); - }) - -(define_expand "smuldi3_highpart" - [(set (match_operand:DI 0 "register_operand" "") - (truncate:DI - (ashiftrt:TI - (mult:TI (sign_extend:TI (match_operand:DI 1 "reg_or_0_operand" "")) - (sign_extend:TI (match_operand:DI 2 "reg_or_0_operand" ""))) - (const_int 64))))] - "" - { - tilegx_expand_smuldi3_highpart (operands[0], operands[1], operands[2]); - DONE; - }) - -(define_expand "umuldi3_highpart" - [(set (match_operand:DI 0 "register_operand" "") - (truncate:DI - (lshiftrt:TI - (mult:TI (zero_extend:TI (match_operand:DI 1 "reg_or_0_operand" "")) - (zero_extend:TI (match_operand:DI 2 "reg_or_0_operand" ""))) - (const_int 64))))] - "" -{ - tilegx_expand_umuldi3_highpart (operands[0], operands[1], operands[2]); - DONE; -}) - - -;; -;; Divide stubs. These exist to work around a bug in expmed.cc, which -;; will not attempt to convert a divide by constant into a multiply -;; unless there is a pattern for a divide of the same mode. The end -;; result is a 32-bit divide turns into 64-bit multiply. -;; - -(define_expand "divsi3" - [(set (match_operand:SI 0 "register_operand" "") - (div:SI (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")))] - "" -{ - FAIL; -}) - -(define_expand "udivsi3" - [(set (match_operand:SI 0 "register_operand" "") - (udiv:SI (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")))] - "" -{ - FAIL; -}) - - -;; -;; Loops -;; - -;; Define the subtract-one-and-jump insns so loop.c knows what to -;; generate. -(define_expand "doloop_end" - [(use (match_operand 0 "" "")) ;; loop pseudo - (use (match_operand 1 "" ""))] ;; label - "" -{ - if (optimize > 0 && flag_modulo_sched) - { - rtx s0; - rtx bcomp; - rtx loc_ref; - machine_mode mode = GET_MODE (operands[0]); - - /* only deal with loop counters in SImode or DImode */ - if (mode != SImode && mode != DImode) - FAIL; - - s0 = operands [0]; - emit_move_insn (s0, gen_rtx_PLUS (mode, s0, GEN_INT (-1))); - bcomp = gen_rtx_NE(mode, s0, const0_rtx); - loc_ref = gen_rtx_LABEL_REF (VOIDmode, operands [1]); - emit_jump_insn (gen_rtx_SET (pc_rtx, - gen_rtx_IF_THEN_ELSE (VOIDmode, bcomp, - loc_ref, pc_rtx))); - DONE; - } - else - FAIL; - -}) - -;; -;; Prologue/epilogue -;; -(define_expand "prologue" - [(const_int 0)] - "" -{ - tilegx_expand_prologue (); - DONE; -}) - -(define_expand "epilogue" - [(const_int 0)] - "" -{ - tilegx_expand_epilogue (false); - DONE; -}) - -(define_expand "sibcall_epilogue" - [(const_int 0)] - "" -{ - tilegx_expand_epilogue (true); - DONE; -}) - -;; -;; Stack manipulations -;; - -;; An insn to allocate new stack space for dynamic use (e.g., alloca). -(define_expand "allocate_stack" - [(set (match_operand 0 "register_operand" "") - (minus (reg 54) (match_operand 1 "nonmemory_operand" ""))) - (set (reg 54) - (minus (reg 54) (match_dup 1)))] - "" - "tilegx_allocate_stack (operands[0], operands[1]); DONE;") - -;; -;; Branches -;; - -(define_expand "call" - [(parallel [(call (match_operand:DI 0 "call_operand" "") - (match_operand 1 "" "")) - (use (reg:DI 54)) - (clobber (reg:DI 55))])] - "" -{ - rtx orig_addr = XEXP (operands[0], 0); - rtx addr; - if (GET_CODE (orig_addr) == SYMBOL_REF) - { - if (tilegx_cmodel == CM_LARGE) - { - addr = gen_reg_rtx (Pmode); - tilegx_expand_set_const64 (addr, orig_addr); - operands[0] = gen_rtx_MEM (DImode, addr); - } - else if (tilegx_cmodel == CM_LARGE_PIC) - { - crtl->uses_pic_offset_table = 1; - addr = gen_reg_rtx (Pmode); - if (SYMBOL_REF_LOCAL_P (orig_addr)) - tilegx_compute_pcrel_address (addr, orig_addr); - else - tilegx_compute_pcrel_plt_address (addr, orig_addr); - operands[0] = gen_rtx_MEM (DImode, addr); - } - } -}) - -(define_insn "*call_insn" - [(call (mem:DI (match_operand:I48MODE 0 "call_address_operand" "rO,i")) - (match_operand 1 "" "")) - (use (reg:DI 54)) - (clobber (reg:DI 55))] - "" - "@ - jalr\t%r0 - jal\t%p0" - [(set_attr "type" "Y1,X1")]) - -(define_expand "call_value" - [(parallel [(set (match_operand 0 "register_operand" "") - (call (match_operand:DI 1 "call_operand" "") - (match_operand 2 "" ""))) - (use (reg:DI 54)) - (clobber (reg:DI 55))])] - "" -{ - rtx orig_addr = XEXP (operands[1], 0); - rtx addr; - if (GET_CODE (orig_addr) == SYMBOL_REF) - { - if (tilegx_cmodel == CM_LARGE) - { - addr = gen_reg_rtx (Pmode); - tilegx_expand_set_const64 (addr, orig_addr); - operands[1] = gen_rtx_MEM (DImode, addr); - } - else if (tilegx_cmodel == CM_LARGE_PIC) - { - crtl->uses_pic_offset_table = 1; - addr = gen_reg_rtx (Pmode); - if (SYMBOL_REF_LOCAL_P (orig_addr)) - tilegx_compute_pcrel_address (addr, orig_addr); - else - tilegx_compute_pcrel_plt_address (addr, orig_addr); - operands[1] = gen_rtx_MEM (DImode, addr); - } - } -}) - -(define_insn "*call_value_insn" - [(set (match_operand 0 "register_operand" "=r,r") - (call (mem:DI (match_operand:I48MODE 1 "call_address_operand" "rO,i")) - (match_operand 2 "" ""))) - (use (reg:DI 54)) - (clobber (reg:DI 55))] - "" - "@ - jalr\t%r1 - jal\t%p1" - [(set_attr "type" "Y1,X1")]) - -(define_expand "sibcall" - [(parallel [(call (match_operand:DI 0 "call_operand" "") - (match_operand 1 "" "")) - (use (reg:DI 54))])] - "" - "") - -(define_insn "*sibcall_insn" - [(call (mem:DI (match_operand:I48MODE 0 "call_address_operand" "rO,i")) - (match_operand 1 "" "")) - (use (reg:DI 54))] - "SIBLING_CALL_P(insn)" - "@ - jr\t%r0 - j\t%p0" - [(set_attr "type" "Y1,X1")]) - -(define_expand "sibcall_value" - [(parallel [(set (match_operand 0 "" "") - (call (match_operand:DI 1 "call_operand" "") - (match_operand 2 "" ""))) - (use (reg:DI 54))])] - "" - "") - -(define_insn "*sibcall_value" - [(set (match_operand 0 "" "") - (call (mem:DI (match_operand:I48MODE 1 "call_address_operand" "rO,i")) - (match_operand 2 "" ""))) - (use (reg:DI 54))] - "SIBLING_CALL_P(insn)" - "@ - jr\t%r1 - j\t%p1" - [(set_attr "type" "Y1,X1")]) - -(define_insn "jump" - [(set (pc) (label_ref (match_operand 0 "" "")))] - "" - "j\t%l0" - [(set_attr "type" "X1")]) - -(define_insn "indirect_jump" - [(set (pc) (match_operand 0 "pointer_operand" "rO"))] - "" - "jr\t%r0" - [(set_attr "type" "Y1")]) - -(define_expand "return" - [(parallel - [(return) - (use (reg:DI 55))])] - "tilegx_can_use_return_insn_p ()" - "") - -(define_insn "_return" - [(return) - (use (reg:DI 55))] - "reload_completed" - "jrp\tlr" - [(set_attr "type" "Y1")]) - -(define_expand "tablejump" - [(set (pc) (match_operand 0 "pointer_operand" "")) - (use (label_ref (match_operand 1 "" "")))] - "" -{ - tilegx_expand_tablejump (operands[0], operands[1]); - DONE; -}) - -(define_insn "tablejump_aux" - [(set (pc) (match_operand 0 "pointer_operand" "rO")) - (use (label_ref (match_operand 1 "" "")))] - "" - "jr\t%r0" - [(set_attr "type" "Y1")]) - -;; Call subroutine returning any type. -(define_expand "untyped_call" - [(parallel [(call (match_operand 0 "" "") - (const_int 0)) - (match_operand 1 "" "") - (match_operand 2 "" "")])] - "" -{ - int i; - - emit_call_insn (gen_call (operands[0], const0_rtx)); - - for (i = 0; i < XVECLEN (operands[2], 0); i++) - { - rtx set = XVECEXP (operands[2], 0, i); - emit_move_insn (SET_DEST (set), SET_SRC (set)); - } - - /* The optimizer does not know that the call sets the function value - registers we stored in the result block. We avoid problems by - claiming that all hard registers are used and clobbered at this - point. */ - emit_insn (gen_blockage ()); - - DONE; -}) - -;; 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 "blockage" - [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)] - "" - "pseudo" - [(set_attr "type" "nothing") - (set_attr "length" "0")]) - -;; Internal expanders to prevent memory ops from moving around frame -;; allocation/deallocation. -;; -;; TODO: really this clobber should just clobber the frame memory. Is -;; this possibly by clobbering memory @ the sp reg (as alpha does?) -;; or by explicitly setting the alias set to the frame? -(define_insn "sp_adjust" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (plus:DI - (match_operand:DI 1 "register_operand" "%r,r,r") - (match_operand:DI 2 "add_operand" "r,I,JT"))) - (clobber (mem:BLK (scratch)))] - "" - "@ - add\t%0, %1, %2 - addi\t%0, %1, %2 - addli\t%0, %1, %H2" - [(set_attr "type" "*,*,X01")]) - -(define_insn "sp_adjust_32bit" - [(set (match_operand:SI 0 "register_operand" "=r,r,r") - (plus:SI - (match_operand:SI 1 "register_operand" "%r,r,r") - (match_operand:SI 2 "add_operand" "r,I,JT"))) - (clobber (mem:BLK (scratch)))] - "" - "@ - addx\t%0, %1, %2 - addxi\t%0, %1, %2 - addxli\t%0, %1, %H2" - [(set_attr "type" "*,*,X01")]) - -;; Used for move sp, r52, to pop a stack frame. We need to make sure -;; that stack frame memory operations have been issued before we do -;; this. TODO: see above TODO. -(define_insn "sp_restore" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (match_operand:I48MODE 1 "register_operand" "r")) - (clobber (mem:BLK (scratch)))] - "" - "move\t%0, %1") - -(define_insn "nop" - [(const_int 0)] - "" - "nop" - [(set_attr "type" "Y01")]) - -(define_insn "trap" - [(trap_if (const_int 1) (const_int 0))] - "" - "raise; moveli zero, 6" - [(set_attr "type" "cannot_bundle")]) - - -;; -;; Conditional branches -;; - -(define_expand "cbranch4" - [(set (pc) - (if_then_else (match_operator 0 "ordered_comparison_operator" - [(match_operand:FI48MODE 1 "reg_or_cint_operand") - (match_operand:FI48MODE 2 "reg_or_cint_operand")]) - (label_ref (match_operand 3 "")) - (pc)))] - "" -{ - tilegx_emit_conditional_branch (operands, GET_MODE (operands[1])); - DONE; -}) - -(define_insn "*bcc_normal" - [(set (pc) - (if_then_else - (match_operator 1 "signed_comparison_operator" - [(match_operand:I48MODE 2 "reg_or_0_operand" "rO") - (const_int 0)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - { return tilegx_output_cbranch (insn, operands, false); } - [(set_attr "type" "X1_branch")]) - -(define_insn "*bcc_reverse" - [(set (pc) - (if_then_else - (match_operator 1 "signed_comparison_operator" - [(match_operand:I48MODE 2 "reg_or_0_operand" "rO") - (const_int 0)]) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - { return tilegx_output_cbranch (insn, operands, true); } - [(set_attr "type" "X1_branch")]) - -(define_insn "*blbs_normal" - [(set (pc) - (if_then_else - (ne (zero_extract:I48MODE - (match_operand:I48MODE 1 "reg_or_0_operand" "rO") - (const_int 1) - (const_int 0)) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - { return tilegx_output_cbranch_with_opcode (insn, operands, "blbs", "blbc", - 1); } - [(set_attr "type" "X1_branch")]) - -(define_insn "*blbc_normal" - [(set (pc) - (if_then_else - (eq (zero_extract:I48MODE - (match_operand:I48MODE 1 "reg_or_0_operand" "rO") - (const_int 1) - (const_int 0)) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - { return tilegx_output_cbranch_with_opcode (insn, operands, "blbc", "blbs", - 1); } - [(set_attr "type" "X1_branch")]) - -;; Note that __insn_mf() expands to this. -(define_expand "memory_barrier" - [(set (match_dup 0) - (unspec_volatile:BLK [(match_dup 0)] UNSPEC_MF))] - "" -{ - operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); - MEM_VOLATILE_P (operands[0]) = 1; -}) - -(define_insn "*memory_barrier" - [(set (match_operand:BLK 0 "" "") - (unspec_volatile:BLK [(match_dup 0)] UNSPEC_MF))] - "" - "mf" - [(set_attr "type" "X1")]) - -(define_insn "prefetch" - [(prefetch (match_operand 0 "address_operand" "rO") - (match_operand 1 "const_int_operand" "") - (match_operand 2 "const_int_operand" ""))] - "" -{ - switch (INTVAL (operands[2])) - { - case 0: - case 1: return "prefetch_l3\t%r0"; - case 2: return "prefetch_l2\t%r0"; - case 3: return "prefetch_l1\t%r0"; - default: gcc_unreachable (); - } -} - [(set_attr "type" "Y2")]) - - -;; -;; "__insn" Intrinsics (some expand directly to normal patterns above). -;; - -(define_insn "insn_bfexts" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "u6bit_cint_operand" "n") - (match_operand:DI 3 "u6bit_cint_operand" "n")] - UNSPEC_INSN_BFEXTS))] - "" - "bfexts\t%0, %r1, %2, %3" - [(set_attr "type" "X0")]) - -(define_insn "insn_bfextu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "u6bit_cint_operand" "n") - (match_operand:DI 3 "u6bit_cint_operand" "n")] - UNSPEC_INSN_BFEXTU))] - "" - "bfextu\t%0, %r1, %2, %3" - [(set_attr "type" "X0")]) - -(define_insn "insn_bfins" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "u6bit_cint_operand" "n") - (match_operand:DI 4 "u6bit_cint_operand" "n")] - UNSPEC_INSN_BFINS))] - "" - "bfins\t%0, %r2, %3, %4" - [(set_attr "type" "X0")]) - -(define_insn "insn_cmpexch" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (mem:I48MODE (match_operand 1 "pointer_operand" "rO"))) - (set (mem:I48MODE (match_dup 1)) - (unspec_volatile:I48MODE - [(mem:I48MODE (match_dup 1)) - (reg:I48MODE TILEGX_CMPEXCH_REG) - (match_operand:I48MODE 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CMPEXCH))] - "" - "cmpexch\t%0, %r1, %r2" - [(set_attr "type" "X1_remote")]) - -(define_insn "insn_cmul" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CMUL))] - "" - "cmul\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_cmula" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CMULA))] - "" - "cmula\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_cmulaf" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CMULAF))] - "" - "cmulaf\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_cmulf" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CMULF))] - "" - "cmulf\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_cmulfr" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CMULFR))] - "" - "cmulfr\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_cmulh" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CMULH))] - "" - "cmulh\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_cmulhr" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CMULHR))] - "" - "cmulhr\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_crc32_32" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CRC32_32))] - "" - "crc32_32\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_crc32_8" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CRC32_8))] - "" - "crc32_8\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_dblalign" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand 3 "pointer_operand" "rO")] - UNSPEC_INSN_DBLALIGN))] - "" - "dblalign\t%0, %r2, %r3" - [(set_attr "type" "X0")]) - -(define_insn "insn_dblalign2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_DBLALIGN2))] - "" - "dblalign2\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "insn_dblalign4" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_DBLALIGN4))] - "" - "dblalign4\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "insn_dblalign6" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_DBLALIGN6))] - "" - "dblalign6\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "insn_dtlbpr" - [(unspec_volatile:VOID [(match_operand:DI 0 "reg_or_0_operand" "rO")] - UNSPEC_INSN_DTLBPR)] - "" - "dtlbpr\t%r0" - [(set_attr "type" "X1")]) - -(define_insn "insn_exch" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (mem:I48MODE (match_operand 1 "pointer_operand" "rO"))) - (set (mem:I48MODE (match_dup 1)) - (unspec_volatile:I48MODE - [(match_operand:I48MODE 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_EXCH))] - "" - "exch\t%0, %r1, %r2" - [(set_attr "type" "X1_remote")]) - -(define_insn "insn_fdouble_add_flags" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FDOUBLE_ADD_FLAGS))] - "" - "fdouble_add_flags\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fdouble_addsub" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FDOUBLE_ADDSUB))] - "" - "fdouble_addsub\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fdouble_mul_flags" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FDOUBLE_MUL_FLAGS))] - "" - "fdouble_mul_flags\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fdouble_pack1" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FDOUBLE_PACK1))] - "" - "fdouble_pack1\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fdouble_pack2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FDOUBLE_PACK2))] - "" - "fdouble_pack2\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fdouble_sub_flags" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FDOUBLE_SUB_FLAGS))] - "" - "fdouble_sub_flags\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fdouble_unpack_max" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FDOUBLE_UNPACK_MAX))] - "" - "fdouble_unpack_max\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fdouble_unpack_min" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FDOUBLE_UNPACK_MIN))] - "" - "fdouble_unpack_min\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fetchadd" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec_volatile:I48MODE - [(mem:I48MODE (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_ATOMIC)) - (set (mem:I48MODE (match_dup 1)) - (plus:I48MODE (mem:I48MODE (match_dup 1)) - (match_operand:I48MODE 2 "reg_or_0_operand" "rO")))] - "" - "fetchadd\t%0, %r1, %r2" - [(set_attr "type" "X1_remote")]) - -(define_insn "insn_fetchaddgez" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec_volatile:I48MODE - [(mem:I48MODE (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_ATOMIC)) - (set (mem:I48MODE (match_dup 1)) - (unspec:I48MODE [(match_operand:I48MODE 2 "reg_or_0_operand" "rO") - (mem:I48MODE (match_dup 1))] - UNSPEC_INSN_FETCHADDGEZ))] - "" - "fetchaddgez\t%0, %r1, %r2" - [(set_attr "type" "X1_remote")]) - -(define_insn "insn_fetchand" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec_volatile:I48MODE - [(mem:I48MODE (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_ATOMIC)) - (set (mem:I48MODE (match_dup 1)) - (and:I48MODE (mem:I48MODE (match_dup 1)) - (match_operand:I48MODE 2 "reg_or_0_operand" "rO")))] - "" - "fetchand\t%0, %r1, %r2" - [(set_attr "type" "X1_remote")]) - -(define_insn "insn_fetchor" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (unspec_volatile:I48MODE - [(mem:I48MODE (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_ATOMIC)) - (set (mem:I48MODE (match_dup 1)) - (ior:I48MODE (mem:I48MODE (match_dup 1)) - (match_operand:I48MODE 2 "reg_or_0_operand" "rO")))] - "" - "fetchor\t%0, %r1, %r2" - [(set_attr "type" "X1_remote")]) - -(define_insn "insn_finv" - [(unspec_volatile:VOID [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_INSN_FINV)] - "" - "finv\t%r0" - [(set_attr "type" "X1")]) - -(define_insn "insn_flush" - [(unspec_volatile:VOID [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_INSN_FLUSH)] - "" - "flush\t%r0" - [(set_attr "type" "X1")]) - -(define_insn "insn_flushwb" - [(unspec_volatile:VOID [(const_int 0)] UNSPEC_INSN_FLUSHWB)] - "" - "flushwb" - [(set_attr "type" "X1")]) - -(define_insn "insn_fnop" - [(unspec_volatile:VOID [(const_int 0)] UNSPEC_INSN_FNOP)] - "" - "fnop") - -(define_insn "insn_fsingle_add1" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FSINGLE_ADD1))] - "" - "fsingle_add1\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_fsingle_addsub2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FSINGLE_ADDSUB2))] - "" - "fsingle_addsub2\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fsingle_mul1" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FSINGLE_MUL1))] - "" - "fsingle_mul1\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_fsingle_mul2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FSINGLE_MUL2))] - "" - "fsingle_mul2\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fsingle_pack1" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FSINGLE_PACK1))] - "" - "fsingle_pack1\t%0, %r1" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_fsingle_pack2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FSINGLE_PACK2))] - "" - "fsingle_pack2\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_fsingle_sub1" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FSINGLE_SUB1))] - "" - "fsingle_sub1\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_drain" - [(unspec_volatile:VOID [(const_int 0)] UNSPEC_INSN_DRAIN)] - "" - "drain" - [(set_attr "type" "cannot_bundle")]) - -(define_insn "insn_icoh" - [(unspec_volatile:VOID [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_INSN_ICOH)] - "" - "icoh\t%r0" - [(set_attr "type" "X1")]) - -(define_insn "insn_ill" - [(unspec_volatile:VOID [(const_int 0)] UNSPEC_INSN_ILL)] - "" - "ill" - [(set_attr "type" "cannot_bundle")]) - -(define_insn "insn_info" - [(unspec_volatile:VOID [(match_operand:DI 0 "s8bit_cint_operand" "i")] - UNSPEC_INSN_INFO)] - "" - "info\t%0") - -(define_insn "insn_infol" - [(unspec_volatile:VOID [(match_operand:DI 0 "s16bit_cint_operand" "i")] - UNSPEC_INSN_INFOL)] - "" - "infol\t%0" - [(set_attr "type" "X01")]) - -(define_insn "insn_inv" - [(unspec_volatile:VOID [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_INSN_INV)] - "" - "inv\t%r0" - [(set_attr "type" "X1")]) - -;; loads - -(define_expand "insn_ld" - [(set (match_operand:DI 0 "register_operand" "") - (mem:DI (match_operand 1 "pointer_operand" "")))] - "") - -(define_insn "insn_ld_add" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (mem:DI (match_dup 3)))] - "" - "ld_add\t%0, %1, %2" - [(set_attr "type" "X1_2cycle")]) - -(define_insn "insn_ldna" - [(set (match_operand:DI 0 "register_operand" "=r") - (mem:DI (and:DI (match_operand 1 "pointer_operand" "rO") - (const_int -8))))] - "" - "ldna\t%0, %r1" - [(set_attr "type" "X1_2cycle")]) - -(define_insn "insn_ldna_add" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (mem:DI (and:DI (match_dup 3) (const_int -8))))] - "" - "ldna_add\t%0, %1, %2" - [(set_attr "type" "X1_2cycle")]) - -(define_expand "insn_ld" - [(set (match_operand:DI 0 "register_operand" "") - (any_extend:DI - (mem:I124MODE (match_operand 1 "pointer_operand" ""))))] - "") - -(define_insn "insn_ld_add" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI (mem:I124MODE (match_dup 3))))] - "" - "ld_add\t%0, %1, %2" - [(set_attr "type" "X1_2cycle")]) - -;; non temporal loads - -(define_insn "insn_ldnt" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_NON_TEMPORAL))] - "" - "ldnt\t%0, %r1" - [(set_attr "type" "X1_2cycle")]) - -(define_insn "insn_ldnt_add" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (match_dup 3))] - UNSPEC_NON_TEMPORAL))] - "" - "ldnt_add\t%0, %1, %2" - [(set_attr "type" "X1_2cycle")]) - -(define_insn "insn_ldnt" - [(set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI - (unspec:I124MODE - [(mem:I124MODE (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_NON_TEMPORAL)))] - "" - "ldnt\t%0, %r1" - [(set_attr "type" "X1_2cycle")]) - -(define_insn "insn_ldnt_add" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI (unspec:I124MODE [(mem:I124MODE (match_dup 3))] - UNSPEC_NON_TEMPORAL)))] - "" - "ldnt_add\t%0, %1, %2" - [(set_attr "type" "X1_2cycle")]) - -;; L2 hits - -(define_insn "insn_ld_L2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_LATENCY_L2))] - "" - "ld\t%0, %r1" - [(set_attr "type" "Y2_L2")]) - -(define_insn "insn_ld_add_L2" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (match_dup 3))] - UNSPEC_LATENCY_L2))] - "" - "ld_add\t%0, %1, %2" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_ldna_L2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (and:DI (match_operand 1 "pointer_operand" "rO") - (const_int -8)))] - UNSPEC_LATENCY_L2))] - "" - "ldna\t%0, %r1" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_ldna_add_L2" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (and:DI (match_dup 3) (const_int -8)))] - UNSPEC_LATENCY_L2))] - "" - "ldna_add\t%0, %1, %2" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_ld_L2" - [(set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI - (unspec:I124MODE - [(mem:I124MODE (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_LATENCY_L2)))] - "" - "ld\t%0, %r1" - [(set_attr "type" "Y2_L2")]) - -(define_insn "insn_ld_add_L2" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI (unspec:I124MODE [(mem:I124MODE (match_dup 3))] - UNSPEC_LATENCY_L2)))] - "" - "ld_add\t%0, %1, %2" - [(set_attr "type" "X1_L2")]) - -;; L2 hits, non temporal loads - -(define_insn "insn_ldnt_L2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(unspec:DI - [(mem:DI (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_NON_TEMPORAL)] - UNSPEC_LATENCY_L2))] - "" - "ldnt\t%0, %r1" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_ldnt_add_L2" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(unspec:DI - [(mem:DI (match_dup 3))] - UNSPEC_NON_TEMPORAL)] - UNSPEC_LATENCY_L2))] - "" - "ldnt_add\t%0, %1, %2" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_ldnt_L2" - [(set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI - (unspec:I124MODE - [(unspec:I124MODE - [(mem:I124MODE (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_NON_TEMPORAL)] - UNSPEC_LATENCY_L2)))] - "" - "ldnt\t%0, %r1" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_ldnt_add_L2" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI - (unspec:I124MODE [(unspec:I124MODE - [(mem:I124MODE (match_dup 3))] - UNSPEC_NON_TEMPORAL)] - UNSPEC_LATENCY_L2)))] - "" - "ldnt_add\t%0, %1, %2" - [(set_attr "type" "X1_L2")]) - -;; L2 miss - -(define_insn "insn_ld_miss" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_LATENCY_MISS))] - "" - "ld\t%0, %r1" - [(set_attr "type" "Y2_miss")]) - -(define_insn "insn_ld_add_miss" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (match_dup 3))] - UNSPEC_LATENCY_MISS))] - "" - "ld_add\t%0, %1, %2" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_ldna_miss" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (and:DI (match_operand 1 "pointer_operand" "rO") - (const_int -8)))] - UNSPEC_LATENCY_MISS))] - "" - "ldna\t%0, %r1" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_ldna_add_miss" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(mem:DI (and:DI (match_dup 3) (const_int -8)))] - UNSPEC_LATENCY_MISS))] - "" - "ldna_add\t%0, %1, %2" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_ld_miss" - [(set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI - (unspec:I124MODE - [(mem:I124MODE (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_LATENCY_MISS)))] - "" - "ld\t%0, %r1" - [(set_attr "type" "Y2_miss")]) - -(define_insn "insn_ld_add_miss" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI (unspec:I124MODE [(mem:I124MODE (match_dup 3))] - UNSPEC_LATENCY_MISS)))] - "" - "ld_add\t%0, %1, %2" - [(set_attr "type" "X1_miss")]) - -;; L2 miss, non temporal loads - -(define_insn "insn_ldnt_miss" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(unspec:DI - [(mem:DI (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_NON_TEMPORAL)] - UNSPEC_LATENCY_MISS))] - "" - "ldnt\t%0, %r1" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_ldnt_add_miss" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(unspec:DI - [(mem:DI (match_dup 3))] - UNSPEC_NON_TEMPORAL)] - UNSPEC_LATENCY_MISS))] - "" - "ldnt_add\t%0, %1, %2" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_ldnt_miss" - [(set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI - (unspec:I124MODE - [(unspec:I124MODE - [(mem:I124MODE (match_operand 1 "pointer_operand" "rO"))] - UNSPEC_NON_TEMPORAL)] - UNSPEC_LATENCY_MISS)))] - "" - "ldnt\t%0, %r1" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_ldnt_add_miss" - [(set (match_operand:I48MODE 1 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "1") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (match_operand:DI 0 "register_operand" "=r") - (any_extend:DI - (unspec:I124MODE [(unspec:I124MODE - [(mem:I124MODE (match_dup 3))] - UNSPEC_NON_TEMPORAL)] - UNSPEC_LATENCY_MISS)))] - "" - "ldnt_add\t%0, %1, %2" - [(set_attr "type" "X1_miss")]) - -;; end loads - -(define_insn "insn_lnk" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(const_int 0)] UNSPEC_INSN_LNK))] - "" - "lnk\t%0" - [(set_attr "type" "Y1")]) - -(define_insn "insn_mfspr" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec_volatile:DI [(match_operand:DI 1 "u14bit_cint_operand" "i")] - UNSPEC_INSN_MFSPR)) - (clobber (mem:BLK (const_int 0)))] - "" - "mfspr\t%0, %1" - [(set_attr "type" "X1")]) - -(define_insn "insn_mtspr" - [(unspec_volatile:DI [(match_operand:DI 0 "u14bit_cint_operand" "i") - (match_operand:DI 1 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MTSPR) - (clobber (mem:BLK (const_int 0)))] - "" - "mtspr\t%0, %r1" - [(set_attr "type" "X1")]) - -(define_insn "insn_mm" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "u6bit_cint_operand" "i") - (match_operand:DI 4 "u6bit_cint_operand" "i")] - UNSPEC_INSN_MM))] - "" - "mm\t%0, %r2, %3, %4" - [(set_attr "type" "X0")]) - -(define_insn "insn_mul_hs_hs" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_HS_HS))] - "" - "mul_hs_hs\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mul_hs_hu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_HS_HU))] - "" - "mul_hs_hu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mul_hs_ls" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_HS_LS))] - "" - "mul_hs_ls\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mul_hs_lu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_HS_LU))] - "" - "mul_hs_lu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mul_hu_hu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_HU_HU))] - "" - "mul_hu_hu\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mul_hu_ls" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_HU_LS))] - "" - "mul_hu_ls\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mul_hu_lu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_HU_LU))] - "" - "mul_hu_lu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mul_ls_ls" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_LS_LS))] - "" - "mul_ls_ls\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mul_ls_lu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_LS_LU))] - "" - "mul_ls_lu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mul_lu_lu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MUL_LU_LU))] - "" - "mul_lu_lu\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mula_hs_hs" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_HS_HS))] - "" - "mula_hs_hs\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mula_hs_hu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_HS_HU))] - "" - "mula_hs_hu\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mula_hs_ls" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_HS_LS))] - "" - "mula_hs_ls\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mula_hs_lu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_HS_LU))] - "" - "mula_hs_lu\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mula_hu_hu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_HU_HU))] - "" - "mula_hu_hu\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mula_hu_ls" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_HU_LS))] - "" - "mula_hu_ls\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mula_hu_lu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_HU_LU))] - "" - "mula_hu_lu\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mula_ls_ls" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_LS_LS))] - "" - "mula_ls_ls\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mula_ls_lu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_LS_LU))] - "" - "mula_ls_lu\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mula_lu_lu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULA_LU_LU))] - "" - "mula_lu_lu\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mulax" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULAX))] - "" - "mulax\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_nap" - [(unspec_volatile:VOID [(const_int 0)] UNSPEC_INSN_NAP)] - "" - "nap" - [(set_attr "type" "cannot_bundle")]) - -(define_insn "insn_nor_" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (and:I48MODE - (not:I48MODE (match_operand:I48MODE 1 "reg_or_0_operand" "rO")) - (not:I48MODE (match_operand:I48MODE 2 "reg_or_0_operand" "rO"))))] - "" - "nor\t%0, %r1, %r2") - -(define_expand "insn_prefetch_l1" - [(prefetch (match_operand 0 "pointer_operand" "") - (const_int 0) - (const_int 3))] - "") - -(define_expand "insn_prefetch_l2" - [(prefetch (match_operand 0 "pointer_operand" "") - (const_int 0) - (const_int 2))] - "") - -(define_expand "insn_prefetch_l3" - [(prefetch (match_operand 0 "pointer_operand" "") - (const_int 0) - (const_int 1))] - "") - -(define_insn "insn_prefetch_l1_fault" - [(unspec_volatile:VOID [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_INSN_PREFETCH_L1_FAULT)] - "" - "prefetch_l1_fault\t%r0" - [(set_attr "type" "Y2")]) - -(define_insn "insn_prefetch_l2_fault" - [(unspec_volatile:VOID [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_INSN_PREFETCH_L2_FAULT)] - "" - "prefetch_l2_fault\t%r0" - [(set_attr "type" "Y2")]) - -(define_insn "insn_prefetch_l3_fault" - [(unspec_volatile:VOID [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_INSN_PREFETCH_L3_FAULT)] - "" - "prefetch_l3_fault\t%r0" - [(set_attr "type" "Y2")]) - -(define_insn "insn_revbits" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO")] - UNSPEC_INSN_REVBITS))] - "" - "revbits\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "insn_shl1add" - [(set (match_operand:DI 0 "register_operand" "=r") - (plus:DI (mult:DI (match_operand:DI 1 "reg_or_0_operand" "rO") - (const_int 2)) - (match_operand:DI 2 "reg_or_0_operand" "rO")))] - "" - "shl1add\t%0, %r1, %r2") - -(define_insn "insn_shl1addx" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (mult:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (const_int 2)) - (match_operand:SI 2 "reg_or_0_operand" "rO")))] - "" - "shl1addx\t%0, %r1, %r2") - -(define_insn "insn_shl2add" - [(set (match_operand:DI 0 "register_operand" "=r") - (plus:DI (mult:DI (match_operand:DI 1 "reg_or_0_operand" "rO") - (const_int 4)) - (match_operand:DI 2 "reg_or_0_operand" "rO")))] - "" - "shl2add\t%0, %r1, %r2") - -(define_insn "insn_shl2addx" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (mult:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (const_int 4)) - (match_operand:SI 2 "reg_or_0_operand" "rO")))] - "" - "shl2addx\t%0, %r1, %r2") - -(define_insn "insn_shl3add" - [(set (match_operand:DI 0 "register_operand" "=r") - (plus:DI (mult:DI (match_operand:DI 1 "reg_or_0_operand" "rO") - (const_int 8)) - (match_operand:DI 2 "reg_or_0_operand" "rO")))] - "" - "shl3add\t%0, %r1, %r2") - -(define_insn "insn_shl3addx" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (mult:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (const_int 8)) - (match_operand:SI 2 "reg_or_0_operand" "rO")))] - "" - "shl3addx\t%0, %r1, %r2") - -(define_insn "insn_shufflebytes" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SHUFFLEBYTES))] - "" - "shufflebytes\t%0, %r2, %r3" - [(set_attr "type" "X0")]) - -(define_insn "insn_shufflebytes1" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SHUFFLEBYTES))] - "" - "shufflebytes\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -;; stores - -(define_expand "insn_st" - [(set (mem:DI (match_operand 0 "pointer_operand" "")) - (match_operand:DI 1 "reg_or_0_operand" ""))] - "") - -(define_insn "insn_st_add" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "0") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (mem:DI (match_dup 3)) - (match_operand:DI 1 "reg_or_0_operand" "rO"))] - "" - "st_add\t%0, %r1, %2" - [(set_attr "type" "X1")]) - -(define_expand "insn_st" - [(set (mem:I124MODE (match_operand 0 "pointer_operand" "")) - (match_operand:DI 1 "reg_or_0_operand" ""))] - "" -{ - operands[1] = simplify_gen_subreg (mode, operands[1], DImode, - BYTES_BIG_ENDIAN - ? UNITS_PER_WORD - : 0); -}) - -(define_expand "insn_st_add" - [(parallel - [(set (match_operand:I48MODE 0 "register_operand" "") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "") - (match_operand:I48MODE 2 "s8bit_cint_operand" ""))) - (set (mem:I124MODE (match_dup 3)) - (match_operand:DI 1 "reg_or_0_operand" ""))])] - "" -{ - operands[1] = simplify_gen_subreg (mode, operands[1], - DImode, - BYTES_BIG_ENDIAN - ? UNITS_PER_WORD - : 0); -}) - -(define_insn "*insn_st_add" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "0") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (mem:I124MODE (match_dup 3)) - (match_operand:I124MODE 1 "reg_or_0_operand" "rO"))] - "" - "st_add\t%0, %r1, %2" - [(set_attr "type" "X1")]) - -;; non-temporal stores - -(define_insn "insn_stnt" - [(set (mem:DI (unspec [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_NON_TEMPORAL)) - (match_operand:DI 1 "reg_or_0_operand" "rO"))] - "" - "stnt\t%0, %r1" - [(set_attr "type" "X1")]) - -(define_insn "insn_stnt_add" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "0") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (mem:DI (unspec:I48MODE [(match_dup 3)] UNSPEC_NON_TEMPORAL)) - (match_operand:DI 1 "reg_or_0_operand" "rO"))] - "" - "stnt_add\t%0, %r1, %2" - [(set_attr "type" "X1")]) - -(define_expand "insn_stnt" - [(set (mem:I124MODE (unspec [(match_operand 0 "pointer_operand" "")] - UNSPEC_NON_TEMPORAL)) - (match_operand:DI 1 "reg_or_0_operand" ""))] - "" -{ - operands[1] = simplify_gen_subreg (mode, operands[1], DImode, - BYTES_BIG_ENDIAN - ? UNITS_PER_WORD - : 0); -}) - -(define_insn "*insn_stnt" - [(set (mem:I124MODE (unspec [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_NON_TEMPORAL)) - (match_operand:I124MODE 1 "reg_or_0_operand" "rO"))] - "" - "stnt\t%0, %r1" - [(set_attr "type" "X1")]) - -(define_expand "insn_stnt_add" - [(parallel - [(set (match_operand:I48MODE 0 "register_operand" "") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "") - (match_operand:I48MODE 2 "s8bit_cint_operand" ""))) - (set (mem:I124MODE (unspec:I48MODE [(match_dup 3)] UNSPEC_NON_TEMPORAL)) - (match_operand:DI 1 "reg_or_0_operand" "rO"))])] - "" -{ - operands[1] = simplify_gen_subreg (mode, operands[1], - DImode, - BYTES_BIG_ENDIAN - ? UNITS_PER_WORD - : 0); -}) - -(define_insn "*insn_stnt_add" - [(set (match_operand:I48MODE 0 "register_operand" "=r") - (plus:I48MODE (match_operand:I48MODE 3 "register_operand" "0") - (match_operand:I48MODE 2 "s8bit_cint_operand" "i"))) - (set (mem:I124MODE (unspec:I48MODE [(match_dup 3)] UNSPEC_NON_TEMPORAL)) - (match_operand:I124MODE 1 "reg_or_0_operand" "rO"))] - "" - "stnt_add\t%0, %r1, %2" - [(set_attr "type" "X1")]) - -;; end stores - -(define_insn "insn_tblidxb0" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_TBLIDXB0))] - "" - "tblidxb0\t%0, %r2" - [(set_attr "type" "Y0")]) - -(define_insn "insn_tblidxb1" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_TBLIDXB1))] - "" - "tblidxb1\t%0, %r2" - [(set_attr "type" "Y0")]) - -(define_insn "insn_tblidxb2" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_TBLIDXB2))] - "" - "tblidxb2\t%0, %r2" - [(set_attr "type" "Y0")]) - -(define_insn "insn_tblidxb3" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_TBLIDXB3))] - "" - "tblidxb3\t%0, %r2" - [(set_attr "type" "Y0")]) - -;; insn_v1add -;; insn_v1addi -;; insn_v1cmpeq -;; insn_v1cmpeqi -;; insn_v1cmplts -;; insn_v1cmpltsi -;; insn_v1cmpltu -;; insn_v1cmpltui -;; insn_v1maxu -;; insn_v1maxui -;; insn_v1minu -;; insn_v1minui -(define_insn "v8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=r,r") - (v1op_immed:V8QI - (match_operand:V8QI 1 "reg_or_0_operand" "rO,rO") - (match_operand:V8QI 2 "reg_or_v8s8bit_operand" "W,rO")))] - "" - "@ - v1i\t%0, %r1, %j2 - v1\t%0, %r1, %r2" - [(set_attr "type" ",")]) - -(define_expand "insn_v1" - [(set (match_operand:DI 0 "register_operand" "") - (v1op_immed:V8QI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_v8qi3, V8QImode, operands[0], - V8QImode, operands[1], operands[2], true); - DONE; -}) - -(define_expand "insn_v1i" - [(set (match_operand:DI 0 "register_operand" "") - (v1op_immed:V8QI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "s8bit_cint_operand" "")))] - "" -{ - /* Tile out immediate and expand to general case. */ - rtx n = tilegx_simd_int (operands[2], QImode); - tilegx_expand_builtin_vector_binop (gen_v8qi3, V8QImode, operands[0], - V8QImode, operands[1], n, true); - DONE; -}) - -;; insn_v1shl -;; insn_v1shli -;; insn_v1shrs -;; insn_v1shrsi -;; insn_v1shru -;; insn_v1shrui -(define_insn "v8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=r,r") - (any_shift:V8QI - (match_operand:V8QI 1 "reg_or_0_operand" "rO,rO") - (match_operand:DI 2 "reg_or_u5bit_operand" "I,rO")))] - "" - "@ - v1i\t%0, %r1, %2 - v1\t%0, %r1, %r2" - [(set_attr "type" ",")]) - -(define_expand "insn_v1" - [(set (match_operand:DI 0 "register_operand" "") - (any_shift:V8QI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_u5bit_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_v8qi3, V8QImode, operands[0], - V8QImode, operands[1], operands[2], false); - DONE; -}) - -;; insn_v2add -;; insn_v2addi -;; insn_v2maxs -;; insn_v2maxsi -;; insn_v2mins -;; insn_v2minsi -;; insn_v2cmpeq -;; insn_v2cmpeqi -;; insn_v2cmplts -;; insn_v2cmpltsi -;; insn_v2cmpltu -;; insn_v2cmpltui -(define_insn "v4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=r,r") - (v2op_immed:V4HI - (match_operand:V4HI 1 "reg_or_0_operand" "rO,rO") - (match_operand:V4HI 2 "reg_or_v4s8bit_operand" "Y,rO")))] - "" - "@ - v2i\t%0, %r1, %j2 - v2\t%0, %r1, %r2" - [(set_attr "type" ",")]) - -(define_expand "insn_v2" - [(set (match_operand:DI 0 "register_operand" "") - (v2op_immed:V4HI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_v4hi3, V4HImode, operands[0], - V4HImode, operands[1], operands[2], true); - DONE; -}) - -(define_expand "insn_v2i" - [(set (match_operand:DI 0 "register_operand" "") - (v2op_immed:V4HI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "s8bit_cint_operand" "")))] - "" -{ - /* Tile out immediate and expand to general case. */ - rtx n = tilegx_simd_int (operands[2], HImode); - tilegx_expand_builtin_vector_binop (gen_v4hi3, V4HImode, operands[0], - V4HImode, operands[1], n, true); - DONE; -}) - -;; insn_v2shl -;; insn_v2shli -;; insn_v2shrs -;; insn_v2shrsi -;; insn_v2shru -;; insn_v2shrui -(define_insn "v4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=r,r") - (any_shift:V4HI - (match_operand:V4HI 1 "reg_or_0_operand" "rO,rO") - (match_operand:DI 2 "reg_or_u5bit_operand" "I,rO")))] - "" - "@ - v2i\t%0, %r1, %2 - v2\t%0, %r1, %r2" - [(set_attr "type" ",")]) - -(define_expand "insn_v2" - [(set (match_operand:DI 0 "register_operand" "") - (any_shift:V4HI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_u5bit_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_v4hi3, V4HImode, operands[0], - V4HImode, operands[1], operands[2], false); - DONE; -}) - -;; insn_v1adduc -;; insn_v1subuc -;; insn_v1sub -;; insn_v1cmpne -;; insn_v1cmples -;; insn_v1cmpleu -;; insn_v1multu -(define_insn "v8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (v1op:V8QI - (match_operand:V8QI 1 "reg_or_0_operand" "rO") - (match_operand:V8QI 2 "reg_or_0_operand" "rO")))] - "" - "v1\t%0, %r1, %r2" - [(set_attr "type" "")]) - -(define_expand "insn_v1" - [(set (match_operand:DI 0 "register_operand" "") - (v1op:V8QI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_v8qi3, V8QImode, operands[0], - V8QImode, operands[1], operands[2], true); - DONE; -}) - -;; insn_v2addsc -;; insn_v2subsc -;; insn_v2sub -;; insn_v2cmpne -;; insn_v2cmples -;; insn_v2cmpleu -(define_insn "v4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (v2op:V4HI - (match_operand:V4HI 1 "reg_or_0_operand" "rO") - (match_operand:V4HI 2 "reg_or_0_operand" "rO")))] - "" - "v2\t%0, %r1, %r2" - [(set_attr "type" "")]) - -(define_expand "insn_v2" - [(set (match_operand:DI 0 "register_operand" "") - (v2op:V4HI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_v4hi3, V4HImode, operands[0], - V4HImode, operands[1], operands[2], true); - DONE; -}) - -;; insn_v2mults -(define_insn "mulv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (mult:V4HI - (match_operand:V4HI 1 "reg_or_0_operand" "%rO") - (match_operand:V4HI 2 "reg_or_0_operand" "rO")))] - "" - "v2mults\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_expand "insn_v2mults" - [(set (match_operand:DI 0 "register_operand" "") - (mult:V4HI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_mulv4hi3, V4HImode, operands[0], - V4HImode, operands[1], operands[2], true); - DONE; -}) - -;; insn_v2shlsc -(define_insn "v4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (v2shift:V4HI - (match_operand:V4HI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")))] - "" - "v2\t%0, %r1, %r2" - [(set_attr "type" "")]) - -(define_expand "insn_v2" - [(set (match_operand:DI 0 "register_operand" "") - (v2shift:V4HI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_v4hi3, V4HImode, operands[0], - V4HImode, operands[1], operands[2], false); - DONE; -}) - -;; insn_v4addsc -;; insn_v4subsc -;; insn_v4add -;; insn_v4sub -(define_insn "v2si3" - [(set (match_operand:V2SI 0 "register_operand" "=r") - (v4op:V2SI - (match_operand:V2SI 1 "reg_or_0_operand" "rO") - (match_operand:V2SI 2 "reg_or_0_operand" "rO")))] - "" - "v4\t%0, %r1, %r2" - [(set_attr "type" "")]) - -(define_expand "insn_v4" - [(set (match_operand:DI 0 "register_operand" "") - (v4op:V2SI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_v2si3, V2SImode, operands[0], - V2SImode, operands[1], operands[2], true); - DONE; -}) - -;; insn_v4shl -;; insn_v4shrs -;; insn_v4shru -;; insn_v4shlsc -(define_insn "v2si3" - [(set (match_operand:V2SI 0 "register_operand" "=r") - (v4shift:V2SI - (match_operand:V2SI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")))] - "" - "v4\t%0, %r1, %r2" - [(set_attr "type" "")]) - -(define_expand "insn_v4" - [(set (match_operand:DI 0 "register_operand" "") - (v4shift:V2SI - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_v2si3, V2SImode, operands[0], - V2SImode, operands[1], operands[2], false); - DONE; -}) - -;; Byte ordering of these vectors is endian dependent. gcc concats -;; right-to-left for little endian, and left-to-right for big endian. -;; So we need different patterns that depend on endianness. Our -;; instructions concat and interleave the way a big-endian target would -;; work in gcc, so for little endian, we need to reverse the source -;; operands. - -;; insn_v1int_h -;; {B7,B6,B5,B4,B3,B2,B1,B0} {A7,A6,A5,A4,A3,A2,A1,A0} -;; => {A7,A6,A5,A4,A3,A2,A1,A0,B7,B6,B5,B4,B3,B2,B1,B0} -;; => {A7,B7,A6,B6,A5,B5,A4,B4} -(define_expand "vec_interleave_highv8qi" - [(match_operand:V8QI 0 "register_operand" "") - (match_operand:V8QI 1 "reg_or_0_operand" "") - (match_operand:V8QI 2 "reg_or_0_operand" "")] - "" -{ - if (BYTES_BIG_ENDIAN) - emit_insn (gen_vec_interleave_highv8qi_be (operands[0], operands[1], - operands[2])); - else - emit_insn (gen_vec_interleave_highv8qi_le (operands[0], operands[1], - operands[2])); - DONE; -}) - -(define_insn "vec_interleave_highv8qi_be" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (vec_select:V8QI - (vec_concat:V16QI (match_operand:V8QI 1 "reg_or_0_operand" "rO") - (match_operand:V8QI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 0) (const_int 8) - (const_int 1) (const_int 9) - (const_int 2) (const_int 10) - (const_int 3) (const_int 11)])))] - "BYTES_BIG_ENDIAN" - "v1int_h\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "vec_interleave_highv8qi_le" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (vec_select:V8QI - (vec_concat:V16QI (match_operand:V8QI 1 "reg_or_0_operand" "rO") - (match_operand:V8QI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 4) (const_int 12) - (const_int 5) (const_int 13) - (const_int 6) (const_int 14) - (const_int 7) (const_int 15)])))] - "!BYTES_BIG_ENDIAN" - "v1int_h\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_v1int_h" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "" -{ - /* For little endian, our instruction interleaves opposite of the - way vec_interleave works, so we need to reverse the source - operands. */ - rtx opnd1 = BYTES_BIG_ENDIAN ? operands[1] : operands[2]; - rtx opnd2 = BYTES_BIG_ENDIAN ? operands[2] : operands[1]; - tilegx_expand_builtin_vector_binop (gen_vec_interleave_highv8qi, V8QImode, - operands[0], V8QImode, opnd1, opnd2, - true); - DONE; -}) - -;; insn_v1int_l -;; {B7,B6,B5,B4,B3,B2,B1,B0} {A7,A6,A5,A4,A3,A2,A1,A0} -;; => {A7,A6,A5,A4,A3,A2,A1,A0,B7,B6,B5,B4,B3,B2,B1,B0} -;; => {A3,B3,A2,B2,A1,B1,A0,B0} -(define_expand "vec_interleave_lowv8qi" - [(match_operand:V8QI 0 "register_operand" "") - (match_operand:V8QI 1 "reg_or_0_operand" "") - (match_operand:V8QI 2 "reg_or_0_operand" "")] - "" -{ - if (BYTES_BIG_ENDIAN) - emit_insn (gen_vec_interleave_lowv8qi_be (operands[0], operands[1], - operands[2])); - else - emit_insn (gen_vec_interleave_lowv8qi_le (operands[0], operands[1], - operands[2])); - DONE; -}) - -(define_insn "vec_interleave_lowv8qi_be" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (vec_select:V8QI - (vec_concat:V16QI (match_operand:V8QI 1 "reg_or_0_operand" "rO") - (match_operand:V8QI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 4) (const_int 12) - (const_int 5) (const_int 13) - (const_int 6) (const_int 14) - (const_int 7) (const_int 15)])))] - "BYTES_BIG_ENDIAN" - "v1int_l\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "vec_interleave_lowv8qi_le" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (vec_select:V8QI - (vec_concat:V16QI (match_operand:V8QI 1 "reg_or_0_operand" "rO") - (match_operand:V8QI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 0) (const_int 8) - (const_int 1) (const_int 9) - (const_int 2) (const_int 10) - (const_int 3) (const_int 11)])))] - "!BYTES_BIG_ENDIAN" - "v1int_l\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_v1int_l" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "" -{ - /* For little endian, our instruction interleaves opposite of the - way vec_interleave works, so we need to reverse the source - operands. */ - rtx opnd1 = BYTES_BIG_ENDIAN ? operands[1] : operands[2]; - rtx opnd2 = BYTES_BIG_ENDIAN ? operands[2] : operands[1]; - tilegx_expand_builtin_vector_binop (gen_vec_interleave_lowv8qi, V8QImode, - operands[0], V8QImode, opnd1, opnd2, - true); - DONE; -}) - -;; insn_v2int_h -;; {B3,B2,B1,B0} {A3,A2,A1,A0} -;; => {A3,A2,A1,A0,B3,B2,B1,B0} -;; => {A3,B3,A2,B2} -(define_expand "vec_interleave_highv4hi" - [(match_operand:V4HI 0 "register_operand" "") - (match_operand:V4HI 1 "reg_or_0_operand" "") - (match_operand:V4HI 2 "reg_or_0_operand" "")] - "" -{ - if (BYTES_BIG_ENDIAN) - emit_insn (gen_vec_interleave_highv4hi_be (operands[0], operands[1], - operands[2])); - else - emit_insn (gen_vec_interleave_highv4hi_le (operands[0], operands[1], - operands[2])); - DONE; -}) - -(define_insn "vec_interleave_highv4hi_be" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (vec_select:V4HI - (vec_concat:V8HI (match_operand:V4HI 1 "reg_or_0_operand" "rO") - (match_operand:V4HI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 0) (const_int 4) - (const_int 1) (const_int 5)])))] - "BYTES_BIG_ENDIAN" - "v2int_h\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "vec_interleave_highv4hi_le" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (vec_select:V4HI - (vec_concat:V8HI (match_operand:V4HI 1 "reg_or_0_operand" "rO") - (match_operand:V4HI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 2) (const_int 6) - (const_int 3) (const_int 7)])))] - "!BYTES_BIG_ENDIAN" - "v2int_h\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_v2int_h" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "" -{ - /* For little endian, our instruction interleaves opposite of the - way vec_interleave works, so we need to reverse the source - operands. */ - rtx opnd1 = BYTES_BIG_ENDIAN ? operands[1] : operands[2]; - rtx opnd2 = BYTES_BIG_ENDIAN ? operands[2] : operands[1]; - tilegx_expand_builtin_vector_binop (gen_vec_interleave_highv4hi, V4HImode, - operands[0], V4HImode, opnd1, opnd2, - true); - DONE; -}) - -;; insn_v2int_l -;; {B3,B2,B1,B0} {A3,A2,A1,A0} -;; => {A3,A2,A1,A0,B3,B2,B1,B0} -;; => {A1,B1,A0,B0} -(define_expand "vec_interleave_lowv4hi" - [(match_operand:V4HI 0 "register_operand" "") - (match_operand:V4HI 1 "reg_or_0_operand" "") - (match_operand:V4HI 2 "reg_or_0_operand" "")] - "" -{ - if (BYTES_BIG_ENDIAN) - emit_insn (gen_vec_interleave_lowv4hi_be (operands[0], operands[1], - operands[2])); - else - emit_insn (gen_vec_interleave_lowv4hi_le (operands[0], operands[1], - operands[2])); - DONE; -}) - -(define_insn "vec_interleave_lowv4hi_be" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (vec_select:V4HI - (vec_concat:V8HI (match_operand:V4HI 1 "reg_or_0_operand" "rO") - (match_operand:V4HI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 2) (const_int 6) - (const_int 3) (const_int 7)])))] - "BYTES_BIG_ENDIAN" - "v2int_l\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "vec_interleave_lowv4hi_le" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (vec_select:V4HI - (vec_concat:V8HI (match_operand:V4HI 1 "reg_or_0_operand" "rO") - (match_operand:V4HI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 0) (const_int 4) - (const_int 1) (const_int 5)])))] - "!BYTES_BIG_ENDIAN" - "v2int_l\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_v2int_l" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "" -{ - /* For little endian, our instruction interleaves opposite of the - way vec_interleave works, so we need to reverse the source - operands. */ - rtx opnd1 = BYTES_BIG_ENDIAN ? operands[1] : operands[2]; - rtx opnd2 = BYTES_BIG_ENDIAN ? operands[2] : operands[1]; - tilegx_expand_builtin_vector_binop (gen_vec_interleave_lowv4hi, V4HImode, - operands[0], V4HImode, opnd1, opnd2, - true); - DONE; -}) - -;; insn_v4int_h -;; {B1,B0} {A1,A0} -;; => {A1,A0,B1,B0} -;; => {A1,B1} -(define_expand "vec_interleave_highv2si" - [(match_operand:V2SI 0 "register_operand" "") - (match_operand:V2SI 1 "reg_or_0_operand" "") - (match_operand:V2SI 2 "reg_or_0_operand" "")] - "" -{ - if (BYTES_BIG_ENDIAN) - emit_insn (gen_vec_interleave_highv2si_be (operands[0], operands[1], - operands[2])); - else - emit_insn (gen_vec_interleave_highv2si_le (operands[0], operands[1], - operands[2])); - DONE; -}) - -(define_insn "vec_interleave_highv2si_be" - [(set (match_operand:V2SI 0 "register_operand" "=r") - (vec_select:V2SI - (vec_concat:V4SI (match_operand:V2SI 1 "reg_or_0_operand" "rO") - (match_operand:V2SI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 0) (const_int 2)])))] - "BYTES_BIG_ENDIAN" - "v4int_h\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "vec_interleave_highv2si_le" - [(set (match_operand:V2SI 0 "register_operand" "=r") - (vec_select:V2SI - (vec_concat:V4SI (match_operand:V2SI 1 "reg_or_0_operand" "rO") - (match_operand:V2SI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 1) (const_int 3)])))] - "!BYTES_BIG_ENDIAN" - "v4int_h\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_v4int_h" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "" -{ - /* For little endian, our instruction interleaves opposite of the - way vec_interleave works, so we need to reverse the source - operands. */ - rtx opnd1 = BYTES_BIG_ENDIAN ? operands[1] : operands[2]; - rtx opnd2 = BYTES_BIG_ENDIAN ? operands[2] : operands[1]; - tilegx_expand_builtin_vector_binop (gen_vec_interleave_highv2si, V2SImode, - operands[0], V2SImode, opnd1, opnd2, - true); - DONE; -}) - -;; insn_v4int_l -;; {B1,B0} {A1,A0} -;; => {A1,A0,B1,B0} -;; => {A0,B0} -(define_expand "vec_interleave_lowv2si" - [(match_operand:V2SI 0 "register_operand" "") - (match_operand:V2SI 1 "reg_or_0_operand" "") - (match_operand:V2SI 2 "reg_or_0_operand" "")] - "" -{ - if (BYTES_BIG_ENDIAN) - emit_insn (gen_vec_interleave_lowv2si_be (operands[0], operands[1], - operands[2])); - else - emit_insn (gen_vec_interleave_lowv2si_le (operands[0], operands[1], - operands[2])); - DONE; -}) - -(define_insn "vec_interleave_lowv2si_be" - [(set (match_operand:V2SI 0 "register_operand" "=r") - (vec_select:V2SI - (vec_concat:V4SI (match_operand:V2SI 1 "reg_or_0_operand" "rO") - (match_operand:V2SI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 1) (const_int 3)])))] - "BYTES_BIG_ENDIAN" - "v4int_l\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "vec_interleave_lowv2si_le" - [(set (match_operand:V2SI 0 "register_operand" "=r") - (vec_select:V2SI - (vec_concat:V4SI (match_operand:V2SI 1 "reg_or_0_operand" "rO") - (match_operand:V2SI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 0) (const_int 2)])))] - "!BYTES_BIG_ENDIAN" - "v4int_l\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_v4int_l" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "reg_or_0_operand" "") - (match_operand:DI 2 "reg_or_0_operand" "")] - "" -{ - /* For little endian, our instruction interleaves opposite of the - way vec_interleave works, so we need to reverse the source - operands. */ - rtx opnd1 = BYTES_BIG_ENDIAN ? operands[1] : operands[2]; - rtx opnd2 = BYTES_BIG_ENDIAN ? operands[2] : operands[1]; - tilegx_expand_builtin_vector_binop (gen_vec_interleave_lowv2si, V2SImode, - operands[0], V2SImode, opnd1, opnd2, - true); - DONE; -}) - -;; insn_v1mnz -;; insn_v1mz -;; insn_v2mnz -;; insn_v2mz -(define_insn "insn_mnz_v8qi" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (if_then_else:V8QI - (ne:V8QI - (match_operand:V8QI 1 "reg_or_0_operand" "rO") - (const_vector:V8QI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0)])) - (match_operand:V8QI 2 "reg_or_0_operand" "rO") - (const_vector:V8QI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0)])))] - "" - "v1mnz\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_expand "insn_v1mnz" - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:V8QI - (ne:V8QI - (match_operand:DI 1 "reg_or_0_operand" "") - (const_vector:V8QI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0)]) - ) - (match_operand:DI 2 "reg_or_0_operand" "") - (const_vector:V8QI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0)])))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_insn_mnz_v8qi, V8QImode, - operands[0], V8QImode, operands[1], - operands[2], true); - DONE; -}) - -(define_insn "insn_mz_v8qi" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (if_then_else:V8QI - (ne:V8QI - (match_operand:V8QI 1 "reg_or_0_operand" "rO") - (const_vector:V8QI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0)])) - (const_vector:V8QI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0)]) - (match_operand:V8QI 2 "reg_or_0_operand" "rO")))] - "" - "v1mz\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_expand "insn_v1mz" - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:V8QI - (ne:V8QI - (match_operand:DI 1 "reg_or_0_operand" "") - (const_vector:V8QI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0)])) - (const_vector:V8QI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0)]) - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_insn_mz_v8qi, V8QImode, - operands[0], V8QImode, operands[1], - operands[2], true); - DONE; -}) - -(define_insn "insn_mnz_v4hi" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (if_then_else:V4HI - (ne:V4HI - (match_operand:V4HI 1 "reg_or_0_operand" "rO") - (const_vector:V4HI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0)])) - (match_operand:V4HI 2 "reg_or_0_operand" "rO") - (const_vector:V4HI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0)])))] - "" - "v2mnz\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_expand "insn_v2mnz" - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:V4HI - (ne:V4HI - (match_operand:DI 1 "reg_or_0_operand" "") - (const_vector:V4HI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0)])) - (match_operand:DI 2 "reg_or_0_operand" "") - (const_vector:V4HI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0)])))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_insn_mnz_v4hi, V4HImode, - operands[0], V4HImode, operands[1], - operands[2], true); - DONE; -}) - -(define_insn "insn_mz_v4hi" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (if_then_else:V4HI - (ne:V4HI - (match_operand:V4HI 1 "reg_or_0_operand" "rO") - (const_vector:V4HI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0)])) - (const_vector:V4HI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0)]) - (match_operand:V4HI 2 "reg_or_0_operand" "rO")))] - "" - "v2mz\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_expand "insn_v2mz" - [(set (match_operand:DI 0 "register_operand" "") - (if_then_else:V4HI - (ne:V4HI - (match_operand:DI 1 "reg_or_0_operand" "") - (const_vector:V4HI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0)])) - (const_vector:V4HI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0)]) - (match_operand:DI 2 "reg_or_0_operand" "")))] - "" -{ - tilegx_expand_builtin_vector_binop (gen_insn_mz_v4hi, V4HImode, - operands[0], V4HImode, operands[1], - operands[2], true); - DONE; -}) - -;; insn_v1mulu -(define_insn "vec_widen_umult_lo_v8qi" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (mult:V4HI - (zero_extend:V4HI - (vec_select:V4QI - (match_operand:V8QI 1 "register_operand" "r") - (parallel [(const_int 0) (const_int 1) - (const_int 2) (const_int 3)]))) - (zero_extend:V4HI - (vec_select:V4QI - (match_operand:V8QI 2 "register_operand" "r") - (parallel [(const_int 0) (const_int 1) - (const_int 2) (const_int 3)])))))] - "" - "v1mulu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_expand "insn_v1mulu" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "register_operand" "")] - "" -{ - tilegx_expand_builtin_vector_binop (gen_vec_widen_umult_lo_v8qi, V4HImode, - operands[0], V8QImode, operands[1], - operands[2], true); - DONE; -}) - -;; insn_v1mulus -(define_insn "vec_widen_usmult_lo_v8qi" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (mult:V4HI - (zero_extend:V4HI - (vec_select:V4QI - (match_operand:V8QI 1 "register_operand" "r") - (parallel [(const_int 0) (const_int 1) - (const_int 2) (const_int 3)]))) - (sign_extend:V4HI - (vec_select:V4QI - (match_operand:V8QI 2 "register_operand" "r") - (parallel [(const_int 0) (const_int 1) - (const_int 2) (const_int 3)])))))] - "" - "v1mulus\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_expand "insn_v1mulus" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "register_operand" "")] - "" -{ - tilegx_expand_builtin_vector_binop (gen_vec_widen_usmult_lo_v8qi, V4HImode, - operands[0], V8QImode, operands[1], - operands[2], true); - DONE; -}) - -;; insn_v2muls -(define_insn "vec_widen_smult_lo_v4qi" - [(set (match_operand:V2SI 0 "register_operand" "=r") - (mult:V2SI - (sign_extend:V2SI - (vec_select:V2HI - (match_operand:V4HI 1 "register_operand" "r") - (parallel [(const_int 0) (const_int 1)]))) - (sign_extend:V2SI - (vec_select:V2HI - (match_operand:V4HI 2 "register_operand" "r") - (parallel [(const_int 0) (const_int 1)])))))] - "" - "v2muls\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_expand "insn_v2muls" - [(match_operand:DI 0 "register_operand" "") - (match_operand:DI 1 "register_operand" "") - (match_operand:DI 2 "register_operand" "")] - "" -{ - tilegx_expand_builtin_vector_binop (gen_vec_widen_smult_lo_v4qi, V2SImode, - operands[0], V4HImode, operands[1], - operands[2], true); - DONE; -}) - -;; v2packl -;; v2packuc -;; {B3,B2,B1,B0} {A3,A2,A1,A0} -;; => {A3,A2,A1,A0,B3,B2,B1,B0} -(define_insn "vec_pack__v4hi" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (vec_concat:V8QI - (v2pack:V4QI (match_operand:V4HI 1 "reg_or_0_operand" "rO")) - (v2pack:V4QI (match_operand:V4HI 2 "reg_or_0_operand" "rO"))))] - "" - "v2\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_v2" - [(set (match_operand:DI 0 "register_operand" "") - (vec_concat:V8QI - (v2pack:V4QI (match_operand:DI 2 "reg_or_0_operand" "")) - (v2pack:V4QI (match_operand:DI 1 "reg_or_0_operand" ""))))] - "" -{ - /* Our instruction concats opposite of the way vec_pack works, so we - need to reverse the source operands. */ - tilegx_expand_builtin_vector_binop (gen_vec_pack__v4hi, - V8QImode, operands[0], V4HImode, - operands[2], operands[1], true); - DONE; -}) - -;; v2packh -;; {B3,B2,B1,B0} {A3,A2,A1,A0} -;; => {A3_hi,A2_hi,A1_hi,A0_hi,B3_hi,B2_hi,B1_hi,B0_hi} -(define_insn "vec_pack_hipart_v4hi" - [(set (match_operand:V8QI 0 "register_operand" "=r") - (vec_concat:V8QI - (truncate:V4QI - (ashiftrt:V4HI (match_operand:V4HI 1 "reg_or_0_operand" "rO") - (const_int 8))) - (truncate:V4QI - (ashiftrt:V4HI (match_operand:V4HI 2 "reg_or_0_operand" "rO") - (const_int 8)))))] - "" - "v2packh\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_v2packh" - [(set (match_operand:DI 0 "register_operand" "") - (vec_concat:V8QI - (truncate:V4QI - (ashiftrt:V4HI (match_operand:DI 2 "reg_or_0_operand" "") - (const_int 8))) - (truncate:V4QI - (ashiftrt:V4HI (match_operand:DI 1 "reg_or_0_operand" "") - (const_int 8)))))] - "" -{ - /* Our instruction concats opposite of the way vec_pack works, so we - need to reverse the source operands. */ - tilegx_expand_builtin_vector_binop (gen_vec_pack_hipart_v4hi, V8QImode, - operands[0], V4HImode, operands[2], - operands[1], true); - DONE; -}) - -;; v4packsc -;; {B1,B0} {A1,A0} -;; => {A1,A0,B1,B0} -(define_insn "vec_pack_ssat_v2si" - [(set (match_operand:V4HI 0 "register_operand" "=r") - (vec_concat:V4HI - (us_truncate:V2HI (match_operand:V2SI 1 "reg_or_0_operand" "rO")) - (us_truncate:V2HI (match_operand:V2SI 2 "reg_or_0_operand" "rO"))))] - "" - "v4packsc\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_v4packsc" - [(set (match_operand:DI 0 "register_operand" "") - (vec_concat:V4HI - (us_truncate:V2HI (match_operand:DI 2 "reg_or_0_operand" "")) - (us_truncate:V2HI (match_operand:DI 1 "reg_or_0_operand" ""))))] - "" -{ - /* Our instruction concats opposite of the way vec_pack works, so we - need to reverse the source operands. */ - tilegx_expand_builtin_vector_binop (gen_vec_pack_ssat_v2si, V4HImode, - operands[0], V2SImode, operands[2], - operands[1], true); - DONE; -}) - -;; Rest of the vector intrinsics -(define_insn "insn_v1adiffu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1ADIFFU))] - "" - "v1adiffu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1avgu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1AVGU))] - "" - "v1avgu\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_v1ddotpu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DDOTPU))] - "" - "v1ddotpu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1ddotpua" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DDOTPUA))] - "" - "v1ddotpua\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1ddotpus" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DDOTPUS))] - "" - "v1ddotpus\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1ddotpusa" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DDOTPUSA))] - "" - "v1ddotpusa\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1dotp" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DOTP))] - "" - "v1dotp\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1dotpa" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DOTPA))] - "" - "v1dotpa\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1dotpu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DOTPU))] - "" - "v1dotpu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1dotpua" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DOTPUA))] - "" - "v1dotpua\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1dotpus" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DOTPUS))] - "" - "v1dotpus\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1dotpusa" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1DOTPUSA))] - "" - "v1dotpusa\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1sadau" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1SADAU))] - "" - "v1sadau\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v1sadu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1SADU))] - "" - "v1sadu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "*insn_v1sadu" - [(set (match_operand:SI 0 "register_operand" "=r") - (truncate:SI - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V1SADU)))] - "" - "v1sadu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v2adiffs" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2ADIFFS))] - "" - "v2adiffs\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v2avgs" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2AVGS))] - "" - "v2avgs\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_v2dotp" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2DOTP))] - "" - "v2dotp\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v2dotpa" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2DOTPA))] - "" - "v2dotpa\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v2mulfsc" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2MULFSC))] - "" - "v2mulfsc\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v2sadas" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2SADAS))] - "" - "v2sadas\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v2sadau" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "0") - (match_operand:DI 2 "reg_or_0_operand" "rO") - (match_operand:DI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2SADAU))] - "" - "v2sadau\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v2sads" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2SADS))] - "" - "v2sads\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "*insn_v2sads" - [(set (match_operand:SI 0 "register_operand" "=r") - (truncate:SI - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2SADS)))] - "" - "v2sads\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_v2sadu" - [(set (match_operand:DI 0 "register_operand" "=r") - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2SADU))] - "" - "v2sadu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "*insn_v2sadu" - [(set (match_operand:SI 0 "register_operand" "=r") - (truncate:SI - (unspec:DI [(match_operand:DI 1 "reg_or_0_operand" "rO") - (match_operand:DI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_V2SADU)))] - "" - "v2sadu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_wh64" - [(unspec_volatile:VOID [(match_operand 0 "pointer_operand" "rO")] - UNSPEC_INSN_WH64) - (clobber (mem:BLK (const_int 0)))] - "" - "wh64\t%r0" - [(set_attr "type" "X1")]) - - -;; Network intrinsics - -;; Note the this barrier is of type "nothing," which is deleted after -;; the final scheduling pass so that nothing is emitted for it. -(define_insn "tilegx_network_barrier" - [(unspec_volatile:SI [(const_int 0)] UNSPEC_NETWORK_BARRIER)] - "" - "pseudo" - [(set_attr "type" "nothing") - (set_attr "length" "0")]) - -(define_insn "*netreg_receive" - [(set (match_operand:DI 0 "nonimmediate_operand" "=r,U,m") - (unspec_volatile:DI [(match_operand:DI 1 "netreg_operand" "i,i,i") - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:DI TILEGX_NETORDER_REG))] - - "" - "@ - move\t%0, %N1 - st\t%0, %N1 - st_add\t%I0, %N1, %i0" - [(set_attr "type" "*,Y2,X1")]) - -(define_insn "*netreg_send" - [(unspec_volatile:DI - [(match_operand:DI 0 "netreg_operand" "i,i,i,i,i,i") - (match_operand:DI 1 "reg_or_cint_operand" "r,I,J,K,N,P") - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:DI TILEGX_NETORDER_REG))] - "" - "@ - move\t%N0, %r1 - movei\t%N0, %1 - moveli\t%N0, %1 - shl16insli\t%N0, zero, %h1 - v1addi\t%N0, zero, %j1 - v2addi\t%N0, zero, %h1" - [(set_attr "type" "*,*,X01,X01,X01,X01")]) - -(define_expand "tilegx_idn0_receive" - [(parallel - [(set (match_operand:DI 0 "register_operand" "") - (unspec_volatile:DI [(const_int TILEGX_NETREG_IDN0) - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:DI TILEGX_NETORDER_REG))])] - "") - -(define_expand "tilegx_idn1_receive" - [(parallel - [(set (match_operand:DI 0 "register_operand" "") - (unspec_volatile:DI [(const_int TILEGX_NETREG_IDN1) - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:DI TILEGX_NETORDER_REG))])] - "") - -(define_expand "tilegx_idn_send" - [(parallel - [(unspec_volatile:DI [(const_int TILEGX_NETREG_IDN0) - (match_operand:DI 0 "reg_or_cint_operand" "") - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:DI TILEGX_NETORDER_REG))])] - "") - -(define_expand "tilegx_udn0_receive" - [(parallel - [(set (match_operand:DI 0 "register_operand" "") - (unspec_volatile:DI [(const_int TILEGX_NETREG_UDN0) - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:DI TILEGX_NETORDER_REG))])] - "") - -(define_expand "tilegx_udn1_receive" - [(parallel - [(set (match_operand:DI 0 "register_operand" "") - (unspec_volatile:DI [(const_int TILEGX_NETREG_UDN1) - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:DI TILEGX_NETORDER_REG))])] - "") - -(define_expand "tilegx_udn2_receive" - [(parallel - [(set (match_operand:DI 0 "register_operand" "") - (unspec_volatile:DI [(const_int TILEGX_NETREG_UDN2) - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:DI TILEGX_NETORDER_REG))])] - "") - -(define_expand "tilegx_udn3_receive" - [(parallel - [(set (match_operand:DI 0 "register_operand" "") - (unspec_volatile:DI [(const_int TILEGX_NETREG_UDN3) - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:DI TILEGX_NETORDER_REG))])] - "") - -(define_expand "tilegx_udn_send" - [(parallel - [(unspec_volatile:DI [(const_int TILEGX_NETREG_UDN0) - (match_operand:DI 0 "reg_or_cint_operand" "") - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:DI TILEGX_NETORDER_REG))])] - "") - -(define_insn "*netreg_adddi_to_network" - [(unspec_volatile:DI - [(match_operand:DI 0 "netreg_operand" "i,i,i") - (plus:DI (match_operand:DI 1 "reg_or_0_operand" "%rO,rO,rO") - (match_operand:DI 2 "add_operand" "r,I,JT")) - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:DI TILEGX_NETORDER_REG))] - "" - "@ - add\t%N0, %r1, %2 - addi\t%N0, %r1, %2 - addli\t%N0, %r1, %H2" - [(set_attr "type" "*,*,X01")]) - -(define_insn "*netreg_adddi_from_network" - [(set (match_operand:DI 0 "register_operand" "=r,r,r") - (plus:DI (unspec_volatile:DI - [(match_operand:DI 1 "netreg_operand" "%i,i,i") - (reg:DI TILEGX_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (match_operand:DI 2 "add_operand" "rO,I,JT"))) - (clobber (reg:DI TILEGX_NETORDER_REG))] - "" - "@ - add\t%0, %N1, %r2 - addi\t%0, %N1, %2 - addli\t%0, %N1, %H2" - [(set_attr "type" "*,*,X01")]) - - -;; -;; Stack protector instructions. -;; - -(define_expand "stack_protect_set" - [(set (match_operand 0 "nonautoincmem_operand" "") - (match_operand 1 "nonautoincmem_operand" ""))] - "" -{ -#ifdef TARGET_THREAD_SSP_OFFSET - rtx tp = gen_rtx_REG (Pmode, THREAD_POINTER_REGNUM); - rtx ssp_addr = gen_rtx_PLUS (Pmode, tp, GEN_INT (TARGET_THREAD_SSP_OFFSET)); - rtx ssp = gen_reg_rtx (Pmode); - - emit_insn (gen_rtx_SET (ssp, ssp_addr)); - - operands[1] = gen_rtx_MEM (Pmode, ssp); -#endif - - if (TARGET_32BIT) - emit_insn (gen_stack_protect_setsi (operands[0], operands[1])); - else - emit_insn (gen_stack_protect_setdi (operands[0], operands[1])); - - DONE; -}) - -(define_insn "stack_protect_setsi" - [(set (match_operand:SI 0 "nonautoincmem_operand" "=U") - (unspec:SI [(match_operand:SI 1 "nonautoincmem_operand" "U")] - UNSPEC_SP_SET)) - (set (match_scratch:SI 2 "=&r") (const_int 0))] - "" - "ld4s\t%2, %1; { st4\t%0, %2; move\t%2, zero }" - [(set_attr "length" "16") - (set_attr "type" "cannot_bundle_3cycle")]) - -(define_insn "stack_protect_setdi" - [(set (match_operand:DI 0 "nonautoincmem_operand" "=U") - (unspec:DI [(match_operand:DI 1 "nonautoincmem_operand" "U")] - UNSPEC_SP_SET)) - (set (match_scratch:DI 2 "=&r") (const_int 0))] - "" - "ld\t%2, %1; { st\t%0, %2; move\t%2, zero }" - [(set_attr "length" "16") - (set_attr "type" "cannot_bundle_3cycle")]) - -(define_expand "stack_protect_test" - [(match_operand 0 "nonautoincmem_operand" "") - (match_operand 1 "nonautoincmem_operand" "") - (match_operand 2 "" "")] - "" -{ - rtx compare_result; - rtx bcomp, loc_ref; - -#ifdef TARGET_THREAD_SSP_OFFSET - rtx tp = gen_rtx_REG (Pmode, THREAD_POINTER_REGNUM); - rtx ssp_addr = gen_rtx_PLUS (Pmode, tp, GEN_INT (TARGET_THREAD_SSP_OFFSET)); - rtx ssp = gen_reg_rtx (Pmode); - - emit_insn (gen_rtx_SET (ssp, ssp_addr)); - - operands[1] = gen_rtx_MEM (Pmode, ssp); -#endif - - compare_result = gen_reg_rtx (Pmode); - - if (TARGET_32BIT) - emit_insn (gen_stack_protect_testsi (compare_result, operands[0], - operands[1])); - else - emit_insn (gen_stack_protect_testdi (compare_result, operands[0], - operands[1])); - - bcomp = gen_rtx_NE (SImode, compare_result, const0_rtx); - - loc_ref = gen_rtx_LABEL_REF (VOIDmode, operands[2]); - - emit_jump_insn (gen_rtx_SET (pc_rtx, - gen_rtx_IF_THEN_ELSE (VOIDmode, bcomp, - loc_ref, pc_rtx))); - - DONE; -}) - -(define_insn "stack_protect_testsi" - [(set (match_operand:SI 0 "register_operand" "=&r") - (unspec:SI [(match_operand:SI 1 "nonautoincmem_operand" "U") - (match_operand:SI 2 "nonautoincmem_operand" "U")] - UNSPEC_SP_TEST)) - (set (match_scratch:SI 3 "=&r") (const_int 0))] - "" - "ld4s\t%0, %1; ld4s\t%3, %2; { cmpeq\t%0, %0, %3; move\t%3, zero }" - [(set_attr "length" "24") - (set_attr "type" "cannot_bundle_4cycle")]) - -(define_insn "stack_protect_testdi" - [(set (match_operand:DI 0 "register_operand" "=&r") - (unspec:DI [(match_operand:DI 1 "nonautoincmem_operand" "U") - (match_operand:DI 2 "nonautoincmem_operand" "U")] - UNSPEC_SP_TEST)) - (set (match_scratch:DI 3 "=&r") (const_int 0))] - "" - "ld\t%0, %1; ld\t%3, %2; { cmpeq\t%0, %0, %3; move\t%3, zero }" - [(set_attr "length" "24") - (set_attr "type" "cannot_bundle_4cycle")]) - -(include "sync.md") diff --git a/gcc/config/tilegx/tilegx.opt b/gcc/config/tilegx/tilegx.opt deleted file mode 100644 index 6a01aea..0000000 --- a/gcc/config/tilegx/tilegx.opt +++ /dev/null @@ -1,63 +0,0 @@ -; Options for the TILE-Gx port of the compiler. -; Copyright (C) 2011-2022 Free Software Foundation, Inc. -; Contributed by Walter Lee (walt@tilera.com) -; -; This file is part of GCC. -; -; GCC is free software; you can redistribute it and/or modify it under -; the terms of the GNU General Public License as published by the Free -; Software Foundation; either version 3, or (at your option) any later -; version. -; -; GCC is distributed in the hope that it will be useful, but WITHOUT ANY -; WARRANTY; without even the implied warranty of MERCHANTABILITY or -; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -; for more details. -; -; You should have received a copy of the GNU General Public License -; along with GCC; see the file COPYING3. If not see -; . - -HeaderInclude -config/tilegx/tilegx-opts.h - -mcpu= -Target RejectNegative Joined Enum(tilegx_cpu) Var(tilegx_cpu) Init(0) --mcpu=CPU Use features of and schedule code for given CPU. - -Enum -Name(tilegx_cpu) Type(int) -Known TILE-Gx CPUs (for use with the -mcpu= option): - -EnumValue -Enum(tilegx_cpu) String(tilegx) Value(0) - -m32 -Target RejectNegative Negative(m64) Mask(32BIT) -Compile with 32 bit longs and pointers. - -m64 -Target RejectNegative Negative(m32) InverseMask(32BIT, 64BIT) -Compile with 64 bit longs and pointers. - -mbig-endian -Target RejectNegative Mask(BIG_ENDIAN) -Use big-endian byte order. - -mlittle-endian -Target RejectNegative InverseMask(BIG_ENDIAN) -Use little-endian byte order. - -mcmodel= -Target RejectNegative Joined Enum(cmodel) Var(tilegx_cmodel) Init(CM_SMALL) -Use given TILE-Gx code model. - -Enum -Name(cmodel) Type(enum cmodel) -Known code models (for use with the -mcmodel= option): - -EnumValue -Enum(cmodel) String(small) Value(CM_SMALL) - -EnumValue -Enum(cmodel) String(large) Value(CM_LARGE) diff --git a/gcc/config/tilepro/constraints.md b/gcc/config/tilepro/constraints.md deleted file mode 100644 index 6976aed..0000000 --- a/gcc/config/tilepro/constraints.md +++ /dev/null @@ -1,99 +0,0 @@ -;; Constraint definitions for Tilera TILEPro chip. -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Contributed by Walter Lee (walt@tilera.com) -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; . - -(define_register_constraint "R00" "R0_REGS" "r0") -(define_register_constraint "R01" "R1_REGS" "r1") -(define_register_constraint "R02" "R2_REGS" "r2") -(define_register_constraint "R03" "R3_REGS" "r3") -(define_register_constraint "R04" "R4_REGS" "r4") -(define_register_constraint "R05" "R5_REGS" "r5") -(define_register_constraint "R06" "R6_REGS" "r6") -(define_register_constraint "R07" "R7_REGS" "r7") -(define_register_constraint "R08" "R8_REGS" "r8") -(define_register_constraint "R09" "R9_REGS" "r9") -(define_register_constraint "R10" "R10_REGS" "r10") - -(define_constraint "I" - "A signed 8 bit constant" - (and (match_code "const_int") - (match_test "ival >= -128 && ival <= 127"))) - -(define_constraint "J" - "Signed 16-bit integer constant" - (and (match_code "const_int") - (match_test "ival >= -32768 && ival <= 32767"))) - -(define_constraint "K" - "Nonzero integer constant with low 16 bits zero" - (and (match_code "const_int") - (match_test "ival && (ival & 0xFFFF) == 0"))) - -(define_constraint "L" - "Integer constant that fits in one signed byte when incremented" - (and (match_code "const_int") - (match_test "ival >= -129 && ival <= 126"))) - -(define_constraint "M" - "A bit mask suitable for 'mm'" - (and (match_code "const_int") - (match_test "tilepro_bitfield_operand_p (ival, NULL, NULL)"))) - -(define_constraint "N" - "Integer constant that is a byte tiled out four times" - (and (match_code "const_int") - (match_test "(ival & 0xFFFFFFFF) == (ival & 0xFF) * 0x01010101"))) - -(define_constraint "O" - "The integer zero constant" - (and (match_code "const_int") - (match_test "ival == 0"))) - -(define_constraint "P" - "Integer constant that is a sign-extended byte tiled out as two shorts" - (and (match_code "const_int") - (match_test "((ival & 0xFFFFFFFF) - == ((trunc_int_for_mode (ival, QImode) & 0xFFFF) - * 0x00010001))"))) - -(define_constraint "Q" - "Integer constant that fits in one signed byte when incremented, but not -1" - (and (match_code "const_int") - (match_test "ival >= -129 && ival <= 126 && ival != -1"))) - -(define_constraint "T" - "A const symbolc operand" - (match_operand 0 "const_symbolic_operand")) - -(define_memory_constraint "U" - "Non-auto-incrementing memory" - (and (match_code "mem") - (match_test "GET_RTX_CLASS (GET_CODE (XEXP (op, 0))) != RTX_AUTOINC"))) - -(define_constraint "W" - "A 4-element vector constant with identical elements" - (and (match_code "const_vector") - (match_test "CONST_VECTOR_NUNITS (op) == 4") - (match_test "const_vec_duplicate_p (op)"))) - -(define_constraint "Y" - "A 2-element vector constant with identical elements" - (and (match_code "const_vector") - (match_test "CONST_VECTOR_NUNITS (op) == 2") - (match_test "const_vec_duplicate_p (op)"))) diff --git a/gcc/config/tilepro/feedback.h b/gcc/config/tilepro/feedback.h deleted file mode 100644 index 34e48ed..0000000 --- a/gcc/config/tilepro/feedback.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _FEEDBACK_H -#define _FEEDBACK_H 1 - -#ifdef __ASSEMBLER__ - -/* Stub defines for feedback instrumentation. */ -#define FEEDBACK_ENTER_EXPLICIT(FUNCNAME, SECNAME, SIZE) -#define FEEDBACK_ENTER(FUNCNAME) -#define FEEDBACK_REENTER(FUNCNAME) -#define FEEDBACK_ENTRY(FUNCNAME, SECNAME, SIZE) - -#endif /* __ASSEMBLER__ */ - -#endif /* _FEEDBACK_H */ diff --git a/gcc/config/tilepro/gen-mul-tables.cc b/gcc/config/tilepro/gen-mul-tables.cc deleted file mode 100644 index c125748..0000000 --- a/gcc/config/tilepro/gen-mul-tables.cc +++ /dev/null @@ -1,1369 +0,0 @@ -/* Multiply table generator for tile. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -/* This program creates a table used to compile multiply by constant - efficiently. - - This program should be compiled by a c++ compiler. If it's - compiled with -DTILEPRO, it generates the multiply table for - TILEPro; otherwise it generates the multiply table for TILE-Gx. - Running the program produces the table in stdout. - - The program works by generating every possible combination of up to - MAX_INSTRUCTIONS linear operators (such as add, sub, s2a, left - shift) and computing the multiplier computed by those instructions. - For example, - - s2a r2,r1,r1 - s2a r3,r2,r2 - - multiplies r1 by 25. - - There are usually multiple instruction sequences to multiply by a - given constant. This program keeps only the cheapest one. - "Cheapest" is defined first by the minimum theoretical schedule - length, and if those are equal then by the number of instructions, - and if those are equal then by which instructions we "prefer" - (e.g. because we think one might take infinitesimally less power - than another, or simply because we arbitrarily pick one to be more - canonical). - - Once this program has determined the best instruction sequence for - each multiplier, it emits them in a table sorted by the multiplier - so the user can binary-search it to look for a match. The table is - pruned based on various criteria to keep its sizes reasonable. */ - -#include -#include -#include -#include -#define __STDC_LIMIT_MACROS -#include - -#include - -#ifdef TILEPRO - -/* The string representing the architecture. */ -#define ARCH "tilepro" - -/* The type for the multiplication. */ -typedef int MUL_TYPE; - -#else - -/* The string representing the architecture. */ -#define ARCH "tilegx" - -/* The type for the multiplication. */ -typedef long long MUL_TYPE; - -#endif - -/* Longest instruction sequence this will produce. With the current - stupid algorithm runtime grows very quickly with this number. */ -#define MAX_INSTRUCTIONS 4 - -/* Maximum number of subexpressions in the expression DAG being - generated. This is the same as the number of instructions, except - that zero and the original register we'd like to multiply by a - constant are also thrown into the mix. */ -#define MAX_SUBEXPRS (2 + MAX_INSTRUCTIONS) - -#define MIN(x, y) ((x) <= (y) ? (x) : (y)) -#define MAX(x, y) ((x) >= (y) ? (x) : (y)) - -#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) - -/* For this program a unary op is one which has only one nonconstant - operand. So shift left by 5 is considered unary. */ -typedef MUL_TYPE (*unary_op_func) (MUL_TYPE); -typedef MUL_TYPE (*binary_op_func) (MUL_TYPE, MUL_TYPE); - -/* This describes an operation like 'add two registers' or 'left-shift - by 7'. - - We call something a 'unary' operator if it only takes in one - register as input, even though it might have an implicit second - constant operand. Currently this is used for left-shift by - constant. */ -class Operator -{ -public: - /* Construct for a binary operator. */ - Operator (const char *pattern, const char *name, binary_op_func func, - int cost) - : m_pattern (pattern), m_name (name), m_top_index (-1), - m_unary_func (0), m_binary_func (func), m_cost (cost), - m_rhs_if_unary (0) - { - } - - /* Construct for a unary operator. */ - Operator (const char *pattern, const char *name, unary_op_func func, - int rhs_if_unary, int cost) - : m_pattern (pattern), m_name (name), m_top_index (-1), - m_unary_func (func), m_binary_func (0), m_cost (cost), - m_rhs_if_unary (rhs_if_unary) - { - } - - bool is_unary () const - { - return m_binary_func == NULL; - } - - /* Name of the pattern for this operation, e.g. CODE_FOR_addsi3. */ - const char *m_pattern; - - /* Name of the opcode for this operation, e.g. add. */ - const char *m_name; - - /* We don't have enough bits in our output representation to store - the original insn_code value, so we store a compressed form - instead. These values are decoded back into insn_code via the - machine-generated multiply_insn_seq_decode_opcode lookup - table. */ - int m_top_index; - - /* Unary operator to apply, or NULL if this is a binary operator. */ - unary_op_func m_unary_func; - - /* Binary operator to apply, or NULL if this is a unary operator. */ - binary_op_func m_binary_func; - - /* Function of how expensive we consider this operator. Higher is - worse. */ - int m_cost; - - /* the RHS value to write into the C file if unary; used for shift - count. */ - int m_rhs_if_unary; -}; - - -/* An entry in an expression DAG. */ -class Expr -{ -public: - Expr () : m_op (NULL), m_lhs (0), m_rhs (0), m_produced_val (0), - m_critical_path_length (0) - { - } - - /* The operator being applied to the operands. */ - const Operator *m_op; - - /* The index of the left-hand operand in the array of subexpressions - already computed. */ - int m_lhs; - - /* For binary ops ,this is the index of the left-hand operand in the - array of subexpressions already computed. For unary ops, it is - specific to the op (e.g. it might hold a constant shift - count). */ - int m_rhs; - - /* The multiplier produced by this expression tree. For example, for - the tree ((x << 5) + x), the value would be 33. */ - MUL_TYPE m_produced_val; - - /* How far is this expression from the root, i.e. how many cycles - minimum will it take to compute this? */ - int m_critical_path_length; -}; - - -/* Make function pointers for the various linear operators we can - apply to compute a multiplicative value. */ - -static MUL_TYPE -add (MUL_TYPE n1, MUL_TYPE n2) -{ - return n1 + n2; -} - -static MUL_TYPE -sub (MUL_TYPE n1, MUL_TYPE n2) -{ - return n1 - n2; -} - -static MUL_TYPE -s1a (MUL_TYPE n1, MUL_TYPE n2) -{ - return n1 * 2 + n2; -} - -static MUL_TYPE -s2a (MUL_TYPE n1, MUL_TYPE n2) -{ - return n1 * 4 + n2; -} - -static MUL_TYPE -s3a (MUL_TYPE n1, MUL_TYPE n2) -{ - return n1 * 8 + n2; -} - -#define SHIFT(count) \ -static MUL_TYPE \ -shift##count(MUL_TYPE n) \ -{ \ - return n << (count); \ -} - -SHIFT (1); -SHIFT (2); -SHIFT (3); -SHIFT (4); -SHIFT (5); -SHIFT (6); -SHIFT (7); -SHIFT (8); -SHIFT (9); -SHIFT (10); -SHIFT (11); -SHIFT (12); -SHIFT (13); -SHIFT (14); -SHIFT (15); -SHIFT (16); -SHIFT (17); -SHIFT (18); -SHIFT (19); -SHIFT (20); -SHIFT (21); -SHIFT (22); -SHIFT (23); -SHIFT (24); -SHIFT (25); -SHIFT (26); -SHIFT (27); -SHIFT (28); -SHIFT (29); -SHIFT (30); -SHIFT (31); -#ifndef TILEPRO -SHIFT (32); -SHIFT (33); -SHIFT (34); -SHIFT (35); -SHIFT (36); -SHIFT (37); -SHIFT (38); -SHIFT (39); -SHIFT (40); -SHIFT (41); -SHIFT (42); -SHIFT (43); -SHIFT (44); -SHIFT (45); -SHIFT (46); -SHIFT (47); -SHIFT (48); -SHIFT (49); -SHIFT (50); -SHIFT (51); -SHIFT (52); -SHIFT (53); -SHIFT (54); -SHIFT (55); -SHIFT (56); -SHIFT (57); -SHIFT (58); -SHIFT (59); -SHIFT (60); -SHIFT (61); -SHIFT (62); -SHIFT (63); -#endif - -#ifdef TILEPRO -static Operator ops[] = { - Operator ("CODE_FOR_addsi3", "add", add, 1040), - Operator ("CODE_FOR_subsi3", "sub", sub, 1041), - Operator ("CODE_FOR_insn_s1a", "s1a", s1a, 1042), - Operator ("CODE_FOR_insn_s2a", "s2a", s2a, 1043), - Operator ("CODE_FOR_insn_s3a", "s3a", s3a, 1044), - /* Note: shl by 1 is not necessary, since adding a value to itself - produces the same result. But the architecture team thinks - left-shift may use slightly less power, so we might as well - prefer it. */ - Operator ("CODE_FOR_ashlsi3", "shli", shift1, 1, 1001), - Operator ("CODE_FOR_ashlsi3", "shli", shift2, 2, 1002), - Operator ("CODE_FOR_ashlsi3", "shli", shift3, 3, 1003), - Operator ("CODE_FOR_ashlsi3", "shli", shift4, 4, 1004), - Operator ("CODE_FOR_ashlsi3", "shli", shift5, 5, 1005), - Operator ("CODE_FOR_ashlsi3", "shli", shift6, 6, 1006), - Operator ("CODE_FOR_ashlsi3", "shli", shift7, 7, 1007), - Operator ("CODE_FOR_ashlsi3", "shli", shift8, 8, 1008), - Operator ("CODE_FOR_ashlsi3", "shli", shift9, 9, 1009), - Operator ("CODE_FOR_ashlsi3", "shli", shift10, 10, 1010), - Operator ("CODE_FOR_ashlsi3", "shli", shift11, 11, 1011), - Operator ("CODE_FOR_ashlsi3", "shli", shift12, 12, 1012), - Operator ("CODE_FOR_ashlsi3", "shli", shift13, 13, 1013), - Operator ("CODE_FOR_ashlsi3", "shli", shift14, 14, 1014), - Operator ("CODE_FOR_ashlsi3", "shli", shift15, 15, 1015), - Operator ("CODE_FOR_ashlsi3", "shli", shift16, 16, 1016), - Operator ("CODE_FOR_ashlsi3", "shli", shift17, 17, 1017), - Operator ("CODE_FOR_ashlsi3", "shli", shift18, 18, 1018), - Operator ("CODE_FOR_ashlsi3", "shli", shift19, 19, 1019), - Operator ("CODE_FOR_ashlsi3", "shli", shift20, 20, 1020), - Operator ("CODE_FOR_ashlsi3", "shli", shift21, 21, 1021), - Operator ("CODE_FOR_ashlsi3", "shli", shift22, 22, 1022), - Operator ("CODE_FOR_ashlsi3", "shli", shift23, 23, 1023), - Operator ("CODE_FOR_ashlsi3", "shli", shift24, 24, 1024), - Operator ("CODE_FOR_ashlsi3", "shli", shift25, 25, 1025), - Operator ("CODE_FOR_ashlsi3", "shli", shift26, 26, 1026), - Operator ("CODE_FOR_ashlsi3", "shli", shift27, 27, 1027), - Operator ("CODE_FOR_ashlsi3", "shli", shift28, 28, 1028), - Operator ("CODE_FOR_ashlsi3", "shli", shift29, 29, 1029), - Operator ("CODE_FOR_ashlsi3", "shli", shift30, 30, 1030), - Operator ("CODE_FOR_ashlsi3", "shli", shift31, 31, 1031) -}; -#else -static Operator ops[] = { - Operator ("CODE_FOR_adddi3", "add", add, 1070), - Operator ("CODE_FOR_subdi3", "sub", sub, 1071), - Operator ("CODE_FOR_insn_shl1add", "shl1add", s1a, 1072), - Operator ("CODE_FOR_insn_shl2add", "shl2add", s2a, 1073), - Operator ("CODE_FOR_insn_shl3add", "shl3add", s3a, 1074), - // Note: shl by 1 is not necessary, since adding a value to itself - // produces the same result. But the architecture team thinks left-shift - // may use slightly less power, so we might as well prefer it. - Operator ("CODE_FOR_ashldi3", "shli", shift1, 1, 1001), - Operator ("CODE_FOR_ashldi3", "shli", shift2, 2, 1002), - Operator ("CODE_FOR_ashldi3", "shli", shift3, 3, 1003), - Operator ("CODE_FOR_ashldi3", "shli", shift4, 4, 1004), - Operator ("CODE_FOR_ashldi3", "shli", shift5, 5, 1005), - Operator ("CODE_FOR_ashldi3", "shli", shift6, 6, 1006), - Operator ("CODE_FOR_ashldi3", "shli", shift7, 7, 1007), - Operator ("CODE_FOR_ashldi3", "shli", shift8, 8, 1008), - Operator ("CODE_FOR_ashldi3", "shli", shift9, 9, 1009), - Operator ("CODE_FOR_ashldi3", "shli", shift10, 10, 1010), - Operator ("CODE_FOR_ashldi3", "shli", shift11, 11, 1011), - Operator ("CODE_FOR_ashldi3", "shli", shift12, 12, 1012), - Operator ("CODE_FOR_ashldi3", "shli", shift13, 13, 1013), - Operator ("CODE_FOR_ashldi3", "shli", shift14, 14, 1014), - Operator ("CODE_FOR_ashldi3", "shli", shift15, 15, 1015), - Operator ("CODE_FOR_ashldi3", "shli", shift16, 16, 1016), - Operator ("CODE_FOR_ashldi3", "shli", shift17, 17, 1017), - Operator ("CODE_FOR_ashldi3", "shli", shift18, 18, 1018), - Operator ("CODE_FOR_ashldi3", "shli", shift19, 19, 1019), - Operator ("CODE_FOR_ashldi3", "shli", shift20, 20, 1020), - Operator ("CODE_FOR_ashldi3", "shli", shift21, 21, 1021), - Operator ("CODE_FOR_ashldi3", "shli", shift22, 22, 1022), - Operator ("CODE_FOR_ashldi3", "shli", shift23, 23, 1023), - Operator ("CODE_FOR_ashldi3", "shli", shift24, 24, 1024), - Operator ("CODE_FOR_ashldi3", "shli", shift25, 25, 1025), - Operator ("CODE_FOR_ashldi3", "shli", shift26, 26, 1026), - Operator ("CODE_FOR_ashldi3", "shli", shift27, 27, 1027), - Operator ("CODE_FOR_ashldi3", "shli", shift28, 28, 1028), - Operator ("CODE_FOR_ashldi3", "shli", shift29, 29, 1029), - Operator ("CODE_FOR_ashldi3", "shli", shift30, 30, 1030), - Operator ("CODE_FOR_ashldi3", "shli", shift31, 31, 1031), - Operator ("CODE_FOR_ashldi3", "shli", shift32, 32, 1032), - Operator ("CODE_FOR_ashldi3", "shli", shift33, 33, 1033), - Operator ("CODE_FOR_ashldi3", "shli", shift34, 34, 1034), - Operator ("CODE_FOR_ashldi3", "shli", shift35, 35, 1035), - Operator ("CODE_FOR_ashldi3", "shli", shift36, 36, 1036), - Operator ("CODE_FOR_ashldi3", "shli", shift37, 37, 1037), - Operator ("CODE_FOR_ashldi3", "shli", shift38, 38, 1038), - Operator ("CODE_FOR_ashldi3", "shli", shift39, 39, 1039), - Operator ("CODE_FOR_ashldi3", "shli", shift40, 40, 1040), - Operator ("CODE_FOR_ashldi3", "shli", shift41, 41, 1041), - Operator ("CODE_FOR_ashldi3", "shli", shift42, 42, 1042), - Operator ("CODE_FOR_ashldi3", "shli", shift43, 43, 1043), - Operator ("CODE_FOR_ashldi3", "shli", shift44, 44, 1044), - Operator ("CODE_FOR_ashldi3", "shli", shift45, 45, 1045), - Operator ("CODE_FOR_ashldi3", "shli", shift46, 46, 1046), - Operator ("CODE_FOR_ashldi3", "shli", shift47, 47, 1047), - Operator ("CODE_FOR_ashldi3", "shli", shift48, 48, 1048), - Operator ("CODE_FOR_ashldi3", "shli", shift49, 49, 1049), - Operator ("CODE_FOR_ashldi3", "shli", shift50, 50, 1050), - Operator ("CODE_FOR_ashldi3", "shli", shift51, 51, 1051), - Operator ("CODE_FOR_ashldi3", "shli", shift52, 52, 1052), - Operator ("CODE_FOR_ashldi3", "shli", shift53, 53, 1053), - Operator ("CODE_FOR_ashldi3", "shli", shift54, 54, 1054), - Operator ("CODE_FOR_ashldi3", "shli", shift55, 55, 1055), - Operator ("CODE_FOR_ashldi3", "shli", shift56, 56, 1056), - Operator ("CODE_FOR_ashldi3", "shli", shift57, 57, 1057), - Operator ("CODE_FOR_ashldi3", "shli", shift58, 58, 1058), - Operator ("CODE_FOR_ashldi3", "shli", shift59, 59, 1059), - Operator ("CODE_FOR_ashldi3", "shli", shift60, 60, 1060), - Operator ("CODE_FOR_ashldi3", "shli", shift61, 61, 1061), - Operator ("CODE_FOR_ashldi3", "shli", shift62, 62, 1062), - Operator ("CODE_FOR_ashldi3", "shli", shift63, 63, 1063) -}; -#endif - -/* An ExpressionTree is an expression DAG. */ -class ExpressionTree -{ -public: - ExpressionTree () : m_num_vals (2) - { - m_exprs[0].m_produced_val = 0; - m_exprs[1].m_produced_val = 1; - } - - void copy_technique_from (ExpressionTree * other) - { - /* TODO: write this; other can compute the same products with less - cost. We update this ExpressionTree object because some int is - already mapped to it. */ - } - - int m_num_vals; - Expr m_exprs[MAX_SUBEXPRS]; - - int cost () const - { - int cost = 0; - for (int j = 2; j < m_num_vals; j++) - cost += m_exprs[j].m_op->m_cost; - return cost + m_exprs[m_num_vals - 1].m_critical_path_length * 1000000; - } -}; - - -typedef std::map ExpressionTreeMap; - - -static void -find_sequences (ExpressionTree &s, ExpressionTreeMap &best_solution) -{ - /* Don't look more if we can't add any new values to the expression - tree. */ - const int num_vals = s.m_num_vals; - if (num_vals == MAX_SUBEXPRS) - return; - - /* Grow array to make room for new values added as we loop. */ - s.m_num_vals = num_vals + 1; - - const Operator *const prev_op = s.m_exprs[num_vals - 1].m_op; - const int prev_top_index = (prev_op != NULL) ? prev_op->m_top_index : -1; - - for (size_t f = 0; f < ARRAY_SIZE (ops); f++) - { - const Operator *const op = &ops[f]; - - for (int i = 0; i < num_vals; i++) - { - /* Only allow zero as the first operand to sub, otherwise - it is useless. */ - if (i == 0 && op->m_binary_func != sub) - continue; - - /* Unary ops don't actually use the second operand, so as a - big hack we trick it into only looping once in the inner - loop. */ - const int j_end = op->is_unary () ? 2 : num_vals; - - /* We never allow zero as the second operand, as it is - always useless. */ - for (int j = 1; j < j_end; j++) - { - /* Does this expression use the immediately previous - expression? */ - const bool uses_prev_value = - (i == num_vals - 1 - || (!op->is_unary () && j == num_vals - 1)); - - if (!uses_prev_value) - { - /* For search efficiency, prune redundant - instruction orderings. - - This op does not take the immediately preceding - value as input, which means we could have done it - in the previous slot. If its opcode is less than - the previous instruction's, we'll declare this - instruction order non-canonical and not pursue - this branch of the search. */ - if (op->m_top_index < prev_top_index) - continue; - } - - MUL_TYPE n; - if (op->is_unary ()) - { - n = op->m_unary_func (s.m_exprs[i].m_produced_val); - } - else - { - n = op->m_binary_func (s.m_exprs[i].m_produced_val, - s.m_exprs[j].m_produced_val); - } - - bool duplicate = false; - for (int k = 0; k < num_vals; k++) - if (n == s.m_exprs[j].m_produced_val) - { - duplicate = true; - break; - } - - if (duplicate) - continue; - - /* See if we found the best solution for n. */ - Expr *e = &s.m_exprs[num_vals]; - e->m_op = op; - e->m_lhs = i; - e->m_rhs = op->is_unary () ? op->m_rhs_if_unary : j; - e->m_produced_val = n; - e->m_critical_path_length = - 1 + MAX (s.m_exprs[i].m_critical_path_length, - s.m_exprs[j].m_critical_path_length); - - ExpressionTreeMap::iterator best (best_solution.find (n)); - if (best == best_solution.end () - || (*best).second->cost () > s.cost ()) - best_solution[n] = new ExpressionTree (s); - - /* Recurse and find more. */ - find_sequences (s, best_solution); - } - } - } - - /* Restore old size. */ - s.m_num_vals = num_vals; -} - - -/* For each insn_code used by an operator, choose a compact number so - it takes less space in the output data structure. This prints out a - lookup table used to map the compactified number back to an - insn_code. */ -static void -create_insn_code_compression_table () -{ - int next_index = 1; - - /* Entry 0 must hold CODE_FOR_nothing to mean "end of array". */ - printf ("const enum insn_code %s_multiply_insn_seq_decode_opcode[] = {\n" - " CODE_FOR_nothing /* must be first */ ", ARCH); - - for (size_t i = 0; i < ARRAY_SIZE (ops); i++) - { - Operator *op = &ops[i]; - int index = -1; - - /* See if some previous Operator was using the same insn_code. - If so, reuse its table entry. */ - for (size_t j = 0; j < i; j++) - { - Operator *old = &ops[j]; - if (strcmp (old->m_pattern, op->m_pattern) == 0) - { - index = old->m_top_index; - break; - } - } - - if (index == -1) - { - /* We need to make a new entry in the table. */ - printf (",\n %s", op->m_pattern); - index = next_index++; - } - - op->m_top_index = index; - } - - printf ("\n};\n\n"); -} - - -/* These are constants we've seen in code, that we want to keep table - entries for. */ -static int multiply_constants_used[] = { - -11796480, - -27439, - -25148, - -22820, - -21709, - -20995, - -20284, - -20239, - -19595, - -19447, - -19183, - -19165, - -18730, - -17828, - -17799, - -17237, - -17036, - -16549, - -16423, - -16294, - -16244, - -16069, - -15137, - -15083, - -15038, - -14924, - -14905, - -14752, - -14731, - -14529, - -14273, - -14090, - -14084, - -14043, - -13850, - -13802, - -13631, - -13455, - -13275, - -12879, - -12700, - -12534, - -12399, - -12131, - -12112, - -12054, - -12019, - -11759, - -11585, - -11467, - -11395, - -11295, - -11248, - -11148, - -11116, - -11086, - -11059, - -11018, - -10811, - -10538, - -10258, - -10217, - -10033, - -9766, - -9754, - -9534, - -9527, - -9467, - -9262, - -9232, - -9222, - -9198, - -9191, - -9113, - -8825, - -8756, - -8697, - -8693, - -8565, - -8342, - -8208, - -8200, - -8170, - -8102, - -7770, - -7678, - -7562, - -7376, - -7373, - -7221, - -7121, - -6835, - -6810, - -6626, - -6581, - -6461, - -6278, - -6263, - -6163, - -6029, - -5816, - -5540, - -5461, - -5384, - -5329, - -4985, - -4926, - -4815, - -4788, - -4758, - -4433, - -4229, - -4209, - -4176, - -4104, - -4095, - -4078, - -3941, - -3818, - -3600, - -3474, - -3314, - -3264, - -3196, - -3072, - -2912, - -2836, - -2773, - -2269, - -2184, - -2100, - -1730, - -1512, - -1500, - -1396, - -1344, - -1312, - -1297, - -1059, - -1058, - 1027, - 1049, - 1059, - 1100, - 1104, - 1108, - 1136, - 1200, - 1204, - 1242, - 1292, - 1304, - 1312, - 1320, - 1336, - 1344, - 1348, - 1360, - 1364, - 1395, - 1448, - 1460, - 1461, - 1472, - 1488, - 1500, - 1512, - 1568, - 1576, - 1649, - 1664, - 1684, - 1696, - 1744, - 1812, - 1822, - 1884, - 1963, - 1978, - 2000, - 2012, - 2014, - 2037, - 2039, - 2100, - 2139, - 2144, - 2184, - 2237, - 2260, - 2320, - 2408, - 2446, - 2447, - 2499, - 2531, - 2578, - 2592, - 2611, - 2633, - 2704, - 2730, - 2773, - 2880, - 2896, - 2998, - 3000, - 3001, - 3021, - 3079, - 3112, - 3150, - 3179, - 3192, - 3240, - 3264, - 3271, - 3283, - 3328, - 3363, - 3367, - 3453, - 3529, - 3570, - 3580, - 3600, - 3624, - 3707, - 3783, - 3826, - 3897, - 3941, - 3962, - 3989, - 4000, - 4025, - 4073, - 4093, - 4099, - 4108, - 4184, - 4209, - 4369, - 4376, - 4416, - 4433, - 4434, - 4482, - 4582, - 4712, - 4717, - 4813, - 4815, - 4864, - 5000, - 5027, - 5040, - 5091, - 5195, - 5243, - 5260, - 5285, - 5329, - 5331, - 5350, - 5361, - 5387, - 5461, - 5492, - 5529, - 5573, - 5793, - 5819, - 5915, - 5946, - 5992, - 6000, - 6164, - 6205, - 6262, - 6263, - 6269, - 6270, - 6387, - 6400, - 6406, - 6476, - 6541, - 6565, - 6568, - 6626, - 6656, - 6732, - 6810, - 6817, - 6859, - 7040, - 7053, - 7141, - 7169, - 7221, - 7223, - 7274, - 7282, - 7350, - 7369, - 7373, - 7442, - 7447, - 7471, - 7518, - 7542, - 7566, - 7587, - 7663, - 7678, - 7682, - 7748, - 7752, - 7791, - 8000, - 8026, - 8048, - 8170, - 8203, - 8204, - 8290, - 8368, - 8520, - 8640, - 8666, - 8672, - 8697, - 8716, - 8728, - 8756, - 8820, - 8875, - 8918, - 8956, - 9058, - 9154, - 9175, - 9191, - 9217, - 9262, - 9321, - 9373, - 9434, - 9465, - 9514, - 9534, - 9633, - 9746, - 9810, - 9850, - 9947, - 9973, - 10000, - 10009, - 10033, - 10055, - 10217, - 10248, - 10298, - 10310, - 10323, - 10368, - 10438, - 10456, - 10486, - 10538, - 10664, - 10695, - 10700, - 10703, - 10832, - 10887, - 10935, - 10958, - 11018, - 11059, - 11061, - 11086, - 11116, - 11148, - 11190, - 11249, - 11314, - 11332, - 11363, - 11409, - 11415, - 11443, - 11467, - 11512, - 11522, - 11529, - 11585, - 11759, - 11768, - 11795, - 11893, - 11997, - 12131, - 12299, - 12536, - 12543, - 12893, - 12945, - 12998, - 13109, - 13213, - 13685, - 13930, - 14023, - 14024, - 14271, - 14564, - 14647, - 15326, - 15850, - 15855, - 15929, - 16000, - 16154, - 16496, - 16807, - 16819, - 16984, - 17203, - 17223, - 17333, - 17760, - 17799, - 17837, - 18029, - 18068, - 18336, - 18515, - 19595, - 20017, - 20131, - 20862, - 20995, - 21709, - 22554, - 25000, - 25172, - 25600, - 25733, - 27439, - 38470, - 46802, - 50000, - 11796480, - 16843009, - 23592960, -}; - - -const int num_mult_constants_used = - (int)(sizeof multiply_constants_used - / sizeof multiply_constants_used[0]); - - -#define XSIZE (sizeof multiply_constants_used / \ - sizeof multiply_constants_used[0] + 32) / 32 -unsigned multiply_constants_avail[XSIZE]; -#undef XSIZE - - -/* bsearch helper function. */ -static int -compare_constants (const void *key, const void *t) -{ - return (*(int*)key) - *((int*)t); -} - - -static int * -find_mult_constants_used (int multiplier) -{ - return (int *) bsearch (&multiplier, multiply_constants_used, - num_mult_constants_used, - sizeof multiply_constants_used[0], - compare_constants); -} - - -int num_ops (ExpressionTree *s) -{ - int n = 0; - for (int i = 0; i < s->m_num_vals; i++) - { - Expr *e = &s->m_exprs[i]; - if (e->m_op != NULL) - n++; - } - return n; -} - - -#ifdef TILEPRO -bool -tilepro_emit (int multiplier, int num_ops) -{ - int abs_multiplier = (multiplier >= 0) ? multiplier : -multiplier; - - /* Keep constants in range [-1024, 1024]. */ - if (abs_multiplier <= 1024) - return true; - - /* Keep constants near powers of two. */ - int prev_pow2 = 1 << (31 - __builtin_clz (abs_multiplier)); - int next_pow2 = prev_pow2 << 1; - - if ((abs_multiplier - prev_pow2 <= 10) - || (next_pow2 - abs_multiplier <= 10)) - return true; - - /* Keep constants near powers of ten. */ - { - long long j = 1; - long long prev_pow10; - long long next_pow10; - - while (((j * 10) < abs_multiplier) - && (j < (j * 10))) - j = j * 10; - - prev_pow10 = j; - next_pow10 = j * 10; - - if ((abs_multiplier - prev_pow10 <= 10) - || (next_pow10 - abs_multiplier <= 10)) - return true; - } - - /* Keep short sequences that have two or fewer ops. */ - if (num_ops <= 2) - return true; - - /* Keep constants that are mostly 0's or mostly 1's. */ - if (__builtin_popcount (multiplier) <= 2 || - __builtin_popcount (multiplier) >= 30) - return true; - - /* Keep constants seen in actual code. */ - if ((find_mult_constants_used (multiplier))) - return true; - - return false; -} -#else -bool -tilegx_emit (long long multiplier, int num_ops) -{ - long long abs_multiplier = (multiplier >= 0) ? multiplier : - multiplier; - - /* Keep constants in range [-1024, 1024]. */ - if (abs_multiplier <= 1024) - return true; - - /* Otherwise exclude sequences with four ops. */ - if (num_ops > 3) - return false; - - /* Keep constants near powers of two. */ - { - unsigned long long prev_pow2 = - 1LL << (63 - __builtin_clzll (abs_multiplier)); - unsigned long long next_pow2 = prev_pow2 << 1; - - /* handle overflow case. */ - if (next_pow2 == 0) - { - if (prev_pow2 - abs_multiplier <= 10) - return true; - } - else if ((abs_multiplier - prev_pow2 <= 10) - || (next_pow2 - abs_multiplier <= 10)) - return true; - } - - /* Keep constants near powers of ten. */ - { - long long j = 1; - long long prev_pow10; - long long next_pow10; - - while (((j * 10) < abs_multiplier) - && (j < (j * 10))) - j = j * 10; - - prev_pow10 = j; - next_pow10 = j * 10; - - if ((abs_multiplier - prev_pow10 <= 100) - || (next_pow10 - && (next_pow10 - abs_multiplier <= 100))) - return true; - } - - if (num_ops <= 2) - return true; - - /* Keep constants that are mostly 0's or mostly 1's. */ - if (__builtin_popcountll (multiplier) <= 2 || - __builtin_popcountll (multiplier) >= 62) - return true; - - /* Keep constants seen in actual code. */ - if (find_mult_constants_used (multiplier)) - return true; - - return false; -} -#endif - - -int -main () -{ - ExpressionTreeMap best_solution; - ExpressionTree s; - -#ifdef TILEPRO - printf ("/* Constant multiply table for TILEPro.\n"); -#else - printf ("/* Constant multiply table for TILE-Gx.\n"); -#endif - printf (" Copyright (C) 2011-2022 Free Software Foundation, Inc.\n"); - printf (" Contributed by Walter Lee (walt@tilera.com)\n"); - printf ("\n"); - printf (" This file is part of GCC.\n"); - printf ("\n"); - printf (" GCC is free software; you can redistribute it and/or modify it\n"); - printf (" under the terms of the GNU General Public License as published\n"); - printf (" by the Free Software Foundation; either version 3, or (at your\n"); - printf (" option) any later version.\n"); - printf ("\n"); - printf (" GCC is distributed in the hope that it will be useful, but WITHOUT\n"); - printf (" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n"); - printf (" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public\n"); - printf (" License for more details.\n"); - printf ("\n"); - printf (" You should have received a copy of the GNU General Public License\n"); - printf (" along with GCC; see the file COPYING3. If not see\n"); - printf (" . */\n"); - printf ("\n"); - printf ("/* Note this file is auto-generated from gen-mul-tables.cc.\n"); - printf (" Make any required changes there. */\n"); - printf ("\n"); - printf ("#define IN_TARGET_CODE 1\n"); - printf ("\n"); - printf ("#include \"config.h\"\n"); - printf ("#include \"system.h\"\n"); - printf ("#include \"coretypes.h\"\n"); - printf ("#include \"backend.h\"\n"); - printf ("#include \"rtl.h\"\n"); - printf ("#include \"expmed.h\"\n"); - printf ("#include \"%s-multiply.h\"\n\n", ARCH); - create_insn_code_compression_table (); - - /* Try all combinations of operators and see what constants we - produce. For each possible constant, record the most efficient - way to generate it. */ - find_sequences (s, best_solution); - - printf ("const struct %s_multiply_insn_seq " - "%s_multiply_insn_seq_table[] = {\n", - ARCH, ARCH); - - const char *comma_separator = ""; - - ExpressionTreeMap::iterator i (best_solution.begin ()); - for (; i != best_solution.end (); ++i) - { - ExpressionTree *s = (*i).second; - const MUL_TYPE n = (*i).first; - - if (n == 0 || n == 1) - { - /* Both of these require zero operations, so these entries - are bogus and should never be used. */ - continue; - } - - /* Prune the list of entries to keep the table to a reasonable - size. */ -#ifdef TILEPRO - if (!tilepro_emit (n, num_ops (s))) - continue; -#else - if (!tilegx_emit (n, num_ops (s))) - continue; -#endif - - printf ("%s", comma_separator); - -#ifdef TILEPRO - const MUL_TYPE int_min = INT32_MIN; -#else - const MUL_TYPE int_min = INT64_MIN; -#endif - if (n == int_min) - { - /* Handle C's woeful lack of unary negation. Without this, - printing out INT_MIN in decimal will yield an unsigned - int which could generate a compiler warning. */ -#ifdef TILEPRO - printf (" {%d - 1 /* 0x%x */ ,\n {", n + 1, - (unsigned) n); -#else - printf (" {%lldll - 1 /* 0x%llx */ ,\n {", n + 1, - (unsigned MUL_TYPE) n); -#endif - } - else - { -#ifdef TILEPRO - printf (" {%d /* 0x%x */ ,\n {", n, (unsigned) n); -#else - printf (" {%lldll /* 0x%llx */ ,\n {", n, (unsigned MUL_TYPE) n); -#endif - } - - bool first = true; - for (int j = 0; j < s->m_num_vals; j++) - { - Expr *e = &s->m_exprs[j]; - - const Operator *op = e->m_op; - if (op == NULL) - continue; - - char buf[1024]; - snprintf (buf, sizeof buf, "%s{%d, %d, %d}%s", - first ? "" : " ", - op->m_top_index, - e->m_lhs, e->m_rhs, (j + 1) == s->m_num_vals ? "}" : ","); - - char opnd0[10]; - if (e->m_lhs) - snprintf (opnd0, sizeof opnd0, "r%d", e->m_lhs); - else - snprintf (opnd0, sizeof opnd0, "zero"); - - printf ("%s\t\t\t/* %s r%d, %s, %s%d */\n", - buf, op->m_name, j, opnd0, - op->is_unary () ? "" : "r", e->m_rhs); - - first = false; - } - printf (" }"); - comma_separator = ",\n"; - } - - printf ("\n};\n\n"); - printf ("const int %s_multiply_insn_seq_table_size =\n" - " (int) (sizeof %s_multiply_insn_seq_table\n" - " / sizeof %s_multiply_insn_seq_table[0]);\n", - ARCH, ARCH, ARCH); - - return EXIT_SUCCESS; -} diff --git a/gcc/config/tilepro/linux.h b/gcc/config/tilepro/linux.h deleted file mode 100644 index 65a411e..0000000 --- a/gcc/config/tilepro/linux.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Definitions for TILEPro running Linux-based GNU systems with ELF. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#undef CPP_SPEC -#define CPP_SPEC "%{pthread:-D_REENTRANT}" - -#undef LINK_SPEC -#define LINK_SPEC "\ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker /lib/ld.so.1} \ - %{static:-static}}" - -#define NO_PROFILE_COUNTERS 1 - -#undef MCOUNT_NAME -#define MCOUNT_NAME "__mcount" - -#undef NEED_INDICATE_EXEC_STACK -#define NEED_INDICATE_EXEC_STACK 1 - -#ifdef TARGET_LIBC_PROVIDES_SSP -/* TILEPro glibc provides __stack_chk_guard two pointer-size words before - tp. */ -#define TARGET_THREAD_SSP_OFFSET (-2 * GET_MODE_SIZE (ptr_mode)) -#endif - -/* For __clear_cache in libgcc2.c. */ -#ifdef IN_LIBGCC2 - -/* Use the minimum page size of 4K. Alternatively we can call - getpagesize() but it introduces a libc dependence. - See Linux arch/tile/include/uapi/arch/icache.h for more commentary. */ -#undef CLEAR_INSN_CACHE -#define CLEAR_INSN_CACHE(BEG, END) \ -{ \ - long size = (long) (END) - (long) (BEG); \ - if (size) \ - { \ - const char *start = (const char *) ((unsigned long) (BEG) & -64L);\ - const char *end = start + (size < 16384 ? size : 16384) - 1; \ - long num_passes = 4; \ - __insn_mf (); \ - do \ - { \ - const char *p; \ - for (p = start; p <= end; p += 64) \ - __insn_icoh (p); \ - start += 4096; \ - end += 4096; \ - } \ - while (--num_passes > 0); \ - __insn_drain (); \ - } \ -} - -#else - -/* define CLEAR_INSN_CACHE so that gcc knows to expand __builtin__clear_cache - to the libraray call. */ -#undef CLEAR_INSN_CACHE -#define CLEAR_INSN_CACHE 1 - -#endif diff --git a/gcc/config/tilepro/mul-tables.cc b/gcc/config/tilepro/mul-tables.cc deleted file mode 100644 index 35867b3..0000000 --- a/gcc/config/tilepro/mul-tables.cc +++ /dev/null @@ -1,17837 +0,0 @@ -/* Constant multiply table for TILEPro. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -/* Note this file is auto-generated from gen-mul-tables.cc. - Make any required changes there. */ - -#define IN_TARGET_CODE 1 - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "rtl.h" -#include "expmed.h" -#include "tilepro-multiply.h" - -const enum insn_code tilepro_multiply_insn_seq_decode_opcode[] = { - CODE_FOR_nothing /* must be first */ , - CODE_FOR_addsi3, - CODE_FOR_subsi3, - CODE_FOR_insn_s1a, - CODE_FOR_insn_s2a, - CODE_FOR_insn_s3a, - CODE_FOR_ashlsi3 -}; - -const struct tilepro_multiply_insn_seq tilepro_multiply_insn_seq_table[] = { - {-2147483647 - 1 /* 0x80000000 */ , - {{6, 1, 31}} /* shli r2, r1, 31 */ - }, - {-2147483647 /* 0x80000001 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {-2147483646 /* 0x80000002 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {-2147483645 /* 0x80000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147483644 /* 0x80000004 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {-2147483643 /* 0x80000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147483642 /* 0x80000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-2147483641 /* 0x80000007 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {-2147483640 /* 0x80000008 */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {-2147483639 /* 0x80000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147483638 /* 0x8000000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-2147483632 /* 0x80000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147483616 /* 0x80000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147483584 /* 0x80000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147483520 /* 0x80000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147483392 /* 0x80000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147483136 /* 0x80000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147482624 /* 0x80000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147481600 /* 0x80000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147479552 /* 0x80001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147475456 /* 0x80002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147467264 /* 0x80004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147450880 /* 0x80008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147418112 /* 0x80010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147352576 /* 0x80020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2147221504 /* 0x80040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2146959360 /* 0x80080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2146435072 /* 0x80100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2145386496 /* 0x80200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2143289344 /* 0x80400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2139095040 /* 0x80800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2130706432 /* 0x81000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2113929216 /* 0x82000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2080374784 /* 0x84000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-2013265920 /* 0x88000000 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {-1879048192 /* 0x90000000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 28}} /* shli r3, r2, 28 */ - }, - {-1610612737 /* 0x9fffffff */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 29}, /* shli r3, r2, 29 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {-1610612736 /* 0xa0000000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 29}} /* shli r3, r2, 29 */ - }, - {-1342177281 /* 0xafffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 28}, /* shli r4, r3, 28 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1207959553 /* 0xb7ffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 27}, /* shli r4, r3, 27 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1140850689 /* 0xbbffffff */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-1073741889 /* 0xbfffffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}, /* shli r3, r2, 27 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1073741857 /* 0xbfffffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}, /* shli r3, r2, 27 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1073741841 /* 0xbfffffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-1073741834 /* 0xbffffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 30}, /* shli r4, r2, 30 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-1073741833 /* 0xbffffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1073741832 /* 0xbffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 30}, /* shli r3, r2, 30 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-1073741831 /* 0xbffffff9 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1073741830 /* 0xbffffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 30}, /* shli r4, r2, 30 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {-1073741829 /* 0xbffffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-1073741828 /* 0xbffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 30}, /* shli r3, r2, 30 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-1073741827 /* 0xbffffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 30}, /* shli r3, r2, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {-1073741826 /* 0xbffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 30}, /* shli r3, r2, 30 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-1073741825 /* 0xbfffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741824 /* 0xc0000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 30}} /* shli r3, r2, 30 */ - }, - {-1073741823 /* 0xc0000001 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-1073741822 /* 0xc0000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741821 /* 0xc0000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741820 /* 0xc0000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741819 /* 0xc0000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741818 /* 0xc0000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 30}, /* shli r3, r2, 30 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-1073741817 /* 0xc0000007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 27}, /* shli r4, r2, 27 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1073741816 /* 0xc0000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741815 /* 0xc0000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1073741814 /* 0xc000000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-805306369 /* 0xcfffffff */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-671088641 /* 0xd7ffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 27}, /* shli r4, r3, 27 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-603979777 /* 0xdbffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 26}, /* shli r4, r3, 26 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-570425345 /* 0xddffffff */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-536870977 /* 0xdfffffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}, /* shli r3, r2, 26 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-536870945 /* 0xdfffffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}, /* shli r3, r2, 26 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-536870929 /* 0xdfffffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-536870922 /* 0xdffffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 29}, /* shli r4, r2, 29 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-536870921 /* 0xdffffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-536870920 /* 0xdffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 29}, /* shli r3, r2, 29 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-536870919 /* 0xdffffff9 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-536870918 /* 0xdffffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-536870917 /* 0xdffffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-536870916 /* 0xdffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 29}, /* shli r3, r2, 29 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-536870915 /* 0xdffffffd */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-536870914 /* 0xdffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 29}, /* shli r3, r2, 29 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-536870913 /* 0xdfffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870912 /* 0xe0000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 29}} /* shli r3, r2, 29 */ - }, - {-536870911 /* 0xe0000001 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-536870910 /* 0xe0000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870909 /* 0xe0000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870908 /* 0xe0000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870907 /* 0xe0000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870906 /* 0xe0000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-536870905 /* 0xe0000007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 26}, /* shli r4, r2, 26 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-536870904 /* 0xe0000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870903 /* 0xe0000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-536870902 /* 0xe000000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-402653185 /* 0xe7ffffff */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-335544321 /* 0xebffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 26}, /* shli r4, r3, 26 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-301989889 /* 0xedffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 25}, /* shli r4, r3, 25 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-285212673 /* 0xeeffffff */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-268435521 /* 0xefffffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}, /* shli r3, r2, 25 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-268435489 /* 0xefffffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}, /* shli r3, r2, 25 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-268435473 /* 0xefffffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-268435466 /* 0xeffffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 28}, /* shli r4, r2, 28 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-268435465 /* 0xeffffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-268435464 /* 0xeffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 28}, /* shli r3, r2, 28 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-268435463 /* 0xeffffff9 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-268435462 /* 0xeffffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-268435461 /* 0xeffffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-268435460 /* 0xeffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 28}, /* shli r3, r2, 28 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-268435459 /* 0xeffffffd */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-268435458 /* 0xeffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 28}, /* shli r3, r2, 28 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-268435457 /* 0xefffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435456 /* 0xf0000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 28}} /* shli r3, r2, 28 */ - }, - {-268435455 /* 0xf0000001 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-268435454 /* 0xf0000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435453 /* 0xf0000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435452 /* 0xf0000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435451 /* 0xf0000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435450 /* 0xf0000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-268435449 /* 0xf0000007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 25}, /* shli r4, r2, 25 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-268435448 /* 0xf0000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435447 /* 0xf0000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-268435446 /* 0xf000000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-201326593 /* 0xf3ffffff */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-167772161 /* 0xf5ffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 25}, /* shli r4, r3, 25 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-150994945 /* 0xf6ffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 24}, /* shli r4, r3, 24 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-142606337 /* 0xf77fffff */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-134217793 /* 0xf7ffffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}, /* shli r3, r2, 24 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-134217761 /* 0xf7ffffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}, /* shli r3, r2, 24 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-134217745 /* 0xf7ffffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-134217738 /* 0xf7fffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 27}, /* shli r4, r2, 27 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-134217737 /* 0xf7fffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-134217736 /* 0xf7fffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}, /* shli r3, r2, 27 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-134217735 /* 0xf7fffff9 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-134217734 /* 0xf7fffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-134217733 /* 0xf7fffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-134217732 /* 0xf7fffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}, /* shli r3, r2, 27 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-134217731 /* 0xf7fffffd */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-134217730 /* 0xf7fffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}, /* shli r3, r2, 27 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-134217729 /* 0xf7ffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217728 /* 0xf8000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 27}} /* shli r3, r2, 27 */ - }, - {-134217727 /* 0xf8000001 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-134217726 /* 0xf8000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217725 /* 0xf8000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217724 /* 0xf8000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217723 /* 0xf8000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217722 /* 0xf8000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-134217721 /* 0xf8000007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 24}, /* shli r4, r2, 24 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-134217720 /* 0xf8000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217719 /* 0xf8000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134217718 /* 0xf800000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-100663297 /* 0xf9ffffff */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-83886081 /* 0xfaffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 24}, /* shli r4, r3, 24 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-75497473 /* 0xfb7fffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 23}, /* shli r4, r3, 23 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-71303169 /* 0xfbbfffff */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-67108929 /* 0xfbffffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}, /* shli r3, r2, 23 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-67108897 /* 0xfbffffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}, /* shli r3, r2, 23 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-67108881 /* 0xfbffffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-67108874 /* 0xfbfffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 26}, /* shli r4, r2, 26 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-67108873 /* 0xfbfffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-67108872 /* 0xfbfffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}, /* shli r3, r2, 26 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-67108871 /* 0xfbfffff9 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-67108870 /* 0xfbfffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-67108869 /* 0xfbfffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-67108868 /* 0xfbfffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}, /* shli r3, r2, 26 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-67108867 /* 0xfbfffffd */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-67108866 /* 0xfbfffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}, /* shli r3, r2, 26 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-67108865 /* 0xfbffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108864 /* 0xfc000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 26}} /* shli r3, r2, 26 */ - }, - {-67108863 /* 0xfc000001 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-67108862 /* 0xfc000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108861 /* 0xfc000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108860 /* 0xfc000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108859 /* 0xfc000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108858 /* 0xfc000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-67108857 /* 0xfc000007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 23}, /* shli r4, r2, 23 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-67108856 /* 0xfc000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108855 /* 0xfc000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-67108854 /* 0xfc00000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-50331649 /* 0xfcffffff */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-41943041 /* 0xfd7fffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 23}, /* shli r4, r3, 23 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-37748737 /* 0xfdbfffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 22}, /* shli r4, r3, 22 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-35651585 /* 0xfddfffff */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-33554497 /* 0xfdffffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}, /* shli r3, r2, 22 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-33554465 /* 0xfdffffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}, /* shli r3, r2, 22 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-33554449 /* 0xfdffffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-33554442 /* 0xfdfffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 25}, /* shli r4, r2, 25 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-33554441 /* 0xfdfffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-33554440 /* 0xfdfffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}, /* shli r3, r2, 25 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-33554439 /* 0xfdfffff9 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-33554438 /* 0xfdfffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-33554437 /* 0xfdfffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-33554436 /* 0xfdfffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}, /* shli r3, r2, 25 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-33554435 /* 0xfdfffffd */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-33554434 /* 0xfdfffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}, /* shli r3, r2, 25 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-33554433 /* 0xfdffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554432 /* 0xfe000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 25}} /* shli r3, r2, 25 */ - }, - {-33554431 /* 0xfe000001 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-33554430 /* 0xfe000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554429 /* 0xfe000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554428 /* 0xfe000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554427 /* 0xfe000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554426 /* 0xfe000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-33554425 /* 0xfe000007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 22}, /* shli r4, r2, 22 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-33554424 /* 0xfe000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554423 /* 0xfe000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-33554422 /* 0xfe00000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-25165825 /* 0xfe7fffff */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-20971521 /* 0xfebfffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 22}, /* shli r4, r3, 22 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-18874369 /* 0xfedfffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 21}, /* shli r4, r3, 21 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-17825793 /* 0xfeefffff */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-16777281 /* 0xfeffffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}, /* shli r3, r2, 21 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-16777249 /* 0xfeffffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}, /* shli r3, r2, 21 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-16777233 /* 0xfeffffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-16777226 /* 0xfefffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 24}, /* shli r4, r2, 24 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-16777225 /* 0xfefffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-16777224 /* 0xfefffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}, /* shli r3, r2, 24 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-16777223 /* 0xfefffff9 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-16777222 /* 0xfefffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-16777221 /* 0xfefffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-16777220 /* 0xfefffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}, /* shli r3, r2, 24 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-16777219 /* 0xfefffffd */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-16777218 /* 0xfefffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}, /* shli r3, r2, 24 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-16777217 /* 0xfeffffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777216 /* 0xff000000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 24}} /* shli r3, r2, 24 */ - }, - {-16777215 /* 0xff000001 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-16777214 /* 0xff000002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777213 /* 0xff000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777212 /* 0xff000004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777211 /* 0xff000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777210 /* 0xff000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-16777209 /* 0xff000007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 21}, /* shli r4, r2, 21 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-16777208 /* 0xff000008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777207 /* 0xff000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16777206 /* 0xff00000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-12582913 /* 0xff3fffff */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-11796480 /* 0xff4c0000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 18}, /* shli r3, r2, 18 */ - {6, 2, 22}, /* shli r4, r2, 22 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-10485761 /* 0xff5fffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 21}, /* shli r4, r3, 21 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-9437185 /* 0xff6fffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 20}, /* shli r4, r3, 20 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-8912897 /* 0xff77ffff */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-8388673 /* 0xff7fffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}, /* shli r3, r2, 20 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-8388641 /* 0xff7fffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}, /* shli r3, r2, 20 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-8388625 /* 0xff7fffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-8388618 /* 0xff7ffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 23}, /* shli r4, r2, 23 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-8388617 /* 0xff7ffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-8388616 /* 0xff7ffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}, /* shli r3, r2, 23 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-8388615 /* 0xff7ffff9 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8388614 /* 0xff7ffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-8388613 /* 0xff7ffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-8388612 /* 0xff7ffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}, /* shli r3, r2, 23 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-8388611 /* 0xff7ffffd */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8388610 /* 0xff7ffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}, /* shli r3, r2, 23 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-8388609 /* 0xff7fffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388608 /* 0xff800000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 23}} /* shli r3, r2, 23 */ - }, - {-8388607 /* 0xff800001 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-8388606 /* 0xff800002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388605 /* 0xff800003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388604 /* 0xff800004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388603 /* 0xff800005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388602 /* 0xff800006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-8388601 /* 0xff800007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 20}, /* shli r4, r2, 20 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-8388600 /* 0xff800008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388599 /* 0xff800009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8388598 /* 0xff80000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-6291457 /* 0xff9fffff */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-5242881 /* 0xffafffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 20}, /* shli r4, r3, 20 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-4718593 /* 0xffb7ffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 19}, /* shli r4, r3, 19 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-4456449 /* 0xffbbffff */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-4194369 /* 0xffbfffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}, /* shli r3, r2, 19 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-4194337 /* 0xffbfffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}, /* shli r3, r2, 19 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-4194321 /* 0xffbfffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-4194314 /* 0xffbffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 22}, /* shli r4, r2, 22 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-4194313 /* 0xffbffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-4194312 /* 0xffbffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}, /* shli r3, r2, 22 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-4194311 /* 0xffbffff9 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4194310 /* 0xffbffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-4194309 /* 0xffbffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-4194308 /* 0xffbffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}, /* shli r3, r2, 22 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-4194307 /* 0xffbffffd */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4194306 /* 0xffbffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}, /* shli r3, r2, 22 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-4194305 /* 0xffbfffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194304 /* 0xffc00000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 22}} /* shli r3, r2, 22 */ - }, - {-4194303 /* 0xffc00001 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-4194302 /* 0xffc00002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194301 /* 0xffc00003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194300 /* 0xffc00004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194299 /* 0xffc00005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194298 /* 0xffc00006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-4194297 /* 0xffc00007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 19}, /* shli r4, r2, 19 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-4194296 /* 0xffc00008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194295 /* 0xffc00009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4194294 /* 0xffc0000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-3145729 /* 0xffcfffff */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2621441 /* 0xffd7ffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 19}, /* shli r4, r3, 19 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-2359297 /* 0xffdbffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 18}, /* shli r4, r3, 18 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-2228225 /* 0xffddffff */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-2097217 /* 0xffdfffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}, /* shli r3, r2, 18 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-2097185 /* 0xffdfffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}, /* shli r3, r2, 18 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-2097169 /* 0xffdfffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-2097162 /* 0xffdffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 21}, /* shli r4, r2, 21 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-2097161 /* 0xffdffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-2097160 /* 0xffdffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}, /* shli r3, r2, 21 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-2097159 /* 0xffdffff9 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2097158 /* 0xffdffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-2097157 /* 0xffdffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-2097156 /* 0xffdffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}, /* shli r3, r2, 21 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-2097155 /* 0xffdffffd */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2097154 /* 0xffdffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}, /* shli r3, r2, 21 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-2097153 /* 0xffdfffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097152 /* 0xffe00000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 21}} /* shli r3, r2, 21 */ - }, - {-2097151 /* 0xffe00001 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2097150 /* 0xffe00002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097149 /* 0xffe00003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097148 /* 0xffe00004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097147 /* 0xffe00005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097146 /* 0xffe00006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-2097145 /* 0xffe00007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 18}, /* shli r4, r2, 18 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-2097144 /* 0xffe00008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097143 /* 0xffe00009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2097142 /* 0xffe0000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1572865 /* 0xffe7ffff */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1310721 /* 0xffebffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 18}, /* shli r4, r3, 18 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1179649 /* 0xffedffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 17}, /* shli r4, r3, 17 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1114113 /* 0xffeeffff */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-1048641 /* 0xffefffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}, /* shli r3, r2, 17 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1048609 /* 0xffefffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}, /* shli r3, r2, 17 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1048593 /* 0xffefffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-1048586 /* 0xffeffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 20}, /* shli r4, r2, 20 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-1048585 /* 0xffeffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1048584 /* 0xffeffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}, /* shli r3, r2, 20 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-1048583 /* 0xffeffff9 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1048582 /* 0xffeffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1048581 /* 0xffeffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-1048580 /* 0xffeffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}, /* shli r3, r2, 20 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-1048579 /* 0xffeffffd */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1048578 /* 0xffeffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}, /* shli r3, r2, 20 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-1048577 /* 0xffefffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048576 /* 0xfff00000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 20}} /* shli r3, r2, 20 */ - }, - {-1048575 /* 0xfff00001 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-1048574 /* 0xfff00002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048573 /* 0xfff00003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048572 /* 0xfff00004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048571 /* 0xfff00005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048570 /* 0xfff00006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-1048569 /* 0xfff00007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 17}, /* shli r4, r2, 17 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1048568 /* 0xfff00008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048567 /* 0xfff00009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1048566 /* 0xfff0000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-786433 /* 0xfff3ffff */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-655361 /* 0xfff5ffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 17}, /* shli r4, r3, 17 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-589825 /* 0xfff6ffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 16}, /* shli r4, r3, 16 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-557057 /* 0xfff77fff */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-524353 /* 0xfff7ffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}, /* shli r3, r2, 16 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-524321 /* 0xfff7ffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}, /* shli r3, r2, 16 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-524305 /* 0xfff7ffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-524298 /* 0xfff7fff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 19}, /* shli r4, r2, 19 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-524297 /* 0xfff7fff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-524296 /* 0xfff7fff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}, /* shli r3, r2, 19 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-524295 /* 0xfff7fff9 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-524294 /* 0xfff7fffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-524293 /* 0xfff7fffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-524292 /* 0xfff7fffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}, /* shli r3, r2, 19 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-524291 /* 0xfff7fffd */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-524290 /* 0xfff7fffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}, /* shli r3, r2, 19 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-524289 /* 0xfff7ffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524288 /* 0xfff80000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 19}} /* shli r3, r2, 19 */ - }, - {-524287 /* 0xfff80001 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-524286 /* 0xfff80002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524285 /* 0xfff80003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524284 /* 0xfff80004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524283 /* 0xfff80005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524282 /* 0xfff80006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-524281 /* 0xfff80007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 16}, /* shli r4, r2, 16 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-524280 /* 0xfff80008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524279 /* 0xfff80009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-524278 /* 0xfff8000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-393217 /* 0xfff9ffff */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-327681 /* 0xfffaffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 16}, /* shli r4, r3, 16 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-294913 /* 0xfffb7fff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 15}, /* shli r4, r3, 15 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-278529 /* 0xfffbbfff */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-262209 /* 0xfffbffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}, /* shli r3, r2, 15 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-262177 /* 0xfffbffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}, /* shli r3, r2, 15 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-262161 /* 0xfffbffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-262154 /* 0xfffbfff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 18}, /* shli r4, r2, 18 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-262153 /* 0xfffbfff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-262152 /* 0xfffbfff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}, /* shli r3, r2, 18 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-262151 /* 0xfffbfff9 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-262150 /* 0xfffbfffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-262149 /* 0xfffbfffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-262148 /* 0xfffbfffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}, /* shli r3, r2, 18 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-262147 /* 0xfffbfffd */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-262146 /* 0xfffbfffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}, /* shli r3, r2, 18 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-262145 /* 0xfffbffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262144 /* 0xfffc0000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 18}} /* shli r3, r2, 18 */ - }, - {-262143 /* 0xfffc0001 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-262142 /* 0xfffc0002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262141 /* 0xfffc0003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262140 /* 0xfffc0004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262139 /* 0xfffc0005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262138 /* 0xfffc0006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-262137 /* 0xfffc0007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 15}, /* shli r4, r2, 15 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-262136 /* 0xfffc0008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262135 /* 0xfffc0009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-262134 /* 0xfffc000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-196609 /* 0xfffcffff */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-163841 /* 0xfffd7fff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 15}, /* shli r4, r3, 15 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-147457 /* 0xfffdbfff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 14}, /* shli r4, r3, 14 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-139265 /* 0xfffddfff */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-131137 /* 0xfffdffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}, /* shli r3, r2, 14 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-131105 /* 0xfffdffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}, /* shli r3, r2, 14 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-131089 /* 0xfffdffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-131082 /* 0xfffdfff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 17}, /* shli r4, r2, 17 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-131081 /* 0xfffdfff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-131080 /* 0xfffdfff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}, /* shli r3, r2, 17 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-131079 /* 0xfffdfff9 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-131078 /* 0xfffdfffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-131077 /* 0xfffdfffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-131076 /* 0xfffdfffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}, /* shli r3, r2, 17 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-131075 /* 0xfffdfffd */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-131074 /* 0xfffdfffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}, /* shli r3, r2, 17 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-131073 /* 0xfffdffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131072 /* 0xfffe0000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 17}} /* shli r3, r2, 17 */ - }, - {-131071 /* 0xfffe0001 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-131070 /* 0xfffe0002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131069 /* 0xfffe0003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131068 /* 0xfffe0004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131067 /* 0xfffe0005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131066 /* 0xfffe0006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-131065 /* 0xfffe0007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 14}, /* shli r4, r2, 14 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-131064 /* 0xfffe0008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131063 /* 0xfffe0009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-131062 /* 0xfffe000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-98305 /* 0xfffe7fff */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-81921 /* 0xfffebfff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 14}, /* shli r4, r3, 14 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-73729 /* 0xfffedfff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 13}, /* shli r4, r3, 13 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-69633 /* 0xfffeefff */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-65601 /* 0xfffeffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}, /* shli r3, r2, 13 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-65569 /* 0xfffeffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}, /* shli r3, r2, 13 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-65553 /* 0xfffeffef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-65546 /* 0xfffefff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 16}, /* shli r4, r2, 16 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-65545 /* 0xfffefff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-65544 /* 0xfffefff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}, /* shli r3, r2, 16 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-65543 /* 0xfffefff9 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-65542 /* 0xfffefffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-65541 /* 0xfffefffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-65540 /* 0xfffefffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}, /* shli r3, r2, 16 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-65539 /* 0xfffefffd */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-65538 /* 0xfffefffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}, /* shli r3, r2, 16 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-65537 /* 0xfffeffff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65536 /* 0xffff0000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 16}} /* shli r3, r2, 16 */ - }, - {-65535 /* 0xffff0001 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-65534 /* 0xffff0002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65533 /* 0xffff0003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65532 /* 0xffff0004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65531 /* 0xffff0005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65530 /* 0xffff0006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-65529 /* 0xffff0007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 13}, /* shli r4, r2, 13 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-65528 /* 0xffff0008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65527 /* 0xffff0009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-65526 /* 0xffff000a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-49153 /* 0xffff3fff */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-40961 /* 0xffff5fff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 13}, /* shli r4, r3, 13 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-36865 /* 0xffff6fff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 12}, /* shli r4, r3, 12 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-34817 /* 0xffff77ff */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-32833 /* 0xffff7fbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}, /* shli r3, r2, 12 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-32801 /* 0xffff7fdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}, /* shli r3, r2, 12 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-32785 /* 0xffff7fef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-32778 /* 0xffff7ff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 15}, /* shli r4, r2, 15 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-32777 /* 0xffff7ff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-32776 /* 0xffff7ff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}, /* shli r3, r2, 15 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-32775 /* 0xffff7ff9 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-32774 /* 0xffff7ffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-32773 /* 0xffff7ffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-32772 /* 0xffff7ffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}, /* shli r3, r2, 15 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-32771 /* 0xffff7ffd */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-32770 /* 0xffff7ffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}, /* shli r3, r2, 15 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-32769 /* 0xffff7fff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32768 /* 0xffff8000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 15}} /* shli r3, r2, 15 */ - }, - {-32767 /* 0xffff8001 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-32766 /* 0xffff8002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32765 /* 0xffff8003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32764 /* 0xffff8004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32763 /* 0xffff8005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32762 /* 0xffff8006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-32761 /* 0xffff8007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 12}, /* shli r4, r2, 12 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-32760 /* 0xffff8008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32759 /* 0xffff8009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32758 /* 0xffff800a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-24577 /* 0xffff9fff */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-20481 /* 0xffffafff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 12}, /* shli r4, r3, 12 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-19447 /* 0xffffb409 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 10}, /* shli r4, r3, 10 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-18433 /* 0xffffb7ff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 11}, /* shli r4, r3, 11 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-17409 /* 0xffffbbff */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-16449 /* 0xffffbfbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}, /* shli r3, r2, 11 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-16423 /* 0xffffbfd9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-16417 /* 0xffffbfdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}, /* shli r3, r2, 11 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-16401 /* 0xffffbfef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-16394 /* 0xffffbff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 14}, /* shli r4, r2, 14 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-16393 /* 0xffffbff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-16392 /* 0xffffbff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}, /* shli r3, r2, 14 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-16391 /* 0xffffbff9 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-16390 /* 0xffffbffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-16389 /* 0xffffbffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-16388 /* 0xffffbffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}, /* shli r3, r2, 14 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-16387 /* 0xffffbffd */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-16386 /* 0xffffbffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}, /* shli r3, r2, 14 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-16385 /* 0xffffbfff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16384 /* 0xffffc000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 14}} /* shli r3, r2, 14 */ - }, - {-16383 /* 0xffffc001 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-16382 /* 0xffffc002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16381 /* 0xffffc003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16380 /* 0xffffc004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16379 /* 0xffffc005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16378 /* 0xffffc006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-16377 /* 0xffffc007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 11}, /* shli r4, r2, 11 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-16376 /* 0xffffc008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16375 /* 0xffffc009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16374 /* 0xffffc00a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-12289 /* 0xffffcfff */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-11248 /* 0xffffd410 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-10241 /* 0xffffd7ff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 11}, /* shli r4, r3, 11 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-9232 /* 0xffffdbf0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-9217 /* 0xffffdbff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 10}, /* shli r4, r3, 10 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-9198 /* 0xffffdc12 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-9191 /* 0xffffdc19 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 3}, /* s1a r4, r1, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-8705 /* 0xffffddff */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-8257 /* 0xffffdfbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-8225 /* 0xffffdfdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-8209 /* 0xffffdfef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-8208 /* 0xffffdff0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-8202 /* 0xffffdff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 13}, /* shli r4, r2, 13 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-8201 /* 0xffffdff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-8200 /* 0xffffdff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}, /* shli r3, r2, 13 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-8199 /* 0xffffdff9 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8198 /* 0xffffdffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-8197 /* 0xffffdffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-8196 /* 0xffffdffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}, /* shli r3, r2, 13 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-8195 /* 0xffffdffd */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-8194 /* 0xffffdffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}, /* shli r3, r2, 13 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-8193 /* 0xffffdfff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8192 /* 0xffffe000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 13}} /* shli r3, r2, 13 */ - }, - {-8191 /* 0xffffe001 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-8190 /* 0xffffe002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8189 /* 0xffffe003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8188 /* 0xffffe004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8187 /* 0xffffe005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8186 /* 0xffffe006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-8185 /* 0xffffe007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-8184 /* 0xffffe008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8183 /* 0xffffe009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-8182 /* 0xffffe00a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-7678 /* 0xffffe202 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-6145 /* 0xffffe7ff */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-5121 /* 0xffffebff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 10}, /* shli r4, r3, 10 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-4609 /* 0xffffedff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 9}, /* shli r4, r3, 9 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-4353 /* 0xffffeeff */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-4161 /* 0xffffefbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}, /* shli r3, r2, 9 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-4129 /* 0xffffefdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}, /* shli r3, r2, 9 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-4113 /* 0xffffefef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-4106 /* 0xffffeff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 12}, /* shli r4, r2, 12 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-4105 /* 0xffffeff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-4104 /* 0xffffeff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}, /* shli r3, r2, 12 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-4103 /* 0xffffeff9 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4102 /* 0xffffeffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-4101 /* 0xffffeffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-4100 /* 0xffffeffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}, /* shli r3, r2, 12 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-4099 /* 0xffffeffd */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-4098 /* 0xffffeffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}, /* shli r3, r2, 12 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-4097 /* 0xffffefff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4096 /* 0xfffff000 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 12}} /* shli r3, r2, 12 */ - }, - {-4095 /* 0xfffff001 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-4094 /* 0xfffff002 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4093 /* 0xfffff003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4092 /* 0xfffff004 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4091 /* 0xfffff005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4090 /* 0xfffff006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-4089 /* 0xfffff007 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-4088 /* 0xfffff008 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4087 /* 0xfffff009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-4086 /* 0xfffff00a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-4078 /* 0xfffff012 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-3600 /* 0xfffff1f0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-3073 /* 0xfffff3ff */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-3072 /* 0xfffff400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2912 /* 0xfffff4a0 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-2561 /* 0xfffff5ff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 9}, /* shli r4, r3, 9 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-2305 /* 0xfffff6ff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-2184 /* 0xfffff778 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-2177 /* 0xfffff77f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-2113 /* 0xfffff7bf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-2081 /* 0xfffff7df */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-2065 /* 0xfffff7ef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-2058 /* 0xfffff7f6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 11}, /* shli r4, r2, 11 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-2057 /* 0xfffff7f7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-2056 /* 0xfffff7f8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}, /* shli r3, r2, 11 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-2055 /* 0xfffff7f9 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2054 /* 0xfffff7fa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-2053 /* 0xfffff7fb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-2052 /* 0xfffff7fc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}, /* shli r3, r2, 11 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-2051 /* 0xfffff7fd */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-2050 /* 0xfffff7fe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}, /* shli r3, r2, 11 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-2049 /* 0xfffff7ff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2048 /* 0xfffff800 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 11}} /* shli r3, r2, 11 */ - }, - {-2047 /* 0xfffff801 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2046 /* 0xfffff802 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2045 /* 0xfffff803 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2044 /* 0xfffff804 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2043 /* 0xfffff805 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2042 /* 0xfffff806 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-2041 /* 0xfffff807 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-2040 /* 0xfffff808 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2039 /* 0xfffff809 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-2038 /* 0xfffff80a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1537 /* 0xfffff9ff */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1512 /* 0xfffffa18 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1500 /* 0xfffffa24 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-1396 /* 0xfffffa8c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-1344 /* 0xfffffac0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1312 /* 0xfffffae0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-1281 /* 0xfffffaff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1153 /* 0xfffffb7f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1089 /* 0xfffffbbf */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-1059 /* 0xfffffbdd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1057 /* 0xfffffbdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1041 /* 0xfffffbef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-1034 /* 0xfffffbf6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-1033 /* 0xfffffbf7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1032 /* 0xfffffbf8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-1031 /* 0xfffffbf9 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1030 /* 0xfffffbfa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1029 /* 0xfffffbfb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-1028 /* 0xfffffbfc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-1027 /* 0xfffffbfd */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-1026 /* 0xfffffbfe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-1025 /* 0xfffffbff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1024 /* 0xfffffc00 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 10}} /* shli r3, r2, 10 */ - }, - {-1023 /* 0xfffffc01 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-1022 /* 0xfffffc02 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1021 /* 0xfffffc03 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1020 /* 0xfffffc04 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1019 /* 0xfffffc05 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1018 /* 0xfffffc06 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-1017 /* 0xfffffc07 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1016 /* 0xfffffc08 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1015 /* 0xfffffc09 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1014 /* 0xfffffc0a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1013 /* 0xfffffc0b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1012 /* 0xfffffc0c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-1011 /* 0xfffffc0d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-1010 /* 0xfffffc0e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 1, 3}, /* s1a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1009 /* 0xfffffc0f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1008 /* 0xfffffc10 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-1007 /* 0xfffffc11 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-1006 /* 0xfffffc12 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-1005 /* 0xfffffc13 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 1}} /* s1a r5, r4, r1 */ - }, - {-1004 /* 0xfffffc14 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-1003 /* 0xfffffc15 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-1001 /* 0xfffffc17 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-1000 /* 0xfffffc18 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-999 /* 0xfffffc19 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {-997 /* 0xfffffc1b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-996 /* 0xfffffc1c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {4, 1, 3}, /* s2a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-994 /* 0xfffffc1e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 1, 3}, /* s1a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-993 /* 0xfffffc1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-992 /* 0xfffffc20 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-991 /* 0xfffffc21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-990 /* 0xfffffc22 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-988 /* 0xfffffc24 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-987 /* 0xfffffc25 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-984 /* 0xfffffc28 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-983 /* 0xfffffc29 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {-979 /* 0xfffffc2d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-976 /* 0xfffffc30 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-975 /* 0xfffffc31 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {-969 /* 0xfffffc37 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-968 /* 0xfffffc38 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {5, 1, 3}, /* s3a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-967 /* 0xfffffc39 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-965 /* 0xfffffc3b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-964 /* 0xfffffc3c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {4, 1, 3}, /* s2a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-963 /* 0xfffffc3d */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 1}, /* s1a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-962 /* 0xfffffc3e */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 1, 3}, /* s1a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-961 /* 0xfffffc3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-960 /* 0xfffffc40 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-959 /* 0xfffffc41 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-958 /* 0xfffffc42 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-957 /* 0xfffffc43 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-956 /* 0xfffffc44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-955 /* 0xfffffc45 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {-953 /* 0xfffffc47 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-952 /* 0xfffffc48 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-951 /* 0xfffffc49 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {-945 /* 0xfffffc4f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {-944 /* 0xfffffc50 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-943 /* 0xfffffc51 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-942 /* 0xfffffc52 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {-940 /* 0xfffffc54 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-936 /* 0xfffffc58 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-935 /* 0xfffffc59 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-929 /* 0xfffffc5f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-928 /* 0xfffffc60 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-925 /* 0xfffffc63 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-924 /* 0xfffffc64 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-920 /* 0xfffffc68 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-919 /* 0xfffffc69 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-916 /* 0xfffffc6c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-913 /* 0xfffffc6f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-912 /* 0xfffffc70 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-911 /* 0xfffffc71 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-910 /* 0xfffffc72 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-905 /* 0xfffffc77 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-904 /* 0xfffffc78 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-903 /* 0xfffffc79 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {-902 /* 0xfffffc7a */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-901 /* 0xfffffc7b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-900 /* 0xfffffc7c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-899 /* 0xfffffc7d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-898 /* 0xfffffc7e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-897 /* 0xfffffc7f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-896 /* 0xfffffc80 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-895 /* 0xfffffc81 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-894 /* 0xfffffc82 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-893 /* 0xfffffc83 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-892 /* 0xfffffc84 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-891 /* 0xfffffc85 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-890 /* 0xfffffc86 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-889 /* 0xfffffc87 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-888 /* 0xfffffc88 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {-887 /* 0xfffffc89 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-886 /* 0xfffffc8a */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* s1a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-884 /* 0xfffffc8c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 1, 2}, /* s2a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-881 /* 0xfffffc8f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-880 /* 0xfffffc90 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-879 /* 0xfffffc91 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {3, 4, 1}} /* s1a r5, r4, r1 */ - }, - {-873 /* 0xfffffc97 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-872 /* 0xfffffc98 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-868 /* 0xfffffc9c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-865 /* 0xfffffc9f */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-864 /* 0xfffffca0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-863 /* 0xfffffca1 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-861 /* 0xfffffca3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-860 /* 0xfffffca4 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-856 /* 0xfffffca8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-855 /* 0xfffffca9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-847 /* 0xfffffcb1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-837 /* 0xfffffcbb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-835 /* 0xfffffcbd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-834 /* 0xfffffcbe */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {-832 /* 0xfffffcc0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 6}} /* shli r5, r4, 6 */ - }, - {-831 /* 0xfffffcc1 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-829 /* 0xfffffcc3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-828 /* 0xfffffcc4 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-827 /* 0xfffffcc5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-824 /* 0xfffffcc8 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-823 /* 0xfffffcc9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-819 /* 0xfffffccd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-816 /* 0xfffffcd0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-815 /* 0xfffffcd1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-803 /* 0xfffffcdd */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-801 /* 0xfffffcdf */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-800 /* 0xfffffce0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-799 /* 0xfffffce1 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-797 /* 0xfffffce3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-796 /* 0xfffffce4 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-795 /* 0xfffffce5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-793 /* 0xfffffce7 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-792 /* 0xfffffce8 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-791 /* 0xfffffce9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-789 /* 0xfffffceb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-788 /* 0xfffffcec */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-785 /* 0xfffffcef */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-784 /* 0xfffffcf0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-783 /* 0xfffffcf1 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-781 /* 0xfffffcf3 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-780 /* 0xfffffcf4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-779 /* 0xfffffcf5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-777 /* 0xfffffcf7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-776 /* 0xfffffcf8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-775 /* 0xfffffcf9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-774 /* 0xfffffcfa */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-773 /* 0xfffffcfb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-772 /* 0xfffffcfc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-771 /* 0xfffffcfd */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* s1a r5, r4, r4 */ - }, - {-770 /* 0xfffffcfe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-769 /* 0xfffffcff */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-768 /* 0xfffffd00 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-767 /* 0xfffffd01 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-766 /* 0xfffffd02 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-765 /* 0xfffffd03 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-764 /* 0xfffffd04 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {-763 /* 0xfffffd05 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-762 /* 0xfffffd06 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-761 /* 0xfffffd07 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-760 /* 0xfffffd08 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-759 /* 0xfffffd09 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-757 /* 0xfffffd0b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-756 /* 0xfffffd0c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-755 /* 0xfffffd0d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-753 /* 0xfffffd0f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-752 /* 0xfffffd10 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-751 /* 0xfffffd11 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-749 /* 0xfffffd13 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 1, 3}, /* s3a r4, r1, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {-748 /* 0xfffffd14 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-744 /* 0xfffffd18 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-743 /* 0xfffffd19 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-741 /* 0xfffffd1b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-739 /* 0xfffffd1d */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-737 /* 0xfffffd1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-736 /* 0xfffffd20 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-735 /* 0xfffffd21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {-732 /* 0xfffffd24 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-729 /* 0xfffffd27 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-728 /* 0xfffffd28 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-720 /* 0xfffffd30 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-719 /* 0xfffffd31 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-715 /* 0xfffffd35 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-712 /* 0xfffffd38 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-711 /* 0xfffffd39 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-708 /* 0xfffffd3c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-707 /* 0xfffffd3d */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-705 /* 0xfffffd3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-704 /* 0xfffffd40 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 6}} /* shli r5, r4, 6 */ - }, - {-703 /* 0xfffffd41 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-701 /* 0xfffffd43 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-700 /* 0xfffffd44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-699 /* 0xfffffd45 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-695 /* 0xfffffd49 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-693 /* 0xfffffd4b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-692 /* 0xfffffd4c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-688 /* 0xfffffd50 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-680 /* 0xfffffd58 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-679 /* 0xfffffd59 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-675 /* 0xfffffd5d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-673 /* 0xfffffd5f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-672 /* 0xfffffd60 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-671 /* 0xfffffd61 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-667 /* 0xfffffd65 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-664 /* 0xfffffd68 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-660 /* 0xfffffd6c */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-659 /* 0xfffffd6d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-657 /* 0xfffffd6f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-656 /* 0xfffffd70 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-655 /* 0xfffffd71 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-651 /* 0xfffffd75 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-650 /* 0xfffffd76 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-649 /* 0xfffffd77 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-648 /* 0xfffffd78 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-647 /* 0xfffffd79 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 3}, /* shli r4, r3, 3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-645 /* 0xfffffd7b */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {-644 /* 0xfffffd7c */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-643 /* 0xfffffd7d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-642 /* 0xfffffd7e */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {-641 /* 0xfffffd7f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-640 /* 0xfffffd80 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 7}} /* shli r4, r3, 7 */ - }, - {-639 /* 0xfffffd81 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-638 /* 0xfffffd82 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-637 /* 0xfffffd83 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-636 /* 0xfffffd84 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-635 /* 0xfffffd85 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-634 /* 0xfffffd86 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-633 /* 0xfffffd87 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-632 /* 0xfffffd88 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-631 /* 0xfffffd89 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-630 /* 0xfffffd8a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-629 /* 0xfffffd8b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-627 /* 0xfffffd8d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-625 /* 0xfffffd8f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {-624 /* 0xfffffd90 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-620 /* 0xfffffd94 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-619 /* 0xfffffd95 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-616 /* 0xfffffd98 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-615 /* 0xfffffd99 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-613 /* 0xfffffd9b */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {4, 3, 3}, /* s2a r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-612 /* 0xfffffd9c */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-611 /* 0xfffffd9d */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-609 /* 0xfffffd9f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-608 /* 0xfffffda0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-607 /* 0xfffffda1 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-604 /* 0xfffffda4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-603 /* 0xfffffda5 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-600 /* 0xfffffda8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-599 /* 0xfffffda9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-595 /* 0xfffffdad */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-594 /* 0xfffffdae */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-593 /* 0xfffffdaf */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-592 /* 0xfffffdb0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-591 /* 0xfffffdb1 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-589 /* 0xfffffdb3 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-588 /* 0xfffffdb4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 3}, /* s2a r4, r3, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-585 /* 0xfffffdb7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-584 /* 0xfffffdb8 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-583 /* 0xfffffdb9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-581 /* 0xfffffdbb */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {4, 3, 3}, /* s2a r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-580 /* 0xfffffdbc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-579 /* 0xfffffdbd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-578 /* 0xfffffdbe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {-577 /* 0xfffffdbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-576 /* 0xfffffdc0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {-575 /* 0xfffffdc1 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-574 /* 0xfffffdc2 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-573 /* 0xfffffdc3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-572 /* 0xfffffdc4 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-571 /* 0xfffffdc5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-569 /* 0xfffffdc7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-568 /* 0xfffffdc8 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-567 /* 0xfffffdc9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-566 /* 0xfffffdca */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-565 /* 0xfffffdcb */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-564 /* 0xfffffdcc */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-563 /* 0xfffffdcd */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-561 /* 0xfffffdcf */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-560 /* 0xfffffdd0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-559 /* 0xfffffdd1 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-558 /* 0xfffffdd2 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-557 /* 0xfffffdd3 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-556 /* 0xfffffdd4 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-555 /* 0xfffffdd5 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-553 /* 0xfffffdd7 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-552 /* 0xfffffdd8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-551 /* 0xfffffdd9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-549 /* 0xfffffddb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-548 /* 0xfffffddc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-547 /* 0xfffffddd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-546 /* 0xfffffdde */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {-545 /* 0xfffffddf */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-544 /* 0xfffffde0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-543 /* 0xfffffde1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-542 /* 0xfffffde2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-540 /* 0xfffffde4 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-539 /* 0xfffffde5 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-536 /* 0xfffffde8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-535 /* 0xfffffde9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-533 /* 0xfffffdeb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-532 /* 0xfffffdec */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-531 /* 0xfffffded */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-530 /* 0xfffffdee */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-529 /* 0xfffffdef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-528 /* 0xfffffdf0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-527 /* 0xfffffdf1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-526 /* 0xfffffdf2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-525 /* 0xfffffdf3 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {-524 /* 0xfffffdf4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-523 /* 0xfffffdf5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-522 /* 0xfffffdf6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-521 /* 0xfffffdf7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-520 /* 0xfffffdf8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}, /* shli r3, r2, 9 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-519 /* 0xfffffdf9 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-518 /* 0xfffffdfa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-517 /* 0xfffffdfb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-516 /* 0xfffffdfc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}, /* shli r3, r2, 9 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-515 /* 0xfffffdfd */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-514 /* 0xfffffdfe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}, /* shli r3, r2, 9 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-513 /* 0xfffffdff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-512 /* 0xfffffe00 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 9}} /* shli r3, r2, 9 */ - }, - {-511 /* 0xfffffe01 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-510 /* 0xfffffe02 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-509 /* 0xfffffe03 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-508 /* 0xfffffe04 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-507 /* 0xfffffe05 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-506 /* 0xfffffe06 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-505 /* 0xfffffe07 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-504 /* 0xfffffe08 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-503 /* 0xfffffe09 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-502 /* 0xfffffe0a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-501 /* 0xfffffe0b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-500 /* 0xfffffe0c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-499 /* 0xfffffe0d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-498 /* 0xfffffe0e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 1, 3}, /* s1a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-497 /* 0xfffffe0f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-496 /* 0xfffffe10 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-495 /* 0xfffffe11 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-494 /* 0xfffffe12 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-493 /* 0xfffffe13 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 1}} /* s1a r5, r4, r1 */ - }, - {-492 /* 0xfffffe14 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-491 /* 0xfffffe15 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-489 /* 0xfffffe17 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-488 /* 0xfffffe18 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-487 /* 0xfffffe19 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {-485 /* 0xfffffe1b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-484 /* 0xfffffe1c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 1, 3}, /* s2a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-483 /* 0xfffffe1d */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 1}, /* s1a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-482 /* 0xfffffe1e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 1, 3}, /* s1a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-481 /* 0xfffffe1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-480 /* 0xfffffe20 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-479 /* 0xfffffe21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-478 /* 0xfffffe22 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-477 /* 0xfffffe23 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-476 /* 0xfffffe24 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-475 /* 0xfffffe25 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-472 /* 0xfffffe28 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-471 /* 0xfffffe29 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {-468 /* 0xfffffe2c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-467 /* 0xfffffe2d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-465 /* 0xfffffe2f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {-464 /* 0xfffffe30 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-463 /* 0xfffffe31 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-462 /* 0xfffffe32 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-460 /* 0xfffffe34 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-457 /* 0xfffffe37 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-456 /* 0xfffffe38 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-455 /* 0xfffffe39 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {-454 /* 0xfffffe3a */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-453 /* 0xfffffe3b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-452 /* 0xfffffe3c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-451 /* 0xfffffe3d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-450 /* 0xfffffe3e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-449 /* 0xfffffe3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-448 /* 0xfffffe40 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-447 /* 0xfffffe41 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-446 /* 0xfffffe42 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-445 /* 0xfffffe43 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-444 /* 0xfffffe44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-443 /* 0xfffffe45 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-442 /* 0xfffffe46 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-441 /* 0xfffffe47 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-440 /* 0xfffffe48 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {-439 /* 0xfffffe49 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-438 /* 0xfffffe4a */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* s1a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-436 /* 0xfffffe4c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 1, 2}, /* s2a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-433 /* 0xfffffe4f */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-432 /* 0xfffffe50 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-431 /* 0xfffffe51 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-429 /* 0xfffffe53 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-428 /* 0xfffffe54 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-424 /* 0xfffffe58 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-423 /* 0xfffffe59 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-419 /* 0xfffffe5d */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-418 /* 0xfffffe5e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {-417 /* 0xfffffe5f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-416 /* 0xfffffe60 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-415 /* 0xfffffe61 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-413 /* 0xfffffe63 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-412 /* 0xfffffe64 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-411 /* 0xfffffe65 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-409 /* 0xfffffe67 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-408 /* 0xfffffe68 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-407 /* 0xfffffe69 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-405 /* 0xfffffe6b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-404 /* 0xfffffe6c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-403 /* 0xfffffe6d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-401 /* 0xfffffe6f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-400 /* 0xfffffe70 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-399 /* 0xfffffe71 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-397 /* 0xfffffe73 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-396 /* 0xfffffe74 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-395 /* 0xfffffe75 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-393 /* 0xfffffe77 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-392 /* 0xfffffe78 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-391 /* 0xfffffe79 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-390 /* 0xfffffe7a */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-389 /* 0xfffffe7b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-388 /* 0xfffffe7c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-387 /* 0xfffffe7d */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* s1a r5, r4, r4 */ - }, - {-386 /* 0xfffffe7e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-385 /* 0xfffffe7f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-384 /* 0xfffffe80 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-383 /* 0xfffffe81 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-382 /* 0xfffffe82 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-381 /* 0xfffffe83 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-380 /* 0xfffffe84 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {-379 /* 0xfffffe85 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-378 /* 0xfffffe86 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-377 /* 0xfffffe87 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-376 /* 0xfffffe88 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-375 /* 0xfffffe89 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-373 /* 0xfffffe8b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-372 /* 0xfffffe8c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-371 /* 0xfffffe8d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-369 /* 0xfffffe8f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-368 /* 0xfffffe90 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-367 /* 0xfffffe91 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-365 /* 0xfffffe93 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 1, 3}, /* s3a r4, r1, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {-364 /* 0xfffffe94 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-361 /* 0xfffffe97 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-360 /* 0xfffffe98 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-359 /* 0xfffffe99 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-357 /* 0xfffffe9b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-356 /* 0xfffffe9c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-355 /* 0xfffffe9d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 3}, /* shli r4, r3, 3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-353 /* 0xfffffe9f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-352 /* 0xfffffea0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {-351 /* 0xfffffea1 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-349 /* 0xfffffea3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-348 /* 0xfffffea4 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-347 /* 0xfffffea5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-344 /* 0xfffffea8 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-343 /* 0xfffffea9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-341 /* 0xfffffeab */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-340 /* 0xfffffeac */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-339 /* 0xfffffead */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-337 /* 0xfffffeaf */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-336 /* 0xfffffeb0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-335 /* 0xfffffeb1 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-333 /* 0xfffffeb3 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-332 /* 0xfffffeb4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-331 /* 0xfffffeb5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-330 /* 0xfffffeb6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-329 /* 0xfffffeb7 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-328 /* 0xfffffeb8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-327 /* 0xfffffeb9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-325 /* 0xfffffebb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {-324 /* 0xfffffebc */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-323 /* 0xfffffebd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-322 /* 0xfffffebe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {-321 /* 0xfffffebf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-320 /* 0xfffffec0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {-319 /* 0xfffffec1 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-318 /* 0xfffffec2 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-317 /* 0xfffffec3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-316 /* 0xfffffec4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-315 /* 0xfffffec5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-314 /* 0xfffffec6 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-313 /* 0xfffffec7 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-312 /* 0xfffffec8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-311 /* 0xfffffec9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-310 /* 0xfffffeca */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-309 /* 0xfffffecb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-307 /* 0xfffffecd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-306 /* 0xfffffece */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-305 /* 0xfffffecf */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {-304 /* 0xfffffed0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-303 /* 0xfffffed1 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-301 /* 0xfffffed3 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-300 /* 0xfffffed4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-299 /* 0xfffffed5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-297 /* 0xfffffed7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-296 /* 0xfffffed8 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-295 /* 0xfffffed9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-293 /* 0xfffffedb */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-292 /* 0xfffffedc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-291 /* 0xfffffedd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-290 /* 0xfffffede */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {-289 /* 0xfffffedf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-288 /* 0xfffffee0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {-287 /* 0xfffffee1 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-286 /* 0xfffffee2 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-285 /* 0xfffffee3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-284 /* 0xfffffee4 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-283 /* 0xfffffee5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-281 /* 0xfffffee7 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-280 /* 0xfffffee8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-279 /* 0xfffffee9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-278 /* 0xfffffeea */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-277 /* 0xfffffeeb */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-276 /* 0xfffffeec */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-275 /* 0xfffffeed */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-274 /* 0xfffffeee */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-273 /* 0xfffffeef */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-272 /* 0xfffffef0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-271 /* 0xfffffef1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-270 /* 0xfffffef2 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-269 /* 0xfffffef3 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-268 /* 0xfffffef4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-267 /* 0xfffffef5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-266 /* 0xfffffef6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-265 /* 0xfffffef7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-264 /* 0xfffffef8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-263 /* 0xfffffef9 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-262 /* 0xfffffefa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-261 /* 0xfffffefb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-260 /* 0xfffffefc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-259 /* 0xfffffefd */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-258 /* 0xfffffefe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-257 /* 0xfffffeff */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-256 /* 0xffffff00 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 8}} /* shli r3, r2, 8 */ - }, - {-255 /* 0xffffff01 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-254 /* 0xffffff02 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-253 /* 0xffffff03 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-252 /* 0xffffff04 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-251 /* 0xffffff05 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-250 /* 0xffffff06 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-249 /* 0xffffff07 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-248 /* 0xffffff08 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-247 /* 0xffffff09 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-246 /* 0xffffff0a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-245 /* 0xffffff0b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-244 /* 0xffffff0c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-243 /* 0xffffff0d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-242 /* 0xffffff0e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 1, 3}, /* s1a r4, r1, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-241 /* 0xffffff0f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-240 /* 0xffffff10 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-239 /* 0xffffff11 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-238 /* 0xffffff12 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-237 /* 0xffffff13 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 1}} /* s1a r5, r4, r1 */ - }, - {-236 /* 0xffffff14 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-235 /* 0xffffff15 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-234 /* 0xffffff16 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-233 /* 0xffffff17 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-232 /* 0xffffff18 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {-231 /* 0xffffff19 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {-230 /* 0xffffff1a */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-229 /* 0xffffff1b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-228 /* 0xffffff1c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-227 /* 0xffffff1d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-226 /* 0xffffff1e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-225 /* 0xffffff1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-224 /* 0xffffff20 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-223 /* 0xffffff21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-222 /* 0xffffff22 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-221 /* 0xffffff23 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-220 /* 0xffffff24 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-219 /* 0xffffff25 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-218 /* 0xffffff26 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-217 /* 0xffffff27 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-216 /* 0xffffff28 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {-215 /* 0xffffff29 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-214 /* 0xffffff2a */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* s1a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-213 /* 0xffffff2b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 3}, /* shli r4, r3, 3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-212 /* 0xffffff2c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 1, 2}, /* s2a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-211 /* 0xffffff2d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-210 /* 0xffffff2e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {-209 /* 0xffffff2f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-208 /* 0xffffff30 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-207 /* 0xffffff31 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-205 /* 0xffffff33 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-204 /* 0xffffff34 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-203 /* 0xffffff35 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-202 /* 0xffffff36 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-201 /* 0xffffff37 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-200 /* 0xffffff38 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-199 /* 0xffffff39 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-198 /* 0xffffff3a */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-197 /* 0xffffff3b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-196 /* 0xffffff3c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-195 /* 0xffffff3d */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* s1a r5, r4, r4 */ - }, - {-194 /* 0xffffff3e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-193 /* 0xffffff3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-192 /* 0xffffff40 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-191 /* 0xffffff41 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-190 /* 0xffffff42 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-189 /* 0xffffff43 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-188 /* 0xffffff44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {-187 /* 0xffffff45 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-186 /* 0xffffff46 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-185 /* 0xffffff47 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-184 /* 0xffffff48 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-183 /* 0xffffff49 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-181 /* 0xffffff4b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-180 /* 0xffffff4c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-179 /* 0xffffff4d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-178 /* 0xffffff4e */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-177 /* 0xffffff4f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-176 /* 0xffffff50 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {-175 /* 0xffffff51 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-173 /* 0xffffff53 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-172 /* 0xffffff54 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-171 /* 0xffffff55 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-170 /* 0xffffff56 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-169 /* 0xffffff57 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-168 /* 0xffffff58 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-167 /* 0xffffff59 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-165 /* 0xffffff5b */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {-164 /* 0xffffff5c */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-163 /* 0xffffff5d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-162 /* 0xffffff5e */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-161 /* 0xffffff5f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-160 /* 0xffffff60 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {-159 /* 0xffffff61 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-158 /* 0xffffff62 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-157 /* 0xffffff63 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-156 /* 0xffffff64 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-155 /* 0xffffff65 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-154 /* 0xffffff66 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-153 /* 0xffffff67 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {-152 /* 0xffffff68 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-151 /* 0xffffff69 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-150 /* 0xffffff6a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-149 /* 0xffffff6b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-148 /* 0xffffff6c */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {-147 /* 0xffffff6d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-146 /* 0xffffff6e */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-145 /* 0xffffff6f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-144 /* 0xffffff70 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {-143 /* 0xffffff71 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-142 /* 0xffffff72 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-141 /* 0xffffff73 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-140 /* 0xffffff74 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-139 /* 0xffffff75 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-138 /* 0xffffff76 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-137 /* 0xffffff77 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-136 /* 0xffffff78 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {-135 /* 0xffffff79 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-134 /* 0xffffff7a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-133 /* 0xffffff7b */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-132 /* 0xffffff7c */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-131 /* 0xffffff7d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-130 /* 0xffffff7e */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-129 /* 0xffffff7f */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-128 /* 0xffffff80 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 7}} /* shli r3, r2, 7 */ - }, - {-127 /* 0xffffff81 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-126 /* 0xffffff82 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-125 /* 0xffffff83 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-124 /* 0xffffff84 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-123 /* 0xffffff85 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-122 /* 0xffffff86 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-121 /* 0xffffff87 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-120 /* 0xffffff88 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-119 /* 0xffffff89 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-118 /* 0xffffff8a */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-117 /* 0xffffff8b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-116 /* 0xffffff8c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-115 /* 0xffffff8d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-114 /* 0xffffff8e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-113 /* 0xffffff8f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-112 /* 0xffffff90 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-111 /* 0xffffff91 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-110 /* 0xffffff92 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-109 /* 0xffffff93 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-108 /* 0xffffff94 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-107 /* 0xffffff95 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {-106 /* 0xffffff96 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {-105 /* 0xffffff97 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-104 /* 0xffffff98 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {-103 /* 0xffffff99 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {-102 /* 0xffffff9a */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* s1a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {-101 /* 0xffffff9b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-100 /* 0xffffff9c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-99 /* 0xffffff9d */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* s1a r5, r4, r4 */ - }, - {-98 /* 0xffffff9e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-97 /* 0xffffff9f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-96 /* 0xffffffa0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-95 /* 0xffffffa1 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-94 /* 0xffffffa2 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-93 /* 0xffffffa3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-92 /* 0xffffffa4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {-91 /* 0xffffffa5 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-90 /* 0xffffffa6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-89 /* 0xffffffa7 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-88 /* 0xffffffa8 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-87 /* 0xffffffa9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-86 /* 0xffffffaa */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {2, 1, 4}} /* sub r5, r1, r4 */ - }, - {-85 /* 0xffffffab */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {-84 /* 0xffffffac */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-83 /* 0xffffffad */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-82 /* 0xffffffae */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {-81 /* 0xffffffaf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}} /* s3a r4, r3, r3 */ - }, - {-80 /* 0xffffffb0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {-79 /* 0xffffffb1 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-78 /* 0xffffffb2 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-77 /* 0xffffffb3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 2, 4}} /* sub r5, r2, r4 */ - }, - {-76 /* 0xffffffb4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-75 /* 0xffffffb5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-74 /* 0xffffffb6 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-73 /* 0xffffffb7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {-72 /* 0xffffffb8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {-71 /* 0xffffffb9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-70 /* 0xffffffba */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-69 /* 0xffffffbb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {-68 /* 0xffffffbc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {-67 /* 0xffffffbd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-66 /* 0xffffffbe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-65 /* 0xffffffbf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-64 /* 0xffffffc0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 6}} /* shli r3, r2, 6 */ - }, - {-63 /* 0xffffffc1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-62 /* 0xffffffc2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-61 /* 0xffffffc3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-60 /* 0xffffffc4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-59 /* 0xffffffc5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-58 /* 0xffffffc6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {-57 /* 0xffffffc7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-56 /* 0xffffffc8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-55 /* 0xffffffc9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-54 /* 0xffffffca */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-53 /* 0xffffffcb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {-52 /* 0xffffffcc */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {-51 /* 0xffffffcd */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {3, 4, 4}} /* s1a r5, r4, r4 */ - }, - {-50 /* 0xffffffce */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-49 /* 0xffffffcf */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-48 /* 0xffffffd0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-47 /* 0xffffffd1 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-46 /* 0xffffffd2 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-45 /* 0xffffffd3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-44 /* 0xffffffd4 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {-43 /* 0xffffffd5 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {-42 /* 0xffffffd6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-41 /* 0xffffffd7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {-40 /* 0xffffffd8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {-39 /* 0xffffffd9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-38 /* 0xffffffda */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {-37 /* 0xffffffdb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {-36 /* 0xffffffdc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 2}} /* shli r4, r3, 2 */ - }, - {-35 /* 0xffffffdd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-34 /* 0xffffffde */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {-33 /* 0xffffffdf */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-32 /* 0xffffffe0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 5}} /* shli r3, r2, 5 */ - }, - {-31 /* 0xffffffe1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-30 /* 0xffffffe2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-29 /* 0xffffffe3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-28 /* 0xffffffe4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-27 /* 0xffffffe5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-26 /* 0xffffffe6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-25 /* 0xffffffe7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-24 /* 0xffffffe8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-23 /* 0xffffffe9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-22 /* 0xffffffea */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-21 /* 0xffffffeb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-20 /* 0xffffffec */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 2}} /* shli r4, r3, 2 */ - }, - {-19 /* 0xffffffed */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {2, 1, 3}} /* sub r4, r1, r3 */ - }, - {-18 /* 0xffffffee */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 1}} /* shli r4, r3, 1 */ - }, - {-17 /* 0xffffffef */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-16 /* 0xfffffff0 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 4}} /* shli r3, r2, 4 */ - }, - {-15 /* 0xfffffff1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-14 /* 0xfffffff2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-13 /* 0xfffffff3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-12 /* 0xfffffff4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-11 /* 0xfffffff5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-10 /* 0xfffffff6 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-9 /* 0xfffffff7 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 2, 2}} /* s3a r3, r2, r2 */ - }, - {-8 /* 0xfffffff8 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 3}} /* shli r3, r2, 3 */ - }, - {-7 /* 0xfffffff9 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-6 /* 0xfffffffa */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 3}, /* shli r3, r1, 3 */ - {2, 2, 3}} /* sub r4, r2, r3 */ - }, - {-5 /* 0xfffffffb */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 2, 2}} /* s2a r3, r2, r2 */ - }, - {-4 /* 0xfffffffc */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 2}} /* shli r3, r2, 2 */ - }, - {-3 /* 0xfffffffd */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}} /* sub r3, r1, r2 */ - }, - {-2 /* 0xfffffffe */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {6, 2, 1}} /* shli r3, r2, 1 */ - }, - {-1 /* 0xffffffff */ , - {{2, 0, 1}} /* sub r2, zero, r1 */ - }, - {2 /* 0x2 */ , - {{6, 1, 1}} /* shli r2, r1, 1 */ - }, - {3 /* 0x3 */ , - {{3, 1, 1}} /* s1a r2, r1, r1 */ - }, - {4 /* 0x4 */ , - {{6, 1, 2}} /* shli r2, r1, 2 */ - }, - {5 /* 0x5 */ , - {{4, 1, 1}} /* s2a r2, r1, r1 */ - }, - {6 /* 0x6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}} /* shli r3, r2, 1 */ - }, - {7 /* 0x7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {8 /* 0x8 */ , - {{6, 1, 3}} /* shli r2, r1, 3 */ - }, - {9 /* 0x9 */ , - {{5, 1, 1}} /* s3a r2, r1, r1 */ - }, - {10 /* 0xa */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 1}} /* shli r3, r2, 1 */ - }, - {11 /* 0xb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}} /* s1a r3, r2, r1 */ - }, - {12 /* 0xc */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 2}} /* shli r3, r2, 2 */ - }, - {13 /* 0xd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}} /* s2a r3, r2, r1 */ - }, - {14 /* 0xe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {15 /* 0xf */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {16 /* 0x10 */ , - {{6, 1, 4}} /* shli r2, r1, 4 */ - }, - {17 /* 0x11 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {18 /* 0x12 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 1}} /* shli r3, r2, 1 */ - }, - {19 /* 0x13 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}} /* s1a r3, r2, r1 */ - }, - {20 /* 0x14 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 2}} /* shli r3, r2, 2 */ - }, - {21 /* 0x15 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}} /* s2a r3, r2, r1 */ - }, - {22 /* 0x16 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {23 /* 0x17 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {24 /* 0x18 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}} /* shli r3, r2, 3 */ - }, - {25 /* 0x19 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}} /* s3a r3, r2, r1 */ - }, - {26 /* 0x1a */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {27 /* 0x1b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}} /* s3a r3, r2, r2 */ - }, - {28 /* 0x1c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {29 /* 0x1d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {30 /* 0x1e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {31 /* 0x1f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {32 /* 0x20 */ , - {{6, 1, 5}} /* shli r2, r1, 5 */ - }, - {33 /* 0x21 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {34 /* 0x22 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {35 /* 0x23 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36 /* 0x24 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 2}} /* shli r3, r2, 2 */ - }, - {37 /* 0x25 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}} /* s2a r3, r2, r1 */ - }, - {38 /* 0x26 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {39 /* 0x27 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {40 /* 0x28 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 3}} /* shli r3, r2, 3 */ - }, - {41 /* 0x29 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}} /* s3a r3, r2, r1 */ - }, - {42 /* 0x2a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {43 /* 0x2b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {44 /* 0x2c */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {45 /* 0x2d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}} /* s3a r3, r2, r2 */ - }, - {46 /* 0x2e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {47 /* 0x2f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {48 /* 0x30 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}} /* shli r3, r2, 4 */ - }, - {49 /* 0x31 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {50 /* 0x32 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {51 /* 0x33 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {52 /* 0x34 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {53 /* 0x35 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {54 /* 0x36 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 1}} /* shli r4, r3, 1 */ - }, - {55 /* 0x37 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {56 /* 0x38 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {57 /* 0x39 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {58 /* 0x3a */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {59 /* 0x3b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {60 /* 0x3c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {61 /* 0x3d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {62 /* 0x3e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {63 /* 0x3f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {64 /* 0x40 */ , - {{6, 1, 6}} /* shli r2, r1, 6 */ - }, - {65 /* 0x41 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {66 /* 0x42 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {67 /* 0x43 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68 /* 0x44 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {69 /* 0x45 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {70 /* 0x46 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {71 /* 0x47 */ , - {{2, 0, 1}, /* sub r2, zero, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {72 /* 0x48 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 3}} /* shli r3, r2, 3 */ - }, - {73 /* 0x49 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}} /* s3a r3, r2, r1 */ - }, - {74 /* 0x4a */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {75 /* 0x4b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {76 /* 0x4c */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {77 /* 0x4d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {78 /* 0x4e */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {79 /* 0x4f */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {80 /* 0x50 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}} /* shli r3, r2, 4 */ - }, - {81 /* 0x51 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}} /* s3a r3, r2, r2 */ - }, - {82 /* 0x52 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {83 /* 0x53 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 1}} /* s1a r4, r3, r1 */ - }, - {84 /* 0x54 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {85 /* 0x55 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {86 /* 0x56 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {87 /* 0x57 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {88 /* 0x58 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {89 /* 0x59 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {90 /* 0x5a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 1}} /* shli r4, r3, 1 */ - }, - {91 /* 0x5b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {3, 3, 1}} /* s1a r4, r3, r1 */ - }, - {92 /* 0x5c */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {93 /* 0x5d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {94 /* 0x5e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {95 /* 0x5f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {96 /* 0x60 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}} /* shli r3, r2, 5 */ - }, - {97 /* 0x61 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {98 /* 0x62 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {99 /* 0x63 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {100 /* 0x64 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {101 /* 0x65 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 1}} /* s2a r4, r3, r1 */ - }, - {102 /* 0x66 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {103 /* 0x67 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {104 /* 0x68 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {105 /* 0x69 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {106 /* 0x6a */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {107 /* 0x6b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {108 /* 0x6c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 2}} /* shli r4, r3, 2 */ - }, - {109 /* 0x6d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 1}} /* s2a r4, r3, r1 */ - }, - {110 /* 0x6e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {111 /* 0x6f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {112 /* 0x70 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {113 /* 0x71 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {114 /* 0x72 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {115 /* 0x73 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {116 /* 0x74 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {117 /* 0x75 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 3}} /* s3a r4, r3, r3 */ - }, - {118 /* 0x76 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {119 /* 0x77 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {120 /* 0x78 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {121 /* 0x79 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {122 /* 0x7a */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {123 /* 0x7b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {124 /* 0x7c */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {125 /* 0x7d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {126 /* 0x7e */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {127 /* 0x7f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {128 /* 0x80 */ , - {{6, 1, 7}} /* shli r2, r1, 7 */ - }, - {129 /* 0x81 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {130 /* 0x82 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {131 /* 0x83 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {132 /* 0x84 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {133 /* 0x85 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134 /* 0x86 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {135 /* 0x87 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {136 /* 0x88 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {137 /* 0x89 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {138 /* 0x8a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {139 /* 0x8b */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {140 /* 0x8c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {141 /* 0x8d */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {142 /* 0x8e */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {143 /* 0x8f */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {144 /* 0x90 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}} /* shli r3, r2, 4 */ - }, - {145 /* 0x91 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {146 /* 0x92 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {147 /* 0x93 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 1}} /* s1a r4, r3, r1 */ - }, - {148 /* 0x94 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {149 /* 0x95 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {4, 3, 1}} /* s2a r4, r3, r1 */ - }, - {150 /* 0x96 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {151 /* 0x97 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {152 /* 0x98 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {153 /* 0x99 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {154 /* 0x9a */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {155 /* 0x9b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {156 /* 0x9c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {157 /* 0x9d */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {158 /* 0x9e */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {159 /* 0x9f */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {160 /* 0xa0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}} /* shli r3, r2, 5 */ - }, - {161 /* 0xa1 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {162 /* 0xa2 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 1}} /* shli r4, r3, 1 */ - }, - {163 /* 0xa3 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {3, 3, 1}} /* s1a r4, r3, r1 */ - }, - {164 /* 0xa4 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {165 /* 0xa5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {166 /* 0xa6 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {167 /* 0xa7 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {168 /* 0xa8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {169 /* 0xa9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {170 /* 0xaa */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {171 /* 0xab */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 3, 3}} /* s3a r4, r3, r3 */ - }, - {172 /* 0xac */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {173 /* 0xad */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {174 /* 0xae */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {175 /* 0xaf */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {176 /* 0xb0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {177 /* 0xb1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {178 /* 0xb2 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {179 /* 0xb3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {180 /* 0xb4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 2}} /* shli r4, r3, 2 */ - }, - {181 /* 0xb5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 1}} /* s2a r4, r3, r1 */ - }, - {182 /* 0xb6 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {183 /* 0xb7 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {184 /* 0xb8 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {185 /* 0xb9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {186 /* 0xba */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {187 /* 0xbb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {188 /* 0xbc */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {189 /* 0xbd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {190 /* 0xbe */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {191 /* 0xbf */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {192 /* 0xc0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}} /* shli r3, r2, 6 */ - }, - {193 /* 0xc1 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {194 /* 0xc2 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {195 /* 0xc3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {196 /* 0xc4 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {197 /* 0xc5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {198 /* 0xc6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {199 /* 0xc7 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {200 /* 0xc8 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {201 /* 0xc9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {202 /* 0xca */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {203 /* 0xcb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {204 /* 0xcc */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {205 /* 0xcd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {206 /* 0xce */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {207 /* 0xcf */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {208 /* 0xd0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {209 /* 0xd1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {210 /* 0xd2 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {211 /* 0xd3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {212 /* 0xd4 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {213 /* 0xd5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {214 /* 0xd6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {215 /* 0xd7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {216 /* 0xd8 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {217 /* 0xd9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {218 /* 0xda */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {219 /* 0xdb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {220 /* 0xdc */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {221 /* 0xdd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {222 /* 0xde */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {223 /* 0xdf */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {224 /* 0xe0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {225 /* 0xe1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {226 /* 0xe2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {227 /* 0xe3 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {228 /* 0xe4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {229 /* 0xe5 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {230 /* 0xe6 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {231 /* 0xe7 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 1, 8}, /* shli r4, r1, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {232 /* 0xe8 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {233 /* 0xe9 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {234 /* 0xea */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {235 /* 0xeb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {236 /* 0xec */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {237 /* 0xed */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {238 /* 0xee */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {239 /* 0xef */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {240 /* 0xf0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {241 /* 0xf1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {242 /* 0xf2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {243 /* 0xf3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}} /* s3a r4, r3, r3 */ - }, - {244 /* 0xf4 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {245 /* 0xf5 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {246 /* 0xf6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {247 /* 0xf7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {248 /* 0xf8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {249 /* 0xf9 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {250 /* 0xfa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {251 /* 0xfb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {252 /* 0xfc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {253 /* 0xfd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {254 /* 0xfe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {255 /* 0xff */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {256 /* 0x100 */ , - {{6, 1, 8}} /* shli r2, r1, 8 */ - }, - {257 /* 0x101 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {258 /* 0x102 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {259 /* 0x103 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {260 /* 0x104 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {261 /* 0x105 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262 /* 0x106 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {263 /* 0x107 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {264 /* 0x108 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {265 /* 0x109 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {266 /* 0x10a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {267 /* 0x10b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {268 /* 0x10c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {269 /* 0x10d */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {270 /* 0x10e */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {271 /* 0x10f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {272 /* 0x110 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {273 /* 0x111 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {274 /* 0x112 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {275 /* 0x113 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {276 /* 0x114 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {277 /* 0x115 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {278 /* 0x116 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {279 /* 0x117 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {280 /* 0x118 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {281 /* 0x119 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {282 /* 0x11a */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {283 /* 0x11b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {284 /* 0x11c */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {285 /* 0x11d */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {286 /* 0x11e */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {287 /* 0x11f */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {288 /* 0x120 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}} /* shli r3, r2, 5 */ - }, - {289 /* 0x121 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {290 /* 0x122 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {291 /* 0x123 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {292 /* 0x124 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {293 /* 0x125 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 1}} /* s2a r4, r3, r1 */ - }, - {294 /* 0x126 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {295 /* 0x127 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {296 /* 0x128 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {297 /* 0x129 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {298 /* 0x12a */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {299 /* 0x12b */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {300 /* 0x12c */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {301 /* 0x12d */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {302 /* 0x12e */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {303 /* 0x12f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {304 /* 0x130 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {305 /* 0x131 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {306 /* 0x132 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {307 /* 0x133 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {308 /* 0x134 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {309 /* 0x135 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {310 /* 0x136 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {311 /* 0x137 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {312 /* 0x138 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {313 /* 0x139 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {314 /* 0x13a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {315 /* 0x13b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {316 /* 0x13c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {317 /* 0x13d */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {318 /* 0x13e */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {319 /* 0x13f */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {320 /* 0x140 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}} /* shli r3, r2, 6 */ - }, - {321 /* 0x141 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {322 /* 0x142 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {323 /* 0x143 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {324 /* 0x144 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {325 /* 0x145 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {326 /* 0x146 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {327 /* 0x147 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {328 /* 0x148 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {329 /* 0x149 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {330 /* 0x14a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {331 /* 0x14b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {332 /* 0x14c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {333 /* 0x14d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {334 /* 0x14e */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {335 /* 0x14f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {336 /* 0x150 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {337 /* 0x151 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {338 /* 0x152 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {339 /* 0x153 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {340 /* 0x154 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {341 /* 0x155 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {342 /* 0x156 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {343 /* 0x157 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {344 /* 0x158 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {345 /* 0x159 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {346 /* 0x15a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {347 /* 0x15b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {348 /* 0x15c */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 2}, /* shli r4, r2, 2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {349 /* 0x15d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {350 /* 0x15e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {351 /* 0x15f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {352 /* 0x160 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {353 /* 0x161 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {354 /* 0x162 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {355 /* 0x163 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {356 /* 0x164 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {357 /* 0x165 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {358 /* 0x166 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {359 /* 0x167 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {360 /* 0x168 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {361 /* 0x169 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {362 /* 0x16a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 1, 1}, /* shli r4, r1, 1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {363 /* 0x16b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {364 /* 0x16c */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 1, 2}, /* shli r4, r1, 2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {365 /* 0x16d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {366 /* 0x16e */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {367 /* 0x16f */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {368 /* 0x170 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {369 /* 0x171 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 3}} /* s3a r4, r3, r3 */ - }, - {370 /* 0x172 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {371 /* 0x173 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {372 /* 0x174 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {373 /* 0x175 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {374 /* 0x176 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {375 /* 0x177 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {376 /* 0x178 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {377 /* 0x179 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {378 /* 0x17a */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {379 /* 0x17b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {380 /* 0x17c */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {381 /* 0x17d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {382 /* 0x17e */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {383 /* 0x17f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {384 /* 0x180 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}} /* shli r3, r2, 7 */ - }, - {385 /* 0x181 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {386 /* 0x182 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {387 /* 0x183 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {388 /* 0x184 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {389 /* 0x185 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {390 /* 0x186 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {391 /* 0x187 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {392 /* 0x188 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {393 /* 0x189 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {394 /* 0x18a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {395 /* 0x18b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {396 /* 0x18c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {397 /* 0x18d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {398 /* 0x18e */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {399 /* 0x18f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {400 /* 0x190 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {401 /* 0x191 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {402 /* 0x192 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {403 /* 0x193 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {404 /* 0x194 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {4, 1, 2}, /* s2a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {405 /* 0x195 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}} /* s3a r4, r3, r3 */ - }, - {406 /* 0x196 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {407 /* 0x197 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {408 /* 0x198 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {409 /* 0x199 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {410 /* 0x19a */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {411 /* 0x19b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {412 /* 0x19c */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {413 /* 0x19d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {414 /* 0x19e */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {415 /* 0x19f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {416 /* 0x1a0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {417 /* 0x1a1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {418 /* 0x1a2 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {419 /* 0x1a3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {420 /* 0x1a4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {421 /* 0x1a5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {422 /* 0x1a6 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {423 /* 0x1a7 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {424 /* 0x1a8 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {425 /* 0x1a9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {426 /* 0x1aa */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {427 /* 0x1ab */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {428 /* 0x1ac */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {429 /* 0x1ad */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {430 /* 0x1ae */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {431 /* 0x1af */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {432 /* 0x1b0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {433 /* 0x1b1 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {434 /* 0x1b2 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {435 /* 0x1b3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {436 /* 0x1b4 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {437 /* 0x1b5 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {438 /* 0x1b6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {439 /* 0x1b7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {440 /* 0x1b8 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {441 /* 0x1b9 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {442 /* 0x1ba */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {443 /* 0x1bb */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {444 /* 0x1bc */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {445 /* 0x1bd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {446 /* 0x1be */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {447 /* 0x1bf */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {448 /* 0x1c0 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {449 /* 0x1c1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {450 /* 0x1c2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {451 /* 0x1c3 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {452 /* 0x1c4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {453 /* 0x1c5 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {454 /* 0x1c6 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {455 /* 0x1c7 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {456 /* 0x1c8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {457 /* 0x1c9 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {458 /* 0x1ca */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {459 /* 0x1cb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {460 /* 0x1cc */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {461 /* 0x1cd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {462 /* 0x1ce */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {463 /* 0x1cf */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {464 /* 0x1d0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {465 /* 0x1d1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* s1a r4, r1, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {467 /* 0x1d3 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {468 /* 0x1d4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {469 /* 0x1d5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {470 /* 0x1d6 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {471 /* 0x1d7 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {472 /* 0x1d8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {473 /* 0x1d9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {475 /* 0x1db */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {476 /* 0x1dc */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {477 /* 0x1dd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {478 /* 0x1de */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {479 /* 0x1df */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {480 /* 0x1e0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {481 /* 0x1e1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {482 /* 0x1e2 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {483 /* 0x1e3 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {484 /* 0x1e4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {485 /* 0x1e5 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {486 /* 0x1e6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {487 /* 0x1e7 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {488 /* 0x1e8 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {489 /* 0x1e9 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {490 /* 0x1ea */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {491 /* 0x1eb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {492 /* 0x1ec */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {493 /* 0x1ed */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {494 /* 0x1ee */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {495 /* 0x1ef */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {496 /* 0x1f0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {497 /* 0x1f1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {498 /* 0x1f2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {499 /* 0x1f3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 1, 9}, /* shli r4, r1, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {500 /* 0x1f4 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {501 /* 0x1f5 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {502 /* 0x1f6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {503 /* 0x1f7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {504 /* 0x1f8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {505 /* 0x1f9 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {506 /* 0x1fa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {507 /* 0x1fb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {508 /* 0x1fc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {509 /* 0x1fd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {510 /* 0x1fe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {511 /* 0x1ff */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {512 /* 0x200 */ , - {{6, 1, 9}} /* shli r2, r1, 9 */ - }, - {513 /* 0x201 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {514 /* 0x202 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {515 /* 0x203 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {516 /* 0x204 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {517 /* 0x205 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {518 /* 0x206 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {519 /* 0x207 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {520 /* 0x208 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {521 /* 0x209 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {522 /* 0x20a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {523 /* 0x20b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {524 /* 0x20c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {525 /* 0x20d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {526 /* 0x20e */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {527 /* 0x20f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {528 /* 0x210 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {529 /* 0x211 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {530 /* 0x212 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {531 /* 0x213 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {532 /* 0x214 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {533 /* 0x215 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {534 /* 0x216 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {535 /* 0x217 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {536 /* 0x218 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {537 /* 0x219 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {538 /* 0x21a */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {539 /* 0x21b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {540 /* 0x21c */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {541 /* 0x21d */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {542 /* 0x21e */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {543 /* 0x21f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {544 /* 0x220 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {545 /* 0x221 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {546 /* 0x222 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {547 /* 0x223 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {548 /* 0x224 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {549 /* 0x225 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {550 /* 0x226 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {551 /* 0x227 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {552 /* 0x228 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {553 /* 0x229 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {554 /* 0x22a */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {555 /* 0x22b */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {556 /* 0x22c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {557 /* 0x22d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {558 /* 0x22e */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {559 /* 0x22f */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {560 /* 0x230 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {561 /* 0x231 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {562 /* 0x232 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {563 /* 0x233 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {564 /* 0x234 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {565 /* 0x235 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {566 /* 0x236 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {567 /* 0x237 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {568 /* 0x238 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {569 /* 0x239 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {570 /* 0x23a */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 1, 2}, /* s1a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {571 /* 0x23b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {572 /* 0x23c */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {573 /* 0x23d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {574 /* 0x23e */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {575 /* 0x23f */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {576 /* 0x240 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}} /* shli r3, r2, 6 */ - }, - {577 /* 0x241 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {578 /* 0x242 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {579 /* 0x243 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {580 /* 0x244 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {581 /* 0x245 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {582 /* 0x246 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {583 /* 0x247 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {584 /* 0x248 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {585 /* 0x249 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {586 /* 0x24a */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {587 /* 0x24b */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {588 /* 0x24c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {589 /* 0x24d */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {590 /* 0x24e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {591 /* 0x24f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {592 /* 0x250 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {593 /* 0x251 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {594 /* 0x252 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {595 /* 0x253 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {596 /* 0x254 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {597 /* 0x255 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {598 /* 0x256 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {599 /* 0x257 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {600 /* 0x258 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {601 /* 0x259 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {602 /* 0x25a */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {603 /* 0x25b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {604 /* 0x25c */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {605 /* 0x25d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {606 /* 0x25e */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {607 /* 0x25f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {608 /* 0x260 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {609 /* 0x261 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {610 /* 0x262 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {611 /* 0x263 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {612 /* 0x264 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {613 /* 0x265 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {614 /* 0x266 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {615 /* 0x267 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {616 /* 0x268 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {617 /* 0x269 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 2}, /* shli r3, r1, 2 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {619 /* 0x26b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {620 /* 0x26c */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {621 /* 0x26d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {623 /* 0x26f */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {624 /* 0x270 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {625 /* 0x271 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {626 /* 0x272 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {627 /* 0x273 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {628 /* 0x274 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {629 /* 0x275 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {630 /* 0x276 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {631 /* 0x277 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {632 /* 0x278 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {633 /* 0x279 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {634 /* 0x27a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {635 /* 0x27b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {636 /* 0x27c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {637 /* 0x27d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {638 /* 0x27e */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 1}, /* shli r3, r1, 1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {639 /* 0x27f */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {640 /* 0x280 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}} /* shli r3, r2, 7 */ - }, - {641 /* 0x281 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {642 /* 0x282 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {643 /* 0x283 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {644 /* 0x284 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {645 /* 0x285 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {646 /* 0x286 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {647 /* 0x287 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {648 /* 0x288 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 3}} /* shli r4, r3, 3 */ - }, - {649 /* 0x289 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {650 /* 0x28a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {651 /* 0x28b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {652 /* 0x28c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {653 /* 0x28d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {654 /* 0x28e */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {655 /* 0x28f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {656 /* 0x290 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {657 /* 0x291 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 3}} /* s3a r4, r3, r3 */ - }, - {658 /* 0x292 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {659 /* 0x293 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {660 /* 0x294 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {661 /* 0x295 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {662 /* 0x296 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {663 /* 0x297 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {664 /* 0x298 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {665 /* 0x299 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {666 /* 0x29a */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 1}, /* shli r4, r2, 1 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {667 /* 0x29b */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {668 /* 0x29c */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {669 /* 0x29d */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 1}, /* s1a r4, r3, r1 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {670 /* 0x29e */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {671 /* 0x29f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {672 /* 0x2a0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {673 /* 0x2a1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {674 /* 0x2a2 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {675 /* 0x2a3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {676 /* 0x2a4 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {677 /* 0x2a5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {679 /* 0x2a7 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {5, 2, 4}} /* s3a r5, r2, r4 */ - }, - {680 /* 0x2a8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {681 /* 0x2a9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {682 /* 0x2aa */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {684 /* 0x2ac */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 2}, /* shli r4, r2, 2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {685 /* 0x2ad */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {688 /* 0x2b0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 1, 1}, /* s2a r3, r1, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {689 /* 0x2b1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {690 /* 0x2b2 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {692 /* 0x2b4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {693 /* 0x2b5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 1}, /* s3a r3, r1, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {694 /* 0x2b6 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 3}, /* s2a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {695 /* 0x2b7 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {696 /* 0x2b8 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {697 /* 0x2b9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {699 /* 0x2bb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {700 /* 0x2bc */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {701 /* 0x2bd */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {702 /* 0x2be */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {703 /* 0x2bf */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {704 /* 0x2c0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {705 /* 0x2c1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {706 /* 0x2c2 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {707 /* 0x2c3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {708 /* 0x2c4 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {709 /* 0x2c5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {710 /* 0x2c6 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {711 /* 0x2c7 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {712 /* 0x2c8 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {713 /* 0x2c9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 4}, /* shli r3, r1, 4 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {714 /* 0x2ca */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 3, 3}, /* s2a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {715 /* 0x2cb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {716 /* 0x2cc */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {717 /* 0x2cd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {719 /* 0x2cf */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {2, 4, 1}} /* sub r5, r4, r1 */ - }, - {720 /* 0x2d0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}} /* shli r4, r3, 4 */ - }, - {721 /* 0x2d1 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {722 /* 0x2d2 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {723 /* 0x2d3 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {724 /* 0x2d4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {725 /* 0x2d5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 4}, /* shli r4, r3, 4 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {726 /* 0x2d6 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {727 /* 0x2d7 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {728 /* 0x2d8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {729 /* 0x2d9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}} /* s3a r4, r3, r3 */ - }, - {730 /* 0x2da */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {731 /* 0x2db */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {3, 4, 1}} /* s1a r5, r4, r1 */ - }, - {733 /* 0x2dd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {735 /* 0x2df */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {736 /* 0x2e0 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {737 /* 0x2e1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {738 /* 0x2e2 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {739 /* 0x2e3 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {740 /* 0x2e4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {741 /* 0x2e5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {743 /* 0x2e7 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {744 /* 0x2e8 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {745 /* 0x2e9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {747 /* 0x2eb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {748 /* 0x2ec */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {749 /* 0x2ed */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {750 /* 0x2ee */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {752 /* 0x2f0 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {753 /* 0x2f1 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {755 /* 0x2f3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {756 /* 0x2f4 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 2}, /* shli r3, r2, 2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {757 /* 0x2f5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {758 /* 0x2f6 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {759 /* 0x2f7 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {760 /* 0x2f8 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {761 /* 0x2f9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {762 /* 0x2fa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 1}, /* shli r3, r2, 1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {763 /* 0x2fb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {764 /* 0x2fc */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {765 /* 0x2fd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {766 /* 0x2fe */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {767 /* 0x2ff */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {768 /* 0x300 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}} /* shli r3, r2, 8 */ - }, - {769 /* 0x301 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {770 /* 0x302 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {771 /* 0x303 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {772 /* 0x304 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {773 /* 0x305 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {774 /* 0x306 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {775 /* 0x307 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {776 /* 0x308 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {777 /* 0x309 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {778 /* 0x30a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {779 /* 0x30b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {780 /* 0x30c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {781 /* 0x30d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {782 /* 0x30e */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {783 /* 0x30f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {784 /* 0x310 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {3, 3, 2}} /* s1a r4, r3, r2 */ - }, - {785 /* 0x311 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 1, 2}, /* s3a r4, r1, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {786 /* 0x312 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {787 /* 0x313 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {3, 1, 3}, /* s1a r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {788 /* 0x314 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {789 /* 0x315 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 2, 4}} /* s3a r5, r2, r4 */ - }, - {790 /* 0x316 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {791 /* 0x317 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {792 /* 0x318 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {793 /* 0x319 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {794 /* 0x31a */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {795 /* 0x31b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {796 /* 0x31c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {797 /* 0x31d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {798 /* 0x31e */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {799 /* 0x31f */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {800 /* 0x320 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {801 /* 0x321 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {802 /* 0x322 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {803 /* 0x323 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {804 /* 0x324 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {4, 1, 2}, /* s2a r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {805 /* 0x325 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {806 /* 0x326 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {807 /* 0x327 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {808 /* 0x328 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {809 /* 0x329 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {810 /* 0x32a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {811 /* 0x32b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {812 /* 0x32c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {813 /* 0x32d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {815 /* 0x32f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {816 /* 0x330 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {817 /* 0x331 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {818 /* 0x332 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {819 /* 0x333 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {820 /* 0x334 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {821 /* 0x335 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {822 /* 0x336 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {823 /* 0x337 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {824 /* 0x338 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {825 /* 0x339 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {827 /* 0x33b */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {828 /* 0x33c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {829 /* 0x33d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {831 /* 0x33f */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {832 /* 0x340 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {833 /* 0x341 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {834 /* 0x342 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 2, 2}, /* s1a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {835 /* 0x343 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {836 /* 0x344 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 2}, /* s3a r4, r2, r2 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {837 /* 0x345 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {838 /* 0x346 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {840 /* 0x348 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {841 /* 0x349 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {842 /* 0x34a */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {843 /* 0x34b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {844 /* 0x34c */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {845 /* 0x34d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {846 /* 0x34e */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {848 /* 0x350 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {849 /* 0x351 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {850 /* 0x352 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {852 /* 0x354 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {853 /* 0x355 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {855 /* 0x357 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {856 /* 0x358 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {857 /* 0x359 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {858 /* 0x35a */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {859 /* 0x35b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {861 /* 0x35d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {862 /* 0x35e */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {863 /* 0x35f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 1}} /* sub r5, r4, r1 */ - }, - {864 /* 0x360 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {865 /* 0x361 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 1, 4}} /* add r5, r1, r4 */ - }, - {866 /* 0x362 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {867 /* 0x363 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 2, 4}} /* add r5, r2, r4 */ - }, - {868 /* 0x364 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {869 /* 0x365 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {870 /* 0x366 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {871 /* 0x367 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {872 /* 0x368 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {873 /* 0x369 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {875 /* 0x36b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {876 /* 0x36c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {877 /* 0x36d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {879 /* 0x36f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {880 /* 0x370 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {881 /* 0x371 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 2}, /* s1a r3, r2, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {882 /* 0x372 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {884 /* 0x374 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {885 /* 0x375 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {888 /* 0x378 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {889 /* 0x379 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {2, 2, 1}, /* sub r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {890 /* 0x37a */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {891 /* 0x37b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {892 /* 0x37c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {893 /* 0x37d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {894 /* 0x37e */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {895 /* 0x37f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {896 /* 0x380 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {897 /* 0x381 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {898 /* 0x382 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {899 /* 0x383 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {900 /* 0x384 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {901 /* 0x385 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {902 /* 0x386 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {903 /* 0x387 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {904 /* 0x388 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {905 /* 0x389 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {2, 1, 2}, /* sub r4, r1, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {906 /* 0x38a */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {908 /* 0x38c */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {909 /* 0x38d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {910 /* 0x38e */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {911 /* 0x38f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {912 /* 0x390 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {913 /* 0x391 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 1, 2}, /* s1a r4, r1, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {915 /* 0x393 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {916 /* 0x394 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {917 /* 0x395 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {918 /* 0x396 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {919 /* 0x397 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {920 /* 0x398 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {924 /* 0x39c */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {925 /* 0x39d */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {2, 1, 3}, /* sub r4, r1, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {927 /* 0x39f */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {928 /* 0x3a0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {929 /* 0x3a1 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 1, 2}, /* s2a r4, r1, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {932 /* 0x3a4 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {935 /* 0x3a7 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {936 /* 0x3a8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {937 /* 0x3a9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {939 /* 0x3ab */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {941 /* 0x3ad */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {943 /* 0x3af */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {944 /* 0x3b0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {945 /* 0x3b1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 3, 4}} /* sub r5, r3, r4 */ - }, - {948 /* 0x3b4 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {949 /* 0x3b5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {950 /* 0x3b6 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {951 /* 0x3b7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {952 /* 0x3b8 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {953 /* 0x3b9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {955 /* 0x3bb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {4, 4, 4}} /* s2a r5, r4, r4 */ - }, - {956 /* 0x3bc */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {957 /* 0x3bd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {958 /* 0x3be */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {959 /* 0x3bf */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {960 /* 0x3c0 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {961 /* 0x3c1 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {962 /* 0x3c2 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {963 /* 0x3c3 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {964 /* 0x3c4 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {965 /* 0x3c5 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {966 /* 0x3c6 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {967 /* 0x3c7 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {968 /* 0x3c8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {969 /* 0x3c9 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {3, 2, 1}, /* s1a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {970 /* 0x3ca */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {971 /* 0x3cb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {972 /* 0x3cc */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {973 /* 0x3cd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {975 /* 0x3cf */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {6, 3, 6}, /* shli r4, r3, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {976 /* 0x3d0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {979 /* 0x3d3 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {980 /* 0x3d4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {981 /* 0x3d5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {983 /* 0x3d7 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {984 /* 0x3d8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {985 /* 0x3d9 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {987 /* 0x3db */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {988 /* 0x3dc */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {989 /* 0x3dd */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {990 /* 0x3de */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {991 /* 0x3df */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {992 /* 0x3e0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {993 /* 0x3e1 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {994 /* 0x3e2 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {996 /* 0x3e4 */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {997 /* 0x3e5 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {999 /* 0x3e7 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1000 /* 0x3e8 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {1001 /* 0x3e9 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {4, 2, 1}, /* s2a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {1003 /* 0x3eb */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {1004 /* 0x3ec */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {1005 /* 0x3ed */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {1006 /* 0x3ee */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1007 /* 0x3ef */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1008 /* 0x3f0 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1009 /* 0x3f1 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {1010 /* 0x3f2 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {1011 /* 0x3f3 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 1, 10}, /* shli r4, r1, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1012 /* 0x3f4 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 2}} /* shli r5, r4, 2 */ - }, - {1013 /* 0x3f5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {1014 /* 0x3f6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1015 /* 0x3f7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1016 /* 0x3f8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1017 /* 0x3f9 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {1018 /* 0x3fa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {1019 /* 0x3fb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1020 /* 0x3fc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1021 /* 0x3fd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1022 /* 0x3fe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1023 /* 0x3ff */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {1024 /* 0x400 */ , - {{6, 1, 10}} /* shli r2, r1, 10 */ - }, - {1025 /* 0x401 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {1026 /* 0x402 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {1027 /* 0x403 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1028 /* 0x404 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {1029 /* 0x405 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1030 /* 0x406 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {1031 /* 0x407 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {1032 /* 0x408 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {1033 /* 0x409 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1034 /* 0x40a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {1040 /* 0x410 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1049 /* 0x419 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {1056 /* 0x420 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1059 /* 0x423 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 2, 1}, /* s3a r4, r2, r1 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {1088 /* 0x440 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1100 /* 0x44c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {1104 /* 0x450 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {1108 /* 0x454 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {1136 /* 0x470 */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {1152 /* 0x480 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 7}} /* shli r3, r2, 7 */ - }, - {1200 /* 0x4b0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1204 /* 0x4b4 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {1242 /* 0x4da */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {1280 /* 0x500 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 8}} /* shli r3, r2, 8 */ - }, - {1292 /* 0x50c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {1304 /* 0x518 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {1312 /* 0x520 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {1320 /* 0x528 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {1336 /* 0x538 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {1344 /* 0x540 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {1348 /* 0x544 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {1360 /* 0x550 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {1364 /* 0x554 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {1395 /* 0x573 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}, /* shli r4, r3, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1448 /* 0x5a8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {1460 /* 0x5b4 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {1461 /* 0x5b5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {1472 /* 0x5c0 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 5}, /* shli r3, r1, 5 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 6}} /* shli r5, r4, 6 */ - }, - {1488 /* 0x5d0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1512 /* 0x5e8 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 3}, /* shli r3, r2, 3 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1536 /* 0x600 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 9}} /* shli r3, r2, 9 */ - }, - {1568 /* 0x620 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {1576 /* 0x628 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {1649 /* 0x671 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {1664 /* 0x680 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 7}} /* shli r4, r3, 7 */ - }, - {1684 /* 0x694 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {3, 2, 3}, /* s1a r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {1696 /* 0x6a0 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {4, 2, 2}, /* s2a r4, r2, r2 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {1744 /* 0x6d0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {1812 /* 0x714 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {2000 /* 0x7d0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {2012 /* 0x7dc */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2014 /* 0x7de */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2037 /* 0x7f5 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {4, 4, 1}} /* s2a r5, r4, r1 */ - }, - {2038 /* 0x7f6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2039 /* 0x7f7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2040 /* 0x7f8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2041 /* 0x7f9 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {2042 /* 0x7fa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {2043 /* 0x7fb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2044 /* 0x7fc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2045 /* 0x7fd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2046 /* 0x7fe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2047 /* 0x7ff */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {2048 /* 0x800 */ , - {{6, 1, 11}} /* shli r2, r1, 11 */ - }, - {2049 /* 0x801 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {2050 /* 0x802 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {2051 /* 0x803 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2052 /* 0x804 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {2053 /* 0x805 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2054 /* 0x806 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {2055 /* 0x807 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {2056 /* 0x808 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {2057 /* 0x809 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2058 /* 0x80a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {2064 /* 0x810 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2080 /* 0x820 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2100 /* 0x834 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 1, 11}, /* shli r4, r1, 11 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {2112 /* 0x840 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2144 /* 0x860 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {2176 /* 0x880 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2184 /* 0x888 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {2304 /* 0x900 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 8}} /* shli r3, r2, 8 */ - }, - {2320 /* 0x910 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {5, 3, 2}} /* s3a r4, r3, r2 */ - }, - {2408 /* 0x968 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {2560 /* 0xa00 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 9}} /* shli r3, r2, 9 */ - }, - {2578 /* 0xa12 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {2592 /* 0xa20 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 5}} /* shli r4, r3, 5 */ - }, - {2633 /* 0xa49 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {2704 /* 0xa90 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {2730 /* 0xaaa */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 5}, /* shli r3, r2, 5 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {2880 /* 0xb40 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 6}} /* shli r4, r3, 6 */ - }, - {2896 /* 0xb50 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {3072 /* 0xc00 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 10}} /* shli r3, r2, 10 */ - }, - {3079 /* 0xc07 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {3112 /* 0xc28 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {3192 /* 0xc78 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 2}, /* s2a r3, r2, r2 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {3240 /* 0xca8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {6, 4, 3}} /* shli r5, r4, 3 */ - }, - {3264 /* 0xcc0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {3328 /* 0xd00 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 8}} /* shli r4, r3, 8 */ - }, - {3453 /* 0xd7d */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {3529 /* 0xdc9 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}, /* s3a r4, r2, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {3580 /* 0xdfc */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {3600 /* 0xe10 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 2, 3}, /* sub r4, r2, r3 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {3624 /* 0xe28 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {4000 /* 0xfa0 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 5}} /* shli r5, r4, 5 */ - }, - {4025 /* 0xfb9 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {4073 /* 0xfe9 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 4, 1}} /* s3a r5, r4, r1 */ - }, - {4086 /* 0xff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {4087 /* 0xff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4088 /* 0xff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4089 /* 0xff9 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {4090 /* 0xffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 11}, /* shli r3, r1, 11 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {4091 /* 0xffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4092 /* 0xffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4093 /* 0xffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4094 /* 0xffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4095 /* 0xfff */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {4096 /* 0x1000 */ , - {{6, 1, 12}} /* shli r2, r1, 12 */ - }, - {4097 /* 0x1001 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {4098 /* 0x1002 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {4099 /* 0x1003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4100 /* 0x1004 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {4101 /* 0x1005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4102 /* 0x1006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {4103 /* 0x1007 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {4104 /* 0x1008 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {4105 /* 0x1009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4106 /* 0x100a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {4108 /* 0x100c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {4112 /* 0x1010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4128 /* 0x1020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4160 /* 0x1040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4184 /* 0x1058 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {4224 /* 0x1080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4352 /* 0x1100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4369 /* 0x1111 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {4376 /* 0x1118 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {4416 /* 0x1140 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {1, 2, 3}, /* add r4, r2, r3 */ - {6, 4, 6}} /* shli r5, r4, 6 */ - }, - {4433 /* 0x1151 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {4482 /* 0x1182 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {5, 3, 1}, /* s3a r4, r3, r1 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {4608 /* 0x1200 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 9}} /* shli r3, r2, 9 */ - }, - {4712 /* 0x1268 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {5, 3, 4}} /* s3a r5, r3, r4 */ - }, - {4864 /* 0x1300 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {3, 2, 1}, /* s1a r3, r2, r1 */ - {6, 3, 8}} /* shli r4, r3, 8 */ - }, - {5000 /* 0x1388 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {5040 /* 0x13b0 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 4}, /* shli r3, r2, 4 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {5120 /* 0x1400 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 10}} /* shli r3, r2, 10 */ - }, - {5243 /* 0x147b */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 7}, /* shli r4, r3, 7 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {5285 /* 0x14a5 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 7}, /* shli r3, r2, 7 */ - {4, 2, 3}, /* s2a r4, r2, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {5329 /* 0x14d1 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {6144 /* 0x1800 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 11}} /* shli r3, r2, 11 */ - }, - {6164 /* 0x1814 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 11}, /* shli r4, r2, 11 */ - {4, 3, 4}} /* s2a r5, r3, r4 */ - }, - {6400 /* 0x1900 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 8}} /* shli r4, r3, 8 */ - }, - {6406 /* 0x1906 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {3, 3, 3}, /* s1a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {6656 /* 0x1a00 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {4, 2, 1}, /* s2a r3, r2, r1 */ - {6, 3, 9}} /* shli r4, r3, 9 */ - }, - {7040 /* 0x1b80 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 6}, /* shli r3, r1, 6 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 7}} /* shli r5, r4, 7 */ - }, - {7169 /* 0x1c01 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {5, 2, 3}} /* s3a r4, r2, r3 */ - }, - {7678 /* 0x1dfe */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {7682 /* 0x1e02 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 1, 2}, /* sub r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {3, 3, 4}} /* s1a r5, r3, r4 */ - }, - {8000 /* 0x1f40 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 6}} /* shli r5, r4, 6 */ - }, - {8048 /* 0x1f70 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 4}} /* shli r5, r4, 4 */ - }, - {8182 /* 0x1ff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {8183 /* 0x1ff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8184 /* 0x1ff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8185 /* 0x1ff9 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {8186 /* 0x1ffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 12}, /* shli r3, r1, 12 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {8187 /* 0x1ffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8188 /* 0x1ffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8189 /* 0x1ffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8190 /* 0x1ffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8191 /* 0x1fff */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {8192 /* 0x2000 */ , - {{6, 1, 13}} /* shli r2, r1, 13 */ - }, - {8193 /* 0x2001 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {8194 /* 0x2002 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {8195 /* 0x2003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8196 /* 0x2004 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {8197 /* 0x2005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8198 /* 0x2006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {8199 /* 0x2007 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {8200 /* 0x2008 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {8201 /* 0x2009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8202 /* 0x200a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {8203 /* 0x200b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 10}, /* shli r3, r1, 10 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {8204 /* 0x200c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {4, 2, 3}} /* s2a r4, r2, r3 */ - }, - {8208 /* 0x2010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8224 /* 0x2020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8256 /* 0x2040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8320 /* 0x2080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8448 /* 0x2100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8520 /* 0x2148 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 8}, /* shli r3, r1, 8 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {8640 /* 0x21c0 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {8672 /* 0x21e0 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 3, 8}, /* shli r4, r3, 8 */ - {2, 4, 2}} /* sub r5, r4, r2 */ - }, - {8704 /* 0x2200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8716 /* 0x220c */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {4, 3, 2}, /* s2a r4, r3, r2 */ - {4, 4, 3}} /* s2a r5, r4, r3 */ - }, - {8728 /* 0x2218 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 9}, /* shli r3, r1, 9 */ - {3, 3, 2}, /* s1a r4, r3, r2 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {9216 /* 0x2400 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 10}} /* shli r3, r2, 10 */ - }, - {9217 /* 0x2401 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 10}, /* shli r3, r2, 10 */ - {1, 1, 3}} /* add r4, r1, r3 */ - }, - {9746 /* 0x2612 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {5, 3, 3}, /* s3a r4, r3, r3 */ - {3, 4, 2}} /* s1a r5, r4, r2 */ - }, - {9810 /* 0x2652 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 6}, /* shli r3, r2, 6 */ - {5, 3, 2}, /* s3a r4, r3, r2 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {10240 /* 0x2800 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 11}} /* shli r3, r2, 11 */ - }, - {10248 /* 0x2808 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {4, 3, 2}} /* s2a r4, r3, r2 */ - }, - {10368 /* 0x2880 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 7}} /* shli r4, r3, 7 */ - }, - {10456 /* 0x28d8 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {4, 3, 3}, /* s2a r4, r3, r3 */ - {5, 4, 2}} /* s3a r5, r4, r2 */ - }, - {10832 /* 0x2a50 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {4, 1, 2}, /* s2a r3, r1, r2 */ - {4, 3, 3}, /* s2a r4, r3, r3 */ - {4, 4, 2}} /* s2a r5, r4, r2 */ - }, - {11512 /* 0x2cf8 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {2, 3, 1}, /* sub r4, r3, r1 */ - {5, 4, 3}} /* s3a r5, r4, r3 */ - }, - {11522 /* 0x2d02 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {4, 3, 1}, /* s2a r4, r3, r1 */ - {3, 4, 3}} /* s1a r5, r4, r3 */ - }, - {11529 /* 0x2d09 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 8}, /* shli r3, r2, 8 */ - {1, 1, 3}, /* add r4, r1, r3 */ - {5, 4, 4}} /* s3a r5, r4, r4 */ - }, - {12288 /* 0x3000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 12}} /* shli r3, r2, 12 */ - }, - {12299 /* 0x300b */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 1, 2}, /* s3a r3, r1, r2 */ - {6, 2, 12}, /* shli r4, r2, 12 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {16000 /* 0x3e80 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 7}, /* shli r3, r1, 7 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 7}} /* shli r5, r4, 7 */ - }, - {16374 /* 0x3ff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 11}, /* shli r4, r2, 11 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {16375 /* 0x3ff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16376 /* 0x3ff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16377 /* 0x3ff9 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {16378 /* 0x3ffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 13}, /* shli r3, r1, 13 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {16379 /* 0x3ffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16380 /* 0x3ffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16381 /* 0x3ffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16382 /* 0x3ffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16383 /* 0x3fff */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {16384 /* 0x4000 */ , - {{6, 1, 14}} /* shli r2, r1, 14 */ - }, - {16385 /* 0x4001 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {16386 /* 0x4002 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {16387 /* 0x4003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16388 /* 0x4004 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {16389 /* 0x4005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16390 /* 0x4006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {16391 /* 0x4007 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {16392 /* 0x4008 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {16393 /* 0x4009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16394 /* 0x400a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {16400 /* 0x4010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16416 /* 0x4020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16448 /* 0x4040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16496 /* 0x4070 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {5, 2, 4}} /* s3a r5, r2, r4 */ - }, - {16512 /* 0x4080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16640 /* 0x4100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16896 /* 0x4200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17408 /* 0x4400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18432 /* 0x4800 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 11}} /* shli r3, r2, 11 */ - }, - {20480 /* 0x5000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 12}} /* shli r3, r2, 12 */ - }, - {24576 /* 0x6000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 13}} /* shli r3, r2, 13 */ - }, - {25600 /* 0x6400 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {5, 2, 1}, /* s3a r3, r2, r1 */ - {6, 3, 10}} /* shli r4, r3, 10 */ - }, - {32758 /* 0x7ff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 12}, /* shli r4, r2, 12 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {32759 /* 0x7ff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32760 /* 0x7ff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32761 /* 0x7ff9 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {32762 /* 0x7ffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 14}, /* shli r3, r1, 14 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {32763 /* 0x7ffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32764 /* 0x7ffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32765 /* 0x7ffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32766 /* 0x7ffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {32767 /* 0x7fff */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {32768 /* 0x8000 */ , - {{6, 1, 15}} /* shli r2, r1, 15 */ - }, - {32769 /* 0x8001 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {32770 /* 0x8002 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {32771 /* 0x8003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32772 /* 0x8004 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {32773 /* 0x8005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32774 /* 0x8006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {32775 /* 0x8007 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {32776 /* 0x8008 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {32777 /* 0x8009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32778 /* 0x800a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {32784 /* 0x8010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32800 /* 0x8020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32832 /* 0x8040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {32896 /* 0x8080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33024 /* 0x8100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33280 /* 0x8200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33792 /* 0x8400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34816 /* 0x8800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {36864 /* 0x9000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 12}} /* shli r3, r2, 12 */ - }, - {40960 /* 0xa000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 13}} /* shli r3, r2, 13 */ - }, - {49152 /* 0xc000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 14}} /* shli r3, r2, 14 */ - }, - {65526 /* 0xfff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 13}, /* shli r4, r2, 13 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {65527 /* 0xfff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65528 /* 0xfff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65529 /* 0xfff9 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {65530 /* 0xfffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 15}, /* shli r3, r1, 15 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {65531 /* 0xfffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65532 /* 0xfffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65533 /* 0xfffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65534 /* 0xfffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {65535 /* 0xffff */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {65536 /* 0x10000 */ , - {{6, 1, 16}} /* shli r2, r1, 16 */ - }, - {65537 /* 0x10001 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {65538 /* 0x10002 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {65539 /* 0x10003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65540 /* 0x10004 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {65541 /* 0x10005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65542 /* 0x10006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {65543 /* 0x10007 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {65544 /* 0x10008 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {65545 /* 0x10009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65546 /* 0x1000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {65552 /* 0x10010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65568 /* 0x10020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65600 /* 0x10040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65664 /* 0x10080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {65792 /* 0x10100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {66048 /* 0x10200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {66560 /* 0x10400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67584 /* 0x10800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {69632 /* 0x11000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {73728 /* 0x12000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 13}} /* shli r3, r2, 13 */ - }, - {81920 /* 0x14000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 14}} /* shli r3, r2, 14 */ - }, - {98304 /* 0x18000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 15}} /* shli r3, r2, 15 */ - }, - {131062 /* 0x1fff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 14}, /* shli r4, r2, 14 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {131063 /* 0x1fff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131064 /* 0x1fff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131065 /* 0x1fff9 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {131066 /* 0x1fffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 16}, /* shli r3, r1, 16 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {131067 /* 0x1fffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131068 /* 0x1fffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131069 /* 0x1fffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131070 /* 0x1fffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {131071 /* 0x1ffff */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {131072 /* 0x20000 */ , - {{6, 1, 17}} /* shli r2, r1, 17 */ - }, - {131073 /* 0x20001 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {131074 /* 0x20002 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {131075 /* 0x20003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131076 /* 0x20004 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {131077 /* 0x20005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131078 /* 0x20006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {131079 /* 0x20007 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {131080 /* 0x20008 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {131081 /* 0x20009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131082 /* 0x2000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {131088 /* 0x20010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131104 /* 0x20020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131136 /* 0x20040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131200 /* 0x20080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131328 /* 0x20100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {131584 /* 0x20200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {132096 /* 0x20400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {133120 /* 0x20800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {135168 /* 0x21000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {139264 /* 0x22000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {147456 /* 0x24000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 14}} /* shli r3, r2, 14 */ - }, - {163840 /* 0x28000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 15}} /* shli r3, r2, 15 */ - }, - {196608 /* 0x30000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 16}} /* shli r3, r2, 16 */ - }, - {262134 /* 0x3fff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 15}, /* shli r4, r2, 15 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {262135 /* 0x3fff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262136 /* 0x3fff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262137 /* 0x3fff9 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {262138 /* 0x3fffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 17}, /* shli r3, r1, 17 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {262139 /* 0x3fffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262140 /* 0x3fffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262141 /* 0x3fffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262142 /* 0x3fffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {262143 /* 0x3ffff */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {262144 /* 0x40000 */ , - {{6, 1, 18}} /* shli r2, r1, 18 */ - }, - {262145 /* 0x40001 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {262146 /* 0x40002 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {262147 /* 0x40003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262148 /* 0x40004 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {262149 /* 0x40005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262150 /* 0x40006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {262151 /* 0x40007 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {262152 /* 0x40008 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {262153 /* 0x40009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262154 /* 0x4000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {262160 /* 0x40010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262176 /* 0x40020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262208 /* 0x40040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262272 /* 0x40080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262400 /* 0x40100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {262656 /* 0x40200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {263168 /* 0x40400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {264192 /* 0x40800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {266240 /* 0x41000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {270336 /* 0x42000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {278528 /* 0x44000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {294912 /* 0x48000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 15}} /* shli r3, r2, 15 */ - }, - {327680 /* 0x50000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 16}} /* shli r3, r2, 16 */ - }, - {393216 /* 0x60000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 17}} /* shli r3, r2, 17 */ - }, - {524278 /* 0x7fff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 16}, /* shli r4, r2, 16 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {524279 /* 0x7fff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524280 /* 0x7fff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524281 /* 0x7fff9 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {524282 /* 0x7fffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 18}, /* shli r3, r1, 18 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {524283 /* 0x7fffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524284 /* 0x7fffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524285 /* 0x7fffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524286 /* 0x7fffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {524287 /* 0x7ffff */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {524288 /* 0x80000 */ , - {{6, 1, 19}} /* shli r2, r1, 19 */ - }, - {524289 /* 0x80001 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {524290 /* 0x80002 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {524291 /* 0x80003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524292 /* 0x80004 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {524293 /* 0x80005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524294 /* 0x80006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {524295 /* 0x80007 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {524296 /* 0x80008 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {524297 /* 0x80009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524298 /* 0x8000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {524304 /* 0x80010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524320 /* 0x80020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524352 /* 0x80040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524416 /* 0x80080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524544 /* 0x80100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {524800 /* 0x80200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {525312 /* 0x80400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {526336 /* 0x80800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {528384 /* 0x81000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {532480 /* 0x82000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {540672 /* 0x84000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {557056 /* 0x88000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {589824 /* 0x90000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 16}} /* shli r3, r2, 16 */ - }, - {655360 /* 0xa0000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 17}} /* shli r3, r2, 17 */ - }, - {786432 /* 0xc0000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 18}} /* shli r3, r2, 18 */ - }, - {1048566 /* 0xffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 17}, /* shli r4, r2, 17 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1048567 /* 0xffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048568 /* 0xffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048569 /* 0xffff9 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {1048570 /* 0xffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 19}, /* shli r3, r1, 19 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {1048571 /* 0xffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048572 /* 0xffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048573 /* 0xffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048574 /* 0xffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1048575 /* 0xfffff */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {1048576 /* 0x100000 */ , - {{6, 1, 20}} /* shli r2, r1, 20 */ - }, - {1048577 /* 0x100001 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {1048578 /* 0x100002 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {1048579 /* 0x100003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048580 /* 0x100004 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {1048581 /* 0x100005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048582 /* 0x100006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {1048583 /* 0x100007 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {1048584 /* 0x100008 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {1048585 /* 0x100009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048586 /* 0x10000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {1048592 /* 0x100010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048608 /* 0x100020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048640 /* 0x100040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048704 /* 0x100080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1048832 /* 0x100100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1049088 /* 0x100200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1049600 /* 0x100400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1050624 /* 0x100800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1052672 /* 0x101000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1056768 /* 0x102000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1064960 /* 0x104000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1081344 /* 0x108000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1114112 /* 0x110000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1179648 /* 0x120000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 17}} /* shli r3, r2, 17 */ - }, - {1310720 /* 0x140000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 18}} /* shli r3, r2, 18 */ - }, - {1572864 /* 0x180000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 19}} /* shli r3, r2, 19 */ - }, - {2097142 /* 0x1ffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 18}, /* shli r4, r2, 18 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2097143 /* 0x1ffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097144 /* 0x1ffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097145 /* 0x1ffff9 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {2097146 /* 0x1ffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 20}, /* shli r3, r1, 20 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {2097147 /* 0x1ffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097148 /* 0x1ffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097149 /* 0x1ffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097150 /* 0x1ffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2097151 /* 0x1fffff */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {2097152 /* 0x200000 */ , - {{6, 1, 21}} /* shli r2, r1, 21 */ - }, - {2097153 /* 0x200001 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {2097154 /* 0x200002 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {2097155 /* 0x200003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097156 /* 0x200004 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {2097157 /* 0x200005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097158 /* 0x200006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {2097159 /* 0x200007 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {2097160 /* 0x200008 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {2097161 /* 0x200009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097162 /* 0x20000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {2097168 /* 0x200010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097184 /* 0x200020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097216 /* 0x200040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097280 /* 0x200080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097408 /* 0x200100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2097664 /* 0x200200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2098176 /* 0x200400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2099200 /* 0x200800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2101248 /* 0x201000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2105344 /* 0x202000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2113536 /* 0x204000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2129920 /* 0x208000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2162688 /* 0x210000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2228224 /* 0x220000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {2359296 /* 0x240000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 18}} /* shli r3, r2, 18 */ - }, - {2621440 /* 0x280000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 19}} /* shli r3, r2, 19 */ - }, - {3145728 /* 0x300000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 20}} /* shli r3, r2, 20 */ - }, - {4194294 /* 0x3ffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 19}, /* shli r4, r2, 19 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {4194295 /* 0x3ffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194296 /* 0x3ffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194297 /* 0x3ffff9 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {4194298 /* 0x3ffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 21}, /* shli r3, r1, 21 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {4194299 /* 0x3ffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194300 /* 0x3ffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194301 /* 0x3ffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194302 /* 0x3ffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {4194303 /* 0x3fffff */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {4194304 /* 0x400000 */ , - {{6, 1, 22}} /* shli r2, r1, 22 */ - }, - {4194305 /* 0x400001 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {4194306 /* 0x400002 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {4194307 /* 0x400003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194308 /* 0x400004 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {4194309 /* 0x400005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194310 /* 0x400006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {4194311 /* 0x400007 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {4194312 /* 0x400008 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {4194313 /* 0x400009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194314 /* 0x40000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {4194320 /* 0x400010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194336 /* 0x400020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194368 /* 0x400040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194432 /* 0x400080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194560 /* 0x400100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4194816 /* 0x400200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4195328 /* 0x400400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4196352 /* 0x400800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4198400 /* 0x401000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4202496 /* 0x402000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4210688 /* 0x404000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4227072 /* 0x408000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4259840 /* 0x410000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4325376 /* 0x420000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4456448 /* 0x440000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {4718592 /* 0x480000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 19}} /* shli r3, r2, 19 */ - }, - {5242880 /* 0x500000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 20}} /* shli r3, r2, 20 */ - }, - {6291456 /* 0x600000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 21}} /* shli r3, r2, 21 */ - }, - {8388598 /* 0x7ffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 20}, /* shli r4, r2, 20 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {8388599 /* 0x7ffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388600 /* 0x7ffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388601 /* 0x7ffff9 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {8388602 /* 0x7ffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 22}, /* shli r3, r1, 22 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {8388603 /* 0x7ffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388604 /* 0x7ffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388605 /* 0x7ffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388606 /* 0x7ffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {8388607 /* 0x7fffff */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {8388608 /* 0x800000 */ , - {{6, 1, 23}} /* shli r2, r1, 23 */ - }, - {8388609 /* 0x800001 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {8388610 /* 0x800002 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {8388611 /* 0x800003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388612 /* 0x800004 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {8388613 /* 0x800005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388614 /* 0x800006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {8388615 /* 0x800007 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {8388616 /* 0x800008 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {8388617 /* 0x800009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388618 /* 0x80000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {8388624 /* 0x800010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388640 /* 0x800020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388672 /* 0x800040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388736 /* 0x800080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8388864 /* 0x800100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8389120 /* 0x800200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8389632 /* 0x800400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8390656 /* 0x800800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8392704 /* 0x801000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8396800 /* 0x802000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8404992 /* 0x804000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8421376 /* 0x808000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8454144 /* 0x810000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8519680 /* 0x820000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8650752 /* 0x840000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {8912896 /* 0x880000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {9437184 /* 0x900000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 20}} /* shli r3, r2, 20 */ - }, - {10485760 /* 0xa00000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 21}} /* shli r3, r2, 21 */ - }, - {11796480 /* 0xb40000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 18}} /* shli r4, r3, 18 */ - }, - {12582912 /* 0xc00000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 22}} /* shli r3, r2, 22 */ - }, - {16777206 /* 0xfffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 21}, /* shli r4, r2, 21 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {16777207 /* 0xfffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777208 /* 0xfffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777209 /* 0xfffff9 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {16777210 /* 0xfffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 23}, /* shli r3, r1, 23 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {16777211 /* 0xfffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777212 /* 0xfffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777213 /* 0xfffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777214 /* 0xfffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {16777215 /* 0xffffff */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {16777216 /* 0x1000000 */ , - {{6, 1, 24}} /* shli r2, r1, 24 */ - }, - {16777217 /* 0x1000001 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {16777218 /* 0x1000002 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {16777219 /* 0x1000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777220 /* 0x1000004 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {16777221 /* 0x1000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777222 /* 0x1000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {16777223 /* 0x1000007 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {16777224 /* 0x1000008 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {16777225 /* 0x1000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777226 /* 0x100000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {16777232 /* 0x1000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777248 /* 0x1000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777280 /* 0x1000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777344 /* 0x1000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777472 /* 0x1000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16777728 /* 0x1000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16778240 /* 0x1000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16779264 /* 0x1000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16781312 /* 0x1001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16785408 /* 0x1002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16793600 /* 0x1004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16809984 /* 0x1008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16842752 /* 0x1010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {16843009 /* 0x1010101 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 3, 16}, /* shli r4, r3, 16 */ - {1, 3, 4}} /* add r5, r3, r4 */ - }, - {16908288 /* 0x1020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17039360 /* 0x1040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17301504 /* 0x1080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {17825792 /* 0x1100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {18874368 /* 0x1200000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 21}} /* shli r3, r2, 21 */ - }, - {20971520 /* 0x1400000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 22}} /* shli r3, r2, 22 */ - }, - {23592960 /* 0x1680000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {5, 2, 2}, /* s3a r3, r2, r2 */ - {6, 3, 19}} /* shli r4, r3, 19 */ - }, - {25165824 /* 0x1800000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 23}} /* shli r3, r2, 23 */ - }, - {33554422 /* 0x1fffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 22}, /* shli r4, r2, 22 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {33554423 /* 0x1fffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554424 /* 0x1fffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554425 /* 0x1fffff9 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {33554426 /* 0x1fffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 24}, /* shli r3, r1, 24 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {33554427 /* 0x1fffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554428 /* 0x1fffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554429 /* 0x1fffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554430 /* 0x1fffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {33554431 /* 0x1ffffff */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {33554432 /* 0x2000000 */ , - {{6, 1, 25}} /* shli r2, r1, 25 */ - }, - {33554433 /* 0x2000001 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {33554434 /* 0x2000002 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {33554435 /* 0x2000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554436 /* 0x2000004 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {33554437 /* 0x2000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554438 /* 0x2000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {33554439 /* 0x2000007 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {33554440 /* 0x2000008 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {33554441 /* 0x2000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554442 /* 0x200000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {33554448 /* 0x2000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554464 /* 0x2000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554496 /* 0x2000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554560 /* 0x2000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554688 /* 0x2000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33554944 /* 0x2000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33555456 /* 0x2000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33556480 /* 0x2000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33558528 /* 0x2001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33562624 /* 0x2002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33570816 /* 0x2004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33587200 /* 0x2008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33619968 /* 0x2010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33685504 /* 0x2020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {33816576 /* 0x2040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34078720 /* 0x2080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {34603008 /* 0x2100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {35651584 /* 0x2200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {37748736 /* 0x2400000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 22}} /* shli r3, r2, 22 */ - }, - {41943040 /* 0x2800000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 23}} /* shli r3, r2, 23 */ - }, - {50331648 /* 0x3000000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 24}} /* shli r3, r2, 24 */ - }, - {67108854 /* 0x3fffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 23}, /* shli r4, r2, 23 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {67108855 /* 0x3fffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108856 /* 0x3fffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108857 /* 0x3fffff9 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {67108858 /* 0x3fffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 25}, /* shli r3, r1, 25 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {67108859 /* 0x3fffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108860 /* 0x3fffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108861 /* 0x3fffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108862 /* 0x3fffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {67108863 /* 0x3ffffff */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {67108864 /* 0x4000000 */ , - {{6, 1, 26}} /* shli r2, r1, 26 */ - }, - {67108865 /* 0x4000001 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {67108866 /* 0x4000002 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {67108867 /* 0x4000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108868 /* 0x4000004 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {67108869 /* 0x4000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108870 /* 0x4000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {67108871 /* 0x4000007 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {67108872 /* 0x4000008 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {67108873 /* 0x4000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108874 /* 0x400000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {67108880 /* 0x4000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108896 /* 0x4000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108928 /* 0x4000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67108992 /* 0x4000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67109120 /* 0x4000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67109376 /* 0x4000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67109888 /* 0x4000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67110912 /* 0x4000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67112960 /* 0x4001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67117056 /* 0x4002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67125248 /* 0x4004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67141632 /* 0x4008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67174400 /* 0x4010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67239936 /* 0x4020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67371008 /* 0x4040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {67633152 /* 0x4080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {68157440 /* 0x4100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {69206016 /* 0x4200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {71303168 /* 0x4400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {75497472 /* 0x4800000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 23}} /* shli r3, r2, 23 */ - }, - {83886080 /* 0x5000000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 24}} /* shli r3, r2, 24 */ - }, - {100663296 /* 0x6000000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 25}} /* shli r3, r2, 25 */ - }, - {134217718 /* 0x7fffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 24}, /* shli r4, r2, 24 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {134217719 /* 0x7fffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217720 /* 0x7fffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217721 /* 0x7fffff9 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {134217722 /* 0x7fffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 26}, /* shli r3, r1, 26 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {134217723 /* 0x7fffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217724 /* 0x7fffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217725 /* 0x7fffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217726 /* 0x7fffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {134217727 /* 0x7ffffff */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {134217728 /* 0x8000000 */ , - {{6, 1, 27}} /* shli r2, r1, 27 */ - }, - {134217729 /* 0x8000001 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {134217730 /* 0x8000002 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {134217731 /* 0x8000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217732 /* 0x8000004 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {134217733 /* 0x8000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217734 /* 0x8000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {134217735 /* 0x8000007 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {134217736 /* 0x8000008 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {134217737 /* 0x8000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217738 /* 0x800000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {134217744 /* 0x8000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217760 /* 0x8000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217792 /* 0x8000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217856 /* 0x8000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134217984 /* 0x8000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134218240 /* 0x8000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134218752 /* 0x8000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134219776 /* 0x8000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134221824 /* 0x8001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134225920 /* 0x8002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134234112 /* 0x8004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134250496 /* 0x8008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134283264 /* 0x8010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134348800 /* 0x8020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134479872 /* 0x8040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {134742016 /* 0x8080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {135266304 /* 0x8100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {136314880 /* 0x8200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {138412032 /* 0x8400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {142606336 /* 0x8800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {150994944 /* 0x9000000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 24}} /* shli r3, r2, 24 */ - }, - {167772160 /* 0xa000000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 25}} /* shli r3, r2, 25 */ - }, - {201326592 /* 0xc000000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 26}} /* shli r3, r2, 26 */ - }, - {268435446 /* 0xffffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 25}, /* shli r4, r2, 25 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {268435447 /* 0xffffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435448 /* 0xffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435449 /* 0xffffff9 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {268435450 /* 0xffffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 27}, /* shli r3, r1, 27 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {268435451 /* 0xffffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435452 /* 0xffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435453 /* 0xffffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435454 /* 0xffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {268435455 /* 0xfffffff */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {268435456 /* 0x10000000 */ , - {{6, 1, 28}} /* shli r2, r1, 28 */ - }, - {268435457 /* 0x10000001 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {268435458 /* 0x10000002 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {268435459 /* 0x10000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435460 /* 0x10000004 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {268435461 /* 0x10000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435462 /* 0x10000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {268435463 /* 0x10000007 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {268435464 /* 0x10000008 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {268435465 /* 0x10000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435466 /* 0x1000000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {268435472 /* 0x10000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435488 /* 0x10000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435520 /* 0x10000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435584 /* 0x10000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435712 /* 0x10000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268435968 /* 0x10000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268436480 /* 0x10000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268437504 /* 0x10000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268439552 /* 0x10001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268443648 /* 0x10002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268451840 /* 0x10004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268468224 /* 0x10008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268500992 /* 0x10010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268566528 /* 0x10020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268697600 /* 0x10040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {268959744 /* 0x10080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {269484032 /* 0x10100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {270532608 /* 0x10200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {272629760 /* 0x10400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {276824064 /* 0x10800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {285212672 /* 0x11000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {301989888 /* 0x12000000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 25}} /* shli r3, r2, 25 */ - }, - {335544320 /* 0x14000000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 26}} /* shli r3, r2, 26 */ - }, - {402653184 /* 0x18000000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 27}} /* shli r3, r2, 27 */ - }, - {536870902 /* 0x1ffffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 26}, /* shli r4, r2, 26 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {536870903 /* 0x1ffffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870904 /* 0x1ffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870905 /* 0x1ffffff9 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {536870906 /* 0x1ffffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 28}, /* shli r3, r1, 28 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {536870907 /* 0x1ffffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870908 /* 0x1ffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870909 /* 0x1ffffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870910 /* 0x1ffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {536870911 /* 0x1fffffff */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {536870912 /* 0x20000000 */ , - {{6, 1, 29}} /* shli r2, r1, 29 */ - }, - {536870913 /* 0x20000001 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {536870914 /* 0x20000002 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {536870915 /* 0x20000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870916 /* 0x20000004 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {536870917 /* 0x20000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870918 /* 0x20000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {536870919 /* 0x20000007 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {536870920 /* 0x20000008 */ , - {{6, 1, 29}, /* shli r2, r1, 29 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {536870921 /* 0x20000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870922 /* 0x2000000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {536870928 /* 0x20000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870944 /* 0x20000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536870976 /* 0x20000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536871040 /* 0x20000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536871168 /* 0x20000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536871424 /* 0x20000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536871936 /* 0x20000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536872960 /* 0x20000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536875008 /* 0x20001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536879104 /* 0x20002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536887296 /* 0x20004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536903680 /* 0x20008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {536936448 /* 0x20010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {537001984 /* 0x20020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {537133056 /* 0x20040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {537395200 /* 0x20080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {537919488 /* 0x20100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {538968064 /* 0x20200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {541065216 /* 0x20400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {545259520 /* 0x20800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {553648128 /* 0x21000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {570425344 /* 0x22000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {603979776 /* 0x24000000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 26}} /* shli r3, r2, 26 */ - }, - {671088640 /* 0x28000000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 27}} /* shli r3, r2, 27 */ - }, - {805306368 /* 0x30000000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 28}} /* shli r3, r2, 28 */ - }, - {1073741814 /* 0x3ffffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 27}, /* shli r4, r2, 27 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {1073741815 /* 0x3ffffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741816 /* 0x3ffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741817 /* 0x3ffffff9 */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {1073741818 /* 0x3ffffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 29}, /* shli r3, r1, 29 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {1073741819 /* 0x3ffffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741820 /* 0x3ffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741821 /* 0x3ffffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741822 /* 0x3ffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {1073741823 /* 0x3fffffff */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - }, - {1073741824 /* 0x40000000 */ , - {{6, 1, 30}} /* shli r2, r1, 30 */ - }, - {1073741825 /* 0x40000001 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {1, 1, 2}} /* add r3, r1, r2 */ - }, - {1073741826 /* 0x40000002 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {3, 1, 2}} /* s1a r3, r1, r2 */ - }, - {1073741827 /* 0x40000003 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741828 /* 0x40000004 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {4, 1, 2}} /* s2a r3, r1, r2 */ - }, - {1073741829 /* 0x40000005 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741830 /* 0x40000006 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {1073741831 /* 0x40000007 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 1, 3}} /* s3a r4, r1, r3 */ - }, - {1073741832 /* 0x40000008 */ , - {{6, 1, 30}, /* shli r2, r1, 30 */ - {5, 1, 2}} /* s3a r3, r1, r2 */ - }, - {1073741833 /* 0x40000009 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741834 /* 0x4000000a */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {3, 2, 3}} /* s1a r4, r2, r3 */ - }, - {1073741840 /* 0x40000010 */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741856 /* 0x40000020 */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741888 /* 0x40000040 */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073741952 /* 0x40000080 */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073742080 /* 0x40000100 */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073742336 /* 0x40000200 */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073742848 /* 0x40000400 */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073743872 /* 0x40000800 */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073745920 /* 0x40001000 */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073750016 /* 0x40002000 */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073758208 /* 0x40004000 */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073774592 /* 0x40008000 */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073807360 /* 0x40010000 */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1073872896 /* 0x40020000 */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1074003968 /* 0x40040000 */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1074266112 /* 0x40080000 */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1074790400 /* 0x40100000 */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1075838976 /* 0x40200000 */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1077936128 /* 0x40400000 */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1082130432 /* 0x40800000 */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1090519040 /* 0x41000000 */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1107296256 /* 0x42000000 */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1140850688 /* 0x44000000 */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {1, 2, 3}} /* add r4, r2, r3 */ - }, - {1207959552 /* 0x48000000 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 2, 27}} /* shli r3, r2, 27 */ - }, - {1342177280 /* 0x50000000 */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 2, 28}} /* shli r3, r2, 28 */ - }, - {1610612735 /* 0x5fffffff */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 29}, /* shli r3, r2, 29 */ - {2, 3, 1}} /* sub r4, r3, r1 */ - }, - {1610612736 /* 0x60000000 */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 2, 29}} /* shli r3, r2, 29 */ - }, - {1879048191 /* 0x6fffffff */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 3}, /* shli r4, r2, 3 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2013265919 /* 0x77ffffff */ , - {{6, 1, 27}, /* shli r2, r1, 27 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 4}, /* shli r4, r2, 4 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2080374783 /* 0x7bffffff */ , - {{6, 1, 26}, /* shli r2, r1, 26 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 5}, /* shli r4, r2, 5 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2113929215 /* 0x7dffffff */ , - {{6, 1, 25}, /* shli r2, r1, 25 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 6}, /* shli r4, r2, 6 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2130706431 /* 0x7effffff */ , - {{6, 1, 24}, /* shli r2, r1, 24 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 7}, /* shli r4, r2, 7 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2139095039 /* 0x7f7fffff */ , - {{6, 1, 23}, /* shli r2, r1, 23 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 8}, /* shli r4, r2, 8 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2143289343 /* 0x7fbfffff */ , - {{6, 1, 22}, /* shli r2, r1, 22 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 9}, /* shli r4, r2, 9 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2145386495 /* 0x7fdfffff */ , - {{6, 1, 21}, /* shli r2, r1, 21 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 10}, /* shli r4, r2, 10 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2146435071 /* 0x7fefffff */ , - {{6, 1, 20}, /* shli r2, r1, 20 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 11}, /* shli r4, r2, 11 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2146959359 /* 0x7ff7ffff */ , - {{6, 1, 19}, /* shli r2, r1, 19 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 12}, /* shli r4, r2, 12 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147221503 /* 0x7ffbffff */ , - {{6, 1, 18}, /* shli r2, r1, 18 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 13}, /* shli r4, r2, 13 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147352575 /* 0x7ffdffff */ , - {{6, 1, 17}, /* shli r2, r1, 17 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 14}, /* shli r4, r2, 14 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147418111 /* 0x7ffeffff */ , - {{6, 1, 16}, /* shli r2, r1, 16 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 15}, /* shli r4, r2, 15 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147450879 /* 0x7fff7fff */ , - {{6, 1, 15}, /* shli r2, r1, 15 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 16}, /* shli r4, r2, 16 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147467263 /* 0x7fffbfff */ , - {{6, 1, 14}, /* shli r2, r1, 14 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 17}, /* shli r4, r2, 17 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147475455 /* 0x7fffdfff */ , - {{6, 1, 13}, /* shli r2, r1, 13 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 18}, /* shli r4, r2, 18 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147479551 /* 0x7fffefff */ , - {{6, 1, 12}, /* shli r2, r1, 12 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 19}, /* shli r4, r2, 19 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147481599 /* 0x7ffff7ff */ , - {{6, 1, 11}, /* shli r2, r1, 11 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 20}, /* shli r4, r2, 20 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147482623 /* 0x7ffffbff */ , - {{6, 1, 10}, /* shli r2, r1, 10 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 21}, /* shli r4, r2, 21 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147483135 /* 0x7ffffdff */ , - {{6, 1, 9}, /* shli r2, r1, 9 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 22}, /* shli r4, r2, 22 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147483391 /* 0x7ffffeff */ , - {{6, 1, 8}, /* shli r2, r1, 8 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 23}, /* shli r4, r2, 23 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147483519 /* 0x7fffff7f */ , - {{6, 1, 7}, /* shli r2, r1, 7 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 24}, /* shli r4, r2, 24 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147483583 /* 0x7fffffbf */ , - {{6, 1, 6}, /* shli r2, r1, 6 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 25}, /* shli r4, r2, 25 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147483615 /* 0x7fffffdf */ , - {{6, 1, 5}, /* shli r2, r1, 5 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 26}, /* shli r4, r2, 26 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147483631 /* 0x7fffffef */ , - {{6, 1, 4}, /* shli r2, r1, 4 */ - {1, 1, 2}, /* add r3, r1, r2 */ - {6, 2, 27}, /* shli r4, r2, 27 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147483638 /* 0x7ffffff6 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {3, 1, 2}, /* s1a r3, r1, r2 */ - {6, 2, 28}, /* shli r4, r2, 28 */ - {2, 4, 3}} /* sub r5, r4, r3 */ - }, - {2147483639 /* 0x7ffffff7 */ , - {{5, 1, 1}, /* s3a r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483640 /* 0x7ffffff8 */ , - {{6, 1, 3}, /* shli r2, r1, 3 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483641 /* 0x7ffffff9 */ , - {{6, 1, 28}, /* shli r2, r1, 28 */ - {2, 2, 1}, /* sub r3, r2, r1 */ - {5, 3, 1}} /* s3a r4, r3, r1 */ - }, - {2147483642 /* 0x7ffffffa */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 30}, /* shli r3, r1, 30 */ - {2, 3, 2}, /* sub r4, r3, r2 */ - {6, 4, 1}} /* shli r5, r4, 1 */ - }, - {2147483643 /* 0x7ffffffb */ , - {{4, 1, 1}, /* s2a r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483644 /* 0x7ffffffc */ , - {{6, 1, 2}, /* shli r2, r1, 2 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483645 /* 0x7ffffffd */ , - {{3, 1, 1}, /* s1a r2, r1, r1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483646 /* 0x7ffffffe */ , - {{6, 1, 1}, /* shli r2, r1, 1 */ - {6, 1, 31}, /* shli r3, r1, 31 */ - {2, 3, 2}} /* sub r4, r3, r2 */ - }, - {2147483647 /* 0x7fffffff */ , - {{6, 1, 31}, /* shli r2, r1, 31 */ - {2, 2, 1}} /* sub r3, r2, r1 */ - } -}; - -const int tilepro_multiply_insn_seq_table_size = - (int) (sizeof tilepro_multiply_insn_seq_table - / sizeof tilepro_multiply_insn_seq_table[0]); diff --git a/gcc/config/tilepro/predicates.md b/gcc/config/tilepro/predicates.md deleted file mode 100644 index bc368c0..0000000 --- a/gcc/config/tilepro/predicates.md +++ /dev/null @@ -1,258 +0,0 @@ -;; Predicate definitions for Tilera TILEPro chip. -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Contributed by Walter Lee (walt@tilera.com) -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; . - -;; Return true if OP is the zero constant for MODE. -(define_predicate "const_zero_operand" - (and (match_code "const_int,const_double,const_vector") - (match_test "op == CONST0_RTX (mode)"))) - -;; Returns true if OP is either the constant zero or a register. -(define_predicate "reg_or_0_operand" - (and (ior (match_operand 0 "register_operand") - (match_operand 0 "const_zero_operand")) - (match_test "GET_MODE_SIZE (mode) <= UNITS_PER_WORD"))) - -; Return 1 if OP is a network register identifier. -(define_predicate "netreg_operand" - (and (match_code "const_int") - (match_test "IN_RANGE (INTVAL (op), 0, 6)"))) - -; Return 1 if OP is an unsigned 5-bit constant. -(define_predicate "u5bit_cint_operand" - (and (match_code "const_int") - (match_test "INTVAL (op) == (INTVAL (op) & 0x1F)"))) - -;; Return 1 if OP is an unsigned 16-bit constant. -(define_predicate "u16bit_cint_operand" - (and (match_code "const_int") - (match_test "(unsigned HOST_WIDE_INT)INTVAL (op) < (1U << 16)"))) - -;; Return 1 if OP is a signed 8-bit constant. -(define_predicate "s8bit_cint_operand" - (and (match_code "const_int") - (match_test "satisfies_constraint_I (op)"))) - -;; Return 1 if OP is a signed 16-bit constant. -(define_predicate "s16bit_cint_operand" - (and (match_code "const_int") - (match_test "satisfies_constraint_J (op)"))) - -;; Return 1 if OP is a nonzero integer constant whose low 16 bits are zero. -(define_predicate "auli_cint_operand" - (and (match_code "const_int") - (match_test "satisfies_constraint_K (op)"))) - -;; Return 1 if OP is an unsigned 15-bit constant. -(define_predicate "u15bit_cint_operand" - (and (match_code "const_int") - (match_test "(unsigned HOST_WIDE_INT)INTVAL (op) < (1U << 15)"))) - -;; Return 1 if OP is a constant or any register. -(define_predicate "reg_or_cint_operand" - (ior (match_operand 0 "register_operand") - (match_operand 0 "const_int_operand"))) - -;; Return 1 if OP is a 4-element vector constant with identical signed -;; 8-bit elements or any register. -(define_predicate "reg_or_v4s8bit_operand" - (ior (match_operand 0 "register_operand") - (and (match_code "const_vector") - (match_test "CONST_VECTOR_NUNITS (op) == 4 - && (satisfies_constraint_I - (unwrap_const_vec_duplicate (op)))")))) - -;; Return 1 if OP is a 2-element vector constant with identical signed -;; 8-bit elements or any register. -(define_predicate "reg_or_v2s8bit_operand" - (ior (match_operand 0 "register_operand") - (and (match_code "const_vector") - (match_test "CONST_VECTOR_NUNITS (op) == 2 - && (satisfies_constraint_I - (unwrap_const_vec_duplicate (op)))")))) - -;; Return 1 if the operand is a valid second operand to an add insn. -(define_predicate "add_operand" - (if_then_else (match_code "const_int") - (match_test "satisfies_constraint_J (op) || satisfies_constraint_K (op)") - (match_operand 0 "register_operand"))) - -;; Return 1 if the operand is a register or signed 8-bit immediate operand. -(define_predicate "reg_or_s8bit_operand" - (if_then_else (match_code "const_int") - (match_test "satisfies_constraint_I (op)") - (match_operand 0 "register_operand"))) - -;; Return 1 for an operand suitable for ANDing with a register. -(define_predicate "and_operand" - (if_then_else (match_code "const_int") - (match_test "satisfies_constraint_I (op) || satisfies_constraint_M (op)") - (match_operand 0 "register_operand"))) - -;; Return 1 if the operand is a register or unsigned 5-bit immediate operand. -(define_predicate "reg_or_u5bit_operand" - (if_then_else (match_code "const_int") - (match_test "INTVAL (op) == (INTVAL (op) & 0x1F)") - (match_operand 0 "register_operand"))) - -; Return 1 if the operand is 2, 4 or 8. -(define_predicate "cint_248_operand" - (and (match_code "const_int") - (match_test - "INTVAL (op) == 2 || INTVAL (op) == 4 || INTVAL (op) == 8"))) - - -;; Return true if OP is a TLS symbolic operand. -(define_predicate "tls_symbolic_operand" - (and (match_code "symbol_ref") - (match_test "SYMBOL_REF_TLS_MODEL (op) != TLS_MODEL_NONE"))) - -;; Return true if OP is a symbolic operand for the TLS Global Dynamic model. -(define_predicate "tls_gd_symbolic_operand" - (and (match_code "symbol_ref") - (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_GLOBAL_DYNAMIC"))) - -;; Return true if OP is a symbolic operand for the TLS Local Dynamic model. -(define_predicate "tls_ld_symbolic_operand" - (and (match_code "symbol_ref") - (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_LOCAL_DYNAMIC"))) - -;; Return true if OP is a symbolic operand that can be used for the -;; TLS Initial Exec model. -(define_predicate "tls_ie_symbolic_operand" - (and (match_code "symbol_ref") - (ior (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_INITIAL_EXEC") - (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_LOCAL_EXEC")))) - -;; Return true if OP is a symbolic operand for the TLS Local Exec model. -(define_predicate "tls_le_symbolic_operand" - (and (match_code "symbol_ref") - (match_test "SYMBOL_REF_TLS_MODEL (op) == TLS_MODEL_LOCAL_EXEC"))) - -;; Returns true if OP is any general operand except for an -;; auto-incrementing address operand. -(define_predicate "nonautoinc_operand" - (and (match_operand 0 "general_operand") - (not (ior (match_code "pre_dec") (match_code "pre_inc") - (match_code "post_dec") (match_code "post_inc") - (match_code "post_modify") (match_code "pre_modify"))))) - -;; Returns true if OP is a non-auto-incrementing memory operand. -(define_predicate "nonautoincmem_operand" - (match_operand 0 "memory_operand") -{ - return nonautoinc_operand (XEXP (op, 0), GET_MODE (XEXP (op, 0))); -}) - -;; Returns true if OP is a non-auto-incrementing memory, general -;; operand. -(define_predicate "nonautoincmem_general_operand" - (match_operand 0 "general_operand") -{ - if (memory_operand (op, mode)) - return nonautoinc_operand (XEXP (op, 0), GET_MODE (XEXP (op, 0))); - else - return true; -}) - -;; Returns true if OP is a non-auto-incrementing memory, non-immediate -;; operand. -(define_predicate "nonautoincmem_nonimmediate_operand" - (match_operand 0 "nonimmediate_operand") -{ - if (memory_operand (op, mode)) - return nonautoinc_operand (XEXP (op, 0), GET_MODE (XEXP (op, 0))); - else - return true; -}) - -;; Return true if OP is a valid operand for the source of a move insn. -(define_predicate "move_operand" - (match_operand 0 "general_operand") -{ - /* If both modes are non-void they must be the same. */ - if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) - return false; - - if (GET_MODE_SIZE (mode) > 4) - return false; - - switch (GET_CODE (op)) - { - case CONST_INT: - return (satisfies_constraint_J (op) - || satisfies_constraint_K (op) - || satisfies_constraint_N (op) - || satisfies_constraint_P (op)); - - case HIGH: - return true; - - case MEM: - return memory_address_p (mode, XEXP (op, 0)); - - default: - return register_operand (op, mode); - } -}) - -;; Returns 1 if OP is a symbolic operand, i.e. a symbol_ref or a label_ref, -;; possibly with an offset. -(define_predicate "symbolic_operand" - (ior (match_code "symbol_ref,label_ref") - (and (match_code "const") - (match_test "GET_CODE (XEXP (op,0)) == PLUS - && (GET_CODE (XEXP (XEXP (op,0), 0)) == SYMBOL_REF - || GET_CODE (XEXP (XEXP (op,0), 0)) == LABEL_REF) - && CONST_INT_P (XEXP (XEXP (op,0), 1))")))) - -;; Returns 1 if OP is a symbolic operand, or a const unspec wrapper -;; representing a got reference, a tls reference, or pc-relative -;; reference. -(define_predicate "const_symbolic_operand" - (ior (match_operand 0 "symbolic_operand") - (and (match_code "const") - (match_test "GET_CODE (XEXP (op,0)) == UNSPEC") - (ior (match_test "XINT (XEXP (op,0), 1) == UNSPEC_GOT16_SYM") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_GOT32_SYM") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_PCREL_SYM") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_TLS_GD") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_TLS_IE") - (match_test "XINT (XEXP (op,0), 1) == UNSPEC_TLS_LE"))))) - -;; Return true if OP is an address suitable for a call insn. -;; Call insn on TILE can take a PC-relative constant address -;; or any regular memory address. -(define_predicate "call_address_operand" - (ior (match_operand 0 "symbolic_operand") - (match_test "memory_address_p (Pmode, op)"))) - -;; Return true if OP is an operand suitable for a call insn. -(define_predicate "call_operand" - (and (match_code "mem") - (match_test "call_address_operand (XEXP (op, 0), mode)"))) - -;; Return 1 if OP is a signed comparison operation. -;; We can use these directly in compares against zero. -(define_predicate "signed_comparison_operator" - (match_code "eq,ne,le,lt,ge,gt")) - -;; Return 1 if OP is a equal or not-equal operation. -(define_predicate "eqne_operator" - (match_code "eq,ne")) diff --git a/gcc/config/tilepro/t-tilepro b/gcc/config/tilepro/t-tilepro deleted file mode 100644 index f64fd12..0000000 --- a/gcc/config/tilepro/t-tilepro +++ /dev/null @@ -1,15 +0,0 @@ -tilepro-c.o: $(srcdir)/config/tilepro/tilepro-c.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(MACHMODE_H) \ - $(TM_H) $(TM_P_H) $(CPPLIB_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - -$(srcdir)/config/tilepro/mul-tables.cc: \ - $(srcdir)/config/tilepro/gen-mul-tables.cc - $(CXX_FOR_BUILD) $(BUILD_CPPFLAGS) -O2 -DTILEPRO \ - -o gen-mul-tables $<; - ./gen-mul-tables > $@ - -mul-tables.o: $(srcdir)/config/tilepro/mul-tables.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(EXPR_H) $(OPTABS_H) \ - $(srcdir)/config/tilepro/tilepro-multiply.h - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/tilepro/tilepro-builtins.h b/gcc/config/tilepro/tilepro-builtins.h deleted file mode 100644 index f18bdb5..0000000 --- a/gcc/config/tilepro/tilepro-builtins.h +++ /dev/null @@ -1,216 +0,0 @@ -/* Enum for builtin intrinsics for TILEPro. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#ifndef GCC_TILEPRO_BUILTINS_H -#define GCC_TILEPRO_BUILTINS_H - -enum tilepro_builtin -{ - TILEPRO_INSN_ADD, - TILEPRO_INSN_ADDB, - TILEPRO_INSN_ADDBS_U, - TILEPRO_INSN_ADDH, - TILEPRO_INSN_ADDHS, - TILEPRO_INSN_ADDIB, - TILEPRO_INSN_ADDIH, - TILEPRO_INSN_ADDLIS, - TILEPRO_INSN_ADDS, - TILEPRO_INSN_ADIFFB_U, - TILEPRO_INSN_ADIFFH, - TILEPRO_INSN_AND, - TILEPRO_INSN_AULI, - TILEPRO_INSN_AVGB_U, - TILEPRO_INSN_AVGH, - TILEPRO_INSN_BITX, - TILEPRO_INSN_BYTEX, - TILEPRO_INSN_CLZ, - TILEPRO_INSN_CRC32_32, - TILEPRO_INSN_CRC32_8, - TILEPRO_INSN_CTZ, - TILEPRO_INSN_DRAIN, - TILEPRO_INSN_DTLBPR, - TILEPRO_INSN_DWORD_ALIGN, - TILEPRO_INSN_FINV, - TILEPRO_INSN_FLUSH, - TILEPRO_INSN_FNOP, - TILEPRO_INSN_ICOH, - TILEPRO_INSN_ILL, - TILEPRO_INSN_INFO, - TILEPRO_INSN_INFOL, - TILEPRO_INSN_INTHB, - TILEPRO_INSN_INTHH, - TILEPRO_INSN_INTLB, - TILEPRO_INSN_INTLH, - TILEPRO_INSN_INV, - TILEPRO_INSN_LB, - TILEPRO_INSN_LB_U, - TILEPRO_INSN_LH, - TILEPRO_INSN_LH_U, - TILEPRO_INSN_LNK, - TILEPRO_INSN_LW, - TILEPRO_INSN_LW_NA, - TILEPRO_INSN_LB_L2, - TILEPRO_INSN_LB_U_L2, - TILEPRO_INSN_LH_L2, - TILEPRO_INSN_LH_U_L2, - TILEPRO_INSN_LW_L2, - TILEPRO_INSN_LW_NA_L2, - TILEPRO_INSN_LB_MISS, - TILEPRO_INSN_LB_U_MISS, - TILEPRO_INSN_LH_MISS, - TILEPRO_INSN_LH_U_MISS, - TILEPRO_INSN_LW_MISS, - TILEPRO_INSN_LW_NA_MISS, - TILEPRO_INSN_MAXB_U, - TILEPRO_INSN_MAXH, - TILEPRO_INSN_MAXIB_U, - TILEPRO_INSN_MAXIH, - TILEPRO_INSN_MF, - TILEPRO_INSN_MFSPR, - TILEPRO_INSN_MINB_U, - TILEPRO_INSN_MINH, - TILEPRO_INSN_MINIB_U, - TILEPRO_INSN_MINIH, - TILEPRO_INSN_MM, - TILEPRO_INSN_MNZ, - TILEPRO_INSN_MNZB, - TILEPRO_INSN_MNZH, - TILEPRO_INSN_MOVE, - TILEPRO_INSN_MOVELIS, - TILEPRO_INSN_MTSPR, - TILEPRO_INSN_MULHH_SS, - TILEPRO_INSN_MULHH_SU, - TILEPRO_INSN_MULHH_UU, - TILEPRO_INSN_MULHHA_SS, - TILEPRO_INSN_MULHHA_SU, - TILEPRO_INSN_MULHHA_UU, - TILEPRO_INSN_MULHHSA_UU, - TILEPRO_INSN_MULHL_SS, - TILEPRO_INSN_MULHL_SU, - TILEPRO_INSN_MULHL_US, - TILEPRO_INSN_MULHL_UU, - TILEPRO_INSN_MULHLA_SS, - TILEPRO_INSN_MULHLA_SU, - TILEPRO_INSN_MULHLA_US, - TILEPRO_INSN_MULHLA_UU, - TILEPRO_INSN_MULHLSA_UU, - TILEPRO_INSN_MULLL_SS, - TILEPRO_INSN_MULLL_SU, - TILEPRO_INSN_MULLL_UU, - TILEPRO_INSN_MULLLA_SS, - TILEPRO_INSN_MULLLA_SU, - TILEPRO_INSN_MULLLA_UU, - TILEPRO_INSN_MULLLSA_UU, - TILEPRO_INSN_MVNZ, - TILEPRO_INSN_MVZ, - TILEPRO_INSN_MZ, - TILEPRO_INSN_MZB, - TILEPRO_INSN_MZH, - TILEPRO_INSN_NAP, - TILEPRO_INSN_NOP, - TILEPRO_INSN_NOR, - TILEPRO_INSN_OR, - TILEPRO_INSN_PACKBS_U, - TILEPRO_INSN_PACKHB, - TILEPRO_INSN_PACKHS, - TILEPRO_INSN_PACKLB, - TILEPRO_INSN_PCNT, - TILEPRO_INSN_PREFETCH, - TILEPRO_INSN_PREFETCH_L1, - TILEPRO_INSN_RL, - TILEPRO_INSN_S1A, - TILEPRO_INSN_S2A, - TILEPRO_INSN_S3A, - TILEPRO_INSN_SADAB_U, - TILEPRO_INSN_SADAH, - TILEPRO_INSN_SADAH_U, - TILEPRO_INSN_SADB_U, - TILEPRO_INSN_SADH, - TILEPRO_INSN_SADH_U, - TILEPRO_INSN_SB, - TILEPRO_INSN_SEQ, - TILEPRO_INSN_SEQB, - TILEPRO_INSN_SEQH, - TILEPRO_INSN_SEQIB, - TILEPRO_INSN_SEQIH, - TILEPRO_INSN_SH, - TILEPRO_INSN_SHL, - TILEPRO_INSN_SHLB, - TILEPRO_INSN_SHLH, - TILEPRO_INSN_SHLIB, - TILEPRO_INSN_SHLIH, - TILEPRO_INSN_SHR, - TILEPRO_INSN_SHRB, - TILEPRO_INSN_SHRH, - TILEPRO_INSN_SHRIB, - TILEPRO_INSN_SHRIH, - TILEPRO_INSN_SLT, - TILEPRO_INSN_SLT_U, - TILEPRO_INSN_SLTB, - TILEPRO_INSN_SLTB_U, - TILEPRO_INSN_SLTE, - TILEPRO_INSN_SLTE_U, - TILEPRO_INSN_SLTEB, - TILEPRO_INSN_SLTEB_U, - TILEPRO_INSN_SLTEH, - TILEPRO_INSN_SLTEH_U, - TILEPRO_INSN_SLTH, - TILEPRO_INSN_SLTH_U, - TILEPRO_INSN_SLTIB, - TILEPRO_INSN_SLTIB_U, - TILEPRO_INSN_SLTIH, - TILEPRO_INSN_SLTIH_U, - TILEPRO_INSN_SNE, - TILEPRO_INSN_SNEB, - TILEPRO_INSN_SNEH, - TILEPRO_INSN_SRA, - TILEPRO_INSN_SRAB, - TILEPRO_INSN_SRAH, - TILEPRO_INSN_SRAIB, - TILEPRO_INSN_SRAIH, - TILEPRO_INSN_SUB, - TILEPRO_INSN_SUBB, - TILEPRO_INSN_SUBBS_U, - TILEPRO_INSN_SUBH, - TILEPRO_INSN_SUBHS, - TILEPRO_INSN_SUBS, - TILEPRO_INSN_SW, - TILEPRO_INSN_TBLIDXB0, - TILEPRO_INSN_TBLIDXB1, - TILEPRO_INSN_TBLIDXB2, - TILEPRO_INSN_TBLIDXB3, - TILEPRO_INSN_TNS, - TILEPRO_INSN_WH64, - TILEPRO_INSN_XOR, - TILEPRO_NETWORK_BARRIER, - TILEPRO_IDN0_RECEIVE, - TILEPRO_IDN1_RECEIVE, - TILEPRO_IDN_SEND, - TILEPRO_SN_RECEIVE, - TILEPRO_SN_SEND, - TILEPRO_UDN0_RECEIVE, - TILEPRO_UDN1_RECEIVE, - TILEPRO_UDN2_RECEIVE, - TILEPRO_UDN3_RECEIVE, - TILEPRO_UDN_SEND, - TILEPRO_BUILTIN_max -}; - -#endif /* !GCC_TILEPRO_BUILTINS_H */ diff --git a/gcc/config/tilepro/tilepro-c.cc b/gcc/config/tilepro/tilepro-c.cc deleted file mode 100644 index ed91e71..0000000 --- a/gcc/config/tilepro/tilepro-c.cc +++ /dev/null @@ -1,54 +0,0 @@ -/* Definitions of C specific functions for TILEPro. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#define IN_TARGET_CODE 1 - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tm.h" -#include "c-family/c-common.h" - -/* copy defines in c-cppbuiltin.cc */ -# define builtin_define(TXT) cpp_define (pfile, TXT) -# define builtin_assert(TXT) cpp_assert (pfile, TXT) - - -/* Implement TARGET_CPU_CPP_BUILTINS. */ -void -tilepro_cpu_cpp_builtins (struct cpp_reader *pfile) -{ - builtin_define ("__tile__"); - builtin_define ("__tilepro__"); - builtin_assert ("cpu=tile"); - builtin_assert ("machine=tile"); - builtin_define ("__tile_chip__=1"); - builtin_define ("__tile_chip_rev__=0"); - - builtin_define ("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1"); - builtin_define ("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); - builtin_define ("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); - builtin_define ("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); - - TILEPRO_CPU_CPP_ENDIAN_BUILTINS (); - GNU_USER_TARGET_OS_CPP_BUILTINS (); -} - - diff --git a/gcc/config/tilepro/tilepro-generic.md b/gcc/config/tilepro/tilepro-generic.md deleted file mode 100644 index 438c4d9..0000000 --- a/gcc/config/tilepro/tilepro-generic.md +++ /dev/null @@ -1,107 +0,0 @@ -;; Scheduling description for Tilera TILEPro chip. -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Contributed by Walter Lee (walt@tilera.com) -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; . - -(define_automaton "tile") - -; Make the scheduling automaton an ndfa. -(automata_option "ndfa") - -; Name the three pipes. -(define_cpu_unit "X0" "tile") -(define_cpu_unit "X1" "tile") -(define_cpu_unit "Y0" "tile") -(define_cpu_unit "Y1" "tile") -(define_cpu_unit "Y2" "tile") - -(define_insn_reservation "X0" 1 - (eq_attr "type" "X0") - "X0") - -(define_insn_reservation "X0_2cycle" 2 - (eq_attr "type" "X0_2cycle") - "X0,nothing") - -(define_insn_reservation "X1" 1 - (eq_attr "type" "X1,X1_branch") - "X1") - -(define_insn_reservation "X1_2cycle" 2 - (eq_attr "type" "X1_2cycle") - "X1,nothing") - -(define_insn_reservation "X1_L2" 8 - (eq_attr "type" "X1_L2") - "X1") - -(define_insn_reservation "X1_miss" 80 - (eq_attr "type" "X1_miss") - "X1") - -(define_insn_reservation "X01" 1 - (eq_attr "type" "X01") - "X0|X1") - -(define_insn_reservation "Y0" 1 - (eq_attr "type" "Y0") - "Y0|X0") - -(define_insn_reservation "Y0_2cycle" 2 - (eq_attr "type" "Y0_2cycle") - "Y0|X0,nothing") - -(define_insn_reservation "Y2" 1 - (eq_attr "type" "Y2") - "Y2|X1") - -(define_insn_reservation "Y2_2cycle" 2 - (eq_attr "type" "Y2_2cycle") - "Y2|X1,nothing") - -(define_insn_reservation "Y2_L2" 8 - (eq_attr "type" "Y2_L2") - "Y2|X1") - -(define_insn_reservation "Y2_miss" 80 - (eq_attr "type" "Y2_miss") - "Y2|X1") - -(define_insn_reservation "Y01" 1 - (eq_attr "type" "Y01") - "Y0|Y1|X0|X1") - -(define_insn_reservation "nothing" 0 - (eq_attr "type" "nothing") - "nothing") - -(define_insn_reservation "cannot_bundle" 1 - (eq_attr "type" "cannot_bundle") - "X0+X1") - -(define_insn_reservation "cannot_bundle_3cycle" 3 - (eq_attr "type" "cannot_bundle_3cycle") - "X0+X1") - -(define_insn_reservation "cannot_bundle_4cycle" 4 - (eq_attr "type" "cannot_bundle_4cycle") - "X0+X1") - - -; A bundle must be in either X format or Y format. -(exclusion_set "X0,X1" "Y0,Y1,Y2") diff --git a/gcc/config/tilepro/tilepro-modes.def b/gcc/config/tilepro/tilepro-modes.def deleted file mode 100644 index 1647895..0000000 --- a/gcc/config/tilepro/tilepro-modes.def +++ /dev/null @@ -1,34 +0,0 @@ -/* TILEPro extra machine modes. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -/* Extra modes for handling struct returns in up to 10 registers. */ -INT_MODE (R3I, 12); -INT_MODE (R5I, 20); -INT_MODE (R6I, 24); -INT_MODE (R7I, 28); -INT_MODE (R8I, 32); -INT_MODE (R9I, 36); -INT_MODE (R10I, 40); - -/* Vector modes. */ -VECTOR_MODES (INT, 4); /* V4QI V2HI */ -VECTOR_MODE (INT, QI, 8); /* V8QI */ -VECTOR_MODE (INT, HI, 4); /* V4HI */ -VECTOR_MODE (INT, QI, 2); /* V2QI */ diff --git a/gcc/config/tilepro/tilepro-multiply.h b/gcc/config/tilepro/tilepro-multiply.h deleted file mode 100644 index dde9048..0000000 --- a/gcc/config/tilepro/tilepro-multiply.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Header for constant multiple table for TILEPro. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#ifndef GCC_TILEPRO_MULTIPLY_H -#define GCC_TILEPRO_MULTIPLY_H - -/* A node of a tilepro_multiply_insn_seq, corresponding to a single - machine instruction such as 'add', 's1a', or an shl by a - constant. */ -struct tilepro_multiply_insn_seq_entry -{ - /* Which operation this node performs (e.g. an add or sub). Don't - use this directly, call get_opcode() table to get a - insn_code. */ - unsigned char compressed_opcode; - - /* The left-hand side of this expression tree. - If equal to 0, it refers to 'zero'. - If equal to 1, it refers to the original input to the multiply - operation. - Otherwise, subtract two and it is an index into the containing - tilepro_multiply_insn_seq's 'op' array. Since it can only point - to some value that has already been computed it will always point - to an earlier entry in the array. */ - unsigned char lhs; - - /* This is like lhs, but for the right-hand side. However, for shift - opcodes this is a shift count rather than an operand index. */ - unsigned char rhs; -}; - -/* Maximum size of op array. */ -#define tilepro_multiply_insn_seq_MAX_OPERATIONS 4 - -/* This defines a DAG describing how to multiply by a constant in - terms of one or more machine instructions. */ -struct tilepro_multiply_insn_seq -{ - /* The constant factor by which this expression tree multiplies its - input. */ - int multiplier; - - /* The nodes of the parse tree. These are ordered so that - instructions can be emitted in the same order that they appear in - this array. Entry entry in this array can only refer to earlier - entries in the array. */ - struct tilepro_multiply_insn_seq_entry - op[tilepro_multiply_insn_seq_MAX_OPERATIONS]; - -}; - -/* A mapping from the compressed opcode to the corresponding enum - insn_code. */ -extern const enum insn_code tilepro_multiply_insn_seq_decode_opcode[]; - -/* Table mapping constant int multipliers to an expression tree that - efficiently performs that multiplication. This is sorted by its - 'multiplier' field so a binary search can look for matches. */ -extern const struct tilepro_multiply_insn_seq - tilepro_multiply_insn_seq_table[]; - -/* The number of elements in multiply_insn_seq_table. */ -extern const int tilepro_multiply_insn_seq_table_size; - -#endif /* !GCC_TILEPRO_MULTIPLY_H */ diff --git a/gcc/config/tilepro/tilepro-protos.h b/gcc/config/tilepro/tilepro-protos.h deleted file mode 100644 index ba09fdd..0000000 --- a/gcc/config/tilepro/tilepro-protos.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Prototypes of target machine for TILEPro. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#ifndef GCC__TILEPRO_PROTOS_H -#define GCC__TILEPRO_PROTOS_H - - -extern void tilepro_init_expanders (void); -extern bool tilepro_legitimate_pic_operand_p (rtx); -extern rtx tilepro_simd_int (rtx, machine_mode); - -#ifdef RTX_CODE -extern void split_di (rtx[], int, rtx[], rtx[]); -extern bool tilepro_bitfield_operand_p (HOST_WIDE_INT, int *, int *); -extern void tilepro_expand_set_const32 (rtx, rtx); -extern bool tilepro_expand_mov (machine_mode, rtx *); -extern void tilepro_expand_insv (rtx operands[4]); -extern void tilepro_expand_unaligned_load (rtx, rtx, HOST_WIDE_INT, - HOST_WIDE_INT, bool); -extern void tilepro_expand_movmisalign (machine_mode, rtx *); -extern bool tilepro_expand_addsi (rtx, rtx, rtx); -extern void tilepro_allocate_stack (rtx, rtx); -extern bool tilepro_expand_mulsi (rtx, rtx, rtx); -extern void tilepro_expand_smulsi3_highpart (rtx, rtx, rtx); -extern void tilepro_expand_umulsi3_highpart (rtx, rtx, rtx); - -extern bool tilepro_emit_setcc (rtx[], machine_mode); -extern void tilepro_emit_conditional_branch (rtx[], machine_mode); -extern rtx tilepro_emit_conditional_move (rtx); -extern const char *tilepro_output_cbranch_with_opcode (rtx_insn *, rtx *, - const char *, - const char *, int, - bool); -extern const char *tilepro_output_cbranch (rtx_insn *, rtx *, bool); -extern void tilepro_expand_tablejump (rtx, rtx); -extern void tilepro_expand_builtin_vector_binop (rtx (*)(rtx, rtx, rtx), - machine_mode, rtx, - machine_mode, rtx, rtx, - bool); -#endif /* RTX_CODE */ - -extern bool tilepro_can_use_return_insn_p (void); -extern void tilepro_expand_prologue (void); -extern void tilepro_expand_epilogue (bool); -extern int tilepro_initial_elimination_offset (int, int); -extern rtx tilepro_return_addr (int, rtx); -extern rtx tilepro_eh_return_handler_rtx (void); -extern int tilepro_adjust_insn_length (rtx_insn *, int); - -extern int tilepro_asm_preferred_eh_data_format (int, int); -extern void tilepro_final_prescan_insn (rtx_insn *); -extern const char *tilepro_asm_output_opcode (FILE *, const char *); -extern void tilepro_function_profiler (FILE *, int); - -/* Declare functions in tile-c.c */ - -extern void tilepro_cpu_cpp_builtins (struct cpp_reader *); - -#endif /* GCC_TILEPRO_PROTOS_H */ diff --git a/gcc/config/tilepro/tilepro.cc b/gcc/config/tilepro/tilepro.cc deleted file mode 100644 index 35a6b8c..0000000 --- a/gcc/config/tilepro/tilepro.cc +++ /dev/null @@ -1,5083 +0,0 @@ -/* Subroutines used for code generation on the Tilera TILEPro. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -#define IN_TARGET_CODE 1 - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "target.h" -#include "rtl.h" -#include "tree.h" -#include "gimple.h" -#include "df.h" -#include "memmodel.h" -#include "tm_p.h" -#include "stringpool.h" -#include "attribs.h" -#include "expmed.h" -#include "optabs.h" -#include "regs.h" -#include "emit-rtl.h" -#include "recog.h" -#include "diagnostic.h" -#include "output.h" -#include "insn-attr.h" -#include "alias.h" -#include "explow.h" -#include "calls.h" -#include "varasm.h" -#include "expr.h" -#include "langhooks.h" -#include "cfgrtl.h" -#include "tm-constrs.h" -#include "dwarf2.h" -#include "fold-const.h" -#include "stor-layout.h" -#include "gimplify.h" -#include "tilepro-builtins.h" -#include "tilepro-multiply.h" -#include "builtins.h" - -/* This file should be included last. */ -#include "target-def.h" - -/* SYMBOL_REF for GOT */ -static GTY(()) rtx g_got_symbol = NULL; - -/* Report whether we're printing out the first address fragment of a - POST_INC or POST_DEC memory reference, from TARGET_PRINT_OPERAND to - TARGET_PRINT_OPERAND_ADDRESS. */ -static bool output_memory_autoinc_first; - - - -/* Option handling */ - -/* Implement TARGET_OPTION_OVERRIDE. */ -static void -tilepro_option_override (void) -{ - /* When modulo scheduling is enabled, we still rely on regular - scheduler for bundling. */ - if (flag_modulo_sched) - flag_resched_modulo_sched = 1; -} - - - -/* Implement TARGET_SCALAR_MODE_SUPPORTED_P. */ -static bool -tilepro_scalar_mode_supported_p (scalar_mode mode) -{ - switch (mode) - { - case E_QImode: - case E_HImode: - case E_SImode: - case E_DImode: - return true; - - case E_SFmode: - case E_DFmode: - return true; - - default: - return false; - } -} - - -/* Implement TARGET_VECTOR_MODE_SUPPORTED_P. */ -static bool -tile_vector_mode_supported_p (machine_mode mode) -{ - return mode == V4QImode || mode == V2HImode; -} - - -/* Implement TARGET_CANNOT_FORCE_CONST_MEM. */ -static bool -tilepro_cannot_force_const_mem (machine_mode mode ATTRIBUTE_UNUSED, - rtx x ATTRIBUTE_UNUSED) -{ - return true; -} - - -/* Implement TARGET_FUNCTION_OK_FOR_SIBCALL. */ -static bool -tilepro_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) -{ - return decl != NULL; -} - - -/* Implement TARGET_PASS_BY_REFERENCE. Variable sized types are - passed by reference. */ -static bool -tilepro_pass_by_reference (cumulative_args_t, const function_arg_info &arg) -{ - return (arg.type - && TYPE_SIZE (arg.type) - && TREE_CODE (TYPE_SIZE (arg.type)) != INTEGER_CST); -} - - -/* Implement TARGET_RETURN_IN_MEMORY. */ -static bool -tilepro_return_in_memory (const_tree type, const_tree fndecl ATTRIBUTE_UNUSED) -{ - return !IN_RANGE (int_size_in_bytes (type), - 0, TILEPRO_NUM_RETURN_REGS * UNITS_PER_WORD); -} - - -/* Implement TARGET_FUNCTION_ARG_BOUNDARY. */ -static unsigned int -tilepro_function_arg_boundary (machine_mode mode, const_tree type) -{ - unsigned int alignment; - - alignment = type ? TYPE_ALIGN (type) : GET_MODE_ALIGNMENT (mode); - if (alignment < PARM_BOUNDARY) - alignment = PARM_BOUNDARY; - if (alignment > STACK_BOUNDARY) - alignment = STACK_BOUNDARY; - return alignment; -} - - -/* Implement TARGET_FUNCTION_ARG. */ -static rtx -tilepro_function_arg (cumulative_args_t cum_v, const function_arg_info &arg) -{ - CUMULATIVE_ARGS cum = *get_cumulative_args (cum_v); - int byte_size = arg.promoted_size_in_bytes (); - bool doubleword_aligned_p; - - if (cum >= TILEPRO_NUM_ARG_REGS) - return NULL_RTX; - - /* See whether the argument has doubleword alignment. */ - doubleword_aligned_p = - tilepro_function_arg_boundary (arg.mode, arg.type) > BITS_PER_WORD; - - if (doubleword_aligned_p) - cum += cum & 1; - - /* The ABI does not allow parameters to be passed partially in reg - and partially in stack. */ - if ((cum + (byte_size + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - > TILEPRO_NUM_ARG_REGS) - return NULL_RTX; - - return gen_rtx_REG (arg.mode, cum); -} - - -/* Implement TARGET_FUNCTION_ARG_ADVANCE. */ -static void -tilepro_function_arg_advance (cumulative_args_t cum_v, - const function_arg_info &arg) -{ - CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v); - - int byte_size = arg.promoted_size_in_bytes (); - int word_size = (byte_size + UNITS_PER_WORD - 1) / UNITS_PER_WORD; - bool doubleword_aligned_p; - - /* See whether the argument has doubleword alignment. */ - doubleword_aligned_p = - tilepro_function_arg_boundary (arg.mode, arg.type) > BITS_PER_WORD; - - if (doubleword_aligned_p) - *cum += *cum & 1; - - /* If the current argument does not fit in the pretend_args space, - skip over it. */ - if (*cum < TILEPRO_NUM_ARG_REGS - && *cum + word_size > TILEPRO_NUM_ARG_REGS) - *cum = TILEPRO_NUM_ARG_REGS; - - *cum += word_size; -} - - -/* Implement TARGET_FUNCTION_VALUE. */ -static rtx -tilepro_function_value (const_tree valtype, const_tree fn_decl_or_type, - bool outgoing ATTRIBUTE_UNUSED) -{ - machine_mode mode; - int unsigned_p; - - mode = TYPE_MODE (valtype); - unsigned_p = TYPE_UNSIGNED (valtype); - - mode = promote_function_mode (valtype, mode, &unsigned_p, - fn_decl_or_type, 1); - - return gen_rtx_REG (mode, 0); -} - - -/* Implement TARGET_LIBCALL_VALUE. */ -static rtx -tilepro_libcall_value (machine_mode mode, - const_rtx fun ATTRIBUTE_UNUSED) -{ - return gen_rtx_REG (mode, 0); -} - - -/* Implement FUNCTION_VALUE_REGNO_P. */ -static bool -tilepro_function_value_regno_p (const unsigned int regno) -{ - return regno < TILEPRO_NUM_RETURN_REGS; -} - - -/* Implement TARGET_BUILD_BUILTIN_VA_LIST. */ -static tree -tilepro_build_builtin_va_list (void) -{ - tree f_args, f_skip, record, type_decl; - bool owp; - - record = lang_hooks.types.make_type (RECORD_TYPE); - - type_decl = build_decl (BUILTINS_LOCATION, TYPE_DECL, - get_identifier ("__va_list_tag"), record); - - f_args = build_decl (BUILTINS_LOCATION, FIELD_DECL, - get_identifier ("__args"), ptr_type_node); - f_skip = build_decl (BUILTINS_LOCATION, FIELD_DECL, - get_identifier ("__skip"), ptr_type_node); - - DECL_FIELD_CONTEXT (f_args) = record; - - DECL_FIELD_CONTEXT (f_skip) = record; - - TREE_CHAIN (record) = type_decl; - TYPE_NAME (record) = type_decl; - TYPE_FIELDS (record) = f_args; - TREE_CHAIN (f_args) = f_skip; - - /* We know this is being padded and we want it too. It is an - internal type so hide the warnings from the user. */ - owp = warn_padded; - warn_padded = false; - - layout_type (record); - - warn_padded = owp; - - /* The correct type is an array type of one element. */ - return record; -} - - -/* Implement TARGET_EXPAND_BUILTIN_VA_START. */ -static void -tilepro_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED) -{ - tree f_args, f_skip; - tree args, skip, t; - - f_args = TYPE_FIELDS (TREE_TYPE (valist)); - f_skip = TREE_CHAIN (f_args); - - args = - build3 (COMPONENT_REF, TREE_TYPE (f_args), valist, f_args, NULL_TREE); - skip = - build3 (COMPONENT_REF, TREE_TYPE (f_skip), valist, f_skip, NULL_TREE); - - /* Find the __args area. */ - t = make_tree (TREE_TYPE (args), virtual_incoming_args_rtx); - t = fold_build_pointer_plus_hwi (t, - UNITS_PER_WORD * - (crtl->args.info - TILEPRO_NUM_ARG_REGS)); - - if (crtl->args.pretend_args_size > 0) - t = fold_build_pointer_plus_hwi (t, -STACK_POINTER_OFFSET); - - t = build2 (MODIFY_EXPR, TREE_TYPE (args), args, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); - - /* Find the __skip area. */ - t = make_tree (TREE_TYPE (skip), virtual_incoming_args_rtx); - t = fold_build_pointer_plus_hwi (t, -STACK_POINTER_OFFSET); - t = build2 (MODIFY_EXPR, TREE_TYPE (skip), skip, t); - TREE_SIDE_EFFECTS (t) = 1; - expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL); -} - - -/* Implement TARGET_SETUP_INCOMING_VARARGS. */ -static void -tilepro_setup_incoming_varargs (cumulative_args_t cum, - const function_arg_info &arg, - int *pretend_args, int no_rtl) -{ - CUMULATIVE_ARGS local_cum = *get_cumulative_args (cum); - int first_reg; - - /* The caller has advanced CUM up to, but not beyond, the last named - argument. Advance a local copy of CUM past the last "real" named - argument, to find out how many registers are left over. */ - targetm.calls.function_arg_advance (pack_cumulative_args (&local_cum), arg); - first_reg = local_cum; - - if (local_cum < TILEPRO_NUM_ARG_REGS) - { - *pretend_args = UNITS_PER_WORD * (TILEPRO_NUM_ARG_REGS - first_reg); - - if (!no_rtl) - { - alias_set_type set = get_varargs_alias_set (); - rtx tmp = - gen_rtx_MEM (BLKmode, plus_constant (Pmode, \ - virtual_incoming_args_rtx, - -STACK_POINTER_OFFSET - - UNITS_PER_WORD * - (TILEPRO_NUM_ARG_REGS - - first_reg))); - MEM_NOTRAP_P (tmp) = 1; - set_mem_alias_set (tmp, set); - move_block_from_reg (first_reg, tmp, - TILEPRO_NUM_ARG_REGS - first_reg); - } - } - else - *pretend_args = 0; -} - - -/* Implement TARGET_GIMPLIFY_VA_ARG_EXPR. Gimplify va_arg by updating - the va_list structure VALIST as required to retrieve an argument of - type TYPE, and returning that argument. - - ret = va_arg(VALIST, TYPE); - - generates code equivalent to: - - paddedsize = (sizeof(TYPE) + 3) & -4; - if ((VALIST.__args + paddedsize > VALIST.__skip) - & (VALIST.__args <= VALIST.__skip)) - addr = VALIST.__skip + STACK_POINTER_OFFSET; - else - addr = VALIST.__args; - VALIST.__args = addr + paddedsize; - ret = *(TYPE *)addr; */ -static tree -tilepro_gimplify_va_arg_expr (tree valist, tree type, gimple_seq * pre_p, - gimple_seq * post_p ATTRIBUTE_UNUSED) -{ - tree f_args, f_skip; - tree args, skip; - HOST_WIDE_INT size, rsize; - tree addr, tmp; - bool pass_by_reference_p; - - f_args = TYPE_FIELDS (va_list_type_node); - f_skip = TREE_CHAIN (f_args); - - args = - build3 (COMPONENT_REF, TREE_TYPE (f_args), valist, f_args, NULL_TREE); - skip = - build3 (COMPONENT_REF, TREE_TYPE (f_skip), valist, f_skip, NULL_TREE); - - addr = create_tmp_var (ptr_type_node, "va_arg"); - - /* if an object is dynamically sized, a pointer to it is passed - instead of the object itself. */ - pass_by_reference_p = pass_va_arg_by_reference (type); - - if (pass_by_reference_p) - type = build_pointer_type (type); - - size = int_size_in_bytes (type); - rsize = ((size + UNITS_PER_WORD - 1) / UNITS_PER_WORD) * UNITS_PER_WORD; - - /* If the alignment of the type is greater than the default for a - parameter, align to STACK_BOUNDARY. */ - if (TYPE_ALIGN (type) > PARM_BOUNDARY) - { - /* Assert the only case we generate code for: when - stack boundary = 2 * parm boundary. */ - gcc_assert (STACK_BOUNDARY == PARM_BOUNDARY * 2); - - tmp = build2 (BIT_AND_EXPR, sizetype, - fold_convert (sizetype, unshare_expr (args)), - size_int (PARM_BOUNDARY / 8)); - tmp = build2 (POINTER_PLUS_EXPR, ptr_type_node, - unshare_expr (args), tmp); - - gimplify_assign (unshare_expr (args), tmp, pre_p); - } - - /* Build conditional expression to calculate addr. The expression - will be gimplified later. */ - tmp = fold_build_pointer_plus_hwi (unshare_expr (args), rsize); - tmp = build2 (TRUTH_AND_EXPR, boolean_type_node, - build2 (GT_EXPR, boolean_type_node, tmp, unshare_expr (skip)), - build2 (LE_EXPR, boolean_type_node, unshare_expr (args), - unshare_expr (skip))); - - tmp = build3 (COND_EXPR, ptr_type_node, tmp, - build2 (POINTER_PLUS_EXPR, ptr_type_node, unshare_expr (skip), - size_int (STACK_POINTER_OFFSET)), - unshare_expr (args)); - - gimplify_assign (addr, tmp, pre_p); - - /* Update VALIST.__args. */ - tmp = fold_build_pointer_plus_hwi (addr, rsize); - gimplify_assign (unshare_expr (args), tmp, pre_p); - - addr = fold_convert (build_pointer_type (type), addr); - - if (pass_by_reference_p) - addr = build_va_arg_indirect_ref (addr); - - return build_va_arg_indirect_ref (addr); -} - - - -/* Implement TARGET_RTX_COSTS. */ -static bool -tilepro_rtx_costs (rtx x, machine_mode mode, int outer_code, int opno, - int *total, bool speed) -{ - int code = GET_CODE (x); - - switch (code) - { - case CONST_INT: - /* If this is an 8-bit constant, return zero since it can be - used nearly anywhere with no cost. If it is a valid operand - for an ADD or AND, likewise return 0 if we know it will be - used in that context. Otherwise, return 2 since it might be - used there later. All other constants take at least two - insns. */ - if (satisfies_constraint_I (x)) - { - *total = 0; - return true; - } - else if (outer_code == PLUS && add_operand (x, VOIDmode)) - { - /* Slightly penalize large constants even though we can add - them in one instruction, because it forces the use of - 2-wide bundling mode. */ - *total = 1; - return true; - } - else if (move_operand (x, SImode)) - { - /* We can materialize in one move. */ - *total = COSTS_N_INSNS (1); - return true; - } - else - { - /* We can materialize in two moves. */ - *total = COSTS_N_INSNS (2); - return true; - } - - return false; - - case CONST: - case LABEL_REF: - case SYMBOL_REF: - *total = COSTS_N_INSNS (2); - return true; - - case CONST_DOUBLE: - *total = COSTS_N_INSNS (4); - return true; - - case HIGH: - *total = 0; - return true; - - case MEM: - /* If outer-code was a sign or zero extension, a cost of - COSTS_N_INSNS (1) was already added in, so account for - that. */ - if (outer_code == ZERO_EXTEND || outer_code == SIGN_EXTEND) - *total = COSTS_N_INSNS (1); - else - *total = COSTS_N_INSNS (2); - return true; - - case PLUS: - /* Convey that s[123]a are efficient. */ - if (GET_CODE (XEXP (x, 0)) == MULT - && cint_248_operand (XEXP (XEXP (x, 0), 1), VOIDmode)) - { - *total = (rtx_cost (XEXP (XEXP (x, 0), 0), mode, - (enum rtx_code) outer_code, opno, speed) - + rtx_cost (XEXP (x, 1), mode, - (enum rtx_code) outer_code, opno, speed) - + COSTS_N_INSNS (1)); - return true; - } - return false; - - case MULT: - *total = COSTS_N_INSNS (2); - return false; - - case SIGN_EXTEND: - case ZERO_EXTEND: - if (outer_code == MULT) - *total = 0; - else - *total = COSTS_N_INSNS (1); - return false; - - case DIV: - case UDIV: - case MOD: - case UMOD: - /* These are handled by software and are very expensive. */ - *total = COSTS_N_INSNS (100); - return false; - - case UNSPEC: - case UNSPEC_VOLATILE: - { - int num = XINT (x, 1); - - if (num <= TILEPRO_LAST_LATENCY_1_INSN) - *total = COSTS_N_INSNS (1); - else if (num <= TILEPRO_LAST_LATENCY_2_INSN) - *total = COSTS_N_INSNS (2); - else if (num > TILEPRO_LAST_LATENCY_INSN) - { - if (outer_code == PLUS) - *total = 0; - else - *total = COSTS_N_INSNS (1); - } - else - { - switch (num) - { - case UNSPEC_BLOCKAGE: - case UNSPEC_NETWORK_BARRIER: - *total = 0; - break; - - case UNSPEC_LNK_AND_LABEL: - case UNSPEC_MF: - case UNSPEC_NETWORK_RECEIVE: - case UNSPEC_NETWORK_SEND: - case UNSPEC_TLS_GD_ADD: - *total = COSTS_N_INSNS (1); - break; - - case UNSPEC_TLS_IE_LOAD: - *total = COSTS_N_INSNS (2); - break; - - case UNSPEC_SP_SET: - *total = COSTS_N_INSNS (3); - break; - - case UNSPEC_SP_TEST: - *total = COSTS_N_INSNS (4); - break; - - case UNSPEC_LATENCY_L2: - *total = COSTS_N_INSNS (8); - break; - - case UNSPEC_TLS_GD_CALL: - *total = COSTS_N_INSNS (30); - break; - - case UNSPEC_LATENCY_MISS: - *total = COSTS_N_INSNS (80); - break; - - default: - *total = COSTS_N_INSNS (1); - } - } - return true; - } - - default: - return false; - } -} - - - -/* Returns an SImode integer rtx with value VAL. */ -static rtx -gen_int_si (HOST_WIDE_INT val) -{ - return gen_int_mode (val, SImode); -} - - -/* Create a temporary variable to hold a partial result, to enable - CSE. */ -static rtx -create_temp_reg_if_possible (machine_mode mode, rtx default_reg) -{ - return can_create_pseudo_p ()? gen_reg_rtx (mode) : default_reg; -} - - -/* Functions to save and restore machine-specific function data. */ -static struct machine_function * -tilepro_init_machine_status (void) -{ - return ggc_cleared_alloc (); -} - - -/* Do anything needed before RTL is emitted for each function. */ -void -tilepro_init_expanders (void) -{ - /* Arrange to initialize and mark the machine per-function - status. */ - init_machine_status = tilepro_init_machine_status; - - if (cfun && cfun->machine && flag_pic) - { - static int label_num = 0; - - char text_label_name[32]; - - struct machine_function *machine = cfun->machine; - - ASM_GENERATE_INTERNAL_LABEL (text_label_name, "L_PICLNK", label_num++); - - machine->text_label_symbol = - gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (text_label_name)); - - machine->text_label_rtx = - gen_rtx_REG (Pmode, TILEPRO_PIC_TEXT_LABEL_REGNUM); - - machine->got_rtx = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM); - - machine->calls_tls_get_addr = false; - } -} - - -/* Return true if X contains a thread-local symbol. */ -static bool -tilepro_tls_referenced_p (rtx x) -{ - if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS) - x = XEXP (XEXP (x, 0), 0); - - if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (x)) - return true; - - /* That's all we handle in tilepro_legitimize_tls_address for - now. */ - return false; -} - - -/* Return true if X requires a scratch register. It is given that - flag_pic is on and that X satisfies CONSTANT_P. */ -static int -tilepro_pic_address_needs_scratch (rtx x) -{ - if (GET_CODE (x) == CONST - && GET_CODE (XEXP (x, 0)) == PLUS - && (GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF - || GET_CODE (XEXP (XEXP (x, 0), 0)) == LABEL_REF) - && CONST_INT_P (XEXP (XEXP (x, 0), 1))) - return true; - - return false; -} - - -/* Implement TARGET_LEGITIMATE_CONSTANT_P. This is all constants for - which we are willing to load the value into a register via a move - pattern. TLS cannot be treated as a constant because it can - include a function call. */ -static bool -tilepro_legitimate_constant_p (machine_mode mode ATTRIBUTE_UNUSED, rtx x) -{ - switch (GET_CODE (x)) - { - case CONST: - case SYMBOL_REF: - return !tilepro_tls_referenced_p (x); - - default: - return true; - } -} - - -/* Return true if the constant value X is a legitimate general operand - when generating PIC code. It is given that flag_pic is on and that - X satisfies CONSTANT_P. */ -bool -tilepro_legitimate_pic_operand_p (rtx x) -{ - if (tilepro_pic_address_needs_scratch (x)) - return false; - - if (tilepro_tls_referenced_p (x)) - return false; - - return true; -} - - -/* Return true if the rtx X can be used as an address operand. */ -static bool -tilepro_legitimate_address_p (machine_mode ARG_UNUSED (mode), rtx x, - bool strict) -{ - if (GET_CODE (x) == SUBREG) - x = SUBREG_REG (x); - - switch (GET_CODE (x)) - { - case POST_INC: - case POST_DEC: - if (GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD) - return false; - - x = XEXP (x, 0); - break; - - case POST_MODIFY: - if (GET_MODE_SIZE (GET_MODE (x)) > UNITS_PER_WORD) - return false; - - if (GET_CODE (XEXP (x, 1)) != PLUS) - return false; - - if (!rtx_equal_p (XEXP (x, 0), XEXP (XEXP (x, 1), 0))) - return false; - - if (!satisfies_constraint_I (XEXP (XEXP (x, 1), 1))) - return false; - - x = XEXP (x, 0); - break; - - case REG: - break; - - default: - return false; - } - - /* Check if x is a valid reg. */ - if (!REG_P (x)) - return false; - - if (strict) - return REGNO_OK_FOR_BASE_P (REGNO (x)); - else - return true; -} - - -/* Return the rtx containing SYMBOL_REF to the text label. */ -static rtx -tilepro_text_label_symbol (void) -{ - return cfun->machine->text_label_symbol; -} - - -/* Return the register storing the value of the text label. */ -static rtx -tilepro_text_label_rtx (void) -{ - return cfun->machine->text_label_rtx; -} - - -/* Return the register storing the value of the global offset - table. */ -static rtx -tilepro_got_rtx (void) -{ - return cfun->machine->got_rtx; -} - - -/* Return the SYMBOL_REF for _GLOBAL_OFFSET_TABLE_. */ -static rtx -tilepro_got_symbol (void) -{ - if (g_got_symbol == NULL) - g_got_symbol = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); - - return g_got_symbol; -} - - -/* Return a reference to the got to be used by tls references. */ -static rtx -tilepro_tls_got (void) -{ - rtx temp; - if (flag_pic) - { - crtl->uses_pic_offset_table = 1; - return tilepro_got_rtx (); - } - - temp = gen_reg_rtx (Pmode); - emit_move_insn (temp, tilepro_got_symbol ()); - - return temp; -} - - -/* ADDR contains a thread-local SYMBOL_REF. Generate code to compute - this (thread-local) address. */ -static rtx -tilepro_legitimize_tls_address (rtx addr) -{ - rtx ret; - - gcc_assert (can_create_pseudo_p ()); - - if (GET_CODE (addr) == SYMBOL_REF) - switch (SYMBOL_REF_TLS_MODEL (addr)) - { - case TLS_MODEL_GLOBAL_DYNAMIC: - case TLS_MODEL_LOCAL_DYNAMIC: - { - rtx r0, temp1, temp2, temp3, got; - rtx_insn *last; - - ret = gen_reg_rtx (Pmode); - r0 = gen_rtx_REG (Pmode, 0); - temp1 = gen_reg_rtx (Pmode); - temp2 = gen_reg_rtx (Pmode); - temp3 = gen_reg_rtx (Pmode); - - got = tilepro_tls_got (); - emit_insn (gen_tls_gd_addhi (temp1, got, addr)); - emit_insn (gen_tls_gd_addlo (temp2, temp1, addr)); - emit_move_insn (r0, temp2); - emit_insn (gen_tls_gd_call (addr)); - emit_move_insn (temp3, r0); - last = emit_insn (gen_tls_gd_add (ret, temp3, addr)); - set_unique_reg_note (last, REG_EQUAL, copy_rtx (addr)); - break; - } - case TLS_MODEL_INITIAL_EXEC: - { - rtx temp1, temp2, temp3, got; - rtx_insn *last; - - ret = gen_reg_rtx (Pmode); - temp1 = gen_reg_rtx (Pmode); - temp2 = gen_reg_rtx (Pmode); - temp3 = gen_reg_rtx (Pmode); - - got = tilepro_tls_got (); - emit_insn (gen_tls_ie_addhi (temp1, got, addr)); - emit_insn (gen_tls_ie_addlo (temp2, temp1, addr)); - emit_insn (gen_tls_ie_load (temp3, temp2, addr)); - last = - emit_move_insn(ret, - gen_rtx_PLUS (Pmode, - gen_rtx_REG (Pmode, - THREAD_POINTER_REGNUM), - temp3)); - set_unique_reg_note (last, REG_EQUAL, copy_rtx (addr)); - break; - } - case TLS_MODEL_LOCAL_EXEC: - { - rtx temp1; - rtx_insn *last; - - ret = gen_reg_rtx (Pmode); - temp1 = gen_reg_rtx (Pmode); - - emit_insn (gen_tls_le_addhi (temp1, - gen_rtx_REG (Pmode, - THREAD_POINTER_REGNUM), - addr)); - last = emit_insn (gen_tls_le_addlo (ret, temp1, addr)); - set_unique_reg_note (last, REG_EQUAL, copy_rtx (addr)); - break; - } - default: - gcc_unreachable (); - } - else if (GET_CODE (addr) == CONST) - { - rtx base, offset; - - gcc_assert (GET_CODE (XEXP (addr, 0)) == PLUS); - - base = tilepro_legitimize_tls_address (XEXP (XEXP (addr, 0), 0)); - offset = XEXP (XEXP (addr, 0), 1); - - base = force_operand (base, NULL_RTX); - ret = force_reg (Pmode, gen_rtx_PLUS (Pmode, base, offset)); - } - else - gcc_unreachable (); - - return ret; -} - - -/* Legitimize PIC addresses. If the address is already - position-independent, we return ORIG. Newly generated - position-independent addresses go into a reg. This is REG if - nonzero, otherwise we allocate register(s) as necessary. */ -static rtx -tilepro_legitimize_pic_address (rtx orig, - machine_mode mode ATTRIBUTE_UNUSED, - rtx reg) -{ - if (GET_CODE (orig) == SYMBOL_REF) - { - rtx address, pic_ref; - - if (reg == 0) - { - gcc_assert (can_create_pseudo_p ()); - reg = gen_reg_rtx (Pmode); - } - - if (SYMBOL_REF_LOCAL_P (orig)) - { - /* If not during reload, allocate another temp reg here for - loading in the address, so that these instructions can be - optimized properly. */ - rtx temp_reg = create_temp_reg_if_possible (Pmode, reg); - rtx text_label_symbol = tilepro_text_label_symbol (); - rtx text_label_rtx = tilepro_text_label_rtx (); - - emit_insn (gen_addli_pcrel (temp_reg, text_label_rtx, orig, - text_label_symbol)); - emit_insn (gen_auli_pcrel (temp_reg, temp_reg, orig, - text_label_symbol)); - - /* Note: this is conservative. We use the text_label but we - don't use the pic_offset_table. However, in some cases - we may need the pic_offset_table (see - tilepro_fixup_pcrel_references). */ - crtl->uses_pic_offset_table = 1; - - address = temp_reg; - - emit_move_insn (reg, address); - return reg; - } - else - { - /* If not during reload, allocate another temp reg here for - loading in the address, so that these instructions can be - optimized properly. */ - rtx temp_reg = create_temp_reg_if_possible (Pmode, reg); - - gcc_assert (flag_pic); - if (flag_pic == 1) - { - emit_insn (gen_add_got16 (temp_reg, - tilepro_got_rtx (), orig)); - } - else - { - rtx temp_reg2 = create_temp_reg_if_possible (Pmode, reg); - emit_insn (gen_addhi_got32 (temp_reg2, - tilepro_got_rtx (), orig)); - emit_insn (gen_addlo_got32 (temp_reg, temp_reg2, orig)); - } - - address = temp_reg; - - pic_ref = gen_const_mem (Pmode, address); - crtl->uses_pic_offset_table = 1; - emit_move_insn (reg, pic_ref); - /* The following put a REG_EQUAL note on this insn, so that - it can be optimized by loop. But it causes the label to - be optimized away. */ - /* set_unique_reg_note (insn, REG_EQUAL, orig); */ - return reg; - } - } - else if (GET_CODE (orig) == CONST) - { - rtx base, offset; - - if (GET_CODE (XEXP (orig, 0)) == PLUS - && XEXP (XEXP (orig, 0), 0) == tilepro_got_rtx ()) - return orig; - - if (reg == 0) - { - gcc_assert (can_create_pseudo_p ()); - reg = gen_reg_rtx (Pmode); - } - - gcc_assert (GET_CODE (XEXP (orig, 0)) == PLUS); - base = tilepro_legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, - reg); - offset = - tilepro_legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode, - base == reg ? 0 : reg); - - if (CONST_INT_P (offset)) - { - if (can_create_pseudo_p ()) - offset = force_reg (Pmode, offset); - else - /* If we reach here, then something is seriously - wrong. */ - gcc_unreachable (); - } - - if (can_create_pseudo_p ()) - return force_reg (Pmode, gen_rtx_PLUS (Pmode, base, offset)); - else - gcc_unreachable (); - } - else if (GET_CODE (orig) == LABEL_REF) - { - rtx address, temp_reg; - rtx text_label_symbol; - rtx text_label_rtx; - - if (reg == 0) - { - gcc_assert (can_create_pseudo_p ()); - reg = gen_reg_rtx (Pmode); - } - - /* If not during reload, allocate another temp reg here for - loading in the address, so that these instructions can be - optimized properly. */ - temp_reg = create_temp_reg_if_possible (Pmode, reg); - text_label_symbol = tilepro_text_label_symbol (); - text_label_rtx = tilepro_text_label_rtx (); - - emit_insn (gen_addli_pcrel (temp_reg, text_label_rtx, orig, - text_label_symbol)); - emit_insn (gen_auli_pcrel (temp_reg, temp_reg, orig, - text_label_symbol)); - - /* Note: this is conservative. We use the text_label but we - don't use the pic_offset_table. */ - crtl->uses_pic_offset_table = 1; - - address = temp_reg; - - emit_move_insn (reg, address); - - return reg; - } - - return orig; -} - - -/* Implement TARGET_LEGITIMIZE_ADDRESS. */ -static rtx -tilepro_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, - machine_mode mode) -{ - if (GET_MODE_SIZE (mode) <= UNITS_PER_WORD - && symbolic_operand (x, Pmode) && tilepro_tls_referenced_p (x)) - { - return tilepro_legitimize_tls_address (x); - } - else if (flag_pic) - { - return tilepro_legitimize_pic_address (x, mode, 0); - } - else - return x; -} - - -/* Implement TARGET_DELEGITIMIZE_ADDRESS. */ -static rtx -tilepro_delegitimize_address (rtx x) -{ - x = delegitimize_mem_from_attrs (x); - - if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == UNSPEC) - { - switch (XINT (XEXP (x, 0), 1)) - { - case UNSPEC_PCREL_SYM: - case UNSPEC_GOT16_SYM: - case UNSPEC_GOT32_SYM: - case UNSPEC_TLS_GD: - case UNSPEC_TLS_IE: - x = XVECEXP (XEXP (x, 0), 0, 0); - break; - } - } - - return x; -} - - -/* Emit code to load the PIC register. */ -static void -load_pic_register (bool delay_pic_helper ATTRIBUTE_UNUSED) -{ - int orig_flag_pic = flag_pic; - - rtx got_symbol = tilepro_got_symbol (); - rtx text_label_symbol = tilepro_text_label_symbol (); - rtx text_label_rtx = tilepro_text_label_rtx (); - flag_pic = 0; - - emit_insn (gen_insn_lnk_and_label (text_label_rtx, text_label_symbol)); - - emit_insn (gen_addli_pcrel (tilepro_got_rtx (), - text_label_rtx, got_symbol, text_label_symbol)); - - emit_insn (gen_auli_pcrel (tilepro_got_rtx (), - tilepro_got_rtx (), - got_symbol, text_label_symbol)); - - flag_pic = orig_flag_pic; - - /* Need to emit this whether or not we obey regdecls, since - setjmp/longjmp can cause life info to screw up. ??? In the case - where we don't obey regdecls, this is not sufficient since we may - not fall out the bottom. */ - emit_use (tilepro_got_rtx ()); -} - - -/* Return the simd variant of the constant NUM of mode MODE, by - replicating it to fill an interger of mode SImode. NUM is first - truncated to fit in MODE. */ -rtx -tilepro_simd_int (rtx num, machine_mode mode) -{ - HOST_WIDE_INT n = 0; - - gcc_assert (CONST_INT_P (num)); - - n = INTVAL (num); - - switch (mode) - { - case E_QImode: - n = 0x01010101 * (n & 0x000000FF); - break; - case E_HImode: - n = 0x00010001 * (n & 0x0000FFFF); - break; - case E_SImode: - break; - case E_DImode: - break; - default: - gcc_unreachable (); - } - - return gen_int_si (n); -} - - -/* Split one or more DImode RTL references into pairs of SImode - references. The RTL can be REG, offsettable MEM, integer constant, - or CONST_DOUBLE. "operands" is a pointer to an array of DImode RTL - to split and "num" is its length. lo_half and hi_half are output - arrays that parallel "operands". */ -void -split_di (rtx operands[], int num, rtx lo_half[], rtx hi_half[]) -{ - while (num--) - { - rtx op = operands[num]; - - /* simplify_subreg refuse to split volatile memory addresses, - but we still have to handle it. */ - if (MEM_P (op)) - { - lo_half[num] = adjust_address (op, SImode, 0); - hi_half[num] = adjust_address (op, SImode, 4); - } - else - { - lo_half[num] = simplify_gen_subreg (SImode, op, - GET_MODE (op) == VOIDmode - ? DImode : GET_MODE (op), 0); - hi_half[num] = simplify_gen_subreg (SImode, op, - GET_MODE (op) == VOIDmode - ? DImode : GET_MODE (op), 4); - } - } -} - - -/* Returns true iff val can be moved into a register in one - instruction. And if it can, it emits the code to move the - constant. - - If three_wide_only is true, this insists on an instruction that - works in a bundle containing three instructions. */ -static bool -expand_set_cint32_one_inst (rtx dest_reg, - HOST_WIDE_INT val, bool three_wide_only) -{ - val = trunc_int_for_mode (val, SImode); - - if (val == trunc_int_for_mode (val, QImode)) - { - /* Success! */ - emit_move_insn (dest_reg, GEN_INT (val)); - return true; - } - else if (!three_wide_only) - { - rtx imm_op = GEN_INT (val); - - if (satisfies_constraint_J (imm_op) - || satisfies_constraint_K (imm_op) - || satisfies_constraint_N (imm_op) - || satisfies_constraint_P (imm_op)) - { - emit_move_insn (dest_reg, imm_op); - return true; - } - } - - return false; -} - - -/* Implement SImode rotatert. */ -static HOST_WIDE_INT -rotate_right (HOST_WIDE_INT n, int count) -{ - unsigned HOST_WIDE_INT x = n & 0xFFFFFFFF; - if (count == 0) - return x; - return ((x >> count) | (x << (32 - count))) & 0xFFFFFFFF; -} - - -/* Return true iff n contains exactly one contiguous sequence of 1 - bits, possibly wrapping around from high bits to low bits. */ -bool -tilepro_bitfield_operand_p (HOST_WIDE_INT n, int *first_bit, int *last_bit) -{ - int i; - - if (n == 0) - return false; - - for (i = 0; i < 32; i++) - { - unsigned HOST_WIDE_INT x = rotate_right (n, i); - if (!(x & 1)) - continue; - - /* See if x is a power of two minus one, i.e. only consecutive 1 - bits starting from bit 0. */ - if ((x & (x + 1)) == 0) - { - if (first_bit != NULL) - *first_bit = i; - if (last_bit != NULL) - *last_bit = (i + exact_log2 (x ^ (x >> 1))) & 31; - - return true; - } - } - - return false; -} - - -/* Create code to move the CONST_INT value in src_val to dest_reg. */ -static void -expand_set_cint32 (rtx dest_reg, rtx src_val) -{ - HOST_WIDE_INT val; - int leading_zeroes, trailing_zeroes; - int lower, upper; - int three_wide_only; - rtx temp; - - gcc_assert (CONST_INT_P (src_val)); - val = trunc_int_for_mode (INTVAL (src_val), SImode); - - /* See if we can generate the constant in one instruction. */ - if (expand_set_cint32_one_inst (dest_reg, val, false)) - return; - - /* Create a temporary variable to hold a partial result, to enable - CSE. */ - temp = create_temp_reg_if_possible (SImode, dest_reg); - - leading_zeroes = 31 - floor_log2 (val & 0xFFFFFFFF); - trailing_zeroes = exact_log2 (val & -val); - - lower = trunc_int_for_mode (val, HImode); - upper = trunc_int_for_mode ((val - lower) >> 16, HImode); - - /* First try all three-wide instructions that generate a constant - (i.e. movei) followed by various shifts and rotates. If none of - those work, try various two-wide ways of generating a constant - followed by various shifts and rotates. */ - for (three_wide_only = 1; three_wide_only >= 0; three_wide_only--) - { - int count; - - if (expand_set_cint32_one_inst (temp, val >> trailing_zeroes, - three_wide_only)) - { - /* 0xFFFFA500 becomes: - movei temp, 0xFFFFFFA5 - shli dest, temp, 8 */ - emit_move_insn (dest_reg, - gen_rtx_ASHIFT (SImode, temp, - GEN_INT (trailing_zeroes))); - return; - } - - if (expand_set_cint32_one_inst (temp, val << leading_zeroes, - three_wide_only)) - { - /* 0x7FFFFFFF becomes: - movei temp, -2 - shri dest, temp, 1 */ - emit_move_insn (dest_reg, - gen_rtx_LSHIFTRT (SImode, temp, - GEN_INT (leading_zeroes))); - return; - } - - /* Try rotating a one-instruction immediate, since rotate is - 3-wide. */ - for (count = 1; count < 32; count++) - { - HOST_WIDE_INT r = rotate_right (val, count); - if (expand_set_cint32_one_inst (temp, r, three_wide_only)) - { - /* 0xFFA5FFFF becomes: - movei temp, 0xFFFFFFA5 - rli dest, temp, 16 */ - emit_move_insn (dest_reg, - gen_rtx_ROTATE (SImode, temp, GEN_INT (count))); - return; - } - } - - if (lower == trunc_int_for_mode (lower, QImode)) - { - /* We failed to use two 3-wide instructions, but the low 16 - bits are a small number so just use a 2-wide + 3-wide - auli + addi pair rather than anything more exotic. - - 0x12340056 becomes: - auli temp, zero, 0x1234 - addi dest, temp, 0x56 */ - break; - } - } - - /* Fallback case: use a auli + addli/addi pair. */ - emit_move_insn (temp, GEN_INT (upper << 16)); - emit_move_insn (dest_reg, (gen_rtx_PLUS (SImode, temp, GEN_INT (lower)))); -} - - -/* Load OP1, a 32-bit constant, into OP0, a register. We know it - can't be done in one insn when we get here, the move expander - guarantees this. */ -void -tilepro_expand_set_const32 (rtx op0, rtx op1) -{ - machine_mode mode = GET_MODE (op0); - rtx temp; - - if (CONST_INT_P (op1)) - { - /* TODO: I don't know if we want to split large constants now, - or wait until later (with a define_split). - - Does splitting early help CSE? Does it harm other - optimizations that might fold loads? */ - expand_set_cint32 (op0, op1); - } - else - { - temp = create_temp_reg_if_possible (mode, op0); - - /* A symbol, emit in the traditional way. */ - emit_move_insn (temp, gen_rtx_HIGH (mode, op1)); - emit_move_insn (op0, gen_rtx_LO_SUM (mode, temp, op1)); - } -} - - -/* Expand a move instruction. Return true if all work is done. */ -bool -tilepro_expand_mov (machine_mode mode, rtx *operands) -{ - /* Handle sets of MEM first. */ - if (MEM_P (operands[0])) - { - if (can_create_pseudo_p ()) - operands[0] = validize_mem (operands[0]); - - if (reg_or_0_operand (operands[1], mode)) - return false; - - if (!reload_in_progress) - operands[1] = force_reg (mode, operands[1]); - } - - /* Fixup TLS cases. */ - if (CONSTANT_P (operands[1]) && tilepro_tls_referenced_p (operands[1])) - { - operands[1] = tilepro_legitimize_tls_address (operands[1]); - return false; - } - - /* Fixup PIC cases. */ - if (flag_pic && CONSTANT_P (operands[1])) - { - if (tilepro_pic_address_needs_scratch (operands[1])) - operands[1] = tilepro_legitimize_pic_address (operands[1], mode, 0); - - if (symbolic_operand (operands[1], mode)) - { - operands[1] = tilepro_legitimize_pic_address (operands[1], - mode, - (reload_in_progress ? - operands[0] : - NULL_RTX)); - return false; - } - } - - /* Fixup for UNSPEC addresses. */ - if (flag_pic - && GET_CODE (operands[1]) == HIGH - && GET_CODE (XEXP (operands[1], 0)) == CONST - && GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == UNSPEC) - { - rtx unspec = XEXP (XEXP (operands[1], 0), 0); - int unspec_num = XINT (unspec, 1); - if (unspec_num == UNSPEC_PCREL_SYM) - { - emit_insn (gen_auli_pcrel (operands[0], const0_rtx, - XVECEXP (unspec, 0, 0), - XVECEXP (unspec, 0, 1))); - return true; - } - else if (flag_pic == 2 && unspec_num == UNSPEC_GOT32_SYM) - { - emit_insn (gen_addhi_got32 (operands[0], const0_rtx, - XVECEXP (unspec, 0, 0))); - return true; - } - else if (HAVE_AS_TLS && unspec_num == UNSPEC_TLS_GD) - { - emit_insn (gen_tls_gd_addhi (operands[0], const0_rtx, - XVECEXP (unspec, 0, 0))); - return true; - } - else if (HAVE_AS_TLS && unspec_num == UNSPEC_TLS_IE) - { - emit_insn (gen_tls_ie_addhi (operands[0], const0_rtx, - XVECEXP (unspec, 0, 0))); - return true; - } - else if (HAVE_AS_TLS && unspec_num == UNSPEC_TLS_LE) - { - emit_insn (gen_tls_le_addhi (operands[0], const0_rtx, - XVECEXP (unspec, 0, 0))); - return true; - } - } - - /* Accept non-constants and valid constants unmodified. */ - if (!CONSTANT_P (operands[1]) - || GET_CODE (operands[1]) == HIGH || move_operand (operands[1], mode)) - return false; - - /* Split large integers. */ - if (GET_MODE_SIZE (mode) <= 4) - { - tilepro_expand_set_const32 (operands[0], operands[1]); - return true; - } - - return false; -} - - -/* Expand the "insv" pattern. */ -void -tilepro_expand_insv (rtx operands[4]) -{ - rtx first_rtx = operands[2]; - HOST_WIDE_INT first = INTVAL (first_rtx); - HOST_WIDE_INT width = INTVAL (operands[1]); - rtx v = operands[3]; - - /* Shift the inserted bits into position. */ - if (first != 0) - { - if (CONST_INT_P (v)) - { - /* Shift the constant into mm position. */ - v = gen_int_si (INTVAL (v) << first); - } - else - { - /* Shift over the value to be inserted. */ - rtx tmp = gen_reg_rtx (SImode); - emit_insn (gen_ashlsi3 (tmp, v, first_rtx)); - v = tmp; - } - } - - /* Insert the shifted bits using an 'mm' insn. */ - emit_insn (gen_insn_mm (operands[0], v, operands[0], first_rtx, - GEN_INT (first + width - 1))); -} - - -/* Expand unaligned loads. */ -void -tilepro_expand_unaligned_load (rtx dest_reg, rtx mem, HOST_WIDE_INT bitsize, - HOST_WIDE_INT bit_offset, bool sign) -{ - machine_mode mode; - rtx addr_lo, addr_hi; - rtx mem_lo, mem_hi, hi; - rtx mema, wide_result; - int last_byte_offset; - HOST_WIDE_INT byte_offset = bit_offset / BITS_PER_UNIT; - - mode = GET_MODE (dest_reg); - - hi = gen_reg_rtx (mode); - - if (bitsize == 2 * BITS_PER_UNIT && (bit_offset % BITS_PER_UNIT) == 0) - { - rtx lo; - - /* When just loading a two byte value, we can load the two bytes - individually and combine them efficiently. */ - - mem_lo = adjust_address (mem, QImode, byte_offset); - mem_hi = adjust_address (mem, QImode, byte_offset + 1); - - lo = gen_reg_rtx (mode); - emit_insn (gen_zero_extendqisi2 (lo, mem_lo)); - - if (sign) - { - rtx tmp = gen_reg_rtx (mode); - - /* Do a signed load of the second byte then shift and OR it - in. */ - emit_insn (gen_extendqisi2 (gen_lowpart (SImode, hi), mem_hi)); - emit_insn (gen_ashlsi3 (gen_lowpart (SImode, tmp), - gen_lowpart (SImode, hi), GEN_INT (8))); - emit_insn (gen_iorsi3 (gen_lowpart (SImode, dest_reg), - gen_lowpart (SImode, lo), - gen_lowpart (SImode, tmp))); - } - else - { - /* Do two unsigned loads and use intlb to interleave - them. */ - emit_insn (gen_zero_extendqisi2 (gen_lowpart (SImode, hi), mem_hi)); - emit_insn (gen_insn_intlb (gen_lowpart (SImode, dest_reg), - gen_lowpart (SImode, hi), - gen_lowpart (SImode, lo))); - } - - return; - } - - mema = XEXP (mem, 0); - - /* AND addresses cannot be in any alias set, since they may - implicitly alias surrounding code. Ideally we'd have some alias - set that covered all types except those with alignment 8 or - higher. */ - addr_lo = force_reg (Pmode, plus_constant (Pmode, mema, byte_offset)); - mem_lo = change_address (mem, mode, - gen_rtx_AND (Pmode, addr_lo, GEN_INT (-4))); - set_mem_alias_set (mem_lo, 0); - - /* Load the high word at an address that will not fault if the low - address is aligned and at the very end of a page. */ - last_byte_offset = (bit_offset + bitsize - 1) / BITS_PER_UNIT; - addr_hi = force_reg (Pmode, plus_constant (Pmode, mema, last_byte_offset)); - mem_hi = change_address (mem, mode, - gen_rtx_AND (Pmode, addr_hi, GEN_INT (-4))); - set_mem_alias_set (mem_hi, 0); - - if (bitsize == 32) - { - addr_lo = make_safe_from (addr_lo, dest_reg); - wide_result = dest_reg; - } - else - { - wide_result = gen_reg_rtx (mode); - } - - /* Load hi first in case dest_reg is used in mema. */ - emit_move_insn (hi, mem_hi); - emit_move_insn (wide_result, mem_lo); - - emit_insn (gen_insn_dword_align (gen_lowpart (SImode, wide_result), - gen_lowpart (SImode, wide_result), - gen_lowpart (SImode, hi), addr_lo)); - - if (bitsize != 32) - { - rtx extracted = - extract_bit_field (gen_lowpart (SImode, wide_result), - bitsize, bit_offset % BITS_PER_UNIT, - !sign, gen_lowpart (SImode, dest_reg), - SImode, SImode, false, NULL); - - if (extracted != dest_reg) - emit_move_insn (dest_reg, gen_lowpart (SImode, extracted)); - } -} - - -/* Expand unaligned stores. */ -static void -tilepro_expand_unaligned_store (rtx mem, rtx src, HOST_WIDE_INT bitsize, - HOST_WIDE_INT bit_offset) -{ - HOST_WIDE_INT byte_offset = bit_offset / BITS_PER_UNIT; - HOST_WIDE_INT bytesize = bitsize / BITS_PER_UNIT; - HOST_WIDE_INT shift_amt; - HOST_WIDE_INT i; - rtx mem_addr; - rtx store_val; - - for (i = 0, shift_amt = 0; i < bytesize; i++, shift_amt += BITS_PER_UNIT) - { - mem_addr = adjust_address (mem, QImode, byte_offset + i); - - if (shift_amt) - { - store_val = expand_simple_binop (SImode, LSHIFTRT, - gen_lowpart (SImode, src), - GEN_INT (shift_amt), NULL, 1, - OPTAB_LIB_WIDEN); - store_val = gen_lowpart (QImode, store_val); - } - else - { - store_val = gen_lowpart (QImode, src); - } - - emit_move_insn (mem_addr, store_val); - } -} - - -/* Implement the movmisalign patterns. One of the operands is a - memory that is not naturally aligned. Emit instructions to load - it. */ -void -tilepro_expand_movmisalign (machine_mode mode, rtx *operands) -{ - if (MEM_P (operands[1])) - { - rtx tmp; - - if (register_operand (operands[0], mode)) - tmp = operands[0]; - else - tmp = gen_reg_rtx (mode); - - tilepro_expand_unaligned_load (tmp, operands[1], - GET_MODE_BITSIZE (mode), 0, true); - - if (tmp != operands[0]) - emit_move_insn (operands[0], tmp); - } - else if (MEM_P (operands[0])) - { - if (!reg_or_0_operand (operands[1], mode)) - operands[1] = force_reg (mode, operands[1]); - - tilepro_expand_unaligned_store (operands[0], operands[1], - GET_MODE_BITSIZE (mode), 0); - } - else - gcc_unreachable (); -} - - -/* Implement the addsi3 pattern. */ -bool -tilepro_expand_addsi (rtx op0, rtx op1, rtx op2) -{ - rtx temp; - HOST_WIDE_INT n; - HOST_WIDE_INT high; - - /* Skip anything that only takes one instruction. */ - if (add_operand (op2, SImode)) - return false; - - /* We can only optimize ints here (it should be impossible to get - here with any other type, but it is harmless to check. */ - if (!CONST_INT_P (op2)) - return false; - - temp = create_temp_reg_if_possible (SImode, op0); - n = INTVAL (op2); - high = (n + (n & 0x8000)) & ~0xffff; - - emit_move_insn (temp, gen_rtx_PLUS (SImode, op1, gen_int_si (high))); - emit_move_insn (op0, gen_rtx_PLUS (SImode, temp, gen_int_si (n - high))); - - return true; -} - - -/* Implement the allocate_stack pattern (alloca). */ -void -tilepro_allocate_stack (rtx op0, rtx op1) -{ - /* Technically the correct way to initialize chain_loc is with - * gen_frame_mem() instead of gen_rtx_MEM(), but gen_frame_mem() - * sets the alias_set to that of a frame reference. Some of our - * tests rely on some unsafe assumption about when the chaining - * update is done, we need to be conservative about reordering the - * chaining instructions. - */ - rtx fp_addr = gen_reg_rtx (Pmode); - rtx fp_value = gen_reg_rtx (Pmode); - rtx fp_loc; - - emit_move_insn (fp_addr, gen_rtx_PLUS (Pmode, stack_pointer_rtx, - GEN_INT (UNITS_PER_WORD))); - - fp_loc = gen_frame_mem (Pmode, fp_addr); - - emit_move_insn (fp_value, fp_loc); - - op1 = force_reg (Pmode, op1); - - emit_move_insn (stack_pointer_rtx, - gen_rtx_MINUS (Pmode, stack_pointer_rtx, op1)); - - emit_move_insn (fp_addr, gen_rtx_PLUS (Pmode, stack_pointer_rtx, - GEN_INT (UNITS_PER_WORD))); - - fp_loc = gen_frame_mem (Pmode, fp_addr); - - emit_move_insn (fp_loc, fp_value); - - emit_move_insn (op0, virtual_stack_dynamic_rtx); -} - - - -/* Multiplies */ - -/* Returns the insn_code in ENTRY. */ -static enum insn_code -tilepro_multiply_get_opcode (const struct tilepro_multiply_insn_seq_entry - *entry) -{ - return tilepro_multiply_insn_seq_decode_opcode[entry->compressed_opcode]; -} - - -/* Returns the length of the 'op' array. */ -static int -tilepro_multiply_get_num_ops (const struct tilepro_multiply_insn_seq *seq) -{ - /* The array either uses all of its allocated slots or is terminated - by a bogus opcode. Either way, the array size is the index of the - last valid opcode plus one. */ - int i; - for (i = tilepro_multiply_insn_seq_MAX_OPERATIONS - 1; i >= 0; i--) - if (tilepro_multiply_get_opcode (&seq->op[i]) != CODE_FOR_nothing) - return i + 1; - - /* An empty array is not allowed. */ - gcc_unreachable (); -} - - -/* We precompute a number of expression trees for multiplying by - constants. This generates code for such an expression tree by - walking through the nodes in the tree (which are conveniently - pre-linearized) and emitting an instruction for each one. */ -static void -tilepro_expand_constant_multiply_given_sequence (rtx result, rtx src, - const struct - tilepro_multiply_insn_seq - *seq) -{ - int i; - int num_ops; - - /* Keep track of the subexpressions computed so far, so later - instructions can refer to them. We seed the array with zero and - the value being multiplied. */ - int num_subexprs = 2; - rtx subexprs[tilepro_multiply_insn_seq_MAX_OPERATIONS + 2]; - subexprs[0] = const0_rtx; - subexprs[1] = src; - - /* Determine how many instructions we are going to generate. */ - num_ops = tilepro_multiply_get_num_ops (seq); - gcc_assert (num_ops > 0 - && num_ops <= tilepro_multiply_insn_seq_MAX_OPERATIONS); - - for (i = 0; i < num_ops; i++) - { - const struct tilepro_multiply_insn_seq_entry *entry = &seq->op[i]; - - /* Figure out where to store the output of this instruction. */ - const bool is_last_op = (i + 1 == num_ops); - rtx out = is_last_op ? result : gen_reg_rtx (SImode); - - enum insn_code opcode = tilepro_multiply_get_opcode (entry); - if (opcode == CODE_FOR_ashlsi3) - { - /* Handle shift by immediate. This is a special case because - the meaning of the second operand is a constant shift - count rather than an operand index. */ - - /* Make sure the shift count is in range. Zero should not - happen. */ - const int shift_count = entry->rhs; - gcc_assert (shift_count > 0 && shift_count < 32); - - /* Emit the actual instruction. */ - emit_insn (GEN_FCN (opcode) - (out, subexprs[entry->lhs], - gen_rtx_CONST_INT (SImode, shift_count))); - } - else - { - /* Handle a normal two-operand instruction, such as add or - s1a. */ - - /* Make sure we are referring to a previously computed - subexpression. */ - gcc_assert (entry->rhs < num_subexprs); - - /* Emit the actual instruction. */ - emit_insn (GEN_FCN (opcode) - (out, subexprs[entry->lhs], subexprs[entry->rhs])); - } - - /* Record this subexpression for use by later expressions. */ - subexprs[num_subexprs++] = out; - } -} - - -/* bsearch helper function. */ -static int -tilepro_compare_multipliers (const void *key, const void *t) -{ - return *(const int *) key - - ((const struct tilepro_multiply_insn_seq *) t)->multiplier; -} - - -/* Returns the tilepro_multiply_insn_seq for multiplier, or NULL if - none exists. */ -static const struct tilepro_multiply_insn_seq * -tilepro_find_multiply_insn_seq_for_constant (int multiplier) -{ - return ((const struct tilepro_multiply_insn_seq *) - bsearch (&multiplier, tilepro_multiply_insn_seq_table, - tilepro_multiply_insn_seq_table_size, - sizeof tilepro_multiply_insn_seq_table[0], - tilepro_compare_multipliers)); -} - - -/* Try to a expand constant multiply in SImode by looking it up in a - precompiled table. OP0 is the result operand, OP1 is the source - operand, and MULTIPLIER is the value of the constant. Return true - if it succeeds. */ -static bool -tilepro_expand_const_mulsi (rtx op0, rtx op1, int multiplier) -{ - /* See if we have precomputed an efficient way to multiply by this - constant. */ - const struct tilepro_multiply_insn_seq *seq = - tilepro_find_multiply_insn_seq_for_constant (multiplier); - if (seq != NULL) - { - tilepro_expand_constant_multiply_given_sequence (op0, op1, seq); - return true; - } - else - return false; -} - - -/* Expand the mulsi pattern. */ -bool -tilepro_expand_mulsi (rtx op0, rtx op1, rtx op2) -{ - if (CONST_INT_P (op2)) - { - HOST_WIDE_INT n = trunc_int_for_mode (INTVAL (op2), SImode); - return tilepro_expand_const_mulsi (op0, op1, n); - } - return false; -} - - -/* Expand a high multiply pattern in SImode. RESULT, OP1, OP2 are the - operands, and SIGN is true if it's a signed multiply, and false if - it's an unsigned multiply. */ -static void -tilepro_expand_high_multiply (rtx result, rtx op1, rtx op2, bool sign) -{ - rtx tmp0 = gen_reg_rtx (SImode); - rtx tmp1 = gen_reg_rtx (SImode); - rtx tmp2 = gen_reg_rtx (SImode); - rtx tmp3 = gen_reg_rtx (SImode); - rtx tmp4 = gen_reg_rtx (SImode); - rtx tmp5 = gen_reg_rtx (SImode); - rtx tmp6 = gen_reg_rtx (SImode); - rtx tmp7 = gen_reg_rtx (SImode); - rtx tmp8 = gen_reg_rtx (SImode); - rtx tmp9 = gen_reg_rtx (SImode); - rtx tmp10 = gen_reg_rtx (SImode); - rtx tmp11 = gen_reg_rtx (SImode); - rtx tmp12 = gen_reg_rtx (SImode); - rtx tmp13 = gen_reg_rtx (SImode); - rtx result_lo = gen_reg_rtx (SImode); - - if (sign) - { - emit_insn (gen_insn_mulhl_su (tmp0, op1, op2)); - emit_insn (gen_insn_mulhl_su (tmp1, op2, op1)); - emit_insn (gen_insn_mulll_uu (tmp2, op1, op2)); - emit_insn (gen_insn_mulhh_ss (tmp3, op1, op2)); - } - else - { - emit_insn (gen_insn_mulhl_uu (tmp0, op1, op2)); - emit_insn (gen_insn_mulhl_uu (tmp1, op2, op1)); - emit_insn (gen_insn_mulll_uu (tmp2, op1, op2)); - emit_insn (gen_insn_mulhh_uu (tmp3, op1, op2)); - } - - emit_move_insn (tmp4, (gen_rtx_ASHIFT (SImode, tmp0, GEN_INT (16)))); - - emit_move_insn (tmp5, (gen_rtx_ASHIFT (SImode, tmp1, GEN_INT (16)))); - - emit_move_insn (tmp6, (gen_rtx_PLUS (SImode, tmp4, tmp5))); - emit_move_insn (result_lo, (gen_rtx_PLUS (SImode, tmp2, tmp6))); - - emit_move_insn (tmp7, gen_rtx_LTU (SImode, tmp6, tmp4)); - emit_move_insn (tmp8, gen_rtx_LTU (SImode, result_lo, tmp2)); - - if (sign) - { - emit_move_insn (tmp9, (gen_rtx_ASHIFTRT (SImode, tmp0, GEN_INT (16)))); - emit_move_insn (tmp10, (gen_rtx_ASHIFTRT (SImode, tmp1, GEN_INT (16)))); - } - else - { - emit_move_insn (tmp9, (gen_rtx_LSHIFTRT (SImode, tmp0, GEN_INT (16)))); - emit_move_insn (tmp10, (gen_rtx_LSHIFTRT (SImode, tmp1, GEN_INT (16)))); - } - - emit_move_insn (tmp11, (gen_rtx_PLUS (SImode, tmp3, tmp7))); - emit_move_insn (tmp12, (gen_rtx_PLUS (SImode, tmp8, tmp9))); - emit_move_insn (tmp13, (gen_rtx_PLUS (SImode, tmp11, tmp12))); - emit_move_insn (result, (gen_rtx_PLUS (SImode, tmp13, tmp10))); -} - - -/* Implement smulsi3_highpart. */ -void -tilepro_expand_smulsi3_highpart (rtx op0, rtx op1, rtx op2) -{ - tilepro_expand_high_multiply (op0, op1, op2, true); -} - - -/* Implement umulsi3_highpart. */ -void -tilepro_expand_umulsi3_highpart (rtx op0, rtx op1, rtx op2) -{ - tilepro_expand_high_multiply (op0, op1, op2, false); -} - - - -/* Compare and branches */ - -/* Helper function to handle DImode for tilepro_emit_setcc_internal. */ -static bool -tilepro_emit_setcc_internal_di (rtx res, enum rtx_code code, rtx op0, rtx op1) -{ - rtx operands[2], lo_half[2], hi_half[2]; - rtx tmp, tmp0, tmp1, tmp2; - bool swap = false; - - /* Reduce the number of cases we need to handle by reversing the - operands. */ - switch (code) - { - case EQ: - case NE: - case LE: - case LT: - case LEU: - case LTU: - /* We handle these compares directly. */ - break; - - case GE: - case GT: - case GEU: - case GTU: - /* Reverse the operands. */ - swap = true; - break; - - default: - /* We should not have called this with any other code. */ - gcc_unreachable (); - } - - if (swap) - { - code = swap_condition (code); - tmp = op0, op0 = op1, op1 = tmp; - } - - operands[0] = op0; - operands[1] = op1; - - split_di (operands, 2, lo_half, hi_half); - - if (!reg_or_0_operand (lo_half[0], SImode)) - lo_half[0] = force_reg (SImode, lo_half[0]); - - if (!reg_or_0_operand (hi_half[0], SImode)) - hi_half[0] = force_reg (SImode, hi_half[0]); - - if (!CONST_INT_P (lo_half[1]) && !register_operand (lo_half[1], SImode)) - lo_half[1] = force_reg (SImode, lo_half[1]); - - if (!CONST_INT_P (hi_half[1]) && !register_operand (hi_half[1], SImode)) - hi_half[1] = force_reg (SImode, hi_half[1]); - - tmp0 = gen_reg_rtx (SImode); - tmp1 = gen_reg_rtx (SImode); - tmp2 = gen_reg_rtx (SImode); - - switch (code) - { - case EQ: - emit_insn (gen_insn_seq (tmp0, lo_half[0], lo_half[1])); - emit_insn (gen_insn_seq (tmp1, hi_half[0], hi_half[1])); - emit_insn (gen_andsi3 (res, tmp0, tmp1)); - return true; - case NE: - emit_insn (gen_insn_sne (tmp0, lo_half[0], lo_half[1])); - emit_insn (gen_insn_sne (tmp1, hi_half[0], hi_half[1])); - emit_insn (gen_iorsi3 (res, tmp0, tmp1)); - return true; - case LE: - emit_insn (gen_insn_slte (tmp0, hi_half[0], hi_half[1])); - emit_insn (gen_insn_seq (tmp1, hi_half[0], hi_half[1])); - emit_insn (gen_insn_slte_u (tmp2, lo_half[0], lo_half[1])); - emit_insn (gen_insn_mvnz (res, tmp0, tmp1, tmp2)); - return true; - case LT: - if (operands[1] == const0_rtx) - { - emit_insn (gen_lshrsi3 (res, hi_half[0], GEN_INT (31))); - return true; - } - else - { - emit_insn (gen_insn_slt (tmp0, hi_half[0], hi_half[1])); - emit_insn (gen_insn_seq (tmp1, hi_half[0], hi_half[1])); - emit_insn (gen_insn_slt_u (tmp2, lo_half[0], lo_half[1])); - emit_insn (gen_insn_mvnz (res, tmp0, tmp1, tmp2)); - } - return true; - case LEU: - emit_insn (gen_insn_slte_u (tmp0, hi_half[0], hi_half[1])); - emit_insn (gen_insn_seq (tmp1, hi_half[0], hi_half[1])); - emit_insn (gen_insn_slte_u (tmp2, lo_half[0], lo_half[1])); - emit_insn (gen_insn_mvnz (res, tmp0, tmp1, tmp2)); - return true; - case LTU: - emit_insn (gen_insn_slt_u (tmp0, hi_half[0], hi_half[1])); - emit_insn (gen_insn_seq (tmp1, hi_half[0], hi_half[1])); - emit_insn (gen_insn_slt_u (tmp2, lo_half[0], lo_half[1])); - emit_insn (gen_insn_mvnz (res, tmp0, tmp1, tmp2)); - return true; - default: - gcc_unreachable (); - } - - return false; -} - - -/* Certain simplifications can be done to make invalid setcc - operations valid. Return the final comparison, or NULL if we can't - work. */ -static bool -tilepro_emit_setcc_internal (rtx res, enum rtx_code code, rtx op0, rtx op1, - machine_mode cmp_mode) -{ - rtx tmp; - bool swap = false; - - if (cmp_mode == DImode) - { - return tilepro_emit_setcc_internal_di (res, code, op0, op1); - } - - /* The general case: fold the comparison code to the types of - compares that we have, choosing the branch as necessary. */ - - switch (code) - { - case EQ: - case NE: - case LE: - case LT: - case LEU: - case LTU: - /* We have these compares. */ - break; - - case GE: - case GT: - case GEU: - case GTU: - /* We do not have these compares, so we reverse the - operands. */ - swap = true; - break; - - default: - /* We should not have called this with any other code. */ - gcc_unreachable (); - } - - if (swap) - { - code = swap_condition (code); - tmp = op0, op0 = op1, op1 = tmp; - } - - if (!reg_or_0_operand (op0, SImode)) - op0 = force_reg (SImode, op0); - - if (!CONST_INT_P (op1) && !register_operand (op1, SImode)) - op1 = force_reg (SImode, op1); - - /* Return the setcc comparison. */ - emit_insn (gen_rtx_SET (res, gen_rtx_fmt_ee (code, SImode, op0, op1))); - - return true; -} - - -/* Implement cstore patterns. */ -bool -tilepro_emit_setcc (rtx operands[], machine_mode cmp_mode) -{ - return - tilepro_emit_setcc_internal (operands[0], GET_CODE (operands[1]), - operands[2], operands[3], cmp_mode); -} - - -/* Return whether CODE is a signed comparison. */ -static bool -signed_compare_p (enum rtx_code code) -{ - return (code == EQ || code == NE || code == LT || code == LE - || code == GT || code == GE); -} - - -/* Generate the comparison for an SImode conditional branch. */ -static rtx -tilepro_emit_cc_test (enum rtx_code code, rtx op0, rtx op1, - machine_mode cmp_mode, bool eq_ne_only) -{ - enum rtx_code branch_code; - rtx temp; - - /* Check for a compare against zero using a comparison we can do - directly. */ - if (cmp_mode != DImode - && op1 == const0_rtx - && (code == EQ || code == NE - || (!eq_ne_only && signed_compare_p (code)))) - { - op0 = force_reg (SImode, op0); - return gen_rtx_fmt_ee (code, VOIDmode, op0, const0_rtx); - } - - /* The general case: fold the comparison code to the types of - compares that we have, choosing the branch as necessary. */ - switch (code) - { - case EQ: - case LE: - case LT: - case LEU: - case LTU: - /* We have these compares. */ - branch_code = NE; - break; - - case NE: - case GE: - case GT: - case GEU: - case GTU: - /* These must be reversed (except NE, but let's - canonicalize). */ - code = reverse_condition (code); - branch_code = EQ; - break; - - default: - gcc_unreachable (); - } - - if (cmp_mode != DImode - && CONST_INT_P (op1) && (!satisfies_constraint_I (op1) || code == LEU)) - { - HOST_WIDE_INT n = trunc_int_for_mode (INTVAL (op1), SImode); - - switch (code) - { - case EQ: - /* Subtract off the value we want to compare against and see - if we get zero. This is cheaper than creating a constant - in a register. Except that subtracting -128 is more - expensive than seqi to -128, so we leave that alone. */ - /* ??? Don't do this when comparing against symbols, - otherwise we'll reduce (&x == 0x1234) to (&x-0x1234 == - 0), which will be declared false out of hand (at least - for non-weak). */ - if (!(symbolic_operand (op0, VOIDmode) - || (REG_P (op0) && REG_POINTER (op0)))) - { - /* To compare against MIN_INT, we add MIN_INT and check - for 0. */ - HOST_WIDE_INT add; - if (n != -2147483647 - 1) - add = -n; - else - add = n; - - op0 = force_reg (SImode, op0); - temp = gen_reg_rtx (SImode); - emit_insn (gen_addsi3 (temp, op0, gen_int_si (add))); - return gen_rtx_fmt_ee (reverse_condition (branch_code), - VOIDmode, temp, const0_rtx); - } - break; - - case LEU: - if (n == -1) - break; - /* FALLTHRU */ - - case LTU: - /* Change ((unsigned)x < 0x1000) into !((unsigned)x >> 12), - etc. */ - { - int first = exact_log2 (code == LTU ? n : n + 1); - if (first != -1) - { - op0 = force_reg (SImode, op0); - temp = gen_reg_rtx (SImode); - emit_move_insn (temp, - gen_rtx_LSHIFTRT (SImode, op0, - gen_int_si (first))); - return gen_rtx_fmt_ee (reverse_condition (branch_code), - VOIDmode, temp, const0_rtx); - } - } - break; - - default: - break; - } - } - - /* Compute a flag saying whether we should branch. */ - temp = gen_reg_rtx (SImode); - tilepro_emit_setcc_internal (temp, code, op0, op1, cmp_mode); - - /* Return the branch comparison. */ - return gen_rtx_fmt_ee (branch_code, VOIDmode, temp, const0_rtx); -} - - -/* Generate the comparison for a conditional branch. */ -void -tilepro_emit_conditional_branch (rtx operands[], machine_mode cmp_mode) -{ - rtx cmp_rtx = - tilepro_emit_cc_test (GET_CODE (operands[0]), operands[1], operands[2], - cmp_mode, false); - rtx branch_rtx = gen_rtx_SET (pc_rtx, - gen_rtx_IF_THEN_ELSE (VOIDmode, cmp_rtx, - gen_rtx_LABEL_REF - (VOIDmode, - operands[3]), - pc_rtx)); - emit_jump_insn (branch_rtx); -} - - -/* Implement the movsicc pattern. */ -rtx -tilepro_emit_conditional_move (rtx cmp) -{ - return - tilepro_emit_cc_test (GET_CODE (cmp), XEXP (cmp, 0), XEXP (cmp, 1), - GET_MODE (XEXP (cmp, 0)), true); -} - - -/* Return true if INSN is annotated with a REG_BR_PROB note that - indicates it's a branch that's predicted taken. */ -static bool -cbranch_predicted_p (rtx_insn *insn) -{ - rtx x = find_reg_note (insn, REG_BR_PROB, 0); - - if (x) - { - return profile_probability::from_reg_br_prob_note (XINT (x, 0)) - >= profile_probability::even (); - } - - return false; -} - - -/* Output assembly code for a specific branch instruction, appending - the branch prediction flag to the opcode if appropriate. */ -static const char * -tilepro_output_simple_cbranch_with_opcode (rtx_insn *insn, const char *opcode, - int regop, bool netreg_p, - bool reverse_predicted) -{ - static char buf[64]; - sprintf (buf, "%s%s\t%%%c%d, %%l0", opcode, - (cbranch_predicted_p (insn) ^ reverse_predicted) ? "t" : "", - netreg_p ? 'N' : 'r', regop); - return buf; -} - - -/* Output assembly code for a specific branch instruction, appending - the branch prediction flag to the opcode if appropriate. */ -const char * -tilepro_output_cbranch_with_opcode (rtx_insn *insn, rtx *operands, - const char *opcode, - const char *rev_opcode, - int regop, bool netreg_p) -{ - const char *branch_if_false; - rtx taken, not_taken; - bool is_simple_branch; - - gcc_assert (LABEL_P (operands[0])); - - is_simple_branch = true; - if (INSN_ADDRESSES_SET_P ()) - { - int from_addr = INSN_ADDRESSES (INSN_UID (insn)); - int to_addr = INSN_ADDRESSES (INSN_UID (operands[0])); - int delta = to_addr - from_addr; - is_simple_branch = IN_RANGE (delta, -524288, 524280); - } - - if (is_simple_branch) - { - /* Just a simple conditional branch. */ - return - tilepro_output_simple_cbranch_with_opcode (insn, opcode, regop, - netreg_p, false); - } - - /* Generate a reversed branch around a direct jump. This fallback - does not use branch-likely instructions. */ - not_taken = gen_label_rtx (); - taken = operands[0]; - - /* Generate the reversed branch to NOT_TAKEN. */ - operands[0] = not_taken; - branch_if_false = - tilepro_output_simple_cbranch_with_opcode (insn, rev_opcode, regop, - netreg_p, true); - output_asm_insn (branch_if_false, operands); - - output_asm_insn ("j\t%l0", &taken); - - /* Output NOT_TAKEN. */ - targetm.asm_out.internal_label (asm_out_file, "L", - CODE_LABEL_NUMBER (not_taken)); - return ""; -} - - -/* Output assembly code for a conditional branch instruction. */ -const char * -tilepro_output_cbranch (rtx_insn *insn, rtx *operands, bool reversed) -{ - enum rtx_code code = GET_CODE (operands[1]); - const char *opcode; - const char *rev_opcode; - - if (reversed) - code = reverse_condition (code); - - switch (code) - { - case NE: - opcode = "bnz"; - rev_opcode = "bz"; - break; - case EQ: - opcode = "bz"; - rev_opcode = "bnz"; - break; - case GE: - opcode = "bgez"; - rev_opcode = "blz"; - break; - case GT: - opcode = "bgz"; - rev_opcode = "blez"; - break; - case LE: - opcode = "blez"; - rev_opcode = "bgz"; - break; - case LT: - opcode = "blz"; - rev_opcode = "bgez"; - break; - default: - gcc_unreachable (); - } - - return - tilepro_output_cbranch_with_opcode (insn, operands, opcode, rev_opcode, - 2, false); -} - - -/* Implement the tablejump pattern. */ -void -tilepro_expand_tablejump (rtx op0, rtx op1) -{ - if (flag_pic) - { - rtx table = gen_rtx_LABEL_REF (Pmode, op1); - rtx temp = gen_reg_rtx (Pmode); - rtx text_label_symbol = tilepro_text_label_symbol (); - rtx text_label_rtx = tilepro_text_label_rtx (); - - emit_insn (gen_addli_pcrel (temp, text_label_rtx, - table, text_label_symbol)); - emit_insn (gen_auli_pcrel (temp, temp, table, text_label_symbol)); - emit_move_insn (temp, - gen_rtx_PLUS (Pmode, - convert_to_mode (Pmode, op0, false), - temp)); - op0 = temp; - } - - emit_jump_insn (gen_tablejump_aux (op0, op1)); -} - - -/* Expand a builtin vector binary op, by calling gen function GEN with - operands in the proper modes. DEST is converted to DEST_MODE, and - src0 and src1 (if DO_SRC1 is true) is converted to SRC_MODE. */ -void -tilepro_expand_builtin_vector_binop (rtx (*gen) (rtx, rtx, rtx), - machine_mode dest_mode, - rtx dest, - machine_mode src_mode, - rtx src0, rtx src1, bool do_src1) -{ - dest = gen_lowpart (dest_mode, dest); - - if (src0 == const0_rtx) - src0 = CONST0_RTX (src_mode); - else - src0 = gen_lowpart (src_mode, src0); - - if (do_src1) - { - if (src1 == const0_rtx) - src1 = CONST0_RTX (src_mode); - else - src1 = gen_lowpart (src_mode, src1); - } - - emit_insn ((*gen) (dest, src0, src1)); -} - - - -/* Intrinsics */ - -struct tile_builtin_info -{ - enum insn_code icode; - tree fndecl; -}; - -static struct tile_builtin_info tilepro_builtin_info[TILEPRO_BUILTIN_max] = { - { CODE_FOR_addsi3, NULL }, /* add */ - { CODE_FOR_insn_addb, NULL }, /* addb */ - { CODE_FOR_insn_addbs_u, NULL }, /* addbs_u */ - { CODE_FOR_insn_addh, NULL }, /* addh */ - { CODE_FOR_insn_addhs, NULL }, /* addhs */ - { CODE_FOR_insn_addib, NULL }, /* addib */ - { CODE_FOR_insn_addih, NULL }, /* addih */ - { CODE_FOR_insn_addlis, NULL }, /* addlis */ - { CODE_FOR_ssaddsi3, NULL }, /* adds */ - { CODE_FOR_insn_adiffb_u, NULL }, /* adiffb_u */ - { CODE_FOR_insn_adiffh, NULL }, /* adiffh */ - { CODE_FOR_andsi3, NULL }, /* and */ - { CODE_FOR_insn_auli, NULL }, /* auli */ - { CODE_FOR_insn_avgb_u, NULL }, /* avgb_u */ - { CODE_FOR_insn_avgh, NULL }, /* avgh */ - { CODE_FOR_insn_bitx, NULL }, /* bitx */ - { CODE_FOR_bswapsi2, NULL }, /* bytex */ - { CODE_FOR_clzsi2, NULL }, /* clz */ - { CODE_FOR_insn_crc32_32, NULL }, /* crc32_32 */ - { CODE_FOR_insn_crc32_8, NULL }, /* crc32_8 */ - { CODE_FOR_ctzsi2, NULL }, /* ctz */ - { CODE_FOR_insn_drain, NULL }, /* drain */ - { CODE_FOR_insn_dtlbpr, NULL }, /* dtlbpr */ - { CODE_FOR_insn_dword_align, NULL }, /* dword_align */ - { CODE_FOR_insn_finv, NULL }, /* finv */ - { CODE_FOR_insn_flush, NULL }, /* flush */ - { CODE_FOR_insn_fnop, NULL }, /* fnop */ - { CODE_FOR_insn_icoh, NULL }, /* icoh */ - { CODE_FOR_insn_ill, NULL }, /* ill */ - { CODE_FOR_insn_info, NULL }, /* info */ - { CODE_FOR_insn_infol, NULL }, /* infol */ - { CODE_FOR_insn_inthb, NULL }, /* inthb */ - { CODE_FOR_insn_inthh, NULL }, /* inthh */ - { CODE_FOR_insn_intlb, NULL }, /* intlb */ - { CODE_FOR_insn_intlh, NULL }, /* intlh */ - { CODE_FOR_insn_inv, NULL }, /* inv */ - { CODE_FOR_insn_lb, NULL }, /* lb */ - { CODE_FOR_insn_lb_u, NULL }, /* lb_u */ - { CODE_FOR_insn_lh, NULL }, /* lh */ - { CODE_FOR_insn_lh_u, NULL }, /* lh_u */ - { CODE_FOR_insn_lnk, NULL }, /* lnk */ - { CODE_FOR_insn_lw, NULL }, /* lw */ - { CODE_FOR_insn_lw_na, NULL }, /* lw_na */ - { CODE_FOR_insn_lb_L2, NULL }, /* lb_L2 */ - { CODE_FOR_insn_lb_u_L2, NULL }, /* lb_u_L2 */ - { CODE_FOR_insn_lh_L2, NULL }, /* lh_L2 */ - { CODE_FOR_insn_lh_u_L2, NULL }, /* lh_u_L2 */ - { CODE_FOR_insn_lw_L2, NULL }, /* lw_L2 */ - { CODE_FOR_insn_lw_na_L2, NULL }, /* lw_na_L2 */ - { CODE_FOR_insn_lb_miss, NULL }, /* lb_miss */ - { CODE_FOR_insn_lb_u_miss, NULL }, /* lb_u_miss */ - { CODE_FOR_insn_lh_miss, NULL }, /* lh_miss */ - { CODE_FOR_insn_lh_u_miss, NULL }, /* lh_u_miss */ - { CODE_FOR_insn_lw_miss, NULL }, /* lw_miss */ - { CODE_FOR_insn_lw_na_miss, NULL }, /* lw_na_miss */ - { CODE_FOR_insn_maxb_u, NULL }, /* maxb_u */ - { CODE_FOR_insn_maxh, NULL }, /* maxh */ - { CODE_FOR_insn_maxib_u, NULL }, /* maxib_u */ - { CODE_FOR_insn_maxih, NULL }, /* maxih */ - { CODE_FOR_memory_barrier, NULL }, /* mf */ - { CODE_FOR_insn_mfspr, NULL }, /* mfspr */ - { CODE_FOR_insn_minb_u, NULL }, /* minb_u */ - { CODE_FOR_insn_minh, NULL }, /* minh */ - { CODE_FOR_insn_minib_u, NULL }, /* minib_u */ - { CODE_FOR_insn_minih, NULL }, /* minih */ - { CODE_FOR_insn_mm, NULL }, /* mm */ - { CODE_FOR_insn_mnz, NULL }, /* mnz */ - { CODE_FOR_insn_mnzb, NULL }, /* mnzb */ - { CODE_FOR_insn_mnzh, NULL }, /* mnzh */ - { CODE_FOR_movsi, NULL }, /* move */ - { CODE_FOR_insn_movelis, NULL }, /* movelis */ - { CODE_FOR_insn_mtspr, NULL }, /* mtspr */ - { CODE_FOR_insn_mulhh_ss, NULL }, /* mulhh_ss */ - { CODE_FOR_insn_mulhh_su, NULL }, /* mulhh_su */ - { CODE_FOR_insn_mulhh_uu, NULL }, /* mulhh_uu */ - { CODE_FOR_insn_mulhha_ss, NULL }, /* mulhha_ss */ - { CODE_FOR_insn_mulhha_su, NULL }, /* mulhha_su */ - { CODE_FOR_insn_mulhha_uu, NULL }, /* mulhha_uu */ - { CODE_FOR_insn_mulhhsa_uu, NULL }, /* mulhhsa_uu */ - { CODE_FOR_insn_mulhl_ss, NULL }, /* mulhl_ss */ - { CODE_FOR_insn_mulhl_su, NULL }, /* mulhl_su */ - { CODE_FOR_insn_mulhl_us, NULL }, /* mulhl_us */ - { CODE_FOR_insn_mulhl_uu, NULL }, /* mulhl_uu */ - { CODE_FOR_insn_mulhla_ss, NULL }, /* mulhla_ss */ - { CODE_FOR_insn_mulhla_su, NULL }, /* mulhla_su */ - { CODE_FOR_insn_mulhla_us, NULL }, /* mulhla_us */ - { CODE_FOR_insn_mulhla_uu, NULL }, /* mulhla_uu */ - { CODE_FOR_insn_mulhlsa_uu, NULL }, /* mulhlsa_uu */ - { CODE_FOR_insn_mulll_ss, NULL }, /* mulll_ss */ - { CODE_FOR_insn_mulll_su, NULL }, /* mulll_su */ - { CODE_FOR_insn_mulll_uu, NULL }, /* mulll_uu */ - { CODE_FOR_insn_mullla_ss, NULL }, /* mullla_ss */ - { CODE_FOR_insn_mullla_su, NULL }, /* mullla_su */ - { CODE_FOR_insn_mullla_uu, NULL }, /* mullla_uu */ - { CODE_FOR_insn_mulllsa_uu, NULL }, /* mulllsa_uu */ - { CODE_FOR_insn_mvnz, NULL }, /* mvnz */ - { CODE_FOR_insn_mvz, NULL }, /* mvz */ - { CODE_FOR_insn_mz, NULL }, /* mz */ - { CODE_FOR_insn_mzb, NULL }, /* mzb */ - { CODE_FOR_insn_mzh, NULL }, /* mzh */ - { CODE_FOR_insn_nap, NULL }, /* nap */ - { CODE_FOR_nop, NULL }, /* nop */ - { CODE_FOR_insn_nor, NULL }, /* nor */ - { CODE_FOR_iorsi3, NULL }, /* or */ - { CODE_FOR_insn_packbs_u, NULL }, /* packbs_u */ - { CODE_FOR_insn_packhb, NULL }, /* packhb */ - { CODE_FOR_insn_packhs, NULL }, /* packhs */ - { CODE_FOR_insn_packlb, NULL }, /* packlb */ - { CODE_FOR_popcountsi2, NULL }, /* pcnt */ - { CODE_FOR_insn_prefetch, NULL }, /* prefetch */ - { CODE_FOR_insn_prefetch_L1, NULL }, /* prefetch_L1 */ - { CODE_FOR_rotlsi3, NULL }, /* rl */ - { CODE_FOR_insn_s1a, NULL }, /* s1a */ - { CODE_FOR_insn_s2a, NULL }, /* s2a */ - { CODE_FOR_insn_s3a, NULL }, /* s3a */ - { CODE_FOR_insn_sadab_u, NULL }, /* sadab_u */ - { CODE_FOR_insn_sadah, NULL }, /* sadah */ - { CODE_FOR_insn_sadah_u, NULL }, /* sadah_u */ - { CODE_FOR_insn_sadb_u, NULL }, /* sadb_u */ - { CODE_FOR_insn_sadh, NULL }, /* sadh */ - { CODE_FOR_insn_sadh_u, NULL }, /* sadh_u */ - { CODE_FOR_insn_sb, NULL }, /* sb */ - { CODE_FOR_insn_seq, NULL }, /* seq */ - { CODE_FOR_insn_seqb, NULL }, /* seqb */ - { CODE_FOR_insn_seqh, NULL }, /* seqh */ - { CODE_FOR_insn_seqib, NULL }, /* seqib */ - { CODE_FOR_insn_seqih, NULL }, /* seqih */ - { CODE_FOR_insn_sh, NULL }, /* sh */ - { CODE_FOR_ashlsi3, NULL }, /* shl */ - { CODE_FOR_insn_shlb, NULL }, /* shlb */ - { CODE_FOR_insn_shlh, NULL }, /* shlh */ - { CODE_FOR_insn_shlb, NULL }, /* shlib */ - { CODE_FOR_insn_shlh, NULL }, /* shlih */ - { CODE_FOR_lshrsi3, NULL }, /* shr */ - { CODE_FOR_insn_shrb, NULL }, /* shrb */ - { CODE_FOR_insn_shrh, NULL }, /* shrh */ - { CODE_FOR_insn_shrb, NULL }, /* shrib */ - { CODE_FOR_insn_shrh, NULL }, /* shrih */ - { CODE_FOR_insn_slt, NULL }, /* slt */ - { CODE_FOR_insn_slt_u, NULL }, /* slt_u */ - { CODE_FOR_insn_sltb, NULL }, /* sltb */ - { CODE_FOR_insn_sltb_u, NULL }, /* sltb_u */ - { CODE_FOR_insn_slte, NULL }, /* slte */ - { CODE_FOR_insn_slte_u, NULL }, /* slte_u */ - { CODE_FOR_insn_slteb, NULL }, /* slteb */ - { CODE_FOR_insn_slteb_u, NULL }, /* slteb_u */ - { CODE_FOR_insn_slteh, NULL }, /* slteh */ - { CODE_FOR_insn_slteh_u, NULL }, /* slteh_u */ - { CODE_FOR_insn_slth, NULL }, /* slth */ - { CODE_FOR_insn_slth_u, NULL }, /* slth_u */ - { CODE_FOR_insn_sltib, NULL }, /* sltib */ - { CODE_FOR_insn_sltib_u, NULL }, /* sltib_u */ - { CODE_FOR_insn_sltih, NULL }, /* sltih */ - { CODE_FOR_insn_sltih_u, NULL }, /* sltih_u */ - { CODE_FOR_insn_sne, NULL }, /* sne */ - { CODE_FOR_insn_sneb, NULL }, /* sneb */ - { CODE_FOR_insn_sneh, NULL }, /* sneh */ - { CODE_FOR_ashrsi3, NULL }, /* sra */ - { CODE_FOR_insn_srab, NULL }, /* srab */ - { CODE_FOR_insn_srah, NULL }, /* srah */ - { CODE_FOR_insn_srab, NULL }, /* sraib */ - { CODE_FOR_insn_srah, NULL }, /* sraih */ - { CODE_FOR_subsi3, NULL }, /* sub */ - { CODE_FOR_insn_subb, NULL }, /* subb */ - { CODE_FOR_insn_subbs_u, NULL }, /* subbs_u */ - { CODE_FOR_insn_subh, NULL }, /* subh */ - { CODE_FOR_insn_subhs, NULL }, /* subhs */ - { CODE_FOR_sssubsi3, NULL }, /* subs */ - { CODE_FOR_insn_sw, NULL }, /* sw */ - { CODE_FOR_insn_tblidxb0, NULL }, /* tblidxb0 */ - { CODE_FOR_insn_tblidxb1, NULL }, /* tblidxb1 */ - { CODE_FOR_insn_tblidxb2, NULL }, /* tblidxb2 */ - { CODE_FOR_insn_tblidxb3, NULL }, /* tblidxb3 */ - { CODE_FOR_insn_tns, NULL }, /* tns */ - { CODE_FOR_insn_wh64, NULL }, /* wh64 */ - { CODE_FOR_xorsi3, NULL }, /* xor */ - { CODE_FOR_tilepro_network_barrier, NULL }, /* network_barrier */ - { CODE_FOR_tilepro_idn0_receive, NULL }, /* idn0_receive */ - { CODE_FOR_tilepro_idn1_receive, NULL }, /* idn1_receive */ - { CODE_FOR_tilepro_idn_send, NULL }, /* idn_send */ - { CODE_FOR_tilepro_sn_receive, NULL }, /* sn_receive */ - { CODE_FOR_tilepro_sn_send, NULL }, /* sn_send */ - { CODE_FOR_tilepro_udn0_receive, NULL }, /* udn0_receive */ - { CODE_FOR_tilepro_udn1_receive, NULL }, /* udn1_receive */ - { CODE_FOR_tilepro_udn2_receive, NULL }, /* udn2_receive */ - { CODE_FOR_tilepro_udn3_receive, NULL }, /* udn3_receive */ - { CODE_FOR_tilepro_udn_send, NULL }, /* udn_send */ -}; - - -struct tilepro_builtin_def -{ - const char *name; - enum tilepro_builtin code; - bool is_const; - /* The first character is the return type. Subsequent characters - are the argument types. See char_to_type. */ - const char *type; -}; - - -static const struct tilepro_builtin_def tilepro_builtins[] = { - { "__insn_add", TILEPRO_INSN_ADD, true, "lll" }, - { "__insn_addb", TILEPRO_INSN_ADDB, true, "lll" }, - { "__insn_addbs_u", TILEPRO_INSN_ADDBS_U, false, "lll" }, - { "__insn_addh", TILEPRO_INSN_ADDH, true, "lll" }, - { "__insn_addhs", TILEPRO_INSN_ADDHS, false, "lll" }, - { "__insn_addi", TILEPRO_INSN_ADD, true, "lll" }, - { "__insn_addib", TILEPRO_INSN_ADDIB, true, "lll" }, - { "__insn_addih", TILEPRO_INSN_ADDIH, true, "lll" }, - { "__insn_addli", TILEPRO_INSN_ADD, true, "lll" }, - { "__insn_addlis", TILEPRO_INSN_ADDLIS, false, "lll" }, - { "__insn_adds", TILEPRO_INSN_ADDS, false, "lll" }, - { "__insn_adiffb_u", TILEPRO_INSN_ADIFFB_U, true, "lll" }, - { "__insn_adiffh", TILEPRO_INSN_ADIFFH, true, "lll" }, - { "__insn_and", TILEPRO_INSN_AND, true, "lll" }, - { "__insn_andi", TILEPRO_INSN_AND, true, "lll" }, - { "__insn_auli", TILEPRO_INSN_AULI, true, "lll" }, - { "__insn_avgb_u", TILEPRO_INSN_AVGB_U, true, "lll" }, - { "__insn_avgh", TILEPRO_INSN_AVGH, true, "lll" }, - { "__insn_bitx", TILEPRO_INSN_BITX, true, "ll" }, - { "__insn_bytex", TILEPRO_INSN_BYTEX, true, "ll" }, - { "__insn_clz", TILEPRO_INSN_CLZ, true, "ll" }, - { "__insn_crc32_32", TILEPRO_INSN_CRC32_32, true, "lll" }, - { "__insn_crc32_8", TILEPRO_INSN_CRC32_8, true, "lll" }, - { "__insn_ctz", TILEPRO_INSN_CTZ, true, "ll" }, - { "__insn_drain", TILEPRO_INSN_DRAIN, false, "v" }, - { "__insn_dtlbpr", TILEPRO_INSN_DTLBPR, false, "vl" }, - { "__insn_dword_align", TILEPRO_INSN_DWORD_ALIGN, true, "lllk" }, - { "__insn_finv", TILEPRO_INSN_FINV, false, "vk" }, - { "__insn_flush", TILEPRO_INSN_FLUSH, false, "vk" }, - { "__insn_fnop", TILEPRO_INSN_FNOP, false, "v" }, - { "__insn_icoh", TILEPRO_INSN_ICOH, false, "vk" }, - { "__insn_ill", TILEPRO_INSN_ILL, false, "v" }, - { "__insn_info", TILEPRO_INSN_INFO, false, "vl" }, - { "__insn_infol", TILEPRO_INSN_INFOL, false, "vl" }, - { "__insn_inthb", TILEPRO_INSN_INTHB, true, "lll" }, - { "__insn_inthh", TILEPRO_INSN_INTHH, true, "lll" }, - { "__insn_intlb", TILEPRO_INSN_INTLB, true, "lll" }, - { "__insn_intlh", TILEPRO_INSN_INTLH, true, "lll" }, - { "__insn_inv", TILEPRO_INSN_INV, false, "vp" }, - { "__insn_lb", TILEPRO_INSN_LB, false, "lk" }, - { "__insn_lb_u", TILEPRO_INSN_LB_U, false, "lk" }, - { "__insn_lh", TILEPRO_INSN_LH, false, "lk" }, - { "__insn_lh_u", TILEPRO_INSN_LH_U, false, "lk" }, - { "__insn_lnk", TILEPRO_INSN_LNK, true, "l" }, - { "__insn_lw", TILEPRO_INSN_LW, false, "lk" }, - { "__insn_lw_na", TILEPRO_INSN_LW_NA, false, "lk" }, - { "__insn_lb_L2", TILEPRO_INSN_LB_L2, false, "lk" }, - { "__insn_lb_u_L2", TILEPRO_INSN_LB_U_L2, false, "lk" }, - { "__insn_lh_L2", TILEPRO_INSN_LH_L2, false, "lk" }, - { "__insn_lh_u_L2", TILEPRO_INSN_LH_U_L2, false, "lk" }, - { "__insn_lw_L2", TILEPRO_INSN_LW_L2, false, "lk" }, - { "__insn_lw_na_L2", TILEPRO_INSN_LW_NA_L2, false, "lk" }, - { "__insn_lb_miss", TILEPRO_INSN_LB_MISS, false, "lk" }, - { "__insn_lb_u_miss", TILEPRO_INSN_LB_U_MISS, false, "lk" }, - { "__insn_lh_miss", TILEPRO_INSN_LH_MISS, false, "lk" }, - { "__insn_lh_u_miss", TILEPRO_INSN_LH_U_MISS, false, "lk" }, - { "__insn_lw_miss", TILEPRO_INSN_LW_MISS, false, "lk" }, - { "__insn_lw_na_miss", TILEPRO_INSN_LW_NA_MISS, false, "lk" }, - { "__insn_maxb_u", TILEPRO_INSN_MAXB_U, true, "lll" }, - { "__insn_maxh", TILEPRO_INSN_MAXH, true, "lll" }, - { "__insn_maxib_u", TILEPRO_INSN_MAXIB_U, true, "lll" }, - { "__insn_maxih", TILEPRO_INSN_MAXIH, true, "lll" }, - { "__insn_mf", TILEPRO_INSN_MF, false, "v" }, - { "__insn_mfspr", TILEPRO_INSN_MFSPR, false, "ll" }, - { "__insn_minb_u", TILEPRO_INSN_MINB_U, true, "lll" }, - { "__insn_minh", TILEPRO_INSN_MINH, true, "lll" }, - { "__insn_minib_u", TILEPRO_INSN_MINIB_U, true, "lll" }, - { "__insn_minih", TILEPRO_INSN_MINIH, true, "lll" }, - { "__insn_mm", TILEPRO_INSN_MM, true, "lllll" }, - { "__insn_mnz", TILEPRO_INSN_MNZ, true, "lll" }, - { "__insn_mnzb", TILEPRO_INSN_MNZB, true, "lll" }, - { "__insn_mnzh", TILEPRO_INSN_MNZH, true, "lll" }, - { "__insn_move", TILEPRO_INSN_MOVE, true, "ll" }, - { "__insn_movei", TILEPRO_INSN_MOVE, true, "ll" }, - { "__insn_moveli", TILEPRO_INSN_MOVE, true, "ll" }, - { "__insn_movelis", TILEPRO_INSN_MOVELIS, false, "ll" }, - { "__insn_mtspr", TILEPRO_INSN_MTSPR, false, "vll" }, - { "__insn_mulhh_ss", TILEPRO_INSN_MULHH_SS, true, "lll" }, - { "__insn_mulhh_su", TILEPRO_INSN_MULHH_SU, true, "lll" }, - { "__insn_mulhh_uu", TILEPRO_INSN_MULHH_UU, true, "lll" }, - { "__insn_mulhha_ss", TILEPRO_INSN_MULHHA_SS, true, "llll" }, - { "__insn_mulhha_su", TILEPRO_INSN_MULHHA_SU, true, "llll" }, - { "__insn_mulhha_uu", TILEPRO_INSN_MULHHA_UU, true, "llll" }, - { "__insn_mulhhsa_uu", TILEPRO_INSN_MULHHSA_UU, true, "llll" }, - { "__insn_mulhl_ss", TILEPRO_INSN_MULHL_SS, true, "lll" }, - { "__insn_mulhl_su", TILEPRO_INSN_MULHL_SU, true, "lll" }, - { "__insn_mulhl_us", TILEPRO_INSN_MULHL_US, true, "lll" }, - { "__insn_mulhl_uu", TILEPRO_INSN_MULHL_UU, true, "lll" }, - { "__insn_mulhla_ss", TILEPRO_INSN_MULHLA_SS, true, "llll" }, - { "__insn_mulhla_su", TILEPRO_INSN_MULHLA_SU, true, "llll" }, - { "__insn_mulhla_us", TILEPRO_INSN_MULHLA_US, true, "llll" }, - { "__insn_mulhla_uu", TILEPRO_INSN_MULHLA_UU, true, "llll" }, - { "__insn_mulhlsa_uu", TILEPRO_INSN_MULHLSA_UU, true, "llll" }, - { "__insn_mulll_ss", TILEPRO_INSN_MULLL_SS, true, "lll" }, - { "__insn_mulll_su", TILEPRO_INSN_MULLL_SU, true, "lll" }, - { "__insn_mulll_uu", TILEPRO_INSN_MULLL_UU, true, "lll" }, - { "__insn_mullla_ss", TILEPRO_INSN_MULLLA_SS, true, "llll" }, - { "__insn_mullla_su", TILEPRO_INSN_MULLLA_SU, true, "llll" }, - { "__insn_mullla_uu", TILEPRO_INSN_MULLLA_UU, true, "llll" }, - { "__insn_mulllsa_uu", TILEPRO_INSN_MULLLSA_UU, true, "llll" }, - { "__insn_mvnz", TILEPRO_INSN_MVNZ, true, "llll" }, - { "__insn_mvz", TILEPRO_INSN_MVZ, true, "llll" }, - { "__insn_mz", TILEPRO_INSN_MZ, true, "lll" }, - { "__insn_mzb", TILEPRO_INSN_MZB, true, "lll" }, - { "__insn_mzh", TILEPRO_INSN_MZH, true, "lll" }, - { "__insn_nap", TILEPRO_INSN_NAP, false, "v" }, - { "__insn_nop", TILEPRO_INSN_NOP, true, "v" }, - { "__insn_nor", TILEPRO_INSN_NOR, true, "lll" }, - { "__insn_or", TILEPRO_INSN_OR, true, "lll" }, - { "__insn_ori", TILEPRO_INSN_OR, true, "lll" }, - { "__insn_packbs_u", TILEPRO_INSN_PACKBS_U, false, "lll" }, - { "__insn_packhb", TILEPRO_INSN_PACKHB, true, "lll" }, - { "__insn_packhs", TILEPRO_INSN_PACKHS, false, "lll" }, - { "__insn_packlb", TILEPRO_INSN_PACKLB, true, "lll" }, - { "__insn_pcnt", TILEPRO_INSN_PCNT, true, "ll" }, - { "__insn_prefetch", TILEPRO_INSN_PREFETCH, false, "vk" }, - { "__insn_prefetch_L1", TILEPRO_INSN_PREFETCH_L1, false, "vk" }, - { "__insn_rl", TILEPRO_INSN_RL, true, "lll" }, - { "__insn_rli", TILEPRO_INSN_RL, true, "lll" }, - { "__insn_s1a", TILEPRO_INSN_S1A, true, "lll" }, - { "__insn_s2a", TILEPRO_INSN_S2A, true, "lll" }, - { "__insn_s3a", TILEPRO_INSN_S3A, true, "lll" }, - { "__insn_sadab_u", TILEPRO_INSN_SADAB_U, true, "llll" }, - { "__insn_sadah", TILEPRO_INSN_SADAH, true, "llll" }, - { "__insn_sadah_u", TILEPRO_INSN_SADAH_U, true, "llll" }, - { "__insn_sadb_u", TILEPRO_INSN_SADB_U, true, "lll" }, - { "__insn_sadh", TILEPRO_INSN_SADH, true, "lll" }, - { "__insn_sadh_u", TILEPRO_INSN_SADH_U, true, "lll" }, - { "__insn_sb", TILEPRO_INSN_SB, false, "vpl" }, - { "__insn_seq", TILEPRO_INSN_SEQ, true, "lll" }, - { "__insn_seqb", TILEPRO_INSN_SEQB, true, "lll" }, - { "__insn_seqh", TILEPRO_INSN_SEQH, true, "lll" }, - { "__insn_seqi", TILEPRO_INSN_SEQ, true, "lll" }, - { "__insn_seqib", TILEPRO_INSN_SEQIB, true, "lll" }, - { "__insn_seqih", TILEPRO_INSN_SEQIH, true, "lll" }, - { "__insn_sh", TILEPRO_INSN_SH, false, "vpl" }, - { "__insn_shl", TILEPRO_INSN_SHL, true, "lll" }, - { "__insn_shlb", TILEPRO_INSN_SHLB, true, "lll" }, - { "__insn_shlh", TILEPRO_INSN_SHLH, true, "lll" }, - { "__insn_shli", TILEPRO_INSN_SHL, true, "lll" }, - { "__insn_shlib", TILEPRO_INSN_SHLIB, true, "lll" }, - { "__insn_shlih", TILEPRO_INSN_SHLIH, true, "lll" }, - { "__insn_shr", TILEPRO_INSN_SHR, true, "lll" }, - { "__insn_shrb", TILEPRO_INSN_SHRB, true, "lll" }, - { "__insn_shrh", TILEPRO_INSN_SHRH, true, "lll" }, - { "__insn_shri", TILEPRO_INSN_SHR, true, "lll" }, - { "__insn_shrib", TILEPRO_INSN_SHRIB, true, "lll" }, - { "__insn_shrih", TILEPRO_INSN_SHRIH, true, "lll" }, - { "__insn_slt", TILEPRO_INSN_SLT, true, "lll" }, - { "__insn_slt_u", TILEPRO_INSN_SLT_U, true, "lll" }, - { "__insn_sltb", TILEPRO_INSN_SLTB, true, "lll" }, - { "__insn_sltb_u", TILEPRO_INSN_SLTB_U, true, "lll" }, - { "__insn_slte", TILEPRO_INSN_SLTE, true, "lll" }, - { "__insn_slte_u", TILEPRO_INSN_SLTE_U, true, "lll" }, - { "__insn_slteb", TILEPRO_INSN_SLTEB, true, "lll" }, - { "__insn_slteb_u", TILEPRO_INSN_SLTEB_U, true, "lll" }, - { "__insn_slteh", TILEPRO_INSN_SLTEH, true, "lll" }, - { "__insn_slteh_u", TILEPRO_INSN_SLTEH_U, true, "lll" }, - { "__insn_slth", TILEPRO_INSN_SLTH, true, "lll" }, - { "__insn_slth_u", TILEPRO_INSN_SLTH_U, true, "lll" }, - { "__insn_slti", TILEPRO_INSN_SLT, true, "lll" }, - { "__insn_slti_u", TILEPRO_INSN_SLT_U, true, "lll" }, - { "__insn_sltib", TILEPRO_INSN_SLTIB, true, "lll" }, - { "__insn_sltib_u", TILEPRO_INSN_SLTIB_U, true, "lll" }, - { "__insn_sltih", TILEPRO_INSN_SLTIH, true, "lll" }, - { "__insn_sltih_u", TILEPRO_INSN_SLTIH_U, true, "lll" }, - { "__insn_sne", TILEPRO_INSN_SNE, true, "lll" }, - { "__insn_sneb", TILEPRO_INSN_SNEB, true, "lll" }, - { "__insn_sneh", TILEPRO_INSN_SNEH, true, "lll" }, - { "__insn_sra", TILEPRO_INSN_SRA, true, "lll" }, - { "__insn_srab", TILEPRO_INSN_SRAB, true, "lll" }, - { "__insn_srah", TILEPRO_INSN_SRAH, true, "lll" }, - { "__insn_srai", TILEPRO_INSN_SRA, true, "lll" }, - { "__insn_sraib", TILEPRO_INSN_SRAIB, true, "lll" }, - { "__insn_sraih", TILEPRO_INSN_SRAIH, true, "lll" }, - { "__insn_sub", TILEPRO_INSN_SUB, true, "lll" }, - { "__insn_subb", TILEPRO_INSN_SUBB, true, "lll" }, - { "__insn_subbs_u", TILEPRO_INSN_SUBBS_U, false, "lll" }, - { "__insn_subh", TILEPRO_INSN_SUBH, true, "lll" }, - { "__insn_subhs", TILEPRO_INSN_SUBHS, false, "lll" }, - { "__insn_subs", TILEPRO_INSN_SUBS, false, "lll" }, - { "__insn_sw", TILEPRO_INSN_SW, false, "vpl" }, - { "__insn_tblidxb0", TILEPRO_INSN_TBLIDXB0, true, "lll" }, - { "__insn_tblidxb1", TILEPRO_INSN_TBLIDXB1, true, "lll" }, - { "__insn_tblidxb2", TILEPRO_INSN_TBLIDXB2, true, "lll" }, - { "__insn_tblidxb3", TILEPRO_INSN_TBLIDXB3, true, "lll" }, - { "__insn_tns", TILEPRO_INSN_TNS, false, "lp" }, - { "__insn_wh64", TILEPRO_INSN_WH64, false, "vp" }, - { "__insn_xor", TILEPRO_INSN_XOR, true, "lll" }, - { "__insn_xori", TILEPRO_INSN_XOR, true, "lll" }, - { "__tile_network_barrier", TILEPRO_NETWORK_BARRIER, false, "v" }, - { "__tile_idn0_receive", TILEPRO_IDN0_RECEIVE, false, "l" }, - { "__tile_idn1_receive", TILEPRO_IDN1_RECEIVE, false, "l" }, - { "__tile_idn_send", TILEPRO_IDN_SEND, false, "vl" }, - { "__tile_sn_receive", TILEPRO_SN_RECEIVE, false, "l" }, - { "__tile_sn_send", TILEPRO_SN_SEND, false, "vl" }, - { "__tile_udn0_receive", TILEPRO_UDN0_RECEIVE, false, "l" }, - { "__tile_udn1_receive", TILEPRO_UDN1_RECEIVE, false, "l" }, - { "__tile_udn2_receive", TILEPRO_UDN2_RECEIVE, false, "l" }, - { "__tile_udn3_receive", TILEPRO_UDN3_RECEIVE, false, "l" }, - { "__tile_udn_send", TILEPRO_UDN_SEND, false, "vl" }, -}; - - -/* Convert a character in a builtin type string to a tree type. */ -static tree -char_to_type (char c) -{ - static tree volatile_ptr_type_node = NULL; - static tree volatile_const_ptr_type_node = NULL; - - if (volatile_ptr_type_node == NULL) - { - volatile_ptr_type_node = - build_pointer_type (build_qualified_type (void_type_node, - TYPE_QUAL_VOLATILE)); - volatile_const_ptr_type_node = - build_pointer_type (build_qualified_type (void_type_node, - TYPE_QUAL_CONST - | TYPE_QUAL_VOLATILE)); - } - - switch (c) - { - case 'v': - return void_type_node; - case 'l': - return long_unsigned_type_node; - case 'p': - return volatile_ptr_type_node; - case 'k': - return volatile_const_ptr_type_node; - default: - gcc_unreachable (); - } -} - - -/* Implement TARGET_INIT_BUILTINS. */ -static void -tilepro_init_builtins (void) -{ - size_t i; - - for (i = 0; i < ARRAY_SIZE (tilepro_builtins); i++) - { - const struct tilepro_builtin_def *p = &tilepro_builtins[i]; - tree ftype, ret_type, arg_type_list = void_list_node; - tree decl; - int j; - - for (j = strlen (p->type) - 1; j > 0; j--) - { - arg_type_list = - tree_cons (NULL_TREE, char_to_type (p->type[j]), arg_type_list); - } - - ret_type = char_to_type (p->type[0]); - - ftype = build_function_type (ret_type, arg_type_list); - - decl = add_builtin_function (p->name, ftype, p->code, BUILT_IN_MD, - NULL, NULL); - - if (p->is_const) - TREE_READONLY (decl) = 1; - TREE_NOTHROW (decl) = 1; - - if (tilepro_builtin_info[p->code].fndecl == NULL) - tilepro_builtin_info[p->code].fndecl = decl; - } -} - - -/* Implement TARGET_EXPAND_BUILTIN. */ -static rtx -tilepro_expand_builtin (tree exp, - rtx target, - rtx subtarget ATTRIBUTE_UNUSED, - machine_mode mode ATTRIBUTE_UNUSED, - int ignore ATTRIBUTE_UNUSED) -{ -#define MAX_BUILTIN_ARGS 4 - - tree fndecl = TREE_OPERAND (CALL_EXPR_FN (exp), 0); - unsigned int fcode = DECL_MD_FUNCTION_CODE (fndecl); - tree arg; - call_expr_arg_iterator iter; - enum insn_code icode; - rtx op[MAX_BUILTIN_ARGS + 1], pat; - int opnum; - bool nonvoid; - insn_gen_fn fn; - - if (fcode >= TILEPRO_BUILTIN_max) - internal_error ("bad builtin fcode"); - icode = tilepro_builtin_info[fcode].icode; - if (icode == 0) - internal_error ("bad builtin icode"); - - nonvoid = TREE_TYPE (TREE_TYPE (fndecl)) != void_type_node; - - opnum = nonvoid; - FOR_EACH_CALL_EXPR_ARG (arg, iter, exp) - { - const struct insn_operand_data *insn_op; - - if (arg == error_mark_node) - return NULL_RTX; - if (opnum > MAX_BUILTIN_ARGS) - return NULL_RTX; - - insn_op = &insn_data[icode].operand[opnum]; - - op[opnum] = expand_expr (arg, NULL_RTX, insn_op->mode, EXPAND_NORMAL); - - if (!(*insn_op->predicate) (op[opnum], insn_op->mode)) - op[opnum] = copy_to_mode_reg (insn_op->mode, op[opnum]); - - if (!(*insn_op->predicate) (op[opnum], insn_op->mode)) - { - /* We still failed to meet the predicate even after moving - into a register. Assume we needed an immediate. */ - error_at (EXPR_LOCATION (exp), - "operand must be an immediate of the right size"); - return const0_rtx; - } - - opnum++; - } - - if (nonvoid) - { - machine_mode tmode = insn_data[icode].operand[0].mode; - if (!target - || GET_MODE (target) != tmode - || !(*insn_data[icode].operand[0].predicate) (target, tmode)) - target = gen_reg_rtx (tmode); - op[0] = target; - } - - fn = GEN_FCN (icode); - switch (opnum) - { - case 0: - pat = fn (NULL_RTX); - break; - case 1: - pat = fn (op[0]); - break; - case 2: - pat = fn (op[0], op[1]); - break; - case 3: - pat = fn (op[0], op[1], op[2]); - break; - case 4: - pat = fn (op[0], op[1], op[2], op[3]); - break; - case 5: - pat = fn (op[0], op[1], op[2], op[3], op[4]); - break; - default: - gcc_unreachable (); - } - if (!pat) - return NULL_RTX; - - /* If we are generating a prefetch, tell the scheduler not to move - it around. */ - if (GET_CODE (pat) == PREFETCH) - PREFETCH_SCHEDULE_BARRIER_P (pat) = true; - - emit_insn (pat); - - if (nonvoid) - return target; - else - return const0_rtx; -} - - -/* Implement TARGET_BUILTIN_DECL. */ -static tree -tilepro_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED) -{ - if (code >= TILEPRO_BUILTIN_max) - return error_mark_node; - - return tilepro_builtin_info[code].fndecl; -} - - - -/* Stack frames */ - -/* Return whether REGNO needs to be saved in the stack frame. */ -static bool -need_to_save_reg (unsigned int regno) -{ - if (!call_used_or_fixed_reg_p (regno) - && df_regs_ever_live_p (regno)) - return true; - - if (flag_pic - && (regno == PIC_OFFSET_TABLE_REGNUM - || regno == TILEPRO_PIC_TEXT_LABEL_REGNUM) - && (crtl->uses_pic_offset_table || crtl->saves_all_registers)) - return true; - - if (crtl->calls_eh_return) - { - unsigned i; - for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM; i++) - { - if (regno == EH_RETURN_DATA_REGNO (i)) - return true; - } - } - - return false; -} - - -/* Return the size of the register savev area. This function is only - correct starting with local register allocation */ -static int -tilepro_saved_regs_size (void) -{ - int reg_save_size = 0; - int regno; - int offset_to_frame; - int align_mask; - - for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) - if (need_to_save_reg (regno)) - reg_save_size += UNITS_PER_WORD; - - /* Pad out the register save area if necessary to make - frame_pointer_rtx be as aligned as the stack pointer. */ - offset_to_frame = crtl->args.pretend_args_size + reg_save_size; - align_mask = (STACK_BOUNDARY / BITS_PER_UNIT) - 1; - reg_save_size += (-offset_to_frame) & align_mask; - - return reg_save_size; -} - - -/* Round up frame size SIZE. */ -static int -round_frame_size (int size) -{ - return ((size + STACK_BOUNDARY / BITS_PER_UNIT - 1) - & -STACK_BOUNDARY / BITS_PER_UNIT); -} - - -/* Emit a store in the stack frame to save REGNO at address ADDR, and - emit the corresponding REG_CFA_OFFSET note described by CFA and - CFA_OFFSET. Return the emitted insn. */ -static rtx -frame_emit_store (int regno, int regno_note, rtx addr, rtx cfa, - int cfa_offset) -{ - rtx reg = gen_rtx_REG (Pmode, regno); - rtx mem = gen_frame_mem (Pmode, addr); - rtx mov = gen_movsi (mem, reg); - - /* Describe what just happened in a way that dwarf understands. We - use temporary registers to hold the address to make scheduling - easier, and use the REG_CFA_OFFSET to describe the address as an - offset from the CFA. */ - rtx reg_note = gen_rtx_REG (Pmode, regno_note); - rtx cfa_relative_addr = gen_rtx_PLUS (Pmode, cfa, gen_int_si (cfa_offset)); - rtx cfa_relative_mem = gen_frame_mem (Pmode, cfa_relative_addr); - rtx real = gen_rtx_SET (cfa_relative_mem, reg_note); - add_reg_note (mov, REG_CFA_OFFSET, real); - - return emit_insn (mov); -} - - -/* Emit a load in the stack frame to load REGNO from address ADDR. - Add a REG_CFA_RESTORE note to CFA_RESTORES if CFA_RESTORES is - non-null. Return the emitted insn. */ -static rtx_insn * -frame_emit_load (int regno, rtx addr, rtx *cfa_restores) -{ - rtx reg = gen_rtx_REG (Pmode, regno); - rtx mem = gen_frame_mem (Pmode, addr); - if (cfa_restores) - *cfa_restores = alloc_reg_note (REG_CFA_RESTORE, reg, *cfa_restores); - return emit_insn (gen_movsi (reg, mem)); -} - - -/* Helper function to set RTX_FRAME_RELATED_P on instructions, - including sequences. */ -static rtx_insn * -set_frame_related_p (void) -{ - rtx_insn *seq = get_insns (); - rtx_insn *insn; - - end_sequence (); - - if (!seq) - return NULL; - - if (INSN_P (seq)) - { - insn = seq; - while (insn != NULL_RTX) - { - RTX_FRAME_RELATED_P (insn) = 1; - insn = NEXT_INSN (insn); - } - seq = emit_insn (seq); - } - else - { - seq = emit_insn (seq); - RTX_FRAME_RELATED_P (seq) = 1; - } - return seq; -} - - -#define FRP(exp) (start_sequence (), exp, set_frame_related_p ()) - -/* This emits code for 'sp += offset'. - - The ABI only allows us to modify 'sp' in a single 'addi' or - 'addli', so the backtracer understands it. Larger amounts cannot - use those instructions, so are added by placing the offset into a - large register and using 'add'. - - This happens after reload, so we need to expand it ourselves. */ -static rtx_insn * -emit_sp_adjust (int offset, int *next_scratch_regno, bool frame_related, - rtx reg_notes) -{ - rtx to_add; - rtx imm_rtx = gen_int_si (offset); - - rtx_insn *insn; - if (satisfies_constraint_J (imm_rtx)) - { - /* We can add this using a single addi or addli. */ - to_add = imm_rtx; - } - else - { - rtx tmp = gen_rtx_REG (Pmode, (*next_scratch_regno)--); - tilepro_expand_set_const32 (tmp, imm_rtx); - to_add = tmp; - } - - /* Actually adjust the stack pointer. */ - insn = emit_insn (gen_sp_adjust (stack_pointer_rtx, stack_pointer_rtx, - to_add)); - REG_NOTES (insn) = reg_notes; - - /* Describe what just happened in a way that dwarf understands. */ - if (frame_related) - { - rtx real = gen_rtx_SET (stack_pointer_rtx, - gen_rtx_PLUS (Pmode, stack_pointer_rtx, - imm_rtx)); - RTX_FRAME_RELATED_P (insn) = 1; - add_reg_note (insn, REG_CFA_ADJUST_CFA, real); - } - - return insn; -} - - -/* Return whether the current function is leaf. This takes into - account whether the function calls tls_get_addr. */ -static bool -tilepro_current_function_is_leaf (void) -{ - return crtl->is_leaf && !cfun->machine->calls_tls_get_addr; -} - - -/* Return the frame size. */ -static int -compute_total_frame_size (void) -{ - int total_size = (get_frame_size () + tilepro_saved_regs_size () - + crtl->outgoing_args_size - + crtl->args.pretend_args_size); - - if (!tilepro_current_function_is_leaf () || cfun->calls_alloca) - { - /* Make room for save area in callee. */ - total_size += STACK_POINTER_OFFSET; - } - - return round_frame_size (total_size); -} - - -/* Return nonzero if this function is known to have a null epilogue. - This allows the optimizer to omit jumps to jumps if no stack was - created. */ -bool -tilepro_can_use_return_insn_p (void) -{ - return (reload_completed - && cfun->static_chain_decl == 0 - && compute_total_frame_size () == 0 - && tilepro_current_function_is_leaf () - && !crtl->profile && !df_regs_ever_live_p (TILEPRO_LINK_REGNUM)); -} - - -/* Returns an rtx for a stack slot at 'FP + offset_from_fp'. If there - is a frame pointer, it computes the value relative to - that. Otherwise it uses the stack pointer. */ -static rtx -compute_frame_addr (int offset_from_fp, int *next_scratch_regno) -{ - rtx base_reg_rtx, tmp_reg_rtx, offset_rtx; - int offset_from_base; - - if (frame_pointer_needed) - { - base_reg_rtx = hard_frame_pointer_rtx; - offset_from_base = offset_from_fp; - } - else - { - int offset_from_sp = compute_total_frame_size () + offset_from_fp; - base_reg_rtx = stack_pointer_rtx; - offset_from_base = offset_from_sp; - } - - if (offset_from_base == 0) - return base_reg_rtx; - - /* Compute the new value of the stack pointer. */ - tmp_reg_rtx = gen_rtx_REG (Pmode, (*next_scratch_regno)--); - offset_rtx = gen_int_si (offset_from_base); - - if (!tilepro_expand_addsi (tmp_reg_rtx, base_reg_rtx, offset_rtx)) - { - emit_insn (gen_rtx_SET (tmp_reg_rtx, - gen_rtx_PLUS (Pmode, base_reg_rtx, - offset_rtx))); - } - - return tmp_reg_rtx; -} - - -/* The stack frame looks like this: - +-------------+ - | ... | - | incoming | - | stack args | - AP -> +-------------+ - | caller's HFP| - +-------------+ - | lr save | - HFP -> +-------------+ - | var args | - | reg save | crtl->args.pretend_args_size bytes - +-------------+ - | ... | - | saved regs | tilepro_saved_regs_size() bytes - FP -> +-------------+ - | ... | - | vars | get_frame_size() bytes - +-------------+ - | ... | - | outgoing | - | stack args | crtl->outgoing_args_size bytes - +-------------+ - | HFP | 4 bytes (only here if nonleaf / alloca) - +-------------+ - | callee lr | 4 bytes (only here if nonleaf / alloca) - | save | - SP -> +-------------+ - - HFP == incoming SP. - - For functions with a frame larger than 32767 bytes, or which use - alloca (), r52 is used as a frame pointer. Otherwise there is no - frame pointer. - - FP is saved at SP+4 before calling a subroutine so the - callee can chain. */ -void -tilepro_expand_prologue (void) -{ -#define ROUND_ROBIN_SIZE 4 - /* We round-robin through four scratch registers to hold temporary - addresses for saving registers, to make instruction scheduling - easier. */ - rtx reg_save_addr[ROUND_ROBIN_SIZE] = { - NULL_RTX, NULL_RTX, NULL_RTX, NULL_RTX - }; - rtx insn, cfa; - unsigned int which_scratch; - int offset, start_offset, regno; - - /* A register that holds a copy of the incoming fp. */ - int fp_copy_regno = -1; - - /* A register that holds a copy of the incoming sp. */ - int sp_copy_regno = -1; - - /* Next scratch register number to hand out (postdecrementing). */ - int next_scratch_regno = 29; - - int total_size = compute_total_frame_size (); - - if (flag_stack_usage_info) - current_function_static_stack_size = total_size; - - /* Save lr first in its special location because code after this - might use the link register as a scratch register. */ - if (df_regs_ever_live_p (TILEPRO_LINK_REGNUM) || crtl->calls_eh_return) - { - FRP (frame_emit_store (TILEPRO_LINK_REGNUM, TILEPRO_LINK_REGNUM, - stack_pointer_rtx, stack_pointer_rtx, 0)); - emit_insn (gen_blockage ()); - } - - if (total_size == 0) - { - /* Load the PIC register if needed. */ - if (flag_pic && crtl->uses_pic_offset_table) - load_pic_register (false); - - return; - } - - cfa = stack_pointer_rtx; - - if (frame_pointer_needed) - { - fp_copy_regno = next_scratch_regno--; - - /* Copy the old frame pointer aside so we can save it later. */ - insn = FRP (emit_move_insn (gen_rtx_REG (word_mode, fp_copy_regno), - hard_frame_pointer_rtx)); - add_reg_note (insn, REG_CFA_REGISTER, NULL_RTX); - - /* Set up the frame pointer. */ - insn = FRP (emit_move_insn (hard_frame_pointer_rtx, stack_pointer_rtx)); - add_reg_note (insn, REG_CFA_DEF_CFA, hard_frame_pointer_rtx); - cfa = hard_frame_pointer_rtx; - REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = STACK_BOUNDARY; - - /* fp holds a copy of the incoming sp, in case we need to store - it. */ - sp_copy_regno = HARD_FRAME_POINTER_REGNUM; - } - else if (!tilepro_current_function_is_leaf ()) - { - /* Copy the old stack pointer aside so we can save it later. */ - sp_copy_regno = next_scratch_regno--; - emit_move_insn (gen_rtx_REG (Pmode, sp_copy_regno), - stack_pointer_rtx); - } - - if (tilepro_current_function_is_leaf ()) - { - /* No need to store chain pointer to caller's frame. */ - emit_sp_adjust (-total_size, &next_scratch_regno, - !frame_pointer_needed, NULL_RTX); - } - else - { - /* Save the frame pointer (incoming sp value) to support - backtracing. First we need to create an rtx with the store - address. */ - rtx chain_addr = gen_rtx_REG (Pmode, next_scratch_regno--); - rtx size_rtx = gen_int_si (-(total_size - UNITS_PER_WORD)); - - if (add_operand (size_rtx, Pmode)) - { - /* Expose more parallelism by computing this value from the - original stack pointer, not the one after we have pushed - the frame. */ - rtx p = gen_rtx_PLUS (Pmode, stack_pointer_rtx, size_rtx); - emit_insn (gen_rtx_SET (chain_addr, p)); - emit_sp_adjust (-total_size, &next_scratch_regno, - !frame_pointer_needed, NULL_RTX); - } - else - { - /* The stack frame is large, so just store the incoming sp - value at *(new_sp + UNITS_PER_WORD). */ - rtx p; - emit_sp_adjust (-total_size, &next_scratch_regno, - !frame_pointer_needed, NULL_RTX); - p = gen_rtx_PLUS (Pmode, stack_pointer_rtx, - GEN_INT (UNITS_PER_WORD)); - emit_insn (gen_rtx_SET (chain_addr, p)); - } - - /* Save our frame pointer for backtrace chaining. */ - emit_insn (gen_movsi (gen_frame_mem (SImode, chain_addr), - gen_rtx_REG (SImode, sp_copy_regno))); - } - - /* Compute where to start storing registers we need to save. */ - start_offset = -crtl->args.pretend_args_size - UNITS_PER_WORD; - offset = start_offset; - - /* Store all registers that need saving. */ - which_scratch = 0; - for (regno = FIRST_PSEUDO_REGISTER - 1; regno >= 0; regno--) - if (need_to_save_reg (regno)) - { - rtx r = reg_save_addr[which_scratch]; - int from_regno; - int cfa_offset = frame_pointer_needed ? offset : total_size + offset; - - if (r == NULL_RTX) - { - rtx p = compute_frame_addr (offset, &next_scratch_regno); - r = gen_rtx_REG (word_mode, next_scratch_regno--); - reg_save_addr[which_scratch] = r; - - emit_insn (gen_rtx_SET (r, p)); - } - else - { - /* Advance to the next stack slot to store this register. */ - int stride = ROUND_ROBIN_SIZE * -UNITS_PER_WORD; - rtx p = gen_rtx_PLUS (Pmode, r, GEN_INT (stride)); - emit_insn (gen_rtx_SET (r, p)); - } - - /* Save this register to the stack (but use the old fp value - we copied aside if appropriate). */ - from_regno = (fp_copy_regno >= 0 - && regno == - HARD_FRAME_POINTER_REGNUM) ? fp_copy_regno : regno; - FRP (frame_emit_store (from_regno, regno, r, cfa, cfa_offset)); - - offset -= UNITS_PER_WORD; - which_scratch = (which_scratch + 1) % ROUND_ROBIN_SIZE; - } - - /* If profiling, force that to happen after the frame is set up. */ - if (crtl->profile) - emit_insn (gen_blockage ()); - - /* Load the PIC register if needed. */ - if (flag_pic && crtl->uses_pic_offset_table) - load_pic_register (false); -} - - -/* Implement the epilogue and sibcall_epilogue patterns. SIBCALL_P is - true for a sibcall_epilogue pattern, and false for an epilogue - pattern. */ -void -tilepro_expand_epilogue (bool sibcall_p) -{ - /* We round-robin through four scratch registers to hold temporary - addresses for saving registers, to make instruction scheduling - easier. */ - rtx reg_save_addr[ROUND_ROBIN_SIZE] = { - NULL_RTX, NULL_RTX, NULL_RTX, NULL_RTX - }; - rtx_insn *last_insn, *insn; - unsigned int which_scratch; - int offset, start_offset, regno; - rtx cfa_restores = NULL_RTX; - - /* A register that holds a copy of the incoming fp. */ - int fp_copy_regno = -1; - - /* Next scratch register number to hand out (postdecrementing). */ - int next_scratch_regno = 29; - - int total_size = compute_total_frame_size (); - - last_insn = get_last_insn (); - - /* Load lr first since we are going to need it first. */ - insn = NULL; - if (df_regs_ever_live_p (TILEPRO_LINK_REGNUM)) - { - insn = frame_emit_load (TILEPRO_LINK_REGNUM, - compute_frame_addr (0, &next_scratch_regno), - &cfa_restores); - } - - if (total_size == 0) - { - if (insn) - { - RTX_FRAME_RELATED_P (insn) = 1; - REG_NOTES (insn) = cfa_restores; - } - goto done; - } - - /* Compute where to start restoring registers. */ - start_offset = -crtl->args.pretend_args_size - UNITS_PER_WORD; - offset = start_offset; - - if (frame_pointer_needed) - fp_copy_regno = next_scratch_regno--; - - /* Restore all callee-saved registers. */ - which_scratch = 0; - for (regno = FIRST_PSEUDO_REGISTER - 1; regno >= 0; regno--) - if (need_to_save_reg (regno)) - { - rtx r = reg_save_addr[which_scratch]; - if (r == NULL_RTX) - { - r = compute_frame_addr (offset, &next_scratch_regno); - reg_save_addr[which_scratch] = r; - } - else - { - /* Advance to the next stack slot to store this - register. */ - int stride = ROUND_ROBIN_SIZE * -UNITS_PER_WORD; - rtx p = gen_rtx_PLUS (Pmode, r, GEN_INT (stride)); - emit_insn (gen_rtx_SET (r, p)); - } - - if (fp_copy_regno >= 0 && regno == HARD_FRAME_POINTER_REGNUM) - frame_emit_load (fp_copy_regno, r, NULL); - else - frame_emit_load (regno, r, &cfa_restores); - - offset -= UNITS_PER_WORD; - which_scratch = (which_scratch + 1) % ROUND_ROBIN_SIZE; - } - - if (!tilepro_current_function_is_leaf ()) - cfa_restores = - alloc_reg_note (REG_CFA_RESTORE, stack_pointer_rtx, cfa_restores); - - emit_insn (gen_blockage ()); - - if (frame_pointer_needed) - { - /* Restore the old stack pointer by copying from the frame - pointer. */ - insn = emit_insn (gen_sp_restore (stack_pointer_rtx, - hard_frame_pointer_rtx)); - RTX_FRAME_RELATED_P (insn) = 1; - REG_NOTES (insn) = cfa_restores; - add_reg_note (insn, REG_CFA_DEF_CFA, stack_pointer_rtx); - } - else - { - insn = emit_sp_adjust (total_size, &next_scratch_regno, true, - cfa_restores); - } - - if (crtl->calls_eh_return) - emit_insn (gen_sp_adjust (stack_pointer_rtx, stack_pointer_rtx, - EH_RETURN_STACKADJ_RTX)); - - /* Restore the old frame pointer. */ - if (frame_pointer_needed) - { - insn = emit_move_insn (hard_frame_pointer_rtx, - gen_rtx_REG (Pmode, fp_copy_regno)); - add_reg_note (insn, REG_CFA_RESTORE, hard_frame_pointer_rtx); - } - - /* Mark the pic registers as live outside of the function. */ - if (flag_pic) - { - emit_use (cfun->machine->text_label_rtx); - emit_use (cfun->machine->got_rtx); - } - -done: - if (!sibcall_p) - { - /* Emit the actual 'return' instruction. */ - emit_jump_insn (gen__return ()); - } - else - { - emit_use (gen_rtx_REG (Pmode, TILEPRO_LINK_REGNUM)); - } - - /* Mark all insns we just emitted as frame-related. */ - for (; last_insn != NULL_RTX; last_insn = next_insn (last_insn)) - RTX_FRAME_RELATED_P (last_insn) = 1; -} - -#undef ROUND_ROBIN_SIZE - - -/* Implement INITIAL_ELIMINATION_OFFSET. */ -int -tilepro_initial_elimination_offset (int from, int to) -{ - int total_size = compute_total_frame_size (); - - if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) - { - return (total_size - crtl->args.pretend_args_size - - tilepro_saved_regs_size ()); - } - else if (from == FRAME_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) - { - return -(crtl->args.pretend_args_size + tilepro_saved_regs_size ()); - } - else if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) - { - return STACK_POINTER_OFFSET + total_size; - } - else if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) - { - return STACK_POINTER_OFFSET; - } - else - gcc_unreachable (); -} - - -/* Return an RTX indicating where the return address to the - calling function can be found. */ -rtx -tilepro_return_addr (int count, rtx frame ATTRIBUTE_UNUSED) -{ - if (count != 0) - return const0_rtx; - - return get_hard_reg_initial_val (Pmode, TILEPRO_LINK_REGNUM); -} - - -/* Implement EH_RETURN_HANDLER_RTX. */ -rtx -tilepro_eh_return_handler_rtx (void) -{ - /* The MEM needs to be volatile to prevent it from being - deleted. */ - rtx tmp = gen_frame_mem (Pmode, hard_frame_pointer_rtx); - MEM_VOLATILE_P (tmp) = true; - return tmp; -} - - - -/* Registers */ - -/* Implemnet TARGET_CONDITIONAL_REGISTER_USAGE. */ -static void -tilepro_conditional_register_usage (void) -{ - global_regs[TILEPRO_NETORDER_REGNUM] = 1; - /* TILEPRO_PIC_TEXT_LABEL_REGNUM is conditionally used. */ - if (TILEPRO_PIC_TEXT_LABEL_REGNUM != INVALID_REGNUM) - fixed_regs[TILEPRO_PIC_TEXT_LABEL_REGNUM] = 1; - if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) - fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; -} - - -/* Implement TARGET_FRAME_POINTER_REQUIRED. */ -static bool -tilepro_frame_pointer_required (void) -{ - return crtl->calls_eh_return || cfun->calls_alloca; -} - - - -/* Scheduling and reorg */ - -/* Return the length of INSN. LENGTH is the initial length computed - by attributes in the machine-description file. This is where we - account for bundles. */ -int -tilepro_adjust_insn_length (rtx_insn *insn, int length) -{ - machine_mode mode = GET_MODE (insn); - - /* A non-termininating instruction in a bundle has length 0. */ - if (mode == SImode) - return 0; - - /* By default, there is not length adjustment. */ - return length; -} - - -/* Implement TARGET_SCHED_ISSUE_RATE. */ -static int -tilepro_issue_rate (void) -{ - return 3; -} - - -/* Return the rtx for the jump target. */ -static rtx -get_jump_target (rtx branch) -{ - if (CALL_P (branch)) - { - rtx call; - call = PATTERN (branch); - - if (GET_CODE (call) == PARALLEL) - call = XVECEXP (call, 0, 0); - - if (GET_CODE (call) == SET) - call = SET_SRC (call); - - if (GET_CODE (call) == CALL) - return XEXP (XEXP (call, 0), 0); - } - return 0; -} - -/* Implement TARGET_SCHED_ADJUST_COST. */ -static int -tilepro_sched_adjust_cost (rtx_insn *insn, int dep_type, rtx_insn *dep_insn, - int cost, unsigned int) -{ - /* If we have a true dependence, INSN is a call, and DEP_INSN - defines a register that is needed by the call (argument or stack - pointer), set its latency to 0 so that it can be bundled with - the call. Explicitly check for and exclude the case when - DEP_INSN defines the target of the jump. */ - if (CALL_P (insn) && dep_type == REG_DEP_TRUE) - { - rtx target = get_jump_target (insn); - if (!REG_P (target) || !set_of (target, dep_insn)) - return 0; - } - - return cost; -} - - -/* Skip over irrelevant NOTEs and such and look for the next insn we - would consider bundling. */ -static rtx_insn * -next_insn_to_bundle (rtx_insn *r, rtx_insn *end) -{ - for (; r != end; r = NEXT_INSN (r)) - { - if (NONDEBUG_INSN_P (r) - && GET_CODE (PATTERN (r)) != USE - && GET_CODE (PATTERN (r)) != CLOBBER) - return r; - } - - return NULL; -} - - -/* Go through all insns, and use the information generated during - scheduling to generate SEQUENCEs to represent bundles of - instructions issued simultaneously. */ -static void -tilepro_gen_bundles (void) -{ - basic_block bb; - FOR_EACH_BB_FN (bb, cfun) - { - rtx_insn *insn, *next; - rtx_insn *end = NEXT_INSN (BB_END (bb)); - - for (insn = next_insn_to_bundle (BB_HEAD (bb), end); insn; insn = next) - { - next = next_insn_to_bundle (NEXT_INSN (insn), end); - - /* Never wrap {} around inline asm. */ - if (GET_CODE (PATTERN (insn)) != ASM_INPUT) - { - if (next == NULL_RTX || GET_MODE (next) == TImode - /* NOTE: The scheduler incorrectly believes a call - insn can execute in the same cycle as the insn - after the call. This is of course impossible. - Really we need to fix the scheduler somehow, so - the code after the call gets scheduled - optimally. */ - || CALL_P (insn)) - { - /* Mark current insn as the end of a bundle. */ - PUT_MODE (insn, QImode); - } - else - { - /* Mark it as part of a bundle. */ - PUT_MODE (insn, SImode); - } - } - } - } -} - - -/* Helper function for tilepro_fixup_pcrel_references. */ -static void -replace_pc_relative_symbol_ref (rtx_insn *insn, rtx opnds[4], bool first_insn_p) -{ - rtx_insn *new_insns; - - start_sequence (); - - if (flag_pic == 1) - { - if (!first_insn_p) - { - emit_insn (gen_add_got16 (opnds[0], tilepro_got_rtx (), - opnds[2])); - emit_insn (gen_insn_lw (opnds[0], opnds[0])); - } - } - else - { - if (first_insn_p) - { - emit_insn (gen_addhi_got32 (opnds[0], tilepro_got_rtx (), - opnds[2])); - } - else - { - emit_insn (gen_addlo_got32 (opnds[0], opnds[1], opnds[2])); - emit_insn (gen_insn_lw (opnds[0], opnds[0])); - } - } - - new_insns = get_insns (); - end_sequence (); - - if (new_insns) - emit_insn_before (new_insns, insn); - - delete_insn (insn); -} - - -/* Returns whether INSN is a pc-relative addli insn. */ -static bool -match_addli_pcrel (rtx_insn *insn) -{ - rtx pattern = PATTERN (insn); - rtx unspec; - - if (GET_CODE (pattern) != SET) - return false; - - if (GET_CODE (SET_SRC (pattern)) != LO_SUM) - return false; - - if (GET_CODE (XEXP (SET_SRC (pattern), 1)) != CONST) - return false; - - unspec = XEXP (XEXP (SET_SRC (pattern), 1), 0); - - return (GET_CODE (unspec) == UNSPEC - && XINT (unspec, 1) == UNSPEC_PCREL_SYM); -} - - -/* Helper function for tilepro_fixup_pcrel_references. */ -static void -replace_addli_pcrel (rtx_insn *insn) -{ - rtx pattern = PATTERN (insn); - rtx set_src; - rtx unspec; - rtx opnds[4]; - bool first_insn_p; - - gcc_assert (GET_CODE (pattern) == SET); - opnds[0] = SET_DEST (pattern); - - set_src = SET_SRC (pattern); - gcc_assert (GET_CODE (set_src) == LO_SUM); - gcc_assert (GET_CODE (XEXP (set_src, 1)) == CONST); - opnds[1] = XEXP (set_src, 0); - - unspec = XEXP (XEXP (set_src, 1), 0); - gcc_assert (GET_CODE (unspec) == UNSPEC); - gcc_assert (XINT (unspec, 1) == UNSPEC_PCREL_SYM); - opnds[2] = XVECEXP (unspec, 0, 0); - opnds[3] = XVECEXP (unspec, 0, 1); - - /* We only need to replace SYMBOL_REFs, not LABEL_REFs. */ - if (GET_CODE (opnds[2]) != SYMBOL_REF) - return; - - first_insn_p = (opnds[1] == tilepro_text_label_rtx ()); - - replace_pc_relative_symbol_ref (insn, opnds, first_insn_p); -} - - -/* Returns whether INSN is a pc-relative auli insn. */ -static bool -match_auli_pcrel (rtx_insn *insn) -{ - rtx pattern = PATTERN (insn); - rtx high; - rtx unspec; - - if (GET_CODE (pattern) != SET) - return false; - - if (GET_CODE (SET_SRC (pattern)) != PLUS) - return false; - - high = XEXP (SET_SRC (pattern), 1); - - if (GET_CODE (high) != HIGH - || GET_CODE (XEXP (high, 0)) != CONST) - return false; - - unspec = XEXP (XEXP (high, 0), 0); - - return (GET_CODE (unspec) == UNSPEC - && XINT (unspec, 1) == UNSPEC_PCREL_SYM); -} - - -/* Helper function for tilepro_fixup_pcrel_references. */ -static void -replace_auli_pcrel (rtx_insn *insn) -{ - rtx pattern = PATTERN (insn); - rtx set_src; - rtx high; - rtx unspec; - rtx opnds[4]; - bool first_insn_p; - - gcc_assert (GET_CODE (pattern) == SET); - opnds[0] = SET_DEST (pattern); - - set_src = SET_SRC (pattern); - gcc_assert (GET_CODE (set_src) == PLUS); - opnds[1] = XEXP (set_src, 0); - - high = XEXP (set_src, 1); - gcc_assert (GET_CODE (high) == HIGH); - gcc_assert (GET_CODE (XEXP (high, 0)) == CONST); - - unspec = XEXP (XEXP (high, 0), 0); - gcc_assert (GET_CODE (unspec) == UNSPEC); - gcc_assert (XINT (unspec, 1) == UNSPEC_PCREL_SYM); - opnds[2] = XVECEXP (unspec, 0, 0); - opnds[3] = XVECEXP (unspec, 0, 1); - - /* We only need to replace SYMBOL_REFs, not LABEL_REFs. */ - if (GET_CODE (opnds[2]) != SYMBOL_REF) - return; - - first_insn_p = (opnds[1] == tilepro_text_label_rtx ()); - - replace_pc_relative_symbol_ref (insn, opnds, first_insn_p); -} - - -/* We generate PC relative SYMBOL_REFs as an optimization, to avoid - going through the GOT when the symbol is local to the compilation - unit. But such a symbol requires that the common text_label that - we generate at the beginning of the function be in the same section - as the reference to the SYMBOL_REF. This may not be true if we - generate hot/cold sections. This function looks for such cases and - replaces such references with the longer sequence going through the - GOT. - - We expect one of the following two instruction sequences: - addli tmp1, txt_label_reg, lo16(sym - txt_label) - auli tmp2, tmp1, ha16(sym - txt_label) - - auli tmp1, txt_label_reg, ha16(sym - txt_label) - addli tmp2, tmp1, lo16(sym - txt_label) - - If we're compiling -fpic, we replace the first instruction with - nothing, and the second instruction with: - - addli tmp2, got_rtx, got(sym) - lw tmp2, tmp2 - - If we're compiling -fPIC, we replace the first instruction with: - - auli tmp1, got_rtx, got_ha16(sym) - - and the second instruction with: - - addli tmp2, tmp1, got_lo16(sym) - lw tmp2, tmp2 - - Note that we're careful to disturb the instruction sequence as - little as possible, since it's very late in the compilation - process. -*/ -static void -tilepro_fixup_pcrel_references (void) -{ - rtx_insn *insn, *next_insn; - bool same_section_as_entry = true; - - for (insn = get_insns (); insn; insn = next_insn) - { - next_insn = NEXT_INSN (insn); - - if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_SWITCH_TEXT_SECTIONS) - { - same_section_as_entry = !same_section_as_entry; - continue; - } - - if (same_section_as_entry) - continue; - - if (!(INSN_P (insn) - && GET_CODE (PATTERN (insn)) != USE - && GET_CODE (PATTERN (insn)) != CLOBBER)) - continue; - - if (match_addli_pcrel (insn)) - replace_addli_pcrel (insn); - else if (match_auli_pcrel (insn)) - replace_auli_pcrel (insn); - } -} - - -/* Ensure that no var tracking notes are emitted in the middle of a - three-instruction bundle. */ -static void -reorder_var_tracking_notes (void) -{ - basic_block bb; - FOR_EACH_BB_FN (bb, cfun) - { - rtx_insn *insn, *next; - rtx_insn *queue = NULL; - bool in_bundle = false; - - for (insn = BB_HEAD (bb); insn != BB_END (bb); insn = next) - { - next = NEXT_INSN (insn); - - if (INSN_P (insn)) - { - /* Emit queued up notes at the last instruction of a bundle. */ - if (GET_MODE (insn) == QImode) - { - while (queue) - { - rtx_insn *next_queue = PREV_INSN (queue); - SET_PREV_INSN (NEXT_INSN (insn)) = queue; - SET_NEXT_INSN (queue) = NEXT_INSN (insn); - SET_NEXT_INSN (insn) = queue; - SET_PREV_INSN (queue) = insn; - queue = next_queue; - } - in_bundle = false; - } - else if (GET_MODE (insn) == SImode) - in_bundle = true; - } - else if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_VAR_LOCATION) - { - if (in_bundle) - { - rtx_insn *prev = PREV_INSN (insn); - SET_PREV_INSN (next) = prev; - SET_NEXT_INSN (prev) = next; - - SET_PREV_INSN (insn) = queue; - queue = insn; - } - } - } - } -} - - -/* Perform machine dependent operations on the rtl chain INSNS. */ -static void -tilepro_reorg (void) -{ - /* We are freeing block_for_insn in the toplev to keep compatibility - with old MDEP_REORGS that are not CFG based. Recompute it - now. */ - compute_bb_for_insn (); - - if (flag_reorder_blocks_and_partition) - { - tilepro_fixup_pcrel_references (); - } - - if (flag_schedule_insns_after_reload) - { - split_all_insns (); - - timevar_push (TV_SCHED2); - schedule_insns (); - timevar_pop (TV_SCHED2); - - /* Examine the schedule to group into bundles. */ - tilepro_gen_bundles (); - } - - df_analyze (); - - if (flag_var_tracking) - { - timevar_push (TV_VAR_TRACKING); - variable_tracking_main (); - reorder_var_tracking_notes (); - timevar_pop (TV_VAR_TRACKING); - } - - df_finish_pass (false); -} - - - -/* Assembly */ - -/* Select a format to encode pointers in exception handling data. - CODE is 0 for data, 1 for code labels, 2 for function pointers. - GLOBAL is true if the symbol may be affected by dynamic - relocations. */ -int -tilepro_asm_preferred_eh_data_format (int code ATTRIBUTE_UNUSED, int global) -{ - return (global ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4; -} - - -/* Implement TARGET_ASM_OUTPUT_MI_THUNK. */ -static void -tilepro_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, - HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset, - tree function) -{ - const char *fnname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (thunk_fndecl)); - rtx this_rtx, funexp; - rtx_insn *insn; - - /* Pretend to be a post-reload pass while generating rtl. */ - reload_completed = 1; - - /* Mark the end of the (empty) prologue. */ - emit_note (NOTE_INSN_PROLOGUE_END); - - /* Find the "this" pointer. If the function returns a structure, - the structure return pointer is in $1. */ - if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function)) - this_rtx = gen_rtx_REG (Pmode, 1); - else - this_rtx = gen_rtx_REG (Pmode, 0); - - /* Add DELTA to THIS_RTX. */ - emit_insn (gen_addsi3 (this_rtx, this_rtx, GEN_INT (delta))); - - /* If needed, add *(*THIS_RTX + VCALL_OFFSET) to THIS_RTX. */ - if (vcall_offset) - { - rtx tmp; - - tmp = gen_rtx_REG (Pmode, 29); - emit_move_insn (tmp, gen_rtx_MEM (Pmode, this_rtx)); - - emit_insn (gen_addsi3 (tmp, tmp, GEN_INT (vcall_offset))); - - emit_move_insn (tmp, gen_rtx_MEM (Pmode, tmp)); - - emit_insn (gen_addsi3 (this_rtx, this_rtx, tmp)); - } - - /* Generate a tail call to the target function. */ - if (!TREE_USED (function)) - { - assemble_external (function); - TREE_USED (function) = 1; - } - funexp = XEXP (DECL_RTL (function), 0); - funexp = gen_rtx_MEM (FUNCTION_MODE, funexp); - insn = emit_call_insn (gen_sibcall (funexp, const0_rtx)); - SIBLING_CALL_P (insn) = 1; - - /* Run just enough of rest_of_compilation to get the insns emitted. - There's not really enough bulk here to make other passes such as - instruction scheduling worth while. - - We don't currently bundle, but the instruciton sequence is all - serial except for the tail call, so we're only wasting one cycle. - */ - insn = get_insns (); - shorten_branches (insn); - assemble_start_function (thunk_fndecl, fnname); - final_start_function (insn, file, 1); - final (insn, file, 1); - final_end_function (); - assemble_end_function (thunk_fndecl, fnname); - - /* Stop pretending to be a post-reload pass. */ - reload_completed = 0; -} - - -/* Implement TARGET_ASM_TRAMPOLINE_TEMPLATE. */ -static void -tilepro_asm_trampoline_template (FILE *file) -{ - fprintf (file, "\tlnk r10\n"); - fprintf (file, "\taddi r10, r10, 32\n"); - fprintf (file, "\tlwadd r11, r10, %d\n", GET_MODE_SIZE (ptr_mode)); - fprintf (file, "\tlw r10, r10\n"); - fprintf (file, "\tjr r11\n"); - fprintf (file, "\t.word 0 # \n"); - fprintf (file, "\t.word 0 # \n"); -} - - -/* Implement TARGET_TRAMPOLINE_INIT. */ -static void -tilepro_trampoline_init (rtx m_tramp, tree fndecl, rtx static_chain) -{ - rtx fnaddr, chaddr; - rtx mem; - rtx begin_addr, end_addr; - int ptr_mode_size = GET_MODE_SIZE (ptr_mode); - - fnaddr = copy_to_reg (XEXP (DECL_RTL (fndecl), 0)); - chaddr = copy_to_reg (static_chain); - - emit_block_move (m_tramp, assemble_trampoline_template (), - GEN_INT (TRAMPOLINE_SIZE), BLOCK_OP_NORMAL); - - mem = adjust_address (m_tramp, ptr_mode, - TRAMPOLINE_SIZE - 2 * ptr_mode_size); - emit_move_insn (mem, fnaddr); - mem = adjust_address (m_tramp, ptr_mode, - TRAMPOLINE_SIZE - ptr_mode_size); - emit_move_insn (mem, chaddr); - - /* Get pointers to the beginning and end of the code block. */ - begin_addr = force_reg (Pmode, XEXP (m_tramp, 0)); - end_addr = force_reg (Pmode, plus_constant (Pmode, XEXP (m_tramp, 0), - TRAMPOLINE_SIZE)); - - maybe_emit_call_builtin___clear_cache (begin_addr, end_addr); -} - - -/* Implement TARGET_PRINT_OPERAND. */ -static void -tilepro_print_operand (FILE *file, rtx x, int code) -{ - switch (code) - { - case 'c': - /* Print the compare operator opcode for conditional moves. */ - switch (GET_CODE (x)) - { - case EQ: - fputs ("z", file); - break; - case NE: - fputs ("nz", file); - break; - default: - output_operand_lossage ("invalid %%c operand"); - } - return; - - case 'C': - /* Print the compare operator opcode for conditional moves. */ - switch (GET_CODE (x)) - { - case EQ: - fputs ("nz", file); - break; - case NE: - fputs ("z", file); - break; - default: - output_operand_lossage ("invalid %%C operand"); - } - return; - - case 'h': - { - /* Print the high 16 bits of a 32-bit constant. */ - HOST_WIDE_INT i; - if (CONST_INT_P (x)) - i = INTVAL (x); - else if (GET_CODE (x) == CONST_DOUBLE) - i = CONST_DOUBLE_LOW (x); - else - { - output_operand_lossage ("invalid %%h operand"); - return; - } - i = trunc_int_for_mode (i >> 16, HImode); - fprintf (file, HOST_WIDE_INT_PRINT_DEC, i); - return; - } - - case 'H': - { - rtx addr = NULL; - const char *opstr = NULL; - bool pcrel = false; - if (GET_CODE (x) == CONST - && GET_CODE (XEXP (x, 0)) == UNSPEC) - { - addr = XVECEXP (XEXP (x, 0), 0, 0); - switch (XINT (XEXP (x, 0), 1)) - { - case UNSPEC_GOT32_SYM: - opstr = "got_ha16"; - break; - case UNSPEC_PCREL_SYM: - opstr = "ha16"; - pcrel = true; - break; - case UNSPEC_TLS_GD: - opstr = "tls_gd_ha16"; - break; - case UNSPEC_TLS_IE: - opstr = "tls_ie_ha16"; - break; - case UNSPEC_TLS_LE: - opstr = "tls_le_ha16"; - break; - default: - output_operand_lossage ("invalid %%H operand"); - } - } - else - { - addr = x; - opstr = "ha16"; - } - - fputs (opstr, file); - fputc ('(', file); - output_addr_const (file, addr); - - if (pcrel) - { - rtx addr2 = XVECEXP (XEXP (x, 0), 0, 1); - fputs (" - " , file); - output_addr_const (file, addr2); - } - - fputc (')', file); - return; - } - - case 'I': - /* Print an auto-inc memory operand. */ - if (!MEM_P (x)) - { - output_operand_lossage ("invalid %%I operand"); - return; - } - - output_memory_autoinc_first = true; - output_address (GET_MODE (x), XEXP (x, 0)); - return; - - case 'i': - /* Print an auto-inc memory operand. */ - if (!MEM_P (x)) - { - output_operand_lossage ("invalid %%i operand"); - return; - } - - output_memory_autoinc_first = false; - output_address (GET_MODE (x), XEXP (x, 0)); - return; - - case 'j': - { - /* Print the low 8 bits of a constant. */ - HOST_WIDE_INT i; - if (CONST_INT_P (x)) - i = INTVAL (x); - else if (GET_CODE (x) == CONST_DOUBLE) - i = CONST_DOUBLE_LOW (x); - else if (GET_CODE (x) == CONST_VECTOR - && CONST_INT_P (CONST_VECTOR_ELT (x, 0))) - i = INTVAL (CONST_VECTOR_ELT (x, 0)); - else - { - output_operand_lossage ("invalid %%j operand"); - return; - } - i = trunc_int_for_mode (i, QImode); - fprintf (file, HOST_WIDE_INT_PRINT_DEC, i); - return; - } - - case 'L': - { - rtx addr = NULL; - const char *opstr = NULL; - bool pcrel = false; - if (GET_CODE (x) == CONST - && GET_CODE (XEXP (x, 0)) == UNSPEC) - { - addr = XVECEXP (XEXP (x, 0), 0, 0); - switch (XINT (XEXP (x, 0), 1)) - { - case UNSPEC_GOT16_SYM: - opstr = "got"; - break; - case UNSPEC_GOT32_SYM: - opstr = "got_lo16"; - break; - case UNSPEC_PCREL_SYM: - opstr = "lo16"; - pcrel = true; - break; - case UNSPEC_TLS_GD: - opstr = "tls_gd_lo16"; - break; - case UNSPEC_TLS_IE: - opstr = "tls_ie_lo16"; - break; - case UNSPEC_TLS_LE: - opstr = "tls_le_lo16"; - break; - default: - output_operand_lossage ("invalid %%L operand"); - } - } - else - { - addr = x; - opstr = "lo16"; - } - - fputs (opstr, file); - fputc ('(', file); - output_addr_const (file, addr); - - if (pcrel) - { - rtx addr2 = XVECEXP (XEXP (x, 0), 0, 1); - fputs (" - " , file); - output_addr_const (file, addr2); - } - - fputc (')', file); - return; - } - - case 'p': - if (GET_CODE (x) == SYMBOL_REF) - { - if (flag_pic && !SYMBOL_REF_LOCAL_P (x)) - fprintf (file, "plt("); - output_addr_const (file, x); - if (flag_pic && !SYMBOL_REF_LOCAL_P (x)) - fprintf (file, ")"); - } - else - output_addr_const (file, x); - return; - - case 'P': - { - /* Print a 32-bit constant plus one. */ - HOST_WIDE_INT i; - if (!CONST_INT_P (x)) - { - output_operand_lossage ("invalid %%P operand"); - return; - } - i = trunc_int_for_mode (INTVAL (x) + 1, SImode); - fprintf (file, HOST_WIDE_INT_PRINT_DEC, i); - return; - } - - case 'M': - { - /* Print an mm-style bit range. */ - int first_bit, last_bit; - - if (!CONST_INT_P (x) - || !tilepro_bitfield_operand_p (INTVAL (x), &first_bit, - &last_bit)) - { - output_operand_lossage ("invalid %%M operand"); - return; - } - - fprintf (file, "%d, %d", first_bit, last_bit); - return; - } - - case 'N': - { - const char *reg = NULL; - - /* Print a network register. */ - if (!CONST_INT_P (x)) - { - output_operand_lossage ("invalid %%N operand"); - return; - } - - switch (INTVAL (x)) - { - case TILEPRO_NETREG_IDN0: reg = "idn0"; break; - case TILEPRO_NETREG_IDN1: reg = "idn1"; break; - case TILEPRO_NETREG_SN: reg = "sn"; break; - case TILEPRO_NETREG_UDN0: reg = "udn0"; break; - case TILEPRO_NETREG_UDN1: reg = "udn1"; break; - case TILEPRO_NETREG_UDN2: reg = "udn2"; break; - case TILEPRO_NETREG_UDN3: reg = "udn3"; break; - default: gcc_unreachable (); - } - - fprintf (file, reg); - return; - } - - case 't': - { - /* Log base 2 of a power of two. */ - HOST_WIDE_INT i; - HOST_WIDE_INT n; - - if (!CONST_INT_P (x)) - { - output_operand_lossage ("invalid %%t operand"); - return; - } - n = trunc_int_for_mode (INTVAL (x), SImode); - i = exact_log2 (n); - if (i < 0) - { - output_operand_lossage ("invalid %%t operand"); - return; - } - - fprintf (file, HOST_WIDE_INT_PRINT_DEC, i); - return; - } - break; - - case 'r': - /* In this case we need a register. Use 'zero' if the - operand is const0_rtx. */ - if (x == const0_rtx - || (GET_MODE (x) != VOIDmode && x == CONST0_RTX (GET_MODE (x)))) - { - fputs ("zero", file); - return; - } - else if (!REG_P (x)) - { - output_operand_lossage ("invalid %%r operand"); - return; - } - /* FALLTHRU */ - - case 0: - if (REG_P (x)) - { - fprintf (file, "%s", reg_names[REGNO (x)]); - return; - } - else if (MEM_P (x)) - { - output_address (VOIDmode, XEXP (x, 0)); - return; - } - else - { - output_addr_const (file, x); - return; - } - break; - } - - debug_rtx (x); - output_operand_lossage ("unable to print out operand yet; code == %d (%c)", - code, code); -} - - -/* Implement TARGET_PRINT_OPERAND_ADDRESS. */ -static void -tilepro_print_operand_address (FILE *file, machine_mode mode, rtx addr) -{ - if (GET_CODE (addr) == POST_DEC - || GET_CODE (addr) == POST_INC) - { - int offset = GET_MODE_SIZE (mode); - - gcc_assert (mode != VOIDmode); - - if (output_memory_autoinc_first) - fprintf (file, "%s", reg_names[REGNO (XEXP (addr, 0))]); - else - fprintf (file, "%d", - GET_CODE (addr) == POST_DEC ? -offset : offset); - } - else if (GET_CODE (addr) == POST_MODIFY) - { - gcc_assert (mode != VOIDmode); - - gcc_assert (GET_CODE (XEXP (addr, 1)) == PLUS); - - if (output_memory_autoinc_first) - fprintf (file, "%s", reg_names[REGNO (XEXP (addr, 0))]); - else - fprintf (file, HOST_WIDE_INT_PRINT_DEC, - INTVAL (XEXP (XEXP (addr, 1), 1))); - } - else - tilepro_print_operand (file, addr, 'r'); -} - - -/* Machine mode of current insn, for determining curly brace - placement. */ -static machine_mode insn_mode; - - -/* Implement FINAL_PRESCAN_INSN. This is used to emit bundles. */ -void -tilepro_final_prescan_insn (rtx_insn *insn) -{ - /* Record this for tilepro_asm_output_opcode to examine. */ - insn_mode = GET_MODE (insn); -} - - -/* While emitting asm, are we currently inside '{' for a bundle? */ -static bool tilepro_in_bundle = false; - -/* Implement ASM_OUTPUT_OPCODE. Prepend/append curly braces as - appropriate given the bundling information recorded by - tilepro_gen_bundles. */ -const char * -tilepro_asm_output_opcode (FILE *stream, const char *code) -{ - bool pseudo = !strcmp (code, "pseudo"); - - if (!tilepro_in_bundle && insn_mode == SImode) - { - /* Start a new bundle. */ - fprintf (stream, "{\n\t"); - tilepro_in_bundle = true; - } - - if (tilepro_in_bundle && insn_mode == QImode) - { - /* Close an existing bundle. */ - static char buf[100]; - - gcc_assert (strlen (code) + 3 + 1 < sizeof (buf)); - - strcpy (buf, pseudo ? "" : code); - strcat (buf, "\n\t}"); - tilepro_in_bundle = false; - - return buf; - } - else - { - return pseudo ? "" : code; - } -} - - -/* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ -void -tilepro_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED) -{ - if (tilepro_in_bundle) - { - fprintf (file, "\t}\n"); - } - - if (flag_pic) - { - fprintf (file, - "\t{\n" - "\tmove\tr10, lr\n" - "\tjal\tplt(%s)\n" - "\t}\n", MCOUNT_NAME); - } - else - { - fprintf (file, - "\t{\n" - "\tmove\tr10, lr\n" - "\tjal\t%s\n" - "\t}\n", MCOUNT_NAME); - } - - tilepro_in_bundle = false; -} - - -/* Implement TARGET_ASM_FILE_END. */ -static void -tilepro_file_end (void) -{ - if (NEED_INDICATE_EXEC_STACK) - file_end_indicate_exec_stack (); -} - - -#undef TARGET_HAVE_TLS -#define TARGET_HAVE_TLS HAVE_AS_TLS - -#undef TARGET_OPTION_OVERRIDE -#define TARGET_OPTION_OVERRIDE tilepro_option_override - -#ifdef TARGET_THREAD_SSP_OFFSET -#undef TARGET_STACK_PROTECT_GUARD -#define TARGET_STACK_PROTECT_GUARD hook_tree_void_null -#endif - -#undef TARGET_SCALAR_MODE_SUPPORTED_P -#define TARGET_SCALAR_MODE_SUPPORTED_P tilepro_scalar_mode_supported_p - -#undef TARGET_VECTOR_MODE_SUPPORTED_P -#define TARGET_VECTOR_MODE_SUPPORTED_P tile_vector_mode_supported_p - -#undef TARGET_CANNOT_FORCE_CONST_MEM -#define TARGET_CANNOT_FORCE_CONST_MEM tilepro_cannot_force_const_mem - -#undef TARGET_FUNCTION_OK_FOR_SIBCALL -#define TARGET_FUNCTION_OK_FOR_SIBCALL tilepro_function_ok_for_sibcall - -#undef TARGET_PASS_BY_REFERENCE -#define TARGET_PASS_BY_REFERENCE tilepro_pass_by_reference - -#undef TARGET_RETURN_IN_MEMORY -#define TARGET_RETURN_IN_MEMORY tilepro_return_in_memory - -#undef TARGET_FUNCTION_ARG_BOUNDARY -#define TARGET_FUNCTION_ARG_BOUNDARY tilepro_function_arg_boundary - -#undef TARGET_FUNCTION_ARG -#define TARGET_FUNCTION_ARG tilepro_function_arg - -#undef TARGET_FUNCTION_ARG_ADVANCE -#define TARGET_FUNCTION_ARG_ADVANCE tilepro_function_arg_advance - -#undef TARGET_FUNCTION_VALUE -#define TARGET_FUNCTION_VALUE tilepro_function_value - -#undef TARGET_LIBCALL_VALUE -#define TARGET_LIBCALL_VALUE tilepro_libcall_value - -#undef TARGET_FUNCTION_VALUE_REGNO_P -#define TARGET_FUNCTION_VALUE_REGNO_P tilepro_function_value_regno_p - -#undef TARGET_PROMOTE_FUNCTION_MODE -#define TARGET_PROMOTE_FUNCTION_MODE \ - default_promote_function_mode_always_promote - -#undef TARGET_PROMOTE_PROTOTYPES -#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_false - -#undef TARGET_BUILD_BUILTIN_VA_LIST -#define TARGET_BUILD_BUILTIN_VA_LIST tilepro_build_builtin_va_list - -#undef TARGET_EXPAND_BUILTIN_VA_START -#define TARGET_EXPAND_BUILTIN_VA_START tilepro_va_start - -#undef TARGET_SETUP_INCOMING_VARARGS -#define TARGET_SETUP_INCOMING_VARARGS tilepro_setup_incoming_varargs - -#undef TARGET_GIMPLIFY_VA_ARG_EXPR -#define TARGET_GIMPLIFY_VA_ARG_EXPR tilepro_gimplify_va_arg_expr - -#undef TARGET_RTX_COSTS -#define TARGET_RTX_COSTS tilepro_rtx_costs - -/* Limit to what we can reach in one addli. */ -#undef TARGET_MIN_ANCHOR_OFFSET -#define TARGET_MIN_ANCHOR_OFFSET -32768 -#undef TARGET_MAX_ANCHOR_OFFSET -#define TARGET_MAX_ANCHOR_OFFSET 32767 - -#undef TARGET_LEGITIMATE_CONSTANT_P -#define TARGET_LEGITIMATE_CONSTANT_P tilepro_legitimate_constant_p - -#undef TARGET_LRA_P -#define TARGET_LRA_P hook_bool_void_false - -#undef TARGET_LEGITIMATE_ADDRESS_P -#define TARGET_LEGITIMATE_ADDRESS_P tilepro_legitimate_address_p - -#undef TARGET_LEGITIMIZE_ADDRESS -#define TARGET_LEGITIMIZE_ADDRESS tilepro_legitimize_address - -#undef TARGET_DELEGITIMIZE_ADDRESS -#define TARGET_DELEGITIMIZE_ADDRESS tilepro_delegitimize_address - -#undef TARGET_INIT_BUILTINS -#define TARGET_INIT_BUILTINS tilepro_init_builtins - -#undef TARGET_BUILTIN_DECL -#define TARGET_BUILTIN_DECL tilepro_builtin_decl - -#undef TARGET_EXPAND_BUILTIN -#define TARGET_EXPAND_BUILTIN tilepro_expand_builtin - -#undef TARGET_CONDITIONAL_REGISTER_USAGE -#define TARGET_CONDITIONAL_REGISTER_USAGE tilepro_conditional_register_usage - -#undef TARGET_FRAME_POINTER_REQUIRED -#define TARGET_FRAME_POINTER_REQUIRED tilepro_frame_pointer_required - -#undef TARGET_DELAY_SCHED2 -#define TARGET_DELAY_SCHED2 true - -#undef TARGET_DELAY_VARTRACK -#define TARGET_DELAY_VARTRACK true - -#undef TARGET_SCHED_ISSUE_RATE -#define TARGET_SCHED_ISSUE_RATE tilepro_issue_rate - -#undef TARGET_SCHED_ADJUST_COST -#define TARGET_SCHED_ADJUST_COST tilepro_sched_adjust_cost - -#undef TARGET_MACHINE_DEPENDENT_REORG -#define TARGET_MACHINE_DEPENDENT_REORG tilepro_reorg - -#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK -#define TARGET_ASM_CAN_OUTPUT_MI_THUNK \ - hook_bool_const_tree_hwi_hwi_const_tree_true - -#undef TARGET_ASM_OUTPUT_MI_THUNK -#define TARGET_ASM_OUTPUT_MI_THUNK tilepro_asm_output_mi_thunk - -#undef TARGET_ASM_TRAMPOLINE_TEMPLATE -#define TARGET_ASM_TRAMPOLINE_TEMPLATE tilepro_asm_trampoline_template - -#undef TARGET_TRAMPOLINE_INIT -#define TARGET_TRAMPOLINE_INIT tilepro_trampoline_init - -#undef TARGET_PRINT_OPERAND -#define TARGET_PRINT_OPERAND tilepro_print_operand - -#undef TARGET_PRINT_OPERAND_ADDRESS -#define TARGET_PRINT_OPERAND_ADDRESS tilepro_print_operand_address - -#undef TARGET_ASM_FILE_END -#define TARGET_ASM_FILE_END tilepro_file_end - -#undef TARGET_CAN_USE_DOLOOP_P -#define TARGET_CAN_USE_DOLOOP_P can_use_doloop_if_innermost - -#undef TARGET_CONSTANT_ALIGNMENT -#define TARGET_CONSTANT_ALIGNMENT constant_alignment_word_strings - -struct gcc_target targetm = TARGET_INITIALIZER; - -#include "gt-tilepro.h" diff --git a/gcc/config/tilepro/tilepro.h b/gcc/config/tilepro/tilepro.h deleted file mode 100644 index 6c37aba..0000000 --- a/gcc/config/tilepro/tilepro.h +++ /dev/null @@ -1,457 +0,0 @@ -/* Definitions of target machine for GNU compiler for TILEPro. - Copyright (C) 2011-2022 Free Software Foundation, Inc. - Contributed by Walter Lee (walt@tilera.com) - - This file is part of GCC. - - GCC is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your - option) any later version. - - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -/* This is used by tilepro_cpu_cpp_builtins to indicate the byte order - we're compiling for. */ -#define TILEPRO_CPU_CPP_ENDIAN_BUILTINS() \ - do \ - { \ - if (BYTES_BIG_ENDIAN) \ - builtin_define ("__BIG_ENDIAN__"); \ - else \ - builtin_define ("__LITTLE_ENDIAN__"); \ - } \ - while (0) - -/* Target CPU builtins. */ -#define TARGET_CPU_CPP_BUILTINS() \ - tilepro_cpu_cpp_builtins (pfile) - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE "int" - -#undef SIZE_TYPE -#define SIZE_TYPE "unsigned int" - - -/* Target machine storage layout */ - -#define BITS_BIG_ENDIAN 0 -#define BYTES_BIG_ENDIAN 0 -#define WORDS_BIG_ENDIAN 0 - -#define UNITS_PER_WORD 4 -#define PARM_BOUNDARY 32 -#define STACK_BOUNDARY 64 -#define FUNCTION_BOUNDARY 64 -#define BIGGEST_ALIGNMENT 64 -#define STRICT_ALIGNMENT 1 - -#define PCC_BITFIELD_TYPE_MATTERS 1 -#define FASTEST_ALIGNMENT 32 -#define BIGGEST_FIELD_ALIGNMENT 64 - -/* Make arrays of chars word-aligned for the same reasons. */ -#define DATA_ALIGNMENT(TYPE, ALIGN) \ - (TREE_CODE (TYPE) == ARRAY_TYPE \ - && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ - && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN)) - -/* Make local arrays of chars word-aligned for the same reasons. */ -#define LOCAL_ALIGNMENT(TYPE, ALIGN) DATA_ALIGNMENT (TYPE, ALIGN) - - -/* Standard register usage. */ - -#define FIRST_PSEUDO_REGISTER (64 + 3) - -#define FIXED_REGISTERS \ - {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1} - -#define CALL_REALLY_USED_REGISTERS \ - {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ - 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, 1, 1} - -#define REG_ALLOC_ORDER { \ - 10, 11, 12, 13, 14, /* call used */ \ - 15, 16, 17, 18, 19, \ - 20, 21, 22, 23, 24, \ - 25, 26, 27, 28, 29, \ - \ - 9, 8, 7, 6, 5, /* argument */ \ - 4, 3, 2, 1, 0, \ - \ - 55, /* return address */ \ - \ - 30, 31, 32, 33, 34, /* call saved registers */ \ - 35, 36, 37, 38, 39, \ - 40, 41, 42, 43, 44, \ - 45, 46, 47, 48, 49, \ - 50, 51, \ - \ - 52, /* hard frame pointer */ \ - 53, 54, /* tp, sp */ \ - \ - 56, 57, 58, 59, 60, /* special purpose */ \ - 61, 62, 63, 64, 65, /* or fake registers */ \ - 66 \ -} - -/* Register that holds an address into the text segment that can be - used by pic code. */ -#define TILEPRO_PIC_TEXT_LABEL_REGNUM (flag_pic ? 50 : INVALID_REGNUM) -#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 51 : INVALID_REGNUM) -#define HARD_FRAME_POINTER_REGNUM 52 -#define THREAD_POINTER_REGNUM 53 -#define STACK_POINTER_REGNUM 54 -#define TILEPRO_LINK_REGNUM 55 -#define FRAME_POINTER_REGNUM 64 -#define ARG_POINTER_REGNUM 65 -/* Pseudo register used to enforce order between instructions that - touch the networks. */ -#define TILEPRO_NETORDER_REGNUM 66 -#define STATIC_CHAIN_REGNUM 10 - - -enum reg_class -{ - NO_REGS, - R0_REGS, - R1_REGS, - R2_REGS, - R3_REGS, - R4_REGS, - R5_REGS, - R6_REGS, - R7_REGS, - R8_REGS, - R9_REGS, - R10_REGS, - ALL_REGS, - LIM_REG_CLASSES -}; - -#define N_REG_CLASSES (int) LIM_REG_CLASSES - -/* Since GENERAL_REGS is the same class as ALL_REGS, don't give it a - different class number; just make it an alias. */ -#define GENERAL_REGS ALL_REGS - -#define REG_CLASS_NAMES \ - { \ - "NO_REGS", \ - "R0_REGS", \ - "R1_REGS", \ - "R2_REGS", \ - "R3_REGS", \ - "R4_REGS", \ - "R5_REGS", \ - "R6_REGS", \ - "R7_REGS", \ - "R8_REGS", \ - "R9_REGS", \ - "R10_REGS", \ - "ALL_REGS" \ - } - -#define REG_CLASS_CONTENTS \ - { \ - { 0 }, \ - { 1 << 0 }, \ - { 1 << 1 }, \ - { 1 << 2 }, \ - { 1 << 3 }, \ - { 1 << 4 }, \ - { 1 << 5 }, \ - { 1 << 6 }, \ - { 1 << 7 }, \ - { 1 << 8 }, \ - { 1 << 9 }, \ - { 1 << 10 }, \ - { 0xffffffff, 0xffffffff } \ - } - -#define REGNO_REG_CLASS(REGNO) \ - ((unsigned)(REGNO) <= 10 ? \ - (enum reg_class)(R0_REGS + (REGNO)) : ALL_REGS) - -#define INDEX_REG_CLASS NO_REGS -#define BASE_REG_CLASS ALL_REGS - -#define PREFERRED_RELOAD_CLASS(X,CLASS) (CLASS) - -#define CLASS_MAX_NREGS(CLASS, MODE) \ - ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) - - -/* Stack layout; function entry, exit and calling. */ - -#define STACK_GROWS_DOWNWARD 1 -#define FRAME_GROWS_DOWNWARD 1 - -#define DYNAMIC_CHAIN_ADDRESS(FRAME) \ - plus_constant (Pmode, (FRAME), UNITS_PER_WORD) - -#define FIRST_PARM_OFFSET(FNDECL) 0 - -#define ACCUMULATE_OUTGOING_ARGS 1 - -#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1 - -#define INCOMING_FRAME_SP_OFFSET 0 - -#define STACK_POINTER_OFFSET (2 * UNITS_PER_WORD) - -#define ARG_POINTER_CFA_OFFSET(FNDECL) (-STACK_POINTER_OFFSET) - -#define DEFAULT_PCC_STRUCT_RETURN 0 - -/* The first 10 registers may hold return value. */ -#define TILEPRO_NUM_RETURN_REGS 10 - -/* The first 10 registers hold function arguments. */ -#define TILEPRO_NUM_ARG_REGS 10 - -#define FUNCTION_ARG_REGNO_P(N) ((N) < TILEPRO_NUM_ARG_REGS) - -/* The type used to store the number of words of arguments scanned so - far during argument scanning. This includes any space that is - skipped. */ -#define CUMULATIVE_ARGS int - -#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ - ((CUM) = 0) - - -#define ELIMINABLE_REGS \ - {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ - {ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ - {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ - {FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}} - -#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ - ((OFFSET) = tilepro_initial_elimination_offset((FROM),(TO))) - -#define PROFILE_BEFORE_PROLOGUE 1 - -#define FUNCTION_PROFILER(FILE, LABELNO) \ - tilepro_function_profiler (FILE, LABELNO) - -#define TRAMPOLINE_SIZE 48 -#define TRAMPOLINE_ALIGNMENT 64 -#define TRAMPOLINE_SECTION text_section - - -/* Call frame debugging information. */ - -#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, TILEPRO_LINK_REGNUM) - -#define RETURN_ADDR_RTX tilepro_return_addr - -#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (TILEPRO_LINK_REGNUM) - -#define DWARF_ZERO_REG 63 - -#define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N + 12) : INVALID_REGNUM) -#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, 11) -#define EH_RETURN_HANDLER_RTX tilepro_eh_return_handler_rtx () - -#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ - tilepro_asm_preferred_eh_data_format ((CODE), (GLOBAL)) - - -/* Addressing modes, and classification of registers for them. */ - -#define HAVE_POST_INCREMENT 1 -#define HAVE_POST_DECREMENT 1 -#define HAVE_POST_MODIFY_DISP 1 - -#define REGNO_OK_FOR_INDEX_P(regno) 0 -#define REGNO_OK_FOR_BASE_P(regno) \ - ((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0) - -#define MAX_REGS_PER_ADDRESS 1 - -#define CONSTANT_ADDRESS_P(X) 0 - -#define LEGITIMATE_PIC_OPERAND_P(X) tilepro_legitimate_pic_operand_p (X) - - -#define CASE_VECTOR_MODE SImode -#define CASE_VECTOR_PC_RELATIVE 0 -#define JUMP_TABLES_IN_TEXT_SECTION 0 - -#define DEFAULT_SIGNED_CHAR 1 - -#define MOVE_MAX UNITS_PER_WORD - -/* Use a value of 11 for MOVE_RATIO and friends, because TILEPro - returns structs as large as 10 words in registers. Because of some - some code generation inefficiency, we never get smaller code for - turning that into a memcpy, so pick a value that guarantees this - doesn't happen. */ -#define TILEPRO_CALL_RATIO 11 -#define MOVE_RATIO(speed) ((speed) ? 15 : TILEPRO_CALL_RATIO) -#define CLEAR_RATIO(speed) ((speed) ? 15 : TILEPRO_CALL_RATIO) -#define SET_RATIO(speed) ((speed) ? 15 : TILEPRO_CALL_RATIO) - -#define WORD_REGISTER_OPERATIONS 1 - -#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND - -#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \ - if (GET_MODE_CLASS (MODE) == MODE_INT \ - && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ - (MODE) = SImode; - -/* Define SLOW_BYTE_ACCESS to avoid making a QI or HI mode - register. */ -#define SLOW_BYTE_ACCESS 1 - -#define SHIFT_COUNT_TRUNCATED 1 - -#define SHORT_IMMEDIATES_SIGN_EXTEND 1 - -#define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1) -#define CTZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) ((VALUE) = 32, 1) - -#define Pmode SImode - -#define STORE_FLAG_VALUE 1 - -#define FUNCTION_MODE SImode - -#define NO_FUNCTION_CSE 1 - -#define ADJUST_INSN_LENGTH(INSN, LENGTH) \ - ((LENGTH) = tilepro_adjust_insn_length ((INSN), (LENGTH))) - -#define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT - -#define BRANCH_COST(speed_p, predictable_p) ((predictable_p) ? 2 : 6) - - -/* Control the assembler format that we output. */ - -#undef NO_DOLLAR_IN_LABEL - -#define ASM_COMMENT_START "##" - -#define TEXT_SECTION_ASM_OP "\t.text" - -#define DATA_SECTION_ASM_OP "\t.data" - -#undef READONLY_DATA_SECTION_ASM_OP -#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata, \"a\"" - -#undef BSS_SECTION_ASM_OP -#define BSS_SECTION_ASM_OP "\t.section\t.bss, \"wa\"" - -#undef INIT_SECTION_ASM_OP -#define INIT_SECTION_ASM_OP "\t.section\t.init, \"ax\"" - -#undef FINI_SECTION_ASM_OP -#define FINI_SECTION_ASM_OP "\t.section\t.fini, \"ax\"" - -#define GLOBAL_ASM_OP ".global " - -#define SUPPORTS_WEAK 1 - -#define USER_LABEL_PREFIX "" - -#define REGISTER_PREFIX "" -#define REGISTER_NAMES \ - { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ - "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ - "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", \ - "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \ - "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39", \ - "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47", \ - "r48", "r49", "r50", "r51", "r52", "tp", "sp", "lr", \ - "sn", "idn0", "idn1", "udn0", "udn1", "udn2", "udn3", "zero", \ - "?FRAME?", "?ARG?", "?NET?" } - -/* This is used to help emit bundles. */ -#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ - tilepro_final_prescan_insn (insn) - -/* This is used to help emit bundles. */ -#define ASM_OUTPUT_OPCODE(STREAM, PTR) \ - (PTR = tilepro_asm_output_opcode (STREAM, PTR)) - -#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - do \ - { \ - char label[256]; \ - ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE));\ - fprintf (FILE, "\t.word "); \ - assemble_name (FILE, label); \ - fprintf (FILE, "\n"); \ - } \ - while (0) - -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - do \ - { \ - char label[256]; \ - ASM_GENERATE_INTERNAL_LABEL (label, "L", (VALUE)); \ - fprintf (FILE, "\t.word "); \ - assemble_name (FILE, label); \ - ASM_GENERATE_INTERNAL_LABEL (label, "L", (REL)); \ - fprintf (FILE, "-"); \ - assemble_name (FILE, label); \ - fprintf (FILE, "\n"); \ - } \ - while (0) - -#define ASM_OUTPUT_ALIGN(FILE,LOG) \ - do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0) - -#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".comm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (unsigned int)(ROUNDED))) - -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - ( fputs (".lcomm ", (FILE)), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ",%u\n", (unsigned int)(ROUNDED))) - - - -#define INIT_EXPANDERS tilepro_init_expanders () - -/* A C structure for machine-specific, per-function data. This is - added to the cfun structure. */ -typedef struct GTY(()) machine_function -{ - /* Symbol for the text label used for pic. */ - rtx text_label_symbol; - - /* Register for the text label. */ - rtx text_label_rtx; - - /* Register for the pic offset table. */ - rtx got_rtx; - - /* The function calls tls_get_addr. */ - int calls_tls_get_addr; -} machine_function; - -#ifndef HAVE_AS_TLS -#define HAVE_AS_TLS 0 -#endif diff --git a/gcc/config/tilepro/tilepro.md b/gcc/config/tilepro/tilepro.md deleted file mode 100644 index d5d362c..0000000 --- a/gcc/config/tilepro/tilepro.md +++ /dev/null @@ -1,3816 +0,0 @@ -;; Machine description for Tilera TILEPro chip for GCC. -;; Copyright (C) 2011-2022 Free Software Foundation, Inc. -;; Contributed by Walter Lee (walt@tilera.com) -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. -;; -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; . - -(define_constants [ - ;; - ;; The following represent intrinsic insns, organized by latency. - ;; - - ;; single cycle - (UNSPEC_INSN_ADDLIS 1) - (UNSPEC_INSN_AULI 2) - (UNSPEC_INSN_AVGB_U 3) - (UNSPEC_INSN_AVGH 4) - (UNSPEC_INSN_BITX 5) - (UNSPEC_INSN_CRC32_32 6) - (UNSPEC_INSN_CRC32_8 7) - (UNSPEC_INSN_DRAIN 8) - (UNSPEC_INSN_DTLBPR 9) - (UNSPEC_INSN_DWORD_ALIGN 10) - (UNSPEC_INSN_FINV 11) - (UNSPEC_INSN_FLUSH 12) - (UNSPEC_INSN_FNOP 13) - (UNSPEC_INSN_ICOH 14) - (UNSPEC_INSN_ILL 15) - (UNSPEC_INSN_INFO 16) - (UNSPEC_INSN_INFOL 17) - (UNSPEC_INSN_INV 18) - (UNSPEC_INSN_LNK 19) - (UNSPEC_INSN_MFSPR 20) - (UNSPEC_INSN_MNZB 21) - (UNSPEC_INSN_MNZH 22) - (UNSPEC_INSN_MOVELIS 23) - (UNSPEC_INSN_MTSPR 24) - (UNSPEC_INSN_MZB 25) - (UNSPEC_INSN_MZH 26) - (UNSPEC_INSN_NAP 27) - (UNSPEC_INSN_PACKBS_U 28) - (UNSPEC_INSN_PACKHB 29) - (UNSPEC_INSN_PACKHS 30) - (UNSPEC_INSN_PACKLB 31) - (UNSPEC_INSN_PREFETCH_L1 32) - (UNSPEC_INSN_TBLIDXB0 33) - (UNSPEC_INSN_TBLIDXB1 34) - (UNSPEC_INSN_TBLIDXB2 35) - (UNSPEC_INSN_TBLIDXB3 36) - (UNSPEC_INSN_WH64 37) - - ;; 2 cycles - (UNSPEC_INSN_ADIFFB_U 100) - (UNSPEC_INSN_ADIFFH 101) - (UNSPEC_INSN_MULHHA_SS 102) - (UNSPEC_INSN_MULHHA_SU 103) - (UNSPEC_INSN_MULHHA_UU 104) - (UNSPEC_INSN_MULHHSA_UU 105) - (UNSPEC_INSN_MULHH_SS 106) - (UNSPEC_INSN_MULHH_SU 107) - (UNSPEC_INSN_MULHH_UU 108) - (UNSPEC_INSN_MULHLA_SS 109) - (UNSPEC_INSN_MULHLA_SU 110) - (UNSPEC_INSN_MULHLA_US 111) - (UNSPEC_INSN_MULHLA_UU 112) - (UNSPEC_INSN_MULHLSA_UU 113) - (UNSPEC_INSN_MULHL_SS 114) - (UNSPEC_INSN_MULHL_SU 115) - (UNSPEC_INSN_MULHL_US 116) - (UNSPEC_INSN_MULHL_UU 117) - (UNSPEC_INSN_MULLLA_SS 118) - (UNSPEC_INSN_MULLLA_SU 119) - (UNSPEC_INSN_MULLLA_UU 120) - (UNSPEC_INSN_MULLLSA_UU 121) - (UNSPEC_INSN_MULLL_SU 122) - (UNSPEC_INSN_MULLL_SS 123) - (UNSPEC_INSN_MULLL_UU 124) - (UNSPEC_INSN_SADAB_U 125) - (UNSPEC_INSN_SADAH 126) - (UNSPEC_INSN_SADAH_U 127) - (UNSPEC_INSN_SADB_U 128) - (UNSPEC_INSN_SADH 129) - (UNSPEC_INSN_SADH_U 130) - - ;; - ;; The following are special insns. - ;; - - ;; Blockage - (UNSPEC_BLOCKAGE 200) - - ;; Latency specifying loads. - (UNSPEC_LATENCY_L2 201) - (UNSPEC_LATENCY_MISS 202) - - ;; Lnk and its label - (UNSPEC_LNK_AND_LABEL 203) - - ;; Memory fence - (UNSPEC_MF 204) - - ;; A pseudo-op that prevents network operations from being ordered. - (UNSPEC_NETWORK_BARRIER 205) - - ;; Operations that access network registers. - (UNSPEC_NETWORK_RECEIVE 206) - (UNSPEC_NETWORK_SEND 207) - - ;; Stack protector operations - (UNSPEC_SP_SET 208) - (UNSPEC_SP_TEST 209) - - ;; A call to __tls_get_addr - (UNSPEC_TLS_GD_CALL 210) - - ;; An opaque TLS "add" operation for TLS general dynamic model - ;; access. - (UNSPEC_TLS_GD_ADD 211) - - ;; An opaque TLS "load" operation for TLS initial exec model access. - (UNSPEC_TLS_IE_LOAD 212) - - ;; - ;; The following are operands. - ;; - (UNSPEC_PCREL_SYM 300) - (UNSPEC_GOT16_SYM 301) - (UNSPEC_GOT32_SYM 302) - (UNSPEC_TLS_GD 303) - (UNSPEC_TLS_IE 304) - (UNSPEC_TLS_LE 305) -]) - -;; Mark the last instruction of various latencies, used to -;; determine the rtx costs of unspec insns. -(define_constants [ - (TILEPRO_LAST_LATENCY_1_INSN 99) - (TILEPRO_LAST_LATENCY_2_INSN 199) - (TILEPRO_LAST_LATENCY_INSN 299) -]) - -;; Constants for network registers. -(define_constants [ - (TILEPRO_NETREG_IDN0 0) - (TILEPRO_NETREG_IDN1 1) - (TILEPRO_NETREG_SN 2) - (TILEPRO_NETREG_UDN0 3) - (TILEPRO_NETREG_UDN1 4) - (TILEPRO_NETREG_UDN2 5) - (TILEPRO_NETREG_UDN3 6) -]) - -;; Constants for special purpose registers. -(define_constants [ - (TILEPRO_NETORDER_REG 66)]) - - -;; Operand and operator predicates and constraints - -(include "predicates.md") -(include "constraints.md") -(include "tilepro-generic.md") - -;; Define an insn type attribute. This defines what pipes things can -;; go in. -(define_attr "type" - "X0,X0_2cycle,X1,X1_branch,X1_2cycle,X1_L2,X1_miss,X01,Y0,Y0_2cycle,Y2,Y2_2cycle,Y2_L2,Y2_miss,Y01,cannot_bundle,cannot_bundle_3cycle,cannot_bundle_4cycle,nothing" - (const_string "Y01")) - -(define_attr "length" "" - (cond [(eq_attr "type" "X1_branch") - (if_then_else - (and (le (minus (match_dup 0) (pc)) (const_int 524280)) - (le (minus (pc) (match_dup 0)) (const_int 524288))) - (const_int 8) - (const_int 16)) - ] - (const_int 8))) - - -;; Define iterators. -(define_mode_iterator I48MODE [SI DI]) -(define_mode_iterator I12MODE [QI HI]) - -(define_code_iterator binop_u5bit [ashift ashiftrt lshiftrt rotate]) -(define_code_iterator binop_with_imm - [ashift lshiftrt ashiftrt rotate eq lt and ior xor]) -(define_code_iterator unop [bswap clz ctz popcount]) - -(define_mode_attr load [(QI "lb") (HI "lh") (SI "lw")]) -(define_mode_attr store [(QI "sb") (HI "sh") (SI "sw")]) - -;; expands to the name of the optab for a particular code. -(define_code_attr optab [(ashift "ashl") - (ashiftrt "ashr") - (lshiftrt "lshr") - (eq "seq") - (ne "sne") - (lt "slt") - (ltu "sltu") - (le "sle") - (leu "sleu") - (minus "sub") - (plus "add") - (rotate "rotl") - (smax "smax") - (smin "smin") - (umax "umax") - (umin "umin") - (ss_minus "sssub") - (ss_plus "ssadd") - (us_minus "ussub") - (us_plus "usadd") - (and "and") - (ior "ior") - (xor "xor") - (bswap "bswap") - (clz "clz") - (ctz "ctz") - (popcount "popcount")]) - -;; expands to the name of the insn that implements a particular -;; code. -(define_code_attr insn [(ashift "shl") - (ashiftrt "sra") - (lshiftrt "shr") - (eq "seq") - (ne "sne") - (lt "slt") - (ltu "slt") - (le "slte") - (leu "slte") - (minus "sub") - (plus "add") - (rotate "rl") - (smax "max") - (smin "min") - (umax "max") - (umin "min") - (ss_minus "sub") - (ss_plus "add") - (us_minus "sub") - (us_plus "add") - (and "and") - (ior "or") - (xor "xor") - (bswap "bytex") - (clz "clz") - (ctz "ctz") - (popcount "pcnt")]) - -;; expands to the suffix of the insn that implements a particular -;; code. -(define_code_attr u [(ashift "") - (ashiftrt "") - (lshiftrt "") - (eq "") - (ne "") - (lt "") - (ltu "_u") - (le "") - (leu "_u") - (minus "") - (plus "") - (rotate "") - (smax "") - (smin "") - (umax "_u") - (umin "_u") - (ss_minus "s") - (ss_plus "s") - (us_minus "s_u") - (us_plus "s_u") - (and "") - (ior "") - (xor "")]) - -;; indicates whether a particular code is commutative, using -;; the "%" commutative opterator constraint. -(define_code_attr comm [(ashift "") - (ashiftrt "") - (lshiftrt "") - (eq "%") - (ne "%") - (lt "") - (ltu "") - (le "") - (leu "") - (minus "") - (plus "%") - (rotate "") - (smax "%") - (umax "%") - (smin "%") - (umin "%") - (ss_plus "%") - (us_plus "%") - (ss_minus "") - (us_minus "") - (and "%") - (ior "%") - (xor "%")]) - -(define_mode_iterator VEC [V4QI V2HI]) - -;; Code iterator for all three shifts. -(define_code_iterator any_shift [ashift ashiftrt lshiftrt]) - -;; Code iterator for all byte ops without immediate variants. -(define_code_iterator v1op [us_plus ne le leu minus us_minus]) - -;; Code iterator for all 2-byte vector ops without immediate variants. -(define_code_iterator v2op [ss_plus ne le leu minus ss_minus]) - -;; Code iterator for all byte vector ops with immediate variants. -(define_code_iterator v1op_immed [plus umax umin eq lt ltu]) - -;; Code iterator for all 2-byte vector ops with immediate variants. -(define_code_iterator v2op_immed [plus smax smin eq lt ltu]) - -;; Code for packing two 2-byte vectors. -(define_code_iterator v2pack [truncate us_truncate]) - -;; expands to the part of the optab name describing how -;; two vectors are packed. -(define_code_attr pack_optab [(truncate "trunc") - (us_truncate "usat") - (ss_truncate "ssat")]) - -;; expands to the insn that implements a particular vector -;; packing code. -(define_code_attr pack_insn [(truncate "packl") - (us_truncate "pack") - (ss_truncate "pack")]) - -;; expands to the suffix of the insn that implements a -;; particular vector packing code. -(define_code_attr pack_u [(truncate "") - (us_truncate "s_u") - (ss_truncate "s")]) - - -;; -;; The basic data move insns. -;; - -(define_expand "movqi" - [(set (match_operand:QI 0 "nonimmediate_operand" "") - (match_operand:QI 1 "nonautoinc_operand" ""))] - "" -{ - if (tilepro_expand_mov (QImode, operands)) - DONE; -}) - -(define_insn "*movqi_insn" - [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,r,U,m") - (match_operand:QI 1 "move_operand" "r,I,U,m,rO,rO"))] - "(register_operand (operands[0], QImode) - || reg_or_0_operand (operands[1], QImode))" - "@ - move\t%0, %r1 - movei\t%0, %1 - lb_u\t%0, %1 - lbadd_u\t%0, %I1, %i1 - sb\t%0, %r1 - sbadd\t%I0, %r1, %i0" - [(set_attr "type" "*,*,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_expand "movhi" - [(set (match_operand:HI 0 "nonimmediate_operand" "") - (match_operand:HI 1 "nonautoinc_operand" ""))] - "" -{ - if (tilepro_expand_mov (HImode, operands)) - DONE; -}) - -(define_insn "*movhi_insn" - [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,r,r,U,m") - (match_operand:HI 1 "move_operand" "r,I,J,U,m,rO,rO"))] - "(register_operand (operands[0], HImode) - || reg_or_0_operand (operands[1], HImode))" - "@ - move\t%0, %r1 - movei\t%0, %1 - moveli\t%0, %1 - lh_u\t%0, %1 - lhadd_u\t%0, %I1, %i1 - sh\t%0, %r1 - shadd\t%I0, %r1, %i0" - [(set_attr "type" "*,*,X01,Y2_2cycle,X1_2cycle,Y2,X1")]) - - -(define_expand "movsi" - [(set (match_operand:SI 0 "nonimmediate_operand" "") - (match_operand:SI 1 "nonautoinc_operand" ""))] - "" -{ - if (tilepro_expand_mov (SImode, operands)) - DONE; -}) - -(define_insn "*movsi_high_insn" - [(set (match_operand:SI 0 "register_operand" "=r") - (high:SI (match_operand:SI 1 "symbolic_operand" "in")))] - "" - "auli\t%0, zero, ha16(%1)" - [(set_attr "type" "X01")]) - -(define_insn "*movsi_insn" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,r,r,r,r,U,m") - (match_operand:SI 1 "move_operand" "r,I,J,K,N,P,U,m,rO,rO"))] - "(register_operand (operands[0], SImode) - || reg_or_0_operand (operands[1], SImode))" - "@ - move\t%0, %r1 - movei\t%0, %1 - moveli\t%0, %1 - auli\t%0, zero, %h1 - addib\t%0, zero, %j1 - addih\t%0, zero, %h1 - lw\t%0, %1 - lwadd\t%0, %I1, %i1 - sw\t%0, %r1 - swadd\t%I0, %r1, %i0" - [(set_attr "type" "*,*,X01,X01,X01,X01,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_insn "movstrictqi" - [(set (strict_low_part (match_operand:QI 0 "register_operand" "+r")) - (match_operand:QI 1 "reg_or_0_operand" "rO"))] - "" - "mm\t%r0, %r1, %r0, 0, 7" - [(set_attr "type" "X01")]) - -(define_insn "movstricthi" - [(set (strict_low_part (match_operand:HI 0 "register_operand" "+r")) - (match_operand:HI 1 "reg_or_0_operand" "rO"))] - "" - "mm\t%r0, %r1, %r0, 0, 15" - [(set_attr "type" "X01")]) - -(define_expand "movmisalign" - [(set (match_operand:VEC 0 "nonautoincmem_nonimmediate_operand" "") - (match_operand:VEC 1 "nonautoincmem_general_operand" ""))] - "" -{ - tilepro_expand_movmisalign (mode, operands); - DONE; -}) - -(define_expand "movsf" - [(set (match_operand:SF 0 "nonimmediate_operand" "") - (match_operand:SF 1 "general_operand" ""))] - "" -{ - /* Materialize immediates using clever SImode code, but don't - do this after reload starts, since gen_lowpart will choke - during reload if given an illegitimate address. */ - if (immediate_operand (operands[1], SFmode) - && operands[1] != const0_rtx - && (register_operand (operands[0], SFmode) - || (!reload_in_progress && !reload_completed))) - { - emit_insn (gen_movsi (gen_lowpart (SImode, operands[0]), - gen_lowpart (SImode, operands[1]))); - DONE; - } -}) - -(define_insn "*movsf" - [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,U,m") - (match_operand:SF 1 "general_operand" "rO,U,m,rO,rO"))] - "" - "@ - move\t%0, %r1 - lw\t%0, %1 - lwadd\t%0, %I1, %i1 - sw\t%0, %r1 - swadd\t%I0, %r1, %i0" - [(set_attr "type" "*,Y2_2cycle,X1_2cycle,Y2,X1")]) - -(define_expand "mov" - [(set (match_operand:VEC 0 "nonimmediate_operand" "") - (match_operand:VEC 1 "general_operand" ""))] - "" -{ - /* Materialize immediates using clever SImode code, but don't - do this after reload starts, since gen_lowpart will choke - during reload if given an illegitimate address. */ - if (immediate_operand (operands[1], mode) - && operands[1] != const0_rtx - && (register_operand (operands[0], mode) - || (!reload_in_progress && !reload_completed))) - { - emit_insn (gen_movsi (gen_lowpart (SImode, operands[0]), - gen_lowpart (SImode, operands[1]))); - DONE; - } -}) - -(define_insn "*mov" - [(set (match_operand:VEC 0 "nonimmediate_operand" "=r,r,r,U,m") - (match_operand:VEC 1 "general_operand" "rO,U,m,rO,rO"))] - "" - "@ - move\t%0, %r1 - lw\t%0, %1 - lwadd\t%0, %I1, %i1 - sw\t%0, %r1 - swadd\t%I0, %r1, %i0" - [(set_attr "type" "*,Y2_2cycle,X1_2cycle,Y2,X1")]) - - -;; -;; Bit-field extracts -;; - -(define_expand "extv" - [(set (match_operand:SI 0 "register_operand" "") - (sign_extract:SI - (match_operand:QI 1 "nonautoincmem_operand" "") - (match_operand:SI 2 "immediate_operand" "") - (match_operand:SI 3 "immediate_operand" "")))] - "" -{ - HOST_WIDE_INT bit_offset, bit_width; - HOST_WIDE_INT first_byte_offset, last_byte_offset; - - bit_width = INTVAL (operands[2]); - bit_offset = INTVAL (operands[3]); - - /* Reject bitfields that can be done with a normal load */ - if (MEM_ALIGN (operands[1]) >= bit_offset + bit_width) - FAIL; - - /* The value in memory cannot span more than 4 bytes. */ - first_byte_offset = bit_offset / BITS_PER_UNIT; - last_byte_offset = (bit_offset + bit_width - 1) / BITS_PER_UNIT; - if (last_byte_offset - first_byte_offset > 3) - FAIL; - - tilepro_expand_unaligned_load (operands[0], operands[1], - bit_width, bit_offset, 1); - - DONE; -}) - -(define_expand "extzv" - [(set (match_operand:SI 0 "register_operand" "") - (zero_extract:SI - (match_operand:QI 1 "nonautoincmem_operand" "") - (match_operand:SI 2 "immediate_operand" "") - (match_operand:SI 3 "immediate_operand" "")))] - "" -{ - HOST_WIDE_INT bit_offset, bit_width; - HOST_WIDE_INT first_byte_offset, last_byte_offset; - - bit_width = INTVAL (operands[2]); - bit_offset = INTVAL (operands[3]); - - /* Reject bitfields that can be done with a normal load */ - if (MEM_ALIGN (operands[1]) >= bit_offset + bit_width) - FAIL; - - /* The value in memory cannot span more than 4 bytes. */ - first_byte_offset = bit_offset / BITS_PER_UNIT; - last_byte_offset = (bit_offset + bit_width - 1) / BITS_PER_UNIT; - if (last_byte_offset - first_byte_offset > 3) - FAIL; - - tilepro_expand_unaligned_load (operands[0], operands[1], - bit_width, bit_offset, 0); - - DONE; -}) - - -;; -;; Arithmetic ops -;; - -(define_insn "*s123a_insn" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (mult:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "cint_248_operand" "I")) - (match_operand:SI 3 "reg_or_0_operand" "rO")))] - "" - "s%t2a\t%0, %r1, %r3") - -(define_expand "addsi3" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (match_operand:SI 1 "register_operand" "") - (match_operand:SI 2 "reg_or_cint_operand" "")))] - "" - " - if (tilepro_expand_addsi (operands[0], operands[1], operands[2])) - DONE; - ") - -(define_insn "*addsi_high_insn" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI - (match_operand:SI 1 "reg_or_0_operand" "%rO") - (high:SI (match_operand:SI 2 "const_symbolic_operand" "T"))))] - "" - "auli\t%0, %r1, %H2" - [(set_attr "type" "X01")]) - -(define_insn "*addsi_lo_sum_insn" - [(set (match_operand:SI 0 "register_operand" "=r") - (lo_sum:SI - (match_operand:SI 1 "reg_or_0_operand" "%rO") - (match_operand:SI 2 "const_symbolic_operand" "T")))] - "" - "addli\t%0, %r1, %L2" - [(set_attr "type" "X01")]) - -(define_insn "*addsi3_insn" - [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") - (plus:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO,rO,rO") - (match_operand:SI 2 "add_operand" "r,I,J,K")))] - "" - "@ - add\t%0, %r1, %r2 - addi\t%0, %r1, %2 - addli\t%0, %r1, %2 - auli\t%0, %r1, %h2" - [(set_attr "type" "*,*,X01,X01")]) - -(define_insn "subsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")))] - "" - "sub\t%0, %r1, %r2") - -(define_insn "negsi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (neg:SI (match_operand:SI 1 "reg_or_0_operand" "rO")))] - "" - "sub\t%0, zero, %r1") - -(define_insn "ssaddsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (ss_plus:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")))] - "" - "adds\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "sssubsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (ss_minus:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")))] - "" - "subs\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -;; -;; Shifts -;; - -;; ashift, ashiftrt, lshiftrt, rotate. -(define_insn "si3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (binop_u5bit:SI (match_operand:SI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_u5bit_operand" "I,rO")))] - "" - "@ - i\t%0, %r1, %2 - \t%0, %r1, %r2") - - -;; -;; Compares -;; - -(define_expand "cstore4" - [(set (match_operand:SI 0 "register_operand" "") - (match_operator:SI 1 "ordered_comparison_operator" - [(match_operand:I48MODE 2 "reg_or_cint_operand" "") - (match_operand:I48MODE 3 "reg_or_cint_operand" "")]))] - "" - { if (!tilepro_emit_setcc (operands, mode)) FAIL; else DONE; }) - -(define_insn "insn_seq" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (eq:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO") - (match_operand:SI 2 "reg_or_cint_operand" "I,rO")))] - "" - "@ - seqi\t%0, %r1, %2 - seq\t%0, %r1, %r2") - -(define_insn "insn_sne" - [(set (match_operand:SI 0 "register_operand" "=r") - (ne:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_cint_operand" "rO")))] - "" - "sne\t%0, %r1, %r2") - -(define_insn "insn_slt" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (lt:SI (match_operand:SI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_cint_operand" "I,rO")))] - "" - "@ - slti\t%0, %r1, %2 - slt\t%0, %r1, %r2") - -(define_insn "insn_slte" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (le:SI (match_operand:SI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_cint_operand" "L,rO")))] - "" - "@ - slti\t%0, %r1, %P2 - slte\t%0, %r1, %r2") - -(define_insn "insn_slt_u" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ltu:SI (match_operand:SI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_cint_operand" "I,rO")))] - "" - "@ - slti_u\t%0, %r1, %2 - slt_u\t%0, %r1, %r2") - -(define_insn "insn_slte_u" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (leu:SI (match_operand:SI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_cint_operand" "Q,rO")))] - "" - "@ - slti_u\t%0, %r1, %P2 - slte_u\t%0, %r1, %r2") - - -;; -;; Logical ops -;; - -(define_insn "andsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r,r") - (and:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO,rO") - (match_operand:SI 2 "and_operand" "I,M,rO")))] - "" - "@ - andi\t%0, %r1, %2 - mm\t%0, %r1, zero, %M2 - and\t%0, %r1, %r2" - [(set_attr "type" "*,X01,*")]) - -(define_insn "iorsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (ior:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO") - (match_operand:SI 2 "reg_or_s8bit_operand" "I,rO")))] - "" - "@ - ori\t%0, %r1, %2 - or\t%0, %r1, %r2") - -(define_insn "xorsi3" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (xor:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO") - (match_operand:SI 2 "reg_or_s8bit_operand" "rO,I")))] - "" - "@ - xor\t%0, %r1, %r2 - xori\t%0, %r1, %2" - [(set_attr "type" "*,X01")]) - -;; bswap, clz, ctz, popcount -(define_insn "si2" - [(set (match_operand:SI 0 "register_operand" "=r") - (unop:SI (match_operand:SI 1 "reg_or_0_operand" "rO")))] - "" - "\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_expand "ctzdi2" - [(set (match_operand:DI 0 "register_operand" "") - (ctz:DI (match_operand:DI 1 "register_operand" "")))] - "" -{ - rtx lo, hi, ctz_lo, ctz_hi, ctz_hi_plus_32, result; - - split_di (&operands[1], 1, &lo, &hi); - lo = force_reg (SImode, lo); - hi = force_reg (SImode, hi); - - ctz_lo = gen_reg_rtx (SImode); - emit_insn (gen_ctzsi2 (ctz_lo, lo)); - - ctz_hi = gen_reg_rtx (SImode); - emit_insn (gen_ctzsi2 (ctz_hi, hi)); - - ctz_hi_plus_32 = gen_reg_rtx (SImode); - emit_insn (gen_addsi3 (ctz_hi_plus_32, ctz_hi, GEN_INT (32))); - - result = gen_reg_rtx (SImode); - emit_insn (gen_insn_mvz (result, ctz_lo, lo, ctz_hi_plus_32)); - - emit_move_insn (operands[0], convert_to_mode (DImode, result, 1)); - - DONE; -}) - -(define_expand "clzdi2" - [(set (match_operand:DI 0 "register_operand" "") - (clz:DI (match_operand:DI 1 "register_operand" "")))] - "" -{ - rtx lo, hi, clz_lo, clz_hi, clz_lo_plus_32, result; - - split_di (&operands[1], 1, &lo, &hi); - lo = force_reg (SImode, lo); - hi = force_reg (SImode, hi); - - clz_lo = gen_reg_rtx (SImode); - emit_insn (gen_clzsi2 (clz_lo, lo)); - - clz_hi = gen_reg_rtx (SImode); - emit_insn (gen_clzsi2 (clz_hi, hi)); - - clz_lo_plus_32 = gen_reg_rtx (SImode); - emit_insn (gen_addsi3 (clz_lo_plus_32, clz_lo, GEN_INT (32))); - - result = gen_reg_rtx (SImode); - emit_insn (gen_insn_mvz (result, clz_hi, hi, clz_lo_plus_32)); - - emit_move_insn (operands[0], convert_to_mode (DImode, result, 1)); - - DONE; -}) - -(define_expand "ffsdi2" - [(set (match_operand:DI 0 "register_operand" "") - (ffs:DI (match_operand:DI 1 "register_operand" "")))] - "" -{ - rtx lo, hi, ctz_lo, ctz_hi, ctz_hi_plus_32, ctz, ctz_plus_1,ctz_cond; - rtx result; - - split_di (&operands[1], 1, &lo, &hi); - lo = force_reg (SImode, lo); - hi = force_reg (SImode, hi); - - ctz_lo = gen_reg_rtx (SImode); - emit_insn (gen_ctzsi2 (ctz_lo, lo)); - - ctz_hi = gen_reg_rtx (SImode); - emit_insn (gen_ctzsi2 (ctz_hi, hi)); - - ctz_hi_plus_32 = gen_reg_rtx (SImode); - emit_insn (gen_addsi3 (ctz_hi_plus_32, ctz_hi, GEN_INT (32))); - - ctz = gen_reg_rtx (SImode); - emit_insn (gen_insn_mvz (ctz, ctz_lo, lo, ctz_hi_plus_32)); - - ctz_plus_1 = gen_reg_rtx (SImode); - emit_insn (gen_addsi3 (ctz_plus_1, ctz, GEN_INT (1))); - - ctz_cond = gen_reg_rtx (SImode); - emit_insn (gen_iorsi3 (ctz_cond, lo, hi)); - - result = gen_reg_rtx (SImode); - emit_insn (gen_insn_mvz (result, ctz_plus_1, ctz_cond, const0_rtx)); - - emit_move_insn (operands[0], convert_to_mode (DImode, result, 1)); - - DONE; -}) - -(define_expand "popcountdi2" - [(set (match_operand:DI 0 "register_operand" "") - (popcount:DI (match_operand:DI 1 "nonmemory_operand" "")))] - "" -{ - rtx lo, hi, popcount_lo, popcount_hi, result; - - split_di (&operands[1], 1, &lo, &hi); - lo = force_reg (SImode, lo); - hi = force_reg (SImode, hi); - - popcount_lo = gen_reg_rtx (SImode); - emit_insn (gen_popcountsi2 (popcount_lo, lo)); - - popcount_hi = gen_reg_rtx (SImode); - emit_insn (gen_popcountsi2 (popcount_hi, hi)); - - result = gen_reg_rtx (SImode); - emit_insn (gen_addsi3 (result, popcount_lo, popcount_hi)); - - emit_move_insn (operands[0], convert_to_mode (DImode, result, 1)); - - DONE; -}) - -(define_expand "paritysi2" - [(set (match_operand:SI 0 "register_operand" "") - (parity:SI (match_operand:SI 1 "reg_or_0_operand" "")))] - "" - { - operands[2] = gen_reg_rtx (SImode); - emit_insn (gen_popcountsi2 (operands[2], operands[1])); - emit_insn (gen_andsi3 (operands[0], operands[2], const1_rtx)); - DONE; - }) - -(define_expand "paritydi2" - [(set (match_operand:DI 0 "register_operand" "") - (parity:DI (match_operand:DI 1 "nonmemory_operand" "")))] - "" -{ - rtx lo, hi, xor_lohi, result; - - split_di (&operands[1], 1, &lo, &hi); - lo = force_reg (SImode, lo); - hi = force_reg (SImode, hi); - - xor_lohi = gen_reg_rtx (SImode); - emit_insn (gen_xorsi3 (xor_lohi, lo, hi)); - - result = gen_reg_rtx (SImode); - emit_insn (gen_paritysi2 (result, xor_lohi)); - - emit_move_insn (operands[0], convert_to_mode (DImode, result, 1)); - - DONE; -}) - -(define_insn "one_cmplsi2" - [(set (match_operand:SI 0 "register_operand" "=r") - (not:SI (match_operand:SI 1 "reg_or_0_operand" "rO")))] - "" - "nor\t%0, %r1, zero") - - -;; -;; Conditional moves. -;; - -(define_expand "movsicc" - [(set (match_operand:SI 0 "register_operand" "") - (if_then_else:SI (match_operand 1 "comparison_operator" "") - (match_operand:SI 2 "reg_or_0_operand" "") - (match_operand:SI 3 "reg_or_0_operand" "")))] - "" - { operands[1] = tilepro_emit_conditional_move (operands[1]); }) - -(define_insn "movcc_insn" - [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") - (if_then_else:SI - (match_operator 4 "eqne_operator" - [(match_operand:SI 1 "reg_or_0_operand" "rO,rO,rO,rO") - (const_int 0)]) - (match_operand:SI 2 "reg_or_0_operand" "rO,O,rO,0") - (match_operand:SI 3 "reg_or_0_operand" "O,rO,0,rO")))] - "" - "@ - m%c4\t%0, %r1, %r2 - m%C4\t%0, %r1, %r3 - mv%c4\t%0, %r1, %r2 - mv%C4\t%0, %r1, %r3" - [(set_attr "type" "*,*,Y0,Y0")]) - -(define_expand "insn_mz" - [(set (match_operand:SI 0 "register_operand" "") - (if_then_else:SI - (eq (match_operand:SI 1 "reg_or_0_operand" "") - (const_int 0)) - (match_operand:SI 2 "reg_or_0_operand" "") - (const_int 0)))]) - -(define_expand "insn_mnz" - [(set (match_operand:SI 0 "register_operand" "") - (if_then_else:SI - (ne (match_operand:SI 1 "reg_or_0_operand" "") - (const_int 0)) - (match_operand:SI 2 "reg_or_0_operand" "") - (const_int 0)))]) - -(define_expand "insn_mvz" - [(set (match_operand:SI 0 "register_operand" "") - (if_then_else:SI - (eq (match_operand:SI 2 "reg_or_0_operand" "") - (const_int 0)) - (match_operand:SI 3 "reg_or_0_operand" "") - (match_operand:SI 1 "reg_or_0_operand" "")))]) - -(define_expand "insn_mvnz" - [(set (match_operand:SI 0 "register_operand" "") - (if_then_else:SI - (ne (match_operand:SI 2 "reg_or_0_operand" "") - (const_int 0)) - (match_operand:SI 3 "reg_or_0_operand" "") - (match_operand:SI 1 "reg_or_0_operand" "")))]) - - -;; -;; Conversions -;; - -(define_insn "zero_extendqisi2" - [(set (match_operand:SI 0 "register_operand" "=r,r,r") - (zero_extend:SI (match_operand:QI 1 "move_operand" "rO,U,m")))] - "" - "@ - mm\t%0, %r1, zero, 0, 7 - lb_u\t%0, %1 - lbadd_u\t%0, %I1, %i1" - [(set_attr "type" "X01,Y2_2cycle,X1_2cycle")]) - -(define_insn "zero_extendhisi2" - [(set (match_operand:SI 0 "register_operand" "=r,r,r") - (zero_extend:SI (match_operand:HI 1 "move_operand" "rO,U,m")))] - "" - "@ - mm\t%0, %r1, zero, 0, 15 - lh_u\t%0, %1 - lhadd_u\t%0, %I1, %i1" - [(set_attr "type" "X01,Y2_2cycle,X1_2cycle")]) - -(define_expand "extendhisi2" - [(set (match_operand:SI 0 "register_operand" "") - (sign_extend:SI (match_operand:HI 1 "move_operand" "")))] - "" -{ - if (!memory_operand (operands[1], HImode)) - { - operands[1] = gen_lowpart (SImode, operands[1]); - operands[2] = can_create_pseudo_p () ? gen_reg_rtx (SImode) : operands[0]; - - emit_move_insn (operands[2], gen_rtx_ASHIFT (SImode, operands[1], - GEN_INT (16))); - emit_move_insn (operands[0], gen_rtx_ASHIFTRT (SImode, operands[2], - GEN_INT (16))); - DONE; - } -}) - -(define_insn "*lh" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (sign_extend:SI (match_operand:HI 1 "memory_operand" "U,m")))] - "" - "@ - lh\t%0, %1 - lhadd\t%0, %I1, %i1" - [(set_attr "type" "Y2_2cycle,X1_2cycle")]) - -(define_expand "extendqisi2" - [(set (match_operand:SI 0 "register_operand" "") - (sign_extend:SI (match_operand:QI 1 "move_operand" "")))] - "" -{ - if (!memory_operand (operands[1], QImode)) - { - operands[1] = gen_lowpart (SImode, operands[1]); - operands[2] = can_create_pseudo_p () ? gen_reg_rtx (SImode) : operands[0]; - - emit_move_insn (operands[2], gen_rtx_ASHIFT (SImode, operands[1], - GEN_INT (24))); - emit_move_insn (operands[0], gen_rtx_ASHIFTRT (SImode, operands[2], - GEN_INT (24))); - DONE; - } -}) - -(define_insn "*lb" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (sign_extend:SI (match_operand:QI 1 "memory_operand" "U,m")))] - "" - "@ - lb\t%0, %1 - lbadd\t%0, %I1, %i1" - [(set_attr "type" "Y2_2cycle,X1_2cycle")]) - -;; -;; insv patterns -;; -(define_expand "insv" - [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "u5bit_cint_operand" "") - (match_operand:SI 2 "u5bit_cint_operand" "")) - (match_operand:SI 3 "reg_or_cint_operand" ""))] - "" -{ - tilepro_expand_insv (operands); - DONE; -}) - -(define_insn "*insv_tblidxb0" - [(set (zero_extract:SI - (match_operand:SI 0 "register_operand" "+r") - (const_int 8) - (const_int 2)) - (match_operand:SI 1 "register_operand" "rO"))] - "" - "tblidxb0\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "*insv_tblidxb1" - [(set (zero_extract:SI - (match_operand:SI 0 "register_operand" "+r") - (const_int 8) - (const_int 2)) - (zero_extract:SI - (const_int 8) - (const_int 8) - (match_operand:SI 1 "register_operand" "rO")))] - "" - "tblidxb1\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "*insv_tblidxb2" - [(set (zero_extract:SI - (match_operand:SI 0 "register_operand" "+r") - (const_int 8) - (const_int 2)) - (zero_extract:SI - (const_int 8) - (const_int 16) - (match_operand:SI 1 "register_operand" "rO")))] - "" - "tblidxb2\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "*insv_tblidxb3" - [(set (zero_extract:SI - (match_operand:SI 0 "register_operand" "+r") - (const_int 8) - (const_int 2)) - (zero_extract:SI - (const_int 8) - (const_int 24) - (match_operand:SI 1 "register_operand" "rO")))] - "" - "tblidxb3\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "*insv_mm1" - [(set (zero_extract:SI - (match_operand:SI 0 "register_operand" "+r") - (match_operand:SI 1 "u5bit_cint_operand" "n") - (const_int 0)) - (match_operand:SI 2 "register_operand" "rO"))] - "" - "mm\t%0, %r2, %0, 0, %1-1" - [(set_attr "type" "X01")]) - -(define_insn "*insv_mm2" - [(set (zero_extract:SI - (match_operand:SI 0 "register_operand" "+r") - (match_operand:SI 1 "u5bit_cint_operand" "n") - (match_operand:SI 2 "u5bit_cint_operand" "n")) - (zero_extract:SI - (match_operand:SI 3 "register_operand" "rO") - (match_dup 1) - (match_dup 2)))] - "" - "mm\t%0, %r3, %0, %2, %2+%1-1" - [(set_attr "type" "X01")]) - - -;; -;; Multiplies -;; - -(define_expand "mulsi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (mult:SI (zero_extend:SI - (subreg:HI (match_operand:SI 1 "nonmemory_operand" "") 0)) - (zero_extend:SI - (subreg:HI (match_operand:SI 2 "nonmemory_operand" "") 0)))) - (set (match_dup 0) - (unspec:SI [(match_dup 0) (match_dup 1) (match_dup 2)] - UNSPEC_INSN_MULHLSA_UU)) - (set (match_dup 0) - (unspec:SI [(match_dup 0) (match_dup 2) (match_dup 1)] - UNSPEC_INSN_MULHLSA_UU))] - "" - { - operands[1] = force_reg (SImode, operands[1]); - operands[1] = make_safe_from (operands[1], operands[0]); - - if (tilepro_expand_mulsi (operands[0], operands[1], operands[2])) - DONE; - else - { - operands[2] = force_reg (SImode, operands[2]); - operands[2] = make_safe_from (operands[2], operands[0]); - } - }) - -(define_insn "mulhisi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (mult:SI (sign_extend:SI - (match_operand:HI 1 "reg_or_0_operand" "rO")) - (sign_extend:SI - (match_operand:HI 2 "reg_or_0_operand" "rO"))))] - "" - "mulll_ss\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "umulhisi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (mult:SI (zero_extend:SI - (match_operand:HI 1 "reg_or_0_operand" "rO")) - (zero_extend:SI - (match_operand:HI 2 "reg_or_0_operand" "rO"))))] - "" - "mulll_uu\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "usmulhisi3" - [(set (match_operand:SI 0 "register_operand" "=r") - (mult:SI (zero_extend:SI - (match_operand:HI 1 "reg_or_0_operand" "rO")) - (sign_extend:SI - (match_operand:HI 2 "reg_or_0_operand" "rO"))))] - "" - "mulll_su\t%0, %r2, %r1" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "maddhisi4" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI - (mult:SI (sign_extend:SI - (match_operand:HI 1 "reg_or_0_operand" "rO")) - (sign_extend:SI - (match_operand:HI 2 "reg_or_0_operand" "rO"))) - (match_operand:SI 3 "register_operand" "0")))] - "" - "mullla_ss\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "umaddhisi4" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI - (mult:SI (zero_extend:SI - (match_operand:HI 1 "reg_or_0_operand" "rO")) - (zero_extend:SI - (match_operand:HI 2 "reg_or_0_operand" "rO"))) - (match_operand:SI 3 "register_operand" "0")))] - "" - "mullla_uu\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - - -(define_insn "mulqihi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (mult:HI (sign_extend:HI - (match_operand:QI 1 "reg_or_0_operand" "rO")) - (sign_extend:HI - (match_operand:QI 2 "reg_or_0_operand" "rO"))))] - "" - "mulll_ss\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "umulqihi3" - [(set (match_operand:HI 0 "register_operand" "=r") - (mult:HI (zero_extend:HI - (match_operand:QI 1 "reg_or_0_operand" "rO")) - (zero_extend:HI - (match_operand:QI 2 "reg_or_0_operand" "rO"))))] - "" - "mulll_uu\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_expand "smulsi3_highpart" - [(set (match_operand:SI 0 "register_operand" "") - (truncate:SI - (ashiftrt:DI - (mult:DI (sign_extend:DI (match_operand:SI 1 "reg_or_0_operand" "")) - (sign_extend:DI (match_operand:SI 2 "reg_or_0_operand" ""))) - (const_int 32))))] - "" - { - tilepro_expand_smulsi3_highpart (operands[0], operands[1], operands[2]); - DONE; - }) - -(define_expand "umulsi3_highpart" - [(set (match_operand:SI 0 "register_operand" "") - (truncate:SI - (lshiftrt:DI - (mult:DI (zero_extend:DI (match_operand:SI 1 "reg_or_0_operand" "")) - (zero_extend:DI (match_operand:SI 2 "reg_or_0_operand" ""))) - (const_int 32))))] - "" -{ - tilepro_expand_umulsi3_highpart (operands[0], operands[1], operands[2]); - DONE; -}) - - -;; -;; Loops -;; - -;; Define the subtract-one-and-jump insns so loop.c knows what to -;; generate. -(define_expand "doloop_end" - [(use (match_operand 0 "" "")) ;; loop pseudo - (use (match_operand 1 "" ""))] ;; label - "" -{ - if (optimize > 0) - { - rtx s0; - rtx bcomp; - rtx loc_ref; - - /* only deal with loop counters in SImode */ - if (GET_MODE (operands[0]) != SImode) - FAIL; - - s0 = operands [0]; - - emit_move_insn (s0, gen_rtx_PLUS (SImode, s0, GEN_INT (-1))); - bcomp = gen_rtx_NE(SImode, s0, const0_rtx); - loc_ref = gen_rtx_LABEL_REF (VOIDmode, operands [1]); - emit_jump_insn (gen_rtx_SET (pc_rtx, - gen_rtx_IF_THEN_ELSE (VOIDmode, bcomp, - loc_ref, pc_rtx))); - DONE; - } - else - FAIL; - -}) - -;; -;; Prologue/epilogue -;; -(define_expand "prologue" - [(const_int 0)] - "" -{ - tilepro_expand_prologue (); - DONE; -}) - -(define_expand "epilogue" - [(const_int 0)] - "" -{ - tilepro_expand_epilogue (false); - DONE; -}) - -(define_expand "sibcall_epilogue" - [(const_int 0)] - "" -{ - tilepro_expand_epilogue (true); - DONE; -}) - -;; -;; Stack manipulations -;; - -;; An insn to allocate new stack space for dynamic use (e.g., alloca). -(define_expand "allocate_stack" - [(set (match_operand 0 "register_operand" "") - (minus (reg 54) (match_operand 1 "nonmemory_operand" ""))) - (set (reg 54) - (minus (reg 54) (match_dup 1)))] - "" - "tilepro_allocate_stack (operands[0], operands[1]); DONE;") - -;; -;; Branches -;; -(define_expand "call" - [(parallel [(call (match_operand:SI 0 "call_operand" "") - (match_operand 1 "" "")) - (use (reg:SI 54)) - (clobber (reg:SI 55))])] - "" - "") - -(define_insn "*call_insn" - [(call (mem:SI (match_operand:SI 0 "call_address_operand" "rO,i")) - (match_operand 1 "" "")) - (use (reg:SI 54)) - (clobber (reg:SI 55))] - "" - "@ - jalr\t%r0 - jal\t%p0" - [(set_attr "type" "X1,X1")]) - -(define_expand "call_value" - [(parallel [(set (match_operand 0 "register_operand" "") - (call (match_operand:SI 1 "call_operand" "") - (match_operand 2 "" ""))) - (use (reg:SI 54)) - (clobber (reg:SI 55))])] - "") - -(define_insn "*call_value_insn" - [(set (match_operand 0 "register_operand" "=r,r") - (call (mem:SI (match_operand:SI 1 "call_address_operand" "rO,i")) - (match_operand 2 "" ""))) - (use (reg:SI 54)) - (clobber (reg:SI 55))] - "" - "@ - jalr\t%r1 - jal\t%p1" - [(set_attr "type" "X1,X1")]) - -(define_expand "sibcall" - [(parallel [(call (match_operand:SI 0 "call_operand" "") - (match_operand 1 "" "")) - (use (reg:SI 54))])] - "" - "") - -(define_insn "*sibcall_insn" - [(call (mem:SI (match_operand:SI 0 "call_address_operand" "rO,i")) - (match_operand 1 "" "")) - (use (reg:SI 54))] - "SIBLING_CALL_P(insn)" - "@ - jr\t%r0 - j\t%p0" - [(set_attr "type" "X1,X1")]) - -(define_expand "sibcall_value" - [(parallel [(set (match_operand 0 "" "") - (call (match_operand:SI 1 "call_operand" "") - (match_operand:SI 2 "" ""))) - (use (reg:SI 54))])] - "" - "") - -(define_insn "*sibcall_value" - [(set (match_operand 0 "" "") - (call (mem:SI (match_operand:SI 1 "call_address_operand" "rO,i")) - (match_operand:SI 2 "" ""))) - (use (reg:SI 54))] - "SIBLING_CALL_P(insn)" - "@ - jr\t%r1 - j\t%p1" - [(set_attr "type" "X1,X1")]) - -(define_insn "jump" - [(set (pc) (label_ref (match_operand 0 "" "")))] - "" - "j\t%l0" - [(set_attr "type" "X1")]) - -(define_insn "indirect_jump" - [(set (pc) (match_operand:SI 0 "register_operand" "rO"))] - "" - "jr\t%r0" - [(set_attr "type" "X1")]) - -(define_expand "return" - [(parallel - [(return) - (use (reg:SI 55))])] - "tilepro_can_use_return_insn_p ()" - "") - -(define_insn "_return" - [(return) - (use (reg:SI 55))] - "reload_completed" - "jrp\tlr" - [(set_attr "type" "X1")]) - -(define_expand "tablejump" - [(set (pc) (match_operand:SI 0 "register_operand" "")) - (use (label_ref (match_operand 1 "" "")))] - "" -{ - tilepro_expand_tablejump (operands[0], operands[1]); - DONE; -}) - -(define_insn "tablejump_aux" - [(set (pc) (match_operand:SI 0 "register_operand" "r")) - (use (label_ref (match_operand 1 "" "")))] - "" - "jr\t%0" - [(set_attr "type" "X1")]) - -;; Call subroutine returning any type. -(define_expand "untyped_call" - [(parallel [(call (match_operand 0 "" "") - (const_int 0)) - (match_operand 1 "" "") - (match_operand 2 "" "")])] - "" -{ - int i; - - emit_call_insn (gen_call (operands[0], const0_rtx)); - - for (i = 0; i < XVECLEN (operands[2], 0); i++) - { - rtx set = XVECEXP (operands[2], 0, i); - emit_move_insn (SET_DEST (set), SET_SRC (set)); - } - - /* The optimizer does not know that the call sets the function value - registers we stored in the result block. We avoid problems by - claiming that all hard registers are used and clobbered at this - point. */ - emit_insn (gen_blockage ()); - - DONE; -}) - -;; 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 "blockage" - [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)] - "" - "pseudo" - [(set_attr "type" "nothing") - (set_attr "length" "0")]) - -;; Internal expanders to prevent memory ops from moving around frame -;; allocation/deallocation. -;; -;; TODO: really this clobber should just clobber the frame memory. Is -;; this possibly by clobbering memory @ the sp reg (as alpha does?) -;; or by explicitly setting the alias set to the frame? -(define_insn "sp_adjust" - [(set (match_operand:SI 0 "register_operand" "=r,r,r") - (plus:SI - (match_operand:SI 1 "register_operand" "%r,r,r") - (match_operand:SI 2 "add_operand" "r,I,J"))) - (clobber (mem:BLK (scratch)))] - "" - "@ - add\t%0, %1, %2 - addi\t%0, %1, %2 - addli\t%0, %1, %2" - [(set_attr "type" "*,*,X01")]) - -;; Used for move sp, r52, to pop a stack frame. We need to make sure -;; that stack frame memory operations have been issued before we do -;; this. TODO: see above TODO. -(define_insn "sp_restore" - [(set (match_operand:SI 0 "register_operand" "=r") - (match_operand:SI 1 "register_operand" "r")) - (clobber (mem:BLK (scratch)))] - "" - "move\t%0, %1") - -(define_insn "nop" - [(const_int 0)] - "" - "nop" - [(set_attr "type" "Y01")]) - -(define_insn "trap" - [(trap_if (const_int 1) (const_int 0))] - "" - "raise; moveli zero, 6" - [(set_attr "type" "cannot_bundle")]) - - -;; -;; Conditional branches -;; - -(define_expand "cbranchsi4" - [(set (pc) - (if_then_else (match_operator 0 "ordered_comparison_operator" - [(match_operand:SI 1 "reg_or_cint_operand") - (match_operand:SI 2 "reg_or_cint_operand")]) - (label_ref (match_operand 3 "")) - (pc)))] - "" - { tilepro_emit_conditional_branch (operands, SImode); DONE; }) - - -(define_expand "cbranchdi4" - [(set (pc) - (if_then_else (match_operator 0 "ordered_comparison_operator" - [(match_operand:DI 1 "reg_or_cint_operand") - (match_operand:DI 2 "reg_or_cint_operand")]) - (label_ref (match_operand 3 "")) - (pc)))] - "" - { tilepro_emit_conditional_branch (operands, DImode); DONE; }) - - -(define_insn "*bcc_normal" - [(set (pc) - (if_then_else - (match_operator 1 "signed_comparison_operator" - [(match_operand:SI 2 "reg_or_0_operand" "rO") - (const_int 0)]) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - { return tilepro_output_cbranch (insn, operands, false); } - [(set_attr "type" "X1_branch")]) - -(define_insn "*bcc_reverse" - [(set (pc) - (if_then_else - (match_operator 1 "signed_comparison_operator" - [(match_operand:SI 2 "reg_or_0_operand" "rO") - (const_int 0)]) - (pc) - (label_ref (match_operand 0 "" ""))))] - "" - { return tilepro_output_cbranch (insn, operands, true); } - [(set_attr "type" "X1_branch")]) - -;; FIXME: the straight forward versions which do not include the -;; subreg:QI does not match for some unknown reason. -(define_insn "*bbs_normal" - [(set (pc) - (if_then_else - (ne (zero_extract:SI (subreg:QI - (match_operand:SI 1 "reg_or_0_operand" "rO") 0) - (const_int 1) - (const_int 0)) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - { return tilepro_output_cbranch_with_opcode (insn, operands, "bbs", "bbns", - 1, 0); } - [(set_attr "type" "X1_branch")]) - -(define_insn "*bbc_normal" - [(set (pc) - (if_then_else - (eq (zero_extract:SI (subreg:QI - (match_operand:SI 1 "reg_or_0_operand" "rO") 0) - (const_int 1) - (const_int 0)) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc)))] - "" - { return tilepro_output_cbranch_with_opcode (insn, operands, "bbns", "bbs", - 1, 0); } - [(set_attr "type" "X1_branch")]) - -;; Note that __insn_mf() expands to this. -(define_expand "memory_barrier" - [(set (match_dup 0) - (unspec_volatile:BLK [(match_dup 0)] UNSPEC_MF))] - "" -{ - operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); - MEM_VOLATILE_P (operands[0]) = 1; -}) - -(define_insn "*memory_barrier" - [(set (match_operand:BLK 0 "" "") - (unspec_volatile:BLK [(match_dup 0)] UNSPEC_MF))] - "" - "mf" - [(set_attr "type" "X1")]) - -(define_insn "prefetch" - [(prefetch (match_operand:SI 0 "address_operand" "rO") - (match_operand:SI 1 "const_int_operand" "") - (match_operand:SI 2 "const_int_operand" ""))] - "" - "prefetch\t%r0" - [(set_attr "type" "Y2")]) - - -;; -;; Network intrinsics -;; - -;; Note the "pseudo" text is handled specially by the -;; asm_output_opcode routine. If the output is an empty string, the -;; instruction would bypass the asm_output_opcode routine, bypassing -;; the bundle handling code. -(define_insn "tilepro_network_barrier" - [(unspec_volatile:SI [(const_int 0)] UNSPEC_NETWORK_BARRIER)] - "" - "pseudo" - [(set_attr "type" "nothing") - (set_attr "length" "0")]) - -(define_insn "*netreg_receive" - [(set (match_operand:SI 0 "nonimmediate_operand" "=r,U,m") - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i,i,i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "@ - move\t%0, %N1 - sw\t%0, %N1 - swadd\t%I0, %N1, %i0" - [(set_attr "type" "*,Y2,X1")]) - -(define_insn "*netreg_send" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i,i,i,i,i,i") - (match_operand:SI 1 "reg_or_cint_operand" "rO,I,J,K,N,P") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "@ - move\t%N0, %r1 - movei\t%N0, %1 - moveli\t%N0, %1 - auli\t%N0, zero, %h1 - addib\t%N0, zero, %j1 - addih\t%N0, zero, %h1" - [(set_attr "type" "*,*,X01,X01,X01,X01")]) - -(define_insn "*netreg_copy" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i") - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "move %N0, %N1") - -(define_expand "tilepro_idn0_receive" - [(parallel - [(set (match_operand:SI 0 "register_operand" "") - (unspec_volatile:SI [(const_int TILEPRO_NETREG_IDN0) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_expand "tilepro_idn1_receive" - [(parallel - [(set (match_operand:SI 0 "register_operand" "") - (unspec_volatile:SI [(const_int TILEPRO_NETREG_IDN1) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_expand "tilepro_idn_send" - [(parallel - [(unspec_volatile:SI [(const_int TILEPRO_NETREG_IDN0) - (match_operand:SI 0 "reg_or_cint_operand" "") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_expand "tilepro_sn_receive" - [(parallel - [(set (match_operand:SI 0 "register_operand" "") - (unspec_volatile:SI [(const_int TILEPRO_NETREG_SN) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_expand "tilepro_sn_send" - [(parallel - [(unspec_volatile:SI [(const_int TILEPRO_NETREG_SN) - (match_operand:SI 0 "reg_or_cint_operand" "") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_expand "tilepro_udn0_receive" - [(parallel - [(set (match_operand:SI 0 "register_operand" "") - (unspec_volatile:SI [(const_int TILEPRO_NETREG_UDN0) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_expand "tilepro_udn1_receive" - [(parallel - [(set (match_operand:SI 0 "register_operand" "") - (unspec_volatile:SI [(const_int TILEPRO_NETREG_UDN1) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_expand "tilepro_udn2_receive" - [(parallel - [(set (match_operand:SI 0 "register_operand" "") - (unspec_volatile:SI [(const_int TILEPRO_NETREG_UDN2) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_expand "tilepro_udn3_receive" - [(parallel - [(set (match_operand:SI 0 "register_operand" "") - (unspec_volatile:SI [(const_int TILEPRO_NETREG_UDN3) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_expand "tilepro_udn_send" - [(parallel - [(unspec_volatile:SI [(const_int TILEPRO_NETREG_UDN0) - (match_operand:SI 0 "reg_or_cint_operand" "") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG))])] - "") - -(define_insn "*netreg_add_to_network" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i,i,i,i") - (plus:SI (match_operand:SI 1 "reg_or_0_operand" "%rO,rO,rO,rO") - (match_operand:SI 2 "add_operand" "r,I,J,K")) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "@ - add\t%N0, %r1, %2 - addi\t%N0, %r1, %2 - addli\t%N0, %r1, %2 - auli\t%N0, %r1, %h2" - [(set_attr "type" "*,*,X01,X01")]) - -(define_insn "*netreg_add_from_network" - [(set (match_operand:SI 0 "register_operand" "=r,r,r,r") - (plus:SI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i,i,i,i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (match_operand:SI 2 "add_operand" "rO,I,J,K"))) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "@ - add\t%0, %N1, %r2 - addi\t%0, %N1, %2 - addli\t%0, %N1, %2 - auli\t%0, %N1, %h2" - [(set_attr "type" "*,*,X01,X01")]) - -(define_insn "*netreg_add_from_to_network" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i,i,i,i") - (plus:SI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i,i,i,i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (match_operand:SI 2 "add_operand" "rO,I,J,K")) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "@ - add\t%N0, %N1, %r2 - addi\t%N0, %N1, %2 - addli\t%N0, %N1, %2 - auli\t%N0, %N1, %h2" - [(set_attr "type" "*,*,X01,X01")]) - -(define_code_iterator netreg_binop - [minus]) - -(define_insn "*netreg_binop_to_network" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i") - (netreg_binop:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "\t%N0, %r1, %r2") - -(define_insn "*netreg_binop_from_network0" - [(set (match_operand:SI 0 "register_operand" "=r") - (netreg_binop:SI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (match_operand:SI 2 "reg_or_0_operand" "rO"))) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "\t%0, %N1, %r2") - -(define_insn "*netreg_binop_from_network1" - [(set (match_operand:SI 0 "register_operand" "=r") - (netreg_binop:SI - (match_operand:SI 1 "reg_or_0_operand" "rO") - (unspec_volatile:SI [(match_operand:SI 2 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE))) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "\t%0, %r1, %N2") - -(define_insn "*netreg_binop_from_to_network0" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i") - (netreg_binop:SI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (match_operand:SI 2 "reg_or_0_operand" "rO")) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "\t%N0, %N1, %r2") - -(define_insn "*netreg_binop_from_to_network1" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i") - (netreg_binop:SI - (match_operand:SI 1 "reg_or_0_operand" "rO") - (unspec_volatile:SI [(match_operand:SI 2 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "\t%N0, %r1, %N2") - -(define_insn "*netreg_binop_to_network" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i,i") - (binop_with_imm:SI (match_operand:SI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_cint_operand" "I,rO")) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "@ - i\t%N0, %r1, %2 - \t%N0, %r1, %r2") - -(define_insn "*netreg_binop_from_network" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (binop_with_imm:SI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i,i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (match_operand:SI 2 "reg_or_cint_operand" "I,rO"))) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "@ - i\t%0, %N1, %2 - \t%0, %N1, %r2") - -(define_insn "*netreg_binop_from_to_network" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i,i") - (binop_with_imm:SI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i,i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (match_operand:SI 2 "reg_or_cint_operand" "I,rO")) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "@ - i\t%N0, %N1, %2 - \t%N0, %N1, %r2") - -(define_insn "*netreg_unop_to_network" - [(unspec_volatile:SI [(match_operand:SI 0 "netreg_operand" "i") - (unop:SI (match_operand:SI 1 "reg_or_0_operand" "rO")) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "\t%N0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "*netreg_unop_from_network" - [(set (match_operand:SI 0 "register_operand" "=r") - (unop:SI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE))) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "\t%0, %N1" - [(set_attr "type" "Y0")]) - -(define_insn "*netreg_unop_from_to_network" - [(unspec_volatile:SI - [(match_operand:SI 0 "netreg_operand" "i") - (unop:SI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)) - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_SEND) - (clobber (reg:SI TILEPRO_NETORDER_REG)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "\t%N0, %N1" - [(set_attr "type" "Y0")]) - -(define_insn "*netreg_sadh_u_from_network0" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI - [(unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SADH_U)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "sadh_u\t%0, %N1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "*netreg_sadh_u_from_network1" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI - [(match_operand:SI 1 "reg_or_0_operand" "rO") - (unspec_volatile:SI [(match_operand:SI 2 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)] - UNSPEC_INSN_SADH_U)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "sadh_u\t%0, %r1, %N2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "*netreg_sadah_u_from_network0" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI - [(match_operand:SI 1 "reg_or_0_operand" "0") - (unspec_volatile:SI [(match_operand:SI 2 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SADAH_U)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "sadah_u\t%0, %N2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "*netreg_sadah_u_from_network1" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI - [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (unspec_volatile:SI [(match_operand:SI 3 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE)] - UNSPEC_INSN_SADAH_U)) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - "sadah_u\t%0, %r2, %N3" - [(set_attr "type" "X0_2cycle")]) - -(define_code_iterator mm_combiner [ior xor plus]) - -;; This doesn't seem to match -- too complex for 'combine'? -;; -;; (define_insn "*netreg_mm_to_network" -;; [(unspec_volatile:SI -;; [(match_operand:SI 0 "netreg_operand" "i") -;; (mm_combiner:SI -;; (and:SI (match_operand:SI 1 "reg_or_0_operand" "rO") -;; (match_operand:SI 3 "const_int_operand" "n")) -;; (and:SI (match_operand:SI 2 "reg_or_0_operand" "rO") -;; (match_operand:SI 4 "const_int_operand" "n")))] -;; UNSPEC_NETWORK_SEND)] -;; "tilepro_bitfield_operand_p (INTVAL (operands[3]), NULL, NULL) -;; && INTVAL (operands[3]) == ~INTVAL (operands[4])" -;; "mm\t%N0, %r1, %r2, %M3" -;; [(set_attr "type" "X01")]) - -;; FIXME: the straight forward versions which do not include the -;; subreg:QI does not match for some unknown reason. -(define_insn "*netreg_bbs_normal" - [(set (pc) - (if_then_else - (ne (zero_extract:SI - (subreg:QI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) 0) - (const_int 1) - (const_int 0)) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc))) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - { return tilepro_output_cbranch_with_opcode (insn, operands, "bbs", "bbns", - 1, 1); } - [(set_attr "type" "X1_branch")]) - -(define_insn "*netreg_bbc_normal" - [(set (pc) - (if_then_else - (eq (zero_extract:SI - (subreg:QI - (unspec_volatile:SI [(match_operand:SI 1 "netreg_operand" "i") - (reg:SI TILEPRO_NETORDER_REG)] - UNSPEC_NETWORK_RECEIVE) 0) - (const_int 1) - (const_int 0)) - (const_int 0)) - (label_ref (match_operand 0 "" "")) - (pc))) - (clobber (reg:SI TILEPRO_NETORDER_REG))] - "" - { return tilepro_output_cbranch_with_opcode (insn, operands, "bbns", "bbns", - 1, 1); } - [(set_attr "type" "X1_branch")]) - - -;; -;; "__insn" Intrinsics (some expand directly to normal patterns above). -;; - -(define_insn "insn_addlis" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec_volatile:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "s16bit_cint_operand" "i")] - UNSPEC_INSN_ADDLIS))] - "" - "addlis\t%0, %r1, %2" - [(set_attr "type" "X01")]) - -(define_insn "insn_auli" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "s16bit_cint_operand" "i")] - UNSPEC_INSN_AULI))] - "" - "auli\t%0, %r1, %2" - [(set_attr "type" "X01")]) - -(define_insn "insn_drain" - [(unspec_volatile:VOID [(const_int 0)] UNSPEC_INSN_DRAIN)] - "" - "drain" - [(set_attr "type" "cannot_bundle")]) - -(define_insn "insn_icoh" - [(unspec_volatile:VOID [(match_operand:SI 0 "reg_or_0_operand" "rO")] - UNSPEC_INSN_ICOH)] - "" - "icoh\t%r0" - [(set_attr "type" "X1")]) - - -(define_insn "insn_info" - [(unspec_volatile:VOID [(match_operand:SI 0 "s8bit_cint_operand" "i")] - UNSPEC_INSN_INFO)] - "" - "info\t%0") - -(define_insn "insn_infol" - [(unspec_volatile:VOID [(match_operand:SI 0 "s16bit_cint_operand" "i")] - UNSPEC_INSN_INFOL)] - "" - "infol\t%0" - [(set_attr "type" "X01")]) - -;; loads - -(define_expand "insn_" - [(set (match_operand:SI 0 "register_operand" "") - (sign_extend:SI - (mem:I12MODE (match_operand:SI 1 "address_operand" ""))))] - "") - -(define_expand "insn__u" - [(set (match_operand:SI 0 "register_operand" "") - (zero_extend:SI - (mem:I12MODE (match_operand:SI 1 "address_operand" ""))))] - "") - -(define_insn "insn_add" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI (mem:I12MODE (match_dup 3))))] - "" - "add\t%0, %1, %2" - [(set_attr "type" "X1_2cycle")]) - -(define_insn "insn_add_u" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI (mem:I12MODE (match_dup 3))))] - "" - "add_u\t%0, %1, %2" - [(set_attr "type" "X1_2cycle")]) - -(define_expand "insn_lw" - [(set (match_operand:SI 0 "register_operand" "") - (mem:SI (match_operand:SI 1 "address_operand" "")))] - "") - -(define_insn "insn_lwadd" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (mem:SI (match_dup 3)))] - "" - "lwadd\t%0, %1, %2" - [(set_attr "type" "X1_2cycle")]) - -(define_insn "insn_lwadd_na" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (mem:SI (and:SI (match_dup 3) (const_int -4))))] - "" - "lwadd_na\t%0, %1, %2" - [(set_attr "type" "X1_2cycle")]) - -(define_insn "insn_lw_na" - [(set (match_operand:SI 0 "register_operand" "=r") - (mem:SI (and:SI (match_operand:SI 1 "address_operand" "rO") - (const_int -4))))] - "" - "lw_na\t%0, %r1" - [(set_attr "type" "X1_2cycle")]) - -;; L2 hits - -(define_insn "insn__L2" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI - (unspec:I12MODE - [(mem:I12MODE (match_operand:SI 1 "address_operand" "rO"))] - UNSPEC_LATENCY_L2)))] - "" - "\t%0, %r1" - [(set_attr "type" "Y2_L2")]) - -(define_insn "insn__u_L2" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI - (unspec:I12MODE - [(mem:I12MODE (match_operand:SI 1 "address_operand" "rO"))] - UNSPEC_LATENCY_L2)))] - "" - "_u\t%0, %r1" - [(set_attr "type" "Y2_L2")]) - -(define_insn "insn_add_L2" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI (unspec:I12MODE [(mem:I12MODE (match_dup 3))] - UNSPEC_LATENCY_L2)))] - "" - "add\t%0, %1, %2" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_add_u_L2" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI (unspec:I12MODE [(mem:I12MODE (match_dup 3))] - UNSPEC_LATENCY_L2)))] - "" - "add_u\t%0, %1, %2" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_lwadd_L2" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(mem:SI (match_dup 3))] UNSPEC_LATENCY_L2))] - "" - "lwadd\t%0, %1, %2" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_lwadd_na_L2" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(mem:SI (and:SI (match_dup 3) (const_int -4)))] - UNSPEC_LATENCY_L2))] - "" - "lwadd_na\t%0, %1, %2" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_lw_na_L2" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(mem:SI (and:SI (match_operand:SI 1 "address_operand" "rO") - (const_int -4)))] - UNSPEC_LATENCY_L2))] - "" - "lw_na\t%0, %r1" - [(set_attr "type" "X1_L2")]) - -(define_insn "insn_lw_L2" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(mem:SI (match_operand:SI 1 "address_operand" "rO"))] - UNSPEC_LATENCY_L2))] - "" - "lw\t%0, %r1" - [(set_attr "type" "Y2_L2")]) - -;; L2 miss - -(define_insn "insn__miss" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI - (unspec:I12MODE - [(mem:I12MODE (match_operand:SI 1 "address_operand" "rO"))] - UNSPEC_LATENCY_MISS)))] - "" - "\t%0, %r1" - [(set_attr "type" "Y2_miss")]) - -(define_insn "insn__u_miss" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI - (unspec:I12MODE - [(mem:I12MODE (match_operand:SI 1 "address_operand" "rO"))] - UNSPEC_LATENCY_MISS)))] - "" - "_u\t%0, %r1" - [(set_attr "type" "Y2_miss")]) - -(define_insn "insn_add_miss" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI (unspec:I12MODE [(mem:I12MODE (match_dup 3))] - UNSPEC_LATENCY_MISS)))] - "" - "add\t%0, %1, %2" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_add_u_miss" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI (unspec:I12MODE [(mem:I12MODE (match_dup 3))] - UNSPEC_LATENCY_MISS)))] - "" - "add_u\t%0, %1, %2" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_lwadd_miss" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(mem:SI (match_dup 3))] UNSPEC_LATENCY_MISS))] - "" - "lwadd\t%0, %1, %2" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_lwadd_na_miss" - [(set (match_operand:SI 1 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "1") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(mem:SI (and:SI (match_dup 3) (const_int -4)))] - UNSPEC_LATENCY_MISS))] - "" - "lwadd_na\t%0, %1, %2" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_lw_na_miss" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(mem:SI (and:SI (match_operand:SI 1 "address_operand" "rO") - (const_int -4)))] - UNSPEC_LATENCY_MISS))] - "" - "lw_na\t%0, %r1" - [(set_attr "type" "X1_miss")]) - -(define_insn "insn_lw_miss" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(mem:SI (match_operand:SI 1 "address_operand" "rO"))] - UNSPEC_LATENCY_MISS))] - "" - "lw\t%0, %r1" - [(set_attr "type" "Y2_miss")]) - -;; end loads - -(define_insn "insn_mfspr" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec_volatile:SI [(match_operand:SI 1 "u15bit_cint_operand" "i")] - UNSPEC_INSN_MFSPR)) - (clobber (mem:BLK (const_int 0)))] - "" - "mfspr\t%0, %1" - [(set_attr "type" "X1")]) - -(define_insn "*mm" - [(set (match_operand:SI 0 "register_operand" "=r") - (mm_combiner:SI - (and:SI (match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 3 "const_int_operand" "n")) - (and:SI (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 4 "const_int_operand" "n"))))] - "tilepro_bitfield_operand_p (INTVAL (operands[3]), NULL, NULL) - && INTVAL (operands[3]) == ~INTVAL (operands[4])" - "mm\t%0, %r1, %r2, %M3" - [(set_attr "type" "X01")]) - -(define_expand "insn_mm" - [(set (match_operand:SI 0 "register_operand" "") - (ior:SI - (and:SI (match_operand:SI 1 "reg_or_cint_operand" "") - (match_operand:SI 3 "u5bit_cint_operand" "")) - (and:SI (match_operand:SI 2 "reg_or_cint_operand" "") - (match_operand:SI 4 "u5bit_cint_operand" ""))))] - "" -{ - int first, last, i; - HOST_WIDE_INT mask; - - first = INTVAL (operands[3]) & 31; - last = INTVAL (operands[4]) & 31; - - if (((last + 1) & 31) == first) - { - /* Handle pathological case of a mask that includes only the - first operand. The reordering code below can't handle this. */ - emit_move_insn (operands[0], operands[1]); - DONE; - } - - /* Canonicalize order by putting constant second, if any. */ - if (CONST_INT_P (operands[1])) - { - int tmp_first; - - rtx tmp = operands[1]; - operands[1] = operands[2]; - operands[2] = tmp; - - /* Invert the bit range. */ - tmp_first = first; - first = (last + 1) & 31; - last = (tmp_first - 1) & 31; - } - - /* Convert the first/last bit range into a bit mask. */ - mask = 0; - - for (i = first; ; i = (i + 1) & 31) - { - mask |= ((HOST_WIDE_INT)1) << i; - if (i == last) - break; - } - - mask = trunc_int_for_mode (mask, SImode); - - operands[1] = force_reg (SImode, operands[1]); - operands[3] = GEN_INT (mask); - operands[4] = GEN_INT (~mask); - - if (CONST_INT_P (operands[2])) - { - HOST_WIDE_INT inserted_bits = INTVAL (operands[2]) & ~mask; - - if (inserted_bits == 0) - { - /* All inserted bits are zero. Use a bitwise AND. */ - emit_insn (gen_andsi3 (operands[0], operands[1], operands[3])); - DONE; - } - else if (inserted_bits == ~mask) - { - /* All inserted bits are ones. Use a bitwise IOR if we can. */ - if (satisfies_constraint_I (operands[4])) - { - emit_insn (gen_iorsi3 (operands[0], operands[1], operands[4])); - DONE; - } - - /* Canonicalize to inserting -1 when setting all masked bits - to 1, to facilitate CSE. */ - inserted_bits = -1; - } - - /* Sign extend the inserted bits to make them easier to materialize - in a register, but only if the inserted bits (~mask) do not already - include the high bits. */ - if ((~mask & 0x80000000) == 0) - { - int shift = sizeof (HOST_WIDE_INT) * 8 - first; - inserted_bits = (inserted_bits << shift) >> shift; - } - - operands[2] = GEN_INT (inserted_bits); - } - - operands[2] = force_reg (SImode, operands[2]); -}) - -(define_insn "insn_movelis" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec_volatile:SI [(match_operand:SI 1 "s16bit_cint_operand" "i")] - UNSPEC_INSN_MOVELIS))] - "" - "movelis\t%0, %1" - [(set_attr "type" "X01")]) - -(define_insn "insn_mtspr" - [(unspec_volatile:SI [(match_operand:SI 0 "u15bit_cint_operand" "i") - (match_operand:SI 1 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MTSPR) - (clobber (mem:BLK (const_int 0)))] - "" - "mtspr\t%0, %r1" - [(set_attr "type" "X1")]) - -(define_expand "insn_prefetch" - [(prefetch (match_operand:SI 0 "address_operand" "") - (const_int 0) - (const_int 2))]) - -(define_expand "insn_prefetch_L1" - [(use (match_operand:SI 0 "address_operand" ""))] - "" -{ - /* Generate a volatile byte load to a dummy register. */ - rtx mem = gen_rtx_MEM (QImode, operands[0]); - MEM_VOLATILE_P (mem) = 1; - - emit_insn (gen_zero_extendqisi2 (gen_reg_rtx (SImode), mem)); - DONE; -}) - -(define_expand "insn_s1a" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (mult:SI (match_operand:SI 1 "reg_or_0_operand" "") - (const_int 2)) - (match_operand:SI 2 "reg_or_0_operand" "")))] - "") - -(define_expand "insn_s2a" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (mult:SI (match_operand:SI 1 "reg_or_0_operand" "") - (const_int 4)) - (match_operand:SI 2 "reg_or_0_operand" "")))] - "") - -(define_expand "insn_s3a" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (mult:SI (match_operand:SI 1 "reg_or_0_operand" "") - (const_int 8)) - (match_operand:SI 2 "reg_or_0_operand" "")))] - "") - -(define_expand "insn_" - [(set (mem:I12MODE (match_operand:SI 0 "address_operand" "")) - (match_operand:SI 1 "reg_or_0_operand" ""))] - "" -{ - operands[1] = simplify_gen_subreg (mode, operands[1], SImode, 0); -}) - -(define_expand "insn_sw" - [(set (mem:SI (match_operand:SI 0 "address_operand" "")) - (match_operand:SI 1 "reg_or_0_operand" ""))] - "") - -(define_expand "insn_add" - [(parallel - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI (match_operand:SI 3 "register_operand" "") - (match_operand:SI 2 "s8bit_cint_operand" ""))) - (set (mem:I12MODE (match_dup 3)) - (match_operand:SI 1 "reg_or_0_operand" ""))])] - "" -{ - operands[1] = simplify_gen_subreg (mode, operands[1], SImode, 0); -}) - -(define_insn "*insn_add" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "0") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (mem:I12MODE (match_dup 3)) - (match_operand:I12MODE 1 "reg_or_0_operand" "rO"))] - "" - "add\t%0, %r1, %2" - [(set_attr "type" "X1")]) - -(define_insn "insn_swadd" - [(set (match_operand:SI 0 "register_operand" "=r") - (plus:SI (match_operand:SI 3 "register_operand" "0") - (match_operand:SI 2 "s8bit_cint_operand" "i"))) - (set (mem:SI (match_dup 3)) - (match_operand:SI 1 "reg_or_0_operand" "rO"))] - "" - "swadd\t%0, %r1, %2" - [(set_attr "type" "X1")]) - -(define_insn "insn_wh64" - [(unspec_volatile:VOID [(match_operand:SI 0 "reg_or_0_operand" "rO")] - UNSPEC_INSN_WH64) - (clobber (mem:BLK (const_int 0)))] - "" - "wh64\t%r0" - [(set_attr "type" "X1")]) - -(define_insn "insn_tns" - [(set (match_operand:SI 0 "register_operand" "=r") - (mem:SI (match_operand:SI 1 "reg_or_0_operand" "rO"))) - (set (mem:SI (match_dup 1)) (const_int 1))] - "" - "tns\t%0, %1" - [(set_attr "type" "X1")]) - -;; insn_addb -;; insn_addib -;; insn_maxb_u -;; insn_maxib_u -;; insn_minb_u -;; insn_minib_u -;; insn_seqb -;; insn_seqib -;; insn_sltb -;; insn_sltib -;; insn_sltb_u -;; insn_sltib_u -(define_insn "v4qi3" - [(set (match_operand:V4QI 0 "register_operand" "=r,r") - (v1op_immed:V4QI - (match_operand:V4QI 1 "reg_or_0_operand" "rO,rO") - (match_operand:V4QI 2 "reg_or_v4s8bit_operand" "W,rO")))] - "" - "@ - ib\t%0, %r1, %j2 - b\t%0, %r1, %r2" - [(set_attr "type" "X01,X01")]) - -(define_expand "insn_b" - [(set (match_operand:SI 0 "register_operand" "") - (v1op_immed:V4QI - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")))] - "" -{ - tilepro_expand_builtin_vector_binop (gen_v4qi3, V4QImode, operands[0], - V4QImode, operands[1], operands[2], true); - DONE; -}) - -(define_expand "insn_ib" - [(set (match_operand:SI 0 "register_operand" "") - (v1op_immed:V4QI - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "s8bit_cint_operand" "")))] - "" -{ - /* Tile out immediate and expand to general case. */ - rtx n = tilepro_simd_int (operands[2], QImode); - tilepro_expand_builtin_vector_binop (gen_v4qi3, V4QImode, operands[0], - V4QImode, operands[1], n, true); - DONE; -}) - -;; insn_shlb -;; insn_shlib -;; insn_shrb -;; insn_shrib -;; insn_srab -;; insn_sraib -(define_insn "v4qi3" - [(set (match_operand:V4QI 0 "register_operand" "=r,r") - (any_shift:V4QI - (match_operand:V4QI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_u5bit_operand" "I,rO")))] - "" - "@ - ib\t%0, %r1, %2 - b\t%0, %r1, %r2" - [(set_attr "type" "X01,X01")]) - -(define_expand "insn_b" - [(set (match_operand:SI 0 "register_operand" "") - (any_shift:V4QI - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_u5bit_operand" "")))] - "" -{ - tilepro_expand_builtin_vector_binop (gen_v4qi3, V4QImode, operands[0], - V4QImode, operands[1], operands[2], false); - DONE; -}) - -;; insn_addh -;; insn_addih -;; insn_maxh -;; insn_maxih -;; insn_minh -;; insn_minih -;; insn_seqh -;; insn_seqih -;; insn_slth -;; insn_sltih -;; insn_slth_u -;; insn_sltih_u -(define_insn "v2hi3" - [(set (match_operand:V2HI 0 "register_operand" "=r,r") - (v2op_immed:V2HI - (match_operand:V2HI 1 "reg_or_0_operand" "rO,rO") - (match_operand:V2HI 2 "reg_or_v2s8bit_operand" "Y,rO")))] - "" - "@ - ih\t%0, %r1, %j2 - h\t%0, %r1, %r2" - [(set_attr "type" "X01,X01")]) - -(define_expand "insn_h" - [(set (match_operand:SI 0 "register_operand" "") - (v2op_immed:V2HI - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")))] - "" -{ - tilepro_expand_builtin_vector_binop (gen_v2hi3, V2HImode, operands[0], - V2HImode, operands[1], operands[2], true); - DONE; -}) - -(define_expand "insn_ih" - [(set (match_operand:SI 0 "register_operand" "") - (v2op_immed:V2HI - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "s8bit_cint_operand" "")))] - "" -{ - /* Tile out immediate and expand to general case. */ - rtx n = tilepro_simd_int (operands[2], HImode); - tilepro_expand_builtin_vector_binop (gen_v2hi3, V2HImode, operands[0], - V2HImode, operands[1], n, true); - DONE; -}) - -;; insn_shlh -;; insn_shlih -;; insn_shrh -;; insn_shrih -;; insn_srah -;; insn_sraih -(define_insn "v2hi3" - [(set (match_operand:V2HI 0 "register_operand" "=r,r") - (any_shift:V2HI - (match_operand:V2HI 1 "reg_or_0_operand" "rO,rO") - (match_operand:SI 2 "reg_or_u5bit_operand" "I,rO")))] - "" - "@ - ih\t%0, %r1, %2 - h\t%0, %r1, %r2" - [(set_attr "type" "X01,X01")]) - -(define_expand "insn_h" - [(set (match_operand:SI 0 "register_operand" "") - (any_shift:V2HI - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")))] - "" -{ - tilepro_expand_builtin_vector_binop (gen_v2hi3, V2HImode, operands[0], - V2HImode, operands[1], operands[2], false); - DONE; -}) - -;; insn_addbs_u -;; insn_subbs_u -;; insn_subb -;; insn_slteb -;; insn_slteb_u -;; insn_sneb -(define_insn "v4qi3" - [(set (match_operand:V4QI 0 "register_operand" "=r") - (v1op:V4QI - (match_operand:V4QI 1 "reg_or_0_operand" "rO") - (match_operand:V4QI 2 "reg_or_0_operand" "rO")))] - "" - "b\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_expand "insn_b" - [(set (match_operand:SI 0 "register_operand" "") - (v1op:V4QI - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")))] - "" -{ - tilepro_expand_builtin_vector_binop (gen_v4qi3, V4QImode, operands[0], - V4QImode, operands[1], operands[2], true); - DONE; -}) - -;; insn_addhs -;; insn_subhs -;; insn_subh -;; insn_slteh -;; insn_slteh_u -;; insn_sneh -(define_insn "v2hi3" - [(set (match_operand:V2HI 0 "register_operand" "=r") - (v2op:V2HI - (match_operand:V2HI 1 "reg_or_0_operand" "rO") - (match_operand:V2HI 2 "reg_or_0_operand" "rO")))] - "" - "h\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_expand "insn_h" - [(set (match_operand:SI 0 "register_operand" "") - (v2op:V2HI - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")))] - "" -{ - tilepro_expand_builtin_vector_binop (gen_v2hi3, V2HImode, operands[0], - V2HImode, operands[1], operands[2], true); - DONE; -}) - -;; insn_inthb - -;; Byte ordering of these vectors is endian dependent. We concat -;; right-to-left for little endian. We concat and interleave in the -;; opposite way gcc's vector patterns work, so we need to reverse the -;; order of source operands. - -;; {B3,B2,B1,B0} {A3,A2,A1,A0} -;; => {A3,A2,A1,A0,B3,B2,B1,B0} -;; => {A3,B3,A2,B2} -(define_insn "vec_interleave_highv4qi" - [(set (match_operand:V4QI 0 "register_operand" "=r") - (vec_select:V4QI - (vec_concat:V8QI (match_operand:V4QI 1 "reg_or_0_operand" "rO") - (match_operand:V4QI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 2) (const_int 6) - (const_int 3) (const_int 7)])))] - "" - "inthb\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_inthb" - [(match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")] - "" -{ - /* Our instruction interleaves opposite of the way vec_interleave - works, so we need to reverse the source operands. */ - tilepro_expand_builtin_vector_binop (gen_vec_interleave_highv4qi, V4QImode, - operands[0], V4QImode, operands[2], - operands[1], true); - DONE; -}) - -;; insn_intlb -;; {B3,B2,B1,B0} {A3,A2,A1,A0} -;; => {A3,A2,A1,A0,B3,B2,B1,B0} -;; => {A1,B1,A0,B0} -(define_insn "vec_interleave_lowv4qi" - [(set (match_operand:V4QI 0 "register_operand" "=r") - (vec_select:V4QI - (vec_concat:V8QI (match_operand:V4QI 1 "reg_or_0_operand" "rO") - (match_operand:V4QI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 0) (const_int 4) - (const_int 1) (const_int 5)])))] - "" - "intlb\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_intlb" - [(match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")] - "" -{ - /* Our instruction interleaves opposite of the way vec_interleave - works, so we need to reverse the source operands. */ - tilepro_expand_builtin_vector_binop (gen_vec_interleave_lowv4qi, V4QImode, - operands[0], V4QImode, operands[2], - operands[1], true); - DONE; -}) - -;; insn_inthh -;; {B1,B0} {A1,A0} -;; => {A1,A0,B1,B0} -;; => {A1,B1} -(define_insn "vec_interleave_highv2hi" - [(set (match_operand:V2HI 0 "register_operand" "=r") - (vec_select:V2HI - (vec_concat:V4HI (match_operand:V2HI 1 "reg_or_0_operand" "rO") - (match_operand:V2HI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 1) (const_int 3)])))] - "" - "inthh\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_inthh" - [(match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")] - "" -{ - /* Our instruction interleaves opposite of the way vec_interleave - works, so we need to reverse the source operands. */ - tilepro_expand_builtin_vector_binop (gen_vec_interleave_highv2hi, V2HImode, - operands[0], V2HImode, operands[2], - operands[1], true); - DONE; -}) - -;; insn_intlh -;; {B1,B0} {A1,A0} -;; => {A1,A0,B1,B0} -;; => {A0,B0} -(define_insn "vec_interleave_lowv2hi" - [(set (match_operand:V2HI 0 "register_operand" "=r") - (vec_select:V2HI - (vec_concat:V4HI (match_operand:V2HI 1 "reg_or_0_operand" "rO") - (match_operand:V2HI 2 "reg_or_0_operand" "rO")) - (parallel [(const_int 0) (const_int 2)])))] - "" - "intlh\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_intlh" - [(match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "reg_or_0_operand" "") - (match_operand:SI 2 "reg_or_0_operand" "")] - "" -{ - /* Our instruction interleaves opposite of the way vec_interleave - works, so we need to reverse the source operands. */ - tilepro_expand_builtin_vector_binop (gen_vec_interleave_lowv2hi, V2HImode, - operands[0], V2HImode, operands[2], - operands[1], true); - DONE; -}) - -;; insn_packbs_u -;; insn_packlb -;; {B1,B0} {A1,A0} -;; => {A1,A0,B1,B0} -(define_insn "vec_pack__v2hi" - [(set (match_operand:V4QI 0 "register_operand" "=r") - (vec_concat:V4QI - (v2pack:V2QI (match_operand:V2HI 1 "reg_or_0_operand" "rO")) - (v2pack:V2QI (match_operand:V2HI 2 "reg_or_0_operand" "rO"))))] - "" - "b\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_b" - [(set (match_operand:SI 0 "register_operand" "") - (vec_concat:V4QI - (v2pack:V2QI (match_operand:SI 1 "reg_or_0_operand" "")) - (v2pack:V2QI (match_operand:SI 2 "reg_or_0_operand" ""))))] - "" -{ - /* Our instruction concats opposite of the way vec_pack works, so we - need to reverse the source operands. */ - tilepro_expand_builtin_vector_binop (gen_vec_pack__v2hi, - V4QImode, operands[0], - V2HImode, operands[2], operands[1], true); - DONE; -}) - -;; insn_packhb -;; {B1,B0} {A1,A0} -;; => {A1,A0,B1,B0} -(define_insn "vec_pack_hipart_v2hi" - [(set (match_operand:V4QI 0 "register_operand" "=r") - (vec_concat:V4QI - (truncate:V2QI - (ashiftrt:V2HI (match_operand:V2HI 1 "reg_or_0_operand" "rO") - (const_int 8))) - (truncate:V2QI - (ashiftrt:V2HI (match_operand:V2HI 2 "reg_or_0_operand" "rO") - (const_int 8)))))] - "" - "packhb\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_packhb" - [(set (match_operand:SI 0 "register_operand" "") - (vec_concat:V4QI - (truncate:V2QI - (ashiftrt:V2HI (match_operand:SI 2 "reg_or_0_operand" "") - (const_int 8))) - (truncate:V2QI - (ashiftrt:V2HI (match_operand:SI 1 "reg_or_0_operand" "") - (const_int 8)))))] - "" -{ - /* Our instruction concats opposite of the way vec_pack works, so we - need to reverse the source operands. */ - tilepro_expand_builtin_vector_binop (gen_vec_pack_hipart_v2hi, - V4QImode, operands[0], - V2HImode, operands[2], operands[1], true); - DONE; -}) - -;; insn_packhs -;; {B0} {A0} -;; => {A0,B0} -(define_insn "vec_pack_ssat_si" - [(set (match_operand:V2HI 0 "register_operand" "=r") - (vec_concat:V2HI - (ss_truncate:HI (match_operand:SI 1 "reg_or_0_operand" "rO")) - (ss_truncate:HI (match_operand:SI 2 "reg_or_0_operand" "rO"))))] - "" - "packhs\t%0, %r2, %r1" - [(set_attr "type" "X01")]) - -(define_expand "insn_packhs" - [(set (match_operand:SI 0 "register_operand" "") - (vec_concat:V2HI - (ss_truncate:HI (match_operand:SI 2 "reg_or_0_operand" "")) - (ss_truncate:HI (match_operand:SI 1 "reg_or_0_operand" ""))))] - "" -{ - /* Our instruction concats opposite of the way vec_pack works, so we - need to reverse the source operands. */ - tilepro_expand_builtin_vector_binop (gen_vec_pack_ssat_si, - V2HImode, operands[0], - SImode, operands[2], operands[1], true); - DONE; -}) - -;; Rest of the intrinsics -(define_insn "insn_adiffb_u" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_ADIFFB_U))] - "" - "adiffb_u\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_adiffh" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_ADIFFH))] - "" - "adiffh\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_avgb_u" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_AVGB_U))] - "" - "avgb_u\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_avgh" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_AVGH))] - "" - "avgh\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_bitx" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO")] - UNSPEC_INSN_BITX))] - "" - "bitx\t%0, %r1" - [(set_attr "type" "Y0")]) - -(define_insn "insn_crc32_32" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CRC32_32))] - "" - "crc32_32\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_crc32_8" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_CRC32_8))] - "" - "crc32_8\t%0, %r1, %r2" - [(set_attr "type" "X0")]) - -(define_insn "insn_dtlbpr" - [(unspec_volatile:VOID [(match_operand:SI 0 "reg_or_0_operand" "rO")] - UNSPEC_INSN_DTLBPR)] - "" - "dtlbpr\t%r0" - [(set_attr "type" "X1")]) - -(define_insn "insn_dword_align" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_DWORD_ALIGN))] - "" - "dword_align\t%0, %r2, %r3" - [(set_attr "type" "X0")]) - -(define_insn "insn_finv" - [(unspec_volatile:VOID [(match_operand:SI 0 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FINV)] - "" - "finv\t%r0" - [(set_attr "type" "X1")]) - -(define_insn "insn_flush" - [(unspec_volatile:VOID [(match_operand:SI 0 "reg_or_0_operand" "rO")] - UNSPEC_INSN_FLUSH)] - "" - "flush\t%r0" - [(set_attr "type" "X1")]) - -(define_insn "insn_fnop" - [(unspec_volatile:VOID [(const_int 0)] UNSPEC_INSN_FNOP)] - "" - "fnop") - -(define_insn "insn_ill" - [(unspec_volatile:VOID [(const_int 0)] UNSPEC_INSN_ILL)] - "" - "ill" - [(set_attr "type" "cannot_bundle")]) - -(define_insn "insn_inv" - [(unspec_volatile:VOID [(match_operand:SI 0 "reg_or_0_operand" "rO")] - UNSPEC_INSN_INV)] - "" - "inv\t%r0" - [(set_attr "type" "X1")]) - -(define_insn "insn_lnk" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(const_int 0)] UNSPEC_INSN_LNK))] - "" - "lnk\t%0" - [(set_attr "type" "X1")]) - -(define_insn "insn_mnzb" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MNZB))] - "" - "mnzb\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "insn_mnzh" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MNZH))] - "" - "mnzh\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "insn_mulhh_ss" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHH_SS))] - "" - "mulhh_ss\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mulhh_su" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHH_SU))] - "" - "mulhh_su\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhh_uu" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHH_UU))] - "" - "mulhh_uu\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mulhha_ss" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHHA_SS))] - "" - "mulhha_ss\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mulhha_su" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHHA_SU))] - "" - "mulhha_su\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhha_uu" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHHA_UU))] - "" - "mulhha_uu\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mulhhsa_uu" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHHSA_UU))] - "" - "mulhhsa_uu\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhl_ss" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHL_SS))] - "" - "mulhl_ss\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhl_su" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHL_SU))] - "" - "mulhl_su\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhl_us" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHL_US))] - "" - "mulhl_us\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhl_uu" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHL_UU))] - "" - "mulhl_uu\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhla_ss" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHLA_SS))] - "" - "mulhla_ss\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhla_su" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHLA_SU))] - "" - "mulhla_su\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhla_us" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHLA_US))] - "" - "mulhla_us\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhla_uu" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHLA_UU))] - "" - "mulhla_uu\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulhlsa_uu" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULHLSA_UU))] - "" - "mulhlsa_uu\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mulll_ss" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULLL_SS))] - "" - "mulll_ss\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mulll_su" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULLL_SU))] - "" - "mulll_su\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mulll_uu" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULLL_UU))] - "" - "mulll_uu\t%0, %r1, %r2" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mullla_ss" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULLLA_SS))] - "" - "mullla_ss\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mullla_su" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULLLA_SU))] - "" - "mullla_su\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mullla_uu" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULLLA_UU))] - "" - "mullla_uu\t%0, %r2, %r3" - [(set_attr "type" "Y0_2cycle")]) - -(define_insn "insn_mulllsa_uu" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MULLLSA_UU))] - "" - "mulllsa_uu\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_mzb" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MZB))] - "" - "mzb\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "insn_mzh" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_MZH))] - "" - "mzh\t%0, %r1, %r2" - [(set_attr "type" "X01")]) - -(define_insn "insn_nap" - [(unspec_volatile:VOID [(const_int 0)] UNSPEC_INSN_NAP)] - "" - "nap" - [(set_attr "type" "cannot_bundle")]) - -(define_insn "insn_nor" - [(set (match_operand:SI 0 "register_operand" "=r") - (and:SI (not:SI (match_operand:SI 1 "reg_or_0_operand" "rO")) - (not:SI (match_operand:SI 2 "reg_or_0_operand" "rO"))))] - "" - "nor\t%0, %r1, %r2") - -(define_insn "insn_sadab_u" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SADAB_U))] - "" - "sadab_u\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_sadah" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SADAH))] - "" - "sadah\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_sadah_u" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO") - (match_operand:SI 3 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SADAH_U))] - "" - "sadah_u\t%0, %r2, %r3" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_sadb_u" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SADB_U))] - "" - "sadb_u\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_sadh" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SADH))] - "" - "sadh\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_sadh_u" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "rO") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_SADH_U))] - "" - "sadh_u\t%0, %r1, %r2" - [(set_attr "type" "X0_2cycle")]) - -(define_insn "insn_tblidxb0" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_TBLIDXB0))] - "" - "tblidxb0\t%0, %r2" - [(set_attr "type" "Y0")]) - -(define_insn "insn_tblidxb1" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_TBLIDXB1))] - "" - "tblidxb1\t%0, %r2" - [(set_attr "type" "Y0")]) - -(define_insn "insn_tblidxb2" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_TBLIDXB2))] - "" - "tblidxb2\t%0, %r2" - [(set_attr "type" "Y0")]) - -(define_insn "insn_tblidxb3" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "reg_or_0_operand" "0") - (match_operand:SI 2 "reg_or_0_operand" "rO")] - UNSPEC_INSN_TBLIDXB3))] - "" - "tblidxb3\t%0, %r2" - [(set_attr "type" "Y0")]) - - -;; -;; pic related instructions -;; - -;; NOTE: We compute the label in this unusual way because if we place -;; the label after the lnk, whether it is at the same address as the -;; lnk will vary depending on whether the optimization level chooses to -;; insert bundling braces. -(define_insn "insn_lnk_and_label" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec_volatile:SI [(match_operand:SI 1 "symbolic_operand" "")] - UNSPEC_LNK_AND_LABEL))] - "" - "%1 = . + 8\n\tlnk\t%0" - [(set_attr "type" "X1")]) - -(define_expand "addli_pcrel" - [(set (match_operand:SI 0 "register_operand" "") - (lo_sum:SI - (match_operand:SI 1 "register_operand" "") - (const:SI - (unspec:SI [(match_operand:SI 2 "symbolic_operand" "") - (match_operand:SI 3 "symbolic_operand" "")] - UNSPEC_PCREL_SYM))))] - "flag_pic") - -(define_expand "auli_pcrel" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI - (match_operand:SI 1 "reg_or_0_operand" "") - (high:SI - (const:SI - (unspec:SI [(match_operand:SI 2 "symbolic_operand" "") - (match_operand:SI 3 "symbolic_operand" "")] - UNSPEC_PCREL_SYM)))))] - "flag_pic") - -(define_expand "add_got16" - [(set (match_operand:SI 0 "register_operand" "") - (lo_sum:SI - (match_operand:SI 1 "reg_or_0_operand" "") - (const:SI (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")] - UNSPEC_GOT16_SYM))))] - "flag_pic == 1") - -(define_expand "addhi_got32" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI - (match_operand:SI 1 "reg_or_0_operand" "") - (high:SI - (const:SI (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")] - UNSPEC_GOT32_SYM)))))] - "flag_pic == 2") - -(define_expand "addlo_got32" - [(set (match_operand:SI 0 "register_operand" "") - (lo_sum:SI - (match_operand:SI 1 "reg_or_0_operand" "") - (const:SI (unspec:SI [(match_operand:SI 2 "symbolic_operand" "")] - UNSPEC_GOT32_SYM))))] - "flag_pic == 2") - - -;; -;; TLS -;; - -(define_expand "tls_gd_addhi" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI - (match_operand:SI 1 "reg_or_0_operand" "") - (high:SI - (const:SI (unspec:SI [(match_operand 2 "tls_symbolic_operand" "")] - UNSPEC_TLS_GD)))))] - "HAVE_AS_TLS") - -(define_expand "tls_gd_addlo" - [(set (match_operand:SI 0 "register_operand" "") - (lo_sum:SI - (match_operand:SI 1 "reg_or_0_operand" "") - (const:SI (unspec:SI [(match_operand 2 "tls_symbolic_operand" "")] - UNSPEC_TLS_GD))))] - "HAVE_AS_TLS") - -(define_expand "tls_gd_call" - [(parallel - [(set (reg:SI 0) - (unspec:SI [(match_operand:SI 0 "tls_symbolic_operand" "") - (reg:SI 0)] - UNSPEC_TLS_GD_CALL)) - (clobber (reg:SI 25)) - (clobber (reg:SI 26)) - (clobber (reg:SI 27)) - (clobber (reg:SI 28)) - (clobber (reg:SI 29)) - (clobber (reg:SI 55))])] - "" -{ - cfun->machine->calls_tls_get_addr = true; -}) - -(define_insn "*tls_gd_call" - [(set (reg:SI 0) - (unspec:SI [(match_operand:SI 0 "tls_symbolic_operand" "") - (reg:SI 0)] - UNSPEC_TLS_GD_CALL)) - (clobber (reg:SI 25)) - (clobber (reg:SI 26)) - (clobber (reg:SI 27)) - (clobber (reg:SI 28)) - (clobber (reg:SI 29)) - (clobber (reg:SI 55))] - "" - "jal\ttls_gd_call(%0)" - [(set_attr "type" "X1")]) - -(define_insn "tls_gd_add" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "tls_symbolic_operand" "")] - UNSPEC_TLS_GD_ADD))] - "HAVE_AS_TLS" - "addi\t%0, %1, tls_gd_add(%2)") - -(define_insn "tls_ie_load" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:SI 1 "register_operand" "r") - (match_operand:SI 2 "tls_symbolic_operand" "")] - UNSPEC_TLS_IE_LOAD))] - "HAVE_AS_TLS" - "lw_tls\t%0, %1, tls_ie_load(%2)" - [(set_attr "type" "X1_2cycle")]) - -(define_expand "tls_ie_addhi" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI - (match_operand:SI 1 "register_operand" "") - (high:SI - (const:SI (unspec:SI [(match_operand 2 "tls_ie_symbolic_operand" "")] - UNSPEC_TLS_IE)))))] - "HAVE_AS_TLS") - -(define_expand "tls_ie_addlo" - [(set (match_operand:SI 0 "register_operand" "") - (lo_sum:SI - (match_operand:SI 1 "register_operand" "") - (const:SI (unspec:SI [(match_operand 2 "tls_ie_symbolic_operand" "")] - UNSPEC_TLS_IE))))] - "HAVE_AS_TLS") - -(define_expand "tls_le_addhi" - [(set (match_operand:SI 0 "register_operand" "") - (plus:SI - (match_operand:SI 1 "register_operand" "") - (high:SI - (const:SI (unspec:SI [(match_operand 2 "tls_le_symbolic_operand" "")] - UNSPEC_TLS_LE)))))] - "HAVE_AS_TLS") - -(define_expand "tls_le_addlo" - [(set (match_operand:SI 0 "register_operand" "") - (lo_sum:SI - (match_operand:SI 1 "register_operand" "") - (const:SI (unspec:SI [(match_operand 2 "tls_le_symbolic_operand" "")] - UNSPEC_TLS_LE))))] - "HAVE_AS_TLS") - - -;; -;; Stack protector instructions. -;; - -(define_expand "stack_protect_set" - [(set (match_operand 0 "nonautoincmem_operand" "") - (match_operand 1 "nonautoincmem_operand" ""))] - "" -{ -#ifdef TARGET_THREAD_SSP_OFFSET - rtx tp = gen_rtx_REG (Pmode, THREAD_POINTER_REGNUM); - rtx ssp_addr = gen_rtx_PLUS (Pmode, tp, GEN_INT (TARGET_THREAD_SSP_OFFSET)); - rtx ssp = gen_reg_rtx (Pmode); - - emit_insn (gen_rtx_SET (ssp, ssp_addr)); - - operands[1] = gen_rtx_MEM (Pmode, ssp); -#endif - - emit_insn (gen_stack_protect_setsi (operands[0], operands[1])); - - DONE; -}) - -(define_insn "stack_protect_setsi" - [(set (match_operand:SI 0 "nonautoincmem_operand" "=U") - (unspec:SI [(match_operand:SI 1 "nonautoincmem_operand" "U")] - UNSPEC_SP_SET)) - (set (match_scratch:SI 2 "=&r") (const_int 0))] - "" - "lw\t%2, %1; { sw\t%0, %2; move\t%2, zero }" - [(set_attr "length" "16") - (set_attr "type" "cannot_bundle_3cycle")]) - - -(define_expand "stack_protect_test" - [(match_operand 0 "nonautoincmem_operand" "") - (match_operand 1 "nonautoincmem_operand" "") - (match_operand 2 "" "")] - "" -{ - rtx compare_result; - rtx bcomp, loc_ref; - -#ifdef TARGET_THREAD_SSP_OFFSET - rtx tp = gen_rtx_REG (Pmode, THREAD_POINTER_REGNUM); - rtx ssp_addr = gen_rtx_PLUS (Pmode, tp, GEN_INT (TARGET_THREAD_SSP_OFFSET)); - rtx ssp = gen_reg_rtx (Pmode); - - emit_insn (gen_rtx_SET (ssp, ssp_addr)); - - operands[1] = gen_rtx_MEM (Pmode, ssp); -#endif - - compare_result = gen_reg_rtx (SImode); - - emit_insn (gen_stack_protect_testsi (compare_result, operands[0], - operands[1])); - - bcomp = gen_rtx_NE (SImode, compare_result, const0_rtx); - - loc_ref = gen_rtx_LABEL_REF (VOIDmode, operands[2]); - - emit_jump_insn (gen_rtx_SET (pc_rtx, - gen_rtx_IF_THEN_ELSE (VOIDmode, bcomp, - loc_ref, pc_rtx))); - - DONE; -}) - -(define_insn "stack_protect_testsi" - [(set (match_operand:SI 0 "register_operand" "=&r") - (unspec:SI [(match_operand:SI 1 "nonautoincmem_operand" "U") - (match_operand:SI 2 "nonautoincmem_operand" "U")] - UNSPEC_SP_TEST)) - (set (match_scratch:SI 3 "=&r") (const_int 0))] - "" - "lw\t%0, %1; lw\t%3, %2; { seq\t%0, %0, %3; move\t%3, zero }" - [(set_attr "length" "24") - (set_attr "type" "cannot_bundle_4cycle")]) - diff --git a/gcc/config/tilepro/tilepro.opt b/gcc/config/tilepro/tilepro.opt deleted file mode 100644 index 74ba0f3..0000000 --- a/gcc/config/tilepro/tilepro.opt +++ /dev/null @@ -1,36 +0,0 @@ -; Options for the TILEPro port of the compiler. -; Copyright (C) 2011-2022 Free Software Foundation, Inc. -; Contributed by Walter Lee (walt@tilera.com) -; -; This file is part of GCC. -; -; GCC is free software; you can redistribute it and/or modify it under -; the terms of the GNU General Public License as published by the Free -; Software Foundation; either version 3, or (at your option) any later -; version. -; -; GCC is distributed in the hope that it will be useful, but WITHOUT ANY -; WARRANTY; without even the implied warranty of MERCHANTABILITY or -; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -; for more details. -; -; You should have received a copy of the GNU General Public License -; along with GCC; see the file COPYING3. If not see -; . - -m32 -Target RejectNegative -Compile with 32 bit longs and pointers, which is the only supported -behavior and thus the flag is ignored. - -mcpu= -Target RejectNegative Joined Enum(tilepro_cpu) Var(tilepro_cpu) Init(0) --mcpu=CPU Use features of and schedule code for given CPU. - -Enum -Name(tilepro_cpu) Type(int) -Known TILEPro CPUs (for use with the -mcpu= option): - -EnumValue -Enum(tilepro_cpu) String(tilepro) Value(0) - diff --git a/gcc/configure b/gcc/configure index f43dc98..62872d1 100755 --- a/gcc/configure +++ b/gcc/configure @@ -25804,33 +25804,6 @@ foo: .long 25 xor %l1, %tle_lox10(foo), %o5 ld [%g7 + %o5], %o1" ;; - tilepro*-*-*) - conftest_s=' - .section ".tdata","awT",@progbits -foo: .long 25 - .text - addli r0, zero, tls_gd(foo) - auli r0, zero, tls_gd_ha16(foo) - addli r0, r0, tls_gd_lo16(foo) - jal __tls_get_addr - addli r0, zero, tls_ie(foo) - auli r0, r0, tls_ie_ha16(foo) - addli r0, r0, tls_ie_lo16(foo)' - tls_as_opt="--fatal-warnings" - ;; - tilegx*-*-*) - conftest_s=' - .section ".tdata","awT",@progbits -foo: .long 25 - .text - shl16insli r0, zero, hw0_last_tls_gd(foo) - shl16insli r0, zero, hw1_last_tls_gd(foo) - shl16insli r0, r0, hw0_tls_gd(foo) - jal __tls_get_addr - shl16insli r0, zero, hw1_last_tls_ie(foo) - shl16insli r0, r0, hw0_tls_ie(foo)' - tls_as_opt="--fatal-warnings" - ;; xtensa*-*-*) conftest_s=' .section ".tdata","awT",@progbits @@ -29086,7 +29059,7 @@ esac case "$cpu_type" in aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | loongarch | m32c \ | m68k | microblaze | mips | nds32 | nios2 | pa | riscv | rs6000 | score | sparc \ - | tilegx | tilepro | visium | xstormy16 | xtensa) + | visium | xstormy16 | xtensa) insn="nop" ;; ia64 | s390) diff --git a/gcc/configure.ac b/gcc/configure.ac index 80bdd8c..4467473 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4082,33 +4082,6 @@ foo: .long 25 xor %l1, %tle_lox10(foo), %o5 ld [%g7 + %o5], %o1" ;; - tilepro*-*-*) - conftest_s=' - .section ".tdata","awT",@progbits -foo: .long 25 - .text - addli r0, zero, tls_gd(foo) - auli r0, zero, tls_gd_ha16(foo) - addli r0, r0, tls_gd_lo16(foo) - jal __tls_get_addr - addli r0, zero, tls_ie(foo) - auli r0, r0, tls_ie_ha16(foo) - addli r0, r0, tls_ie_lo16(foo)' - tls_as_opt="--fatal-warnings" - ;; - tilegx*-*-*) - conftest_s=' - .section ".tdata","awT",@progbits -foo: .long 25 - .text - shl16insli r0, zero, hw0_last_tls_gd(foo) - shl16insli r0, zero, hw1_last_tls_gd(foo) - shl16insli r0, r0, hw0_tls_gd(foo) - jal __tls_get_addr - shl16insli r0, zero, hw1_last_tls_ie(foo) - shl16insli r0, r0, hw0_tls_ie(foo)' - tls_as_opt="--fatal-warnings" - ;; xtensa*-*-*) conftest_s=' .section ".tdata","awT",@progbits @@ -5419,7 +5392,7 @@ esac case "$cpu_type" in aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | loongarch | m32c \ | m68k | microblaze | mips | nds32 | nios2 | pa | riscv | rs6000 | score | sparc \ - | tilegx | tilepro | visium | xstormy16 | xtensa) + | visium | xstormy16 | xtensa) insn="nop" ;; ia64 | s390) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index a2e2a30..dfbe33a 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -14638,8 +14638,6 @@ instructions, but allow the compiler to schedule those calls. * SH Built-in Functions:: * SPARC VIS Built-in Functions:: * TI C6X Built-in Functions:: -* TILE-Gx Built-in Functions:: -* TILEPro Built-in Functions:: * x86 Built-in Functions:: * x86 transactional memory intrinsics:: * x86 control-flow protection intrinsics:: @@ -21572,75 +21570,6 @@ int _abs (int); int _abs2 (int); @end smallexample -@node TILE-Gx Built-in Functions -@subsection TILE-Gx Built-in Functions - -GCC provides intrinsics to access every instruction of the TILE-Gx -processor. The intrinsics are of the form: - -@smallexample - -unsigned long long __insn_@var{op} (...) - -@end smallexample - -Where @var{op} is the name of the instruction. Refer to the ISA manual -for the complete list of instructions. - -GCC also provides intrinsics to directly access the network registers. -The intrinsics are: - -@smallexample -unsigned long long __tile_idn0_receive (void); -unsigned long long __tile_idn1_receive (void); -unsigned long long __tile_udn0_receive (void); -unsigned long long __tile_udn1_receive (void); -unsigned long long __tile_udn2_receive (void); -unsigned long long __tile_udn3_receive (void); -void __tile_idn_send (unsigned long long); -void __tile_udn_send (unsigned long long); -@end smallexample - -The intrinsic @code{void __tile_network_barrier (void)} is used to -guarantee that no network operations before it are reordered with -those after it. - -@node TILEPro Built-in Functions -@subsection TILEPro Built-in Functions - -GCC provides intrinsics to access every instruction of the TILEPro -processor. The intrinsics are of the form: - -@smallexample - -unsigned __insn_@var{op} (...) - -@end smallexample - -@noindent -where @var{op} is the name of the instruction. Refer to the ISA manual -for the complete list of instructions. - -GCC also provides intrinsics to directly access the network registers. -The intrinsics are: - -@smallexample -unsigned __tile_idn0_receive (void); -unsigned __tile_idn1_receive (void); -unsigned __tile_sn_receive (void); -unsigned __tile_udn0_receive (void); -unsigned __tile_udn1_receive (void); -unsigned __tile_udn2_receive (void); -unsigned __tile_udn3_receive (void); -void __tile_idn_send (unsigned); -void __tile_sn_send (unsigned); -void __tile_udn_send (unsigned); -@end smallexample - -The intrinsic @code{void __tile_network_barrier (void)} is used to -guarantee that no network operations before it are reordered with -those after it. - @node x86 Built-in Functions @subsection x86 Built-in Functions diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index ed0d1d8..460da3a 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -758,7 +758,7 @@ mips64orion, mips64vr, mipsel, mipsisa32, mipsisa32r2, mipsisa64, mipsisa64r2, mipsisa64r2el, mipsisa64sb1, mipsisa64sr71k, mipstx39, mmix, mn10300, moxie, msp430, nds32be, nds32le, nios2, nvptx, or1k, pdp11, powerpc, powerpc64, powerpc64le, powerpcle, pru, riscv32, riscv32be, riscv64, riscv64be, rl78, rx, -s390, s390x, sh, shle, sparc, sparc64, tic6x, tilegx, tilegxbe, tilepro, v850, +s390, s390x, sh, shle, sparc, sparc64, tic6x, v850, v850e, v850e1, vax, visium, x86_64, xstormy16, xtensa @end quotation @@ -3675,12 +3675,6 @@ information have to. @item @uref{#c6x-x-x,,c6x-*-*} @item -@uref{#tilegx-x-linux,,tilegx-*-linux*} -@item -@uref{#tilegxbe-x-linux,,tilegxbe-*-linux*} -@item -@uref{#tilepro-x-linux,,tilepro-*-linux*} -@item @uref{#visium-x-elf, visium-*-elf} @item @uref{#x-x-vxworks,,*-*-vxworks*} @@ -4981,30 +4975,6 @@ The C6X family of processors. This port requires binutils-2.22 or newer. @html
@end html -@anchor{tilegx-*-linux} -@heading tilegx-*-linux* -The TILE-Gx processor in little endian mode, running GNU/Linux. This -port requires binutils-2.22 or newer. - -@html -
-@end html -@anchor{tilegxbe-*-linux} -@heading tilegxbe-*-linux* -The TILE-Gx processor in big endian mode, running GNU/Linux. This -port requires binutils-2.23 or newer. - -@html -
-@end html -@anchor{tilepro-*-linux} -@heading tilepro-*-linux* -The TILEPro processor running GNU/Linux. This port requires -binutils-2.22 or newer. - -@html -
-@end html @anchor{visium-x-elf} @heading visium-*-elf CDS VISIUMcore processor. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index dfaa561..bde59ff 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1368,13 +1368,6 @@ See RS/6000 and PowerPC Options. @emph{System V Options} @gccoptlist{-Qy -Qn -YP,@var{paths} -Ym,@var{dir}} -@emph{TILE-Gx Options} -@gccoptlist{-mcpu=CPU -m32 -m64 -mbig-endian -mlittle-endian @gol --mcmodel=@var{code-model}} - -@emph{TILEPro Options} -@gccoptlist{-mcpu=@var{cpu} -m32} - @emph{V850 Options} @gccoptlist{-mlong-calls -mno-long-calls -mep -mno-ep @gol -mprolog-function -mno-prolog-function -mspace @gol @@ -19174,8 +19167,6 @@ platform. * Solaris 2 Options:: * SPARC Options:: * System V Options:: -* TILE-Gx Options:: -* TILEPro Options:: * V850 Options:: * VAX Options:: * Visium Options:: @@ -31068,63 +31059,6 @@ The assembler uses this option. @c the generic assembler that comes with Solaris takes just -Ym. @end table -@node TILE-Gx Options -@subsection TILE-Gx Options -@cindex TILE-Gx options - -These @samp{-m} options are supported on the TILE-Gx: - -@table @gcctabopt -@item -mcmodel=small -@opindex mcmodel=small -Generate code for the small model. The distance for direct calls is -limited to 500M in either direction. PC-relative addresses are 32 -bits. Absolute addresses support the full address range. - -@item -mcmodel=large -@opindex mcmodel=large -Generate code for the large model. There is no limitation on call -distance, pc-relative addresses, or absolute addresses. - -@item -mcpu=@var{name} -@opindex mcpu -Selects the type of CPU to be targeted. Currently the only supported -type is @samp{tilegx}. - -@item -m32 -@itemx -m64 -@opindex m32 -@opindex m64 -Generate code for a 32-bit or 64-bit environment. The 32-bit -environment sets int, long, and pointer to 32 bits. The 64-bit -environment sets int to 32 bits and long and pointer to 64 bits. - -@item -mbig-endian -@itemx -mlittle-endian -@opindex mbig-endian -@opindex mlittle-endian -Generate code in big/little endian mode, respectively. -@end table - -@node TILEPro Options -@subsection TILEPro Options -@cindex TILEPro options - -These @samp{-m} options are supported on the TILEPro: - -@table @gcctabopt -@item -mcpu=@var{name} -@opindex mcpu -Selects the type of CPU to be targeted. Currently the only supported -type is @samp{tilepro}. - -@item -m32 -@opindex m32 -Generate code for a 32-bit environment, which sets int, long, and -pointer to 32 bits. This is the only supported behavior so the flag -is essentially ignored. -@end table - @node V850 Options @subsection V850 Options @cindex V850 Options diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 463471f..04aedfa 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -3859,154 +3859,6 @@ Register B14 (aka DP). @end table -@item TILE-Gx---@file{config/tilegx/constraints.md} -@table @code -@item R00 -@itemx R01 -@itemx R02 -@itemx R03 -@itemx R04 -@itemx R05 -@itemx R06 -@itemx R07 -@itemx R08 -@itemx R09 -@itemx R10 -Each of these represents a register constraint for an individual -register, from r0 to r10. - -@item I -Signed 8-bit integer constant. - -@item J -Signed 16-bit integer constant. - -@item K -Unsigned 16-bit integer constant. - -@item L -Integer constant that fits in one signed byte when incremented by one -(@minus{}129 @dots{} 126). - -@item m -Memory operand. If used together with @samp{<} or @samp{>}, the -operand can have postincrement which requires printing with @samp{%In} -and @samp{%in} on TILE-Gx. For example: - -@smallexample -asm ("st_add %I0,%1,%i0" : "=m<>" (*mem) : "r" (val)); -@end smallexample - -@item M -A bit mask suitable for the BFINS instruction. - -@item N -Integer constant that is a byte tiled out eight times. - -@item O -The integer zero constant. - -@item P -Integer constant that is a sign-extended byte tiled out as four shorts. - -@item Q -Integer constant that fits in one signed byte when incremented -(@minus{}129 @dots{} 126), but excluding -1. - -@item S -Integer constant that has all 1 bits consecutive and starting at bit 0. - -@item T -A 16-bit fragment of a got, tls, or pc-relative reference. - -@item U -Memory operand except postincrement. This is roughly the same as -@samp{m} when not used together with @samp{<} or @samp{>}. - -@item W -An 8-element vector constant with identical elements. - -@item Y -A 4-element vector constant with identical elements. - -@item Z0 -The integer constant 0xffffffff. - -@item Z1 -The integer constant 0xffffffff00000000. - -@end table - -@item TILEPro---@file{config/tilepro/constraints.md} -@table @code -@item R00 -@itemx R01 -@itemx R02 -@itemx R03 -@itemx R04 -@itemx R05 -@itemx R06 -@itemx R07 -@itemx R08 -@itemx R09 -@itemx R10 -Each of these represents a register constraint for an individual -register, from r0 to r10. - -@item I -Signed 8-bit integer constant. - -@item J -Signed 16-bit integer constant. - -@item K -Nonzero integer constant with low 16 bits zero. - -@item L -Integer constant that fits in one signed byte when incremented by one -(@minus{}129 @dots{} 126). - -@item m -Memory operand. If used together with @samp{<} or @samp{>}, the -operand can have postincrement which requires printing with @samp{%In} -and @samp{%in} on TILEPro. For example: - -@smallexample -asm ("swadd %I0,%1,%i0" : "=m<>" (mem) : "r" (val)); -@end smallexample - -@item M -A bit mask suitable for the MM instruction. - -@item N -Integer constant that is a byte tiled out four times. - -@item O -The integer zero constant. - -@item P -Integer constant that is a sign-extended byte tiled out as two shorts. - -@item Q -Integer constant that fits in one signed byte when incremented -(@minus{}129 @dots{} 126), but excluding -1. - -@item T -A symbolic operand, or a 16-bit fragment of a got, tls, or pc-relative -reference. - -@item U -Memory operand except postincrement. This is roughly the same as -@samp{m} when not used together with @samp{<} or @samp{>}. - -@item W -A 4-element vector constant with identical elements. - -@item Y -A 2-element vector constant with identical elements. - -@end table - @item Visium---@file{config/visium/constraints.md} @table @code @item b diff --git a/gcc/testsuite/gcc.dg/lower-subreg-1.c b/gcc/testsuite/gcc.dg/lower-subreg-1.c index 595938a..c62db2c 100644 --- a/gcc/testsuite/gcc.dg/lower-subreg-1.c +++ b/gcc/testsuite/gcc.dg/lower-subreg-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { ! { mips64 || { aarch64*-*-* arm*-*-* i?86-*-* ia64-*-* pru-*-* sparc*-*-* tilegx-*-* x86_64-*-* } } } } } */ +/* { dg-do compile { target { ! { mips64 || { aarch64*-*-* arm*-*-* i?86-*-* ia64-*-* pru-*-* sparc*-*-* x86_64-*-* } } } } } */ /* { dg-options "-O -fdump-rtl-subreg1" } */ /* { dg-require-effective-target ilp32 } */ diff --git a/gcc/testsuite/gcc.misc-tests/linkage.exp b/gcc/testsuite/gcc.misc-tests/linkage.exp index c955332..64da5d1 100644 --- a/gcc/testsuite/gcc.misc-tests/linkage.exp +++ b/gcc/testsuite/gcc.misc-tests/linkage.exp @@ -98,13 +98,6 @@ if { [isnative] && ![is_remote host] } then { } elseif [ string match "*ppc" $file_string ] { set native_cflags "-m32" } - } elseif [istarget "tilegx-*-linux*"] { - set file_string [exec file "linkage-x.o"] - if [ string match "*64-bit*" $file_string ] { - set native_cflags "-m64" - } elseif [ string match "*32-bit*" $file_string ] { - set native_cflags "-m32" - } } elseif [istarget "*86*-*-darwin*"] { set file_string [exec file "linkage-x.o"] if [ string match "*64*" $file_string ] { -- cgit v1.1 From 8c99e307b20c502e55c425897fb3884ba8f05882 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Sat, 25 Jun 2022 18:58:02 -0400 Subject: Convert DOM to use Ranger rather than EVRP [Jeff, this is the same patch I sent you last week with minor tweaks to the commit message.] [Despite the verbosity of the message, this is actually a pretty straightforward patch. It should've gone in last cycle, but there was a nagging regression I couldn't get to until after stage1 had closed.] There are 3 uses of EVRP in DOM that must be converted. Unfortunately, they need to be converted in one go, so further splitting of this patch would be problematic. There's nothing here earth shattering. It's all pretty obvious in retrospect, but I've added a short description of each use to aid in reviewing: * Convert evrp use in cprop to ranger. This is easy, as cprop in DOM was converted to the ranger API last cycle, so this is just a matter of using a ranger instead of an evrp_range_analyzer. * Convert evrp use in threader to ranger. The idea here is to use the hybrid approach we used for the initial VRP threader conversion last cycle. The DOM threader will continue using the forward threader infrastructure while continuing to query DOM data structures, and only if the conditional does not relsolve, using the ranger. This gives us the best of both worlds, and is a proven approach. Furthermore, as frange and prange come live in the next cycle, we can move away from the forward threader altogether, and just add another backward threader. This will not only remove the last use of the forward threader, but will allow us to remove at least 1 or 2 threader instances. * Convert conditional folding to use the method used by the ranger and evrp. Previously DOM was calling into the guts of simplify_using_ranges::vrp_visit_cond_stmt. The blessed way now is using fold_cond() which rewrites the conditional and edges automatically. When legacy is removed, simplify_using_ranges will be further cleaned up, and there will only be one entry point into simplifying a statement. * DOM was setting global ranges determined from unreachable edges as a side-effect of using the evrp engine. We must handle these cases before nuking evrp, and DOM seems like a good fit. I've just moved the snippet to DOM, but it could live anywhere else we do a DOM walk. For the record, this is the case *vrp handled: : ... if (c_5(D) != 5) goto ; else goto ; : __builtin_unreachable (); : If M dominates all uses of c_5, we can set the global range of c_5 to [5,5]. I have tested on x86-64, pcc64le, and aarch64 Linux. I also ran threading benchmarks as well as performance benchmarks. DOM threads 1.56% more paths which ultimately yields a miniscule total increase of 0.03%. The conversion to ranger brings a 7.87% performance drop in DOM, which is a wash in overall compilation. This is in line with other replacements of legacy evrp with ranger. We handle a lot more cases. It's not free . There is a a regression on Wstringop-overflow-4.C which I'm planning on XFAILing. It's another variant of the usual middle-end false positives: having no ranges produces no warnings, but slightly refined ranges, or worse-- isolating specific problematic cases in the threader causes flare-ups. As an aside, as Richi has suggested, I think we should discuss restricting the threader's ability to thread highly unlikely paths. These cause no end of pain for middle-end warnings. However, I don't know if this would conflict with path isolation for things like null dereferencing. ISTR you were interested in this. BTW, I think the Wstringop-overflow-4.C test is problematic and I've attached my analysis. Basically the regression is caused by a bad interaction with the rounding/alignment that placement new has inlined into the IL. This happens for int16_r[] which the test is testing. Ranger can glean some range info, which causes DOM threading to isolate a path which causes a warning. OK for trunk? gcc/ChangeLog: * tree-ssa-dom.cc (dom_jt_state): Pass ranger to constructor instead of evrp. (dom_jt_state::push): Remove m_evrp. (dom_jt_state::pop): Same. (dom_jt_state::record_ranges_from_stmt): Remove. (dom_jt_state::register_equiv): Remove updating of evrp ranges. (class dom_jt_simplifier): Pass ranger to constructor. Inherit from hybrid_jt_simplifier. (dom_jt_simplifier::simplify): Convert to ranger. (pass_dominator::execute): Same. (all_uses_feed_or_dominated_by_stmt): New. (dom_opt_dom_walker::set_global_ranges_from_unreachable_edges): New. (dom_opt_dom_walker::before_dom_children): Call set_global_ranges_from_unreachable_edges. Do not call record_ranges_from_stmt. (dom_opt_dom_walker::after_dom_children): Remove evrp use. (cprop_operand): Use int_range<> instead of value_range. (dom_opt_dom_walker::fold_cond): New. (dom_opt_dom_walker::optimize_stmt): Pass ranger to cprop_into_stmt. Use fold_cond() instead of vrp_visit_cond_stmt(). * tree-ssa-threadedge.cc (jt_state::register_equivs_stmt): Do not pass state to simplifier. * vr-values.h (class vr_values): Make fold_cond public. gcc/testsuite/ChangeLog: * gcc.dg/sancov/cmp0.c: Adjust for conversion to ranger. * gcc.dg/tree-ssa/ssa-dom-branch-1.c: Same. * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same. * gcc.dg/vect/bb-slp-pr81635-2.c: Same. * gcc.dg/vect/bb-slp-pr81635-4.c: Same. * g++.dg/warn/Wstringop-overflow-4.C: Likewise. * gcc.target/mips/data-sym-multi-pool.c: Likewise. * gcc.target/mips/mips.exp: Likewise. --- gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C | 34 ++++ gcc/testsuite/gcc.dg/sancov/cmp0.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-branch-1.c | 5 +- gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c | 2 +- gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-2.c | 2 +- gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-4.c | 6 +- .../gcc.target/mips/data-sym-multi-pool.c | 2 +- gcc/testsuite/gcc.target/mips/mips.exp | 1 + gcc/tree-ssa-dom.cc | 223 +++++++++++---------- gcc/tree-ssa-threadedge.cc | 4 +- gcc/vr-values.h | 2 +- 11 files changed, 170 insertions(+), 113 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C index c80977d..eb48019 100644 --- a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C +++ b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C @@ -161,6 +161,40 @@ void test_strcpy_new_int16_t (size_t n, const size_t vals[]) ptrdiff_t r_dmin_dmax = SR (DIFF_MIN, DIFF_MAX); T (S (1), new int16_t[r_dmin_dmax]); + /* ?? The above SR(DIFF_MIN, DIFF_MAX) implies r_dmin_dmax can be + the entire domain, including negative numbers because ptrdiff_t + is a signed entity. + + This causes a warning in the following line after the + DOM/threader changes for C++98. + + [local count: 1073741824]: + _26 ={v} signed_value_source; ;; could be -1 + r_dmin_dmax.1_8 = (sizetype) _26; + if (r_dmin_dmax.1_8 <= 4611686018427387900) ;; placement new rounding + goto ; [50.00%] + else + goto ; [50.00%] + + ... + ... + + [local count: 536870912]: + # iftmp.0_39 = PHI <18446744073709551615(2)> + _41 = operator new [] (iftmp.0_39); + __builtin_memcpy (_41, "z", 2); + sink (_41); + _44 = _26 + 1; ;; _44 = 0 + _45 = (sizetype) _44; ;; _45 = 0 + if (_45 <= 4611686018427387900) + goto ; [0.00%] + else + goto ; [100.00%] + + [local count: 0]: + iftmp.2_33 = _45 * 2; ;; iftmp.2_33 = 0 + _34 = operator new [] (iftmp.2_33); ;; new [] (0) + */ T (S (2), new int16_t[r_dmin_dmax + 1]); T (S (9), new int16_t[r_dmin_dmax * 2 + 1]); } diff --git a/gcc/testsuite/gcc.dg/sancov/cmp0.c b/gcc/testsuite/gcc.dg/sancov/cmp0.c index 8bbf06e..9fd7f5c 100644 --- a/gcc/testsuite/gcc.dg/sancov/cmp0.c +++ b/gcc/testsuite/gcc.dg/sancov/cmp0.c @@ -1,6 +1,6 @@ /* Basic test on number of inserted callbacks. */ /* { dg-do compile } */ -/* { dg-options "-fsanitize-coverage=trace-cmp -fdump-tree-optimized" } */ +/* { dg-options "-fsanitize-coverage=trace-cmp -fdump-tree-optimized -fno-thread-jumps" } */ /* { dg-skip-if "different type layout" { avr-*-* } } */ #if __SIZEOF_INT__ < 4 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-branch-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-branch-1.c index fae5bde..ede3274 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-branch-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-branch-1.c @@ -19,10 +19,9 @@ try_combine (rtx i1, rtx newpat) else if (i1 && foo ()); } -/* There should be four tests against i1. One from the hash table - dumps, one from the EVRP analyzer one from EVRP evaluation and one +/* There should be 3 tests against i1. Two from DOM machinery and one in the code itself. */ -/* { dg-final { scan-tree-dump-times "if .i1_" 4 "dom2"} } */ +/* { dg-final { scan-tree-dump-times "if .i1_" 3 "dom2"} } */ /* There should be no actual jump threads realized by DOM. The legitimize jump threads are handled in VRP and those discovered diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c index b64e71d..aa06db5 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c @@ -11,7 +11,7 @@ to change decisions in switch expansion which in turn can expose new jump threading opportunities. Skip the later tests on aarch64. */ /* { dg-final { scan-tree-dump-not "Jumps threaded" "dom3" { target { ! aarch64*-*-* } } } } */ -/* { dg-final { scan-tree-dump "Jumps threaded: 7" "thread2" { target { ! aarch64*-*-* } } } } */ +/* { dg-final { scan-tree-dump "Jumps threaded: 8" "thread2" { target { ! aarch64*-*-* } } } } */ /* { dg-final { scan-tree-dump "Jumps threaded: 18" "thread2" { target { aarch64*-*-* } } } } */ enum STATE { diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-2.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-2.c index 6b213d4..56c4bbf 100644 --- a/gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-2.c +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-fno-tree-loop-vectorize" } */ +/* { dg-additional-options "-fno-tree-loop-vectorize -fno-tree-dominator-opts" } */ /* { dg-require-effective-target lp64 } */ double p[1000]; diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-4.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-4.c index 599f718..67ee809 100644 --- a/gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-4.c +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-4.c @@ -1,7 +1,11 @@ /* { dg-do compile } */ -/* { dg-additional-options "-fno-tree-loop-vectorize" } */ +/* { dg-additional-options "-fno-tree-loop-vectorize -fno-tree-dominator-opts" } */ /* { dg-require-effective-target lp64 } */ +/* A ranger based DOM causes many more SSA names to be exported, which + causes slp1 to vectorize more things. Disabling DOM to avoid + disturbing this test. */ + void f1 (double *p, double *q, unsigned int n) { diff --git a/gcc/testsuite/gcc.target/mips/data-sym-multi-pool.c b/gcc/testsuite/gcc.target/mips/data-sym-multi-pool.c index 26a622a..3cf2d4f 100644 --- a/gcc/testsuite/gcc.target/mips/data-sym-multi-pool.c +++ b/gcc/testsuite/gcc.target/mips/data-sym-multi-pool.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-mips16 -mcode-readable=yes -fno-tree-vrp" } */ +/* { dg-options "-mips16 -mcode-readable=yes -fno-tree-vrp -fno-tree-dominator-opts" } */ /* { dg-skip-if "per-function expected output" { *-*-* } { "-flto" } { "" } } */ /* This testcase generates multiple constant pools within a function body. */ diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp index 8a62267..42a0dbb 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -335,6 +335,7 @@ foreach option { split-wide-types tree-vectorize tree-vrp + tree-dominator-opts unroll-all-loops unroll-loops ipa-ra diff --git a/gcc/tree-ssa-dom.cc b/gcc/tree-ssa-dom.cc index 9a84321..208b0a0 100644 --- a/gcc/tree-ssa-dom.cc +++ b/gcc/tree-ssa-dom.cc @@ -48,7 +48,8 @@ along with GCC; see the file COPYING3. If not see #include "alloc-pool.h" #include "tree-vrp.h" #include "vr-values.h" -#include "gimple-ssa-evrp-analyze.h" +#include "gimple-range.h" +#include "gimple-range-path.h" #include "alias.h" /* This file implements optimizations on the dominator tree. */ @@ -588,132 +589,64 @@ class dom_jt_state : public jt_state { public: dom_jt_state (const_and_copies *copies, avail_exprs_stack *avails, - evrp_range_analyzer *evrp) - : m_copies (copies), m_avails (avails), m_evrp (evrp) + gimple_ranger *ranger) + : m_copies (copies), m_avails (avails), m_ranger (ranger) { } void push (edge e) override { m_copies->push_marker (); m_avails->push_marker (); - m_evrp->push_marker (); jt_state::push (e); } void pop () override { m_copies->pop_to_marker (); m_avails->pop_to_marker (); - m_evrp->pop_to_marker (); jt_state::pop (); } void register_equivs_edge (edge e) override { record_temporary_equivalences (e, m_copies, m_avails); } - void record_ranges_from_stmt (gimple *stmt, bool temporary) override - { - m_evrp->record_ranges_from_stmt (stmt, temporary); - } void register_equiv (tree dest, tree src, bool update) override; private: const_and_copies *m_copies; avail_exprs_stack *m_avails; - evrp_range_analyzer *m_evrp; + gimple_ranger *m_ranger; }; void -dom_jt_state::register_equiv (tree dest, tree src, bool update) +dom_jt_state::register_equiv (tree dest, tree src, bool) { m_copies->record_const_or_copy (dest, src); - - /* If requested, update the value range associated with DST, using - the range from SRC. */ - if (update) - { - /* Get new VR we can pass to push_value_range. */ - value_range_equiv *new_vr = m_evrp->allocate_value_range_equiv (); - new (new_vr) value_range_equiv (); - - /* There are three cases to consider: - - First if SRC is an SSA_NAME, then we can copy the value range - from SRC into NEW_VR. - - Second if SRC is an INTEGER_CST, then we can just set NEW_VR - to a singleton range. Note that even if SRC is a constant we - need to set a suitable output range so that VR_UNDEFINED - ranges do not leak through. - - Otherwise set NEW_VR to varying. This may be overly - conservative. */ - if (TREE_CODE (src) == SSA_NAME) - new_vr->deep_copy (m_evrp->get_value_range (src)); - else if (TREE_CODE (src) == INTEGER_CST) - new_vr->set (src); - else - new_vr->set_varying (TREE_TYPE (src)); - - /* This is a temporary range for DST, so push it. */ - m_evrp->push_value_range (dest, new_vr); - } } -class dom_jt_simplifier : public jt_simplifier +class dom_jt_simplifier : public hybrid_jt_simplifier { public: - dom_jt_simplifier (vr_values *v, avail_exprs_stack *avails) - : m_vr_values (v), m_avails (avails) { } + dom_jt_simplifier (avail_exprs_stack *avails, gimple_ranger *ranger, + path_range_query *query) + : hybrid_jt_simplifier (ranger, query), m_avails (avails) { } private: tree simplify (gimple *, gimple *, basic_block, jt_state *) override; - vr_values *m_vr_values; avail_exprs_stack *m_avails; }; tree dom_jt_simplifier::simplify (gimple *stmt, gimple *within_stmt, - basic_block, jt_state *) + basic_block bb, jt_state *state) { /* First see if the conditional is in the hash table. */ tree cached_lhs = m_avails->lookup_avail_expr (stmt, false, true); if (cached_lhs) return cached_lhs; - if (gcond *cond_stmt = dyn_cast (stmt)) - { - simplify_using_ranges simplifier (m_vr_values); - return simplifier.vrp_evaluate_conditional (gimple_cond_code (cond_stmt), - gimple_cond_lhs (cond_stmt), - gimple_cond_rhs (cond_stmt), - within_stmt); - } - if (gswitch *switch_stmt = dyn_cast (stmt)) - { - tree op = gimple_switch_index (switch_stmt); - if (TREE_CODE (op) != SSA_NAME) - return NULL_TREE; + /* Otherwise call the ranger if possible. */ + if (state) + return hybrid_jt_simplifier::simplify (stmt, within_stmt, bb, state); - const value_range *vr = m_vr_values->get_value_range (op); - return find_case_label_range (switch_stmt, vr); - } - if (gassign *assign_stmt = dyn_cast (stmt)) - { - tree lhs = gimple_assign_lhs (assign_stmt); - if (TREE_CODE (lhs) == SSA_NAME - && (INTEGRAL_TYPE_P (TREE_TYPE (lhs)) - || POINTER_TYPE_P (TREE_TYPE (lhs))) - && stmt_interesting_for_vrp (stmt)) - { - edge dummy_e; - tree dummy_tree; - value_range_equiv new_vr; - m_vr_values->extract_range_from_stmt (stmt, &dummy_e, &dummy_tree, - &new_vr); - tree singleton; - if (new_vr.singleton_p (&singleton)) - return singleton; - } - } return NULL; } @@ -723,12 +656,12 @@ public: dom_opt_dom_walker (cdi_direction direction, jump_threader *threader, jt_state *state, - evrp_range_analyzer *analyzer, + gimple_ranger *ranger, const_and_copies *const_and_copies, avail_exprs_stack *avail_exprs_stack) : dom_walker (direction, REACHABLE_BLOCKS) { - m_evrp_range_analyzer = analyzer; + m_ranger = ranger; m_state = state; m_dummy_cond = gimple_build_cond (NE_EXPR, integer_zero_node, integer_zero_node, NULL, NULL); @@ -755,11 +688,13 @@ private: value. */ edge optimize_stmt (basic_block, gimple_stmt_iterator *, bool *); + void set_global_ranges_from_unreachable_edges (basic_block); void test_for_singularity (gimple *, avail_exprs_stack *); + edge fold_cond (gcond *cond); jump_threader *m_threader; - evrp_range_analyzer *m_evrp_range_analyzer; + gimple_ranger *m_ranger; jt_state *m_state; }; @@ -856,18 +791,22 @@ pass_dominator::execute (function *fun) record_edge_info (bb); /* Recursively walk the dominator tree optimizing statements. */ - evrp_range_analyzer analyzer (true); - dom_jt_simplifier simplifier (&analyzer, avail_exprs_stack); - dom_jt_state state (const_and_copies, avail_exprs_stack, &analyzer); + gimple_ranger *ranger = enable_ranger (fun); + path_range_query path_query (/*resolve=*/true, ranger); + dom_jt_simplifier simplifier (avail_exprs_stack, ranger, &path_query); + dom_jt_state state (const_and_copies, avail_exprs_stack, ranger); jump_threader threader (&simplifier, &state); dom_opt_dom_walker walker (CDI_DOMINATORS, &threader, &state, - &analyzer, + ranger, const_and_copies, avail_exprs_stack); walker.walk (fun->cfg->x_entry_block_ptr); + ranger->export_global_ranges (); + disable_ranger (fun); + /* Look for blocks where we cleared EDGE_EXECUTABLE on an outgoing edge. When found, remove jump threads which contain any outgoing edge from the affected block. */ @@ -1252,6 +1191,77 @@ record_equivalences_from_phis (basic_block bb) } } +/* Return true if all uses of NAME are dominated by STMT or feed STMT + via a chain of single immediate uses. */ + +static bool +all_uses_feed_or_dominated_by_stmt (tree name, gimple *stmt) +{ + use_operand_p use_p, use2_p; + imm_use_iterator iter; + basic_block stmt_bb = gimple_bb (stmt); + + FOR_EACH_IMM_USE_FAST (use_p, iter, name) + { + gimple *use_stmt = USE_STMT (use_p), *use_stmt2; + if (use_stmt == stmt + || is_gimple_debug (use_stmt) + || (gimple_bb (use_stmt) != stmt_bb + && dominated_by_p (CDI_DOMINATORS, + gimple_bb (use_stmt), stmt_bb))) + continue; + while (use_stmt != stmt + && is_gimple_assign (use_stmt) + && TREE_CODE (gimple_assign_lhs (use_stmt)) == SSA_NAME + && single_imm_use (gimple_assign_lhs (use_stmt), + &use2_p, &use_stmt2)) + use_stmt = use_stmt2; + if (use_stmt != stmt) + return false; + } + return true; +} + +/* Set global ranges that can be determined from the C->M edge: + + : + ... + if (something) + goto ; + else + goto ; + : + __builtin_unreachable (); + : +*/ + +void +dom_opt_dom_walker::set_global_ranges_from_unreachable_edges (basic_block bb) +{ + edge pred_e = single_pred_edge_ignoring_loop_edges (bb, false); + + if (!pred_e) + return; + + gimple *stmt = last_stmt (pred_e->src); + tree name; + int_range_max r; + if (stmt + && gimple_code (stmt) == GIMPLE_COND + && (name = gimple_cond_lhs (stmt)) + && TREE_CODE (name) == SSA_NAME + && r.supports_type_p (TREE_TYPE (name)) + && assert_unreachable_fallthru_edge_p (pred_e) + && all_uses_feed_or_dominated_by_stmt (name, stmt) + && m_ranger->range_on_edge (r, pred_e, name) + && !r.varying_p () + && !r.undefined_p ()) + { + update_global_range (r, name); + maybe_set_nonzero_bits (pred_e, name); + } +} + /* Record any equivalences created by the incoming edge to BB into CONST_AND_COPIES and AVAIL_EXPRS_STACK. If BB has more than one incoming edge, then no equivalence is created. */ @@ -1505,8 +1515,6 @@ dom_opt_dom_walker::before_dom_children (basic_block bb) if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "\n\nOptimizing block #%d\n\n", bb->index); - m_evrp_range_analyzer->enter (bb); - /* Push a marker on the stacks of local information so that we know how far to unwind when we finalize this block. */ m_avail_exprs_stack->push_marker (); @@ -1514,6 +1522,7 @@ dom_opt_dom_walker::before_dom_children (basic_block bb) record_equivalences_from_incoming_edge (bb, m_const_and_copies, m_avail_exprs_stack); + set_global_ranges_from_unreachable_edges (bb); /* PHI nodes can create equivalences too. */ record_equivalences_from_phis (bb); @@ -1542,7 +1551,6 @@ dom_opt_dom_walker::before_dom_children (basic_block bb) continue; } - m_state->record_ranges_from_stmt (gsi_stmt (gsi), false); bool removed_p = false; taken_edge = this->optimize_stmt (bb, &gsi, &removed_p); if (!removed_p) @@ -1590,7 +1598,6 @@ dom_opt_dom_walker::after_dom_children (basic_block bb) m_threader->thread_outgoing_edges (bb); m_avail_exprs_stack->pop_to_marker (); m_const_and_copies->pop_to_marker (); - m_evrp_range_analyzer->leave (bb); } /* Search for redundant computations in STMT. If any are found, then @@ -1832,7 +1839,7 @@ cprop_operand (gimple *stmt, use_operand_p op_p, range_query *query) val = SSA_NAME_VALUE (op); if (!val) { - value_range r; + int_range<2> r; tree single; if (query->range_of_expr (r, op, stmt) && r.singleton_p (&single)) val = single; @@ -2073,6 +2080,24 @@ reduce_vector_comparison_to_scalar_comparison (gimple *stmt) } } +/* If possible, rewrite the conditional as TRUE or FALSE, and return + the taken edge. Otherwise, return NULL. */ + +edge +dom_opt_dom_walker::fold_cond (gcond *cond) +{ + simplify_using_ranges simplify (m_ranger); + if (simplify.fold_cond (cond)) + { + basic_block bb = gimple_bb (cond); + if (gimple_cond_true_p (cond)) + return find_taken_edge (bb, boolean_true_node); + if (gimple_cond_false_p (cond)) + return find_taken_edge (bb, boolean_false_node); + } + return NULL; +} + /* Optimize the statement in block BB pointed to by iterator SI. We try to perform some simplistic global redundancy elimination and @@ -2121,7 +2146,7 @@ dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator *si, opt_stats.num_stmts++; /* Const/copy propagate into USES, VUSES and the RHS of VDEFs. */ - cprop_into_stmt (stmt, m_evrp_range_analyzer); + cprop_into_stmt (stmt, m_ranger); /* If the statement has been modified with constant replacements, fold its RHS before checking for redundant computations. */ @@ -2218,17 +2243,9 @@ dom_opt_dom_walker::optimize_stmt (basic_block bb, gimple_stmt_iterator *si, IL because we've attached range information to new SSA_NAMES. */ update_stmt_if_modified (stmt); - edge taken_edge = NULL; - simplify_using_ranges simpl (m_evrp_range_analyzer); - simpl.vrp_visit_cond_stmt (as_a (stmt), &taken_edge); + edge taken_edge = fold_cond (as_a (stmt)); if (taken_edge) { - if (taken_edge->flags & EDGE_TRUE_VALUE) - gimple_cond_make_true (as_a (stmt)); - else if (taken_edge->flags & EDGE_FALSE_VALUE) - gimple_cond_make_false (as_a (stmt)); - else - gcc_unreachable (); gimple_set_modified (stmt, true); update_stmt (stmt); cfg_altered = true; diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc index a70aebd..e64e4f2 100644 --- a/gcc/tree-ssa-threadedge.cc +++ b/gcc/tree-ssa-threadedge.cc @@ -1377,7 +1377,9 @@ jt_state::register_equivs_stmt (gimple *stmt, basic_block bb, SET_USE (use_p, tmp); } - cached_lhs = simplifier->simplify (stmt, stmt, bb, this); + /* Do not pass state to avoid calling the ranger with the + temporarily altered IL. */ + cached_lhs = simplifier->simplify (stmt, stmt, bb, /*state=*/NULL); /* Restore the statement's original uses/defs. */ i = 0; diff --git a/gcc/vr-values.h b/gcc/vr-values.h index f018d0d..8c8f031 100644 --- a/gcc/vr-values.h +++ b/gcc/vr-values.h @@ -41,6 +41,7 @@ public: // ?? These should be cleaned, merged, and made private. tree vrp_evaluate_conditional (tree_code, tree, tree, gimple *); void vrp_visit_cond_stmt (gcond *, edge *); + bool fold_cond (gcond *); tree vrp_evaluate_conditional_warnv_with_ops (gimple *stmt, enum tree_code, tree, tree, bool, bool *, bool *); @@ -53,7 +54,6 @@ private: bool simplify_bit_ops_using_ranges (gimple_stmt_iterator *, gimple *); bool simplify_min_or_max_using_ranges (gimple_stmt_iterator *, gimple *); bool simplify_cond_using_ranges_1 (gcond *); - bool fold_cond (gcond *); bool simplify_switch_using_ranges (gswitch *); bool simplify_float_conversion_using_ranges (gimple_stmt_iterator *, gimple *); -- cgit v1.1 From 87509781849b6a64d1c049599d75a06c0fa68d01 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 26 Jun 2022 00:16:33 +0000 Subject: Daily bump. --- gcc/ChangeLog | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/po/ChangeLog | 4 +++ gcc/testsuite/ChangeLog | 22 ++++++++++++++ 4 files changed, 108 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 51cb9ec..e5c3b66 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,84 @@ +2022-06-25 Aldy Hernandez + + * tree-ssa-dom.cc (dom_jt_state): Pass ranger to constructor + instead of evrp. + (dom_jt_state::push): Remove m_evrp. + (dom_jt_state::pop): Same. + (dom_jt_state::record_ranges_from_stmt): Remove. + (dom_jt_state::register_equiv): Remove updating of evrp ranges. + (class dom_jt_simplifier): Pass ranger to constructor. + Inherit from hybrid_jt_simplifier. + (dom_jt_simplifier::simplify): Convert to ranger. + (pass_dominator::execute): Same. + (all_uses_feed_or_dominated_by_stmt): New. + (dom_opt_dom_walker::set_global_ranges_from_unreachable_edges): New. + (dom_opt_dom_walker::before_dom_children): Call + set_global_ranges_from_unreachable_edges. + Do not call record_ranges_from_stmt. + (dom_opt_dom_walker::after_dom_children): Remove evrp use. + (cprop_operand): Use int_range<> instead of value_range. + (dom_opt_dom_walker::fold_cond): New. + (dom_opt_dom_walker::optimize_stmt): Pass ranger to + cprop_into_stmt. + Use fold_cond() instead of vrp_visit_cond_stmt(). + * tree-ssa-threadedge.cc (jt_state::register_equivs_stmt): Do not + pass state to simplifier. + * vr-values.h (class vr_values): Make fold_cond public. + +2022-06-25 Jeff Law + + * common/config/tilegx/tilegx-common.cc: Removed. + * common/config/tilepro/tilepro-common.cc: Removed. + * config.gcc: Remove tilegx and tilepro entries. + * config/tilegx/constraints.md: Removed. + * config/tilegx/feedback.h: Removed. + * config/tilegx/linux.h: Removed. + * config/tilegx/mul-tables.cc: Removed. + * config/tilegx/predicates.md: Removed. + * config/tilegx/sync.md: Removed. + * config/tilegx/t-tilegx: Removed. + * config/tilegx/tilegx-builtins.h: Removed. + * config/tilegx/tilegx-c.cc: Removed. + * config/tilegx/tilegx-generic.md: Removed. + * config/tilegx/tilegx-modes.def: Removed. + * config/tilegx/tilegx-multiply.h: Removed. + * config/tilegx/tilegx-opts.h: Removed. + * config/tilegx/tilegx-protos.h: Removed. + * config/tilegx/tilegx.cc: Removed. + * config/tilegx/tilegx.h: Removed. + * config/tilegx/tilegx.md: Removed. + * config/tilegx/tilegx.opt: Removed. + * config/tilepro/constraints.md: Removed. + * config/tilepro/feedback.h: Removed. + * config/tilepro/gen-mul-tables.cc: Removed. + * config/tilepro/linux.h: Removed. + * config/tilepro/mul-tables.cc: Removed. + * config/tilepro/predicates.md: Removed. + * config/tilepro/t-tilepro: Removed. + * config/tilepro/tilepro-builtins.h: Removed. + * config/tilepro/tilepro-c.cc: Removed. + * config/tilepro/tilepro-generic.md: Removed. + * config/tilepro/tilepro-modes.def: Removed. + * config/tilepro/tilepro-multiply.h: Removed. + * config/tilepro/tilepro-protos.h: Removed. + * config/tilepro/tilepro.cc: Removed. + * config/tilepro/tilepro.h: Removed. + * config/tilepro/tilepro.md: Removed. + * config/tilepro/tilepro.opt: Removed. + * configure.ac: Remove tilegx and tilepro entries. + * configure: Rebuilt. + * doc/extend.texi: Remove tilegx and tilepro entries. + * doc/install.texi: Remove tilegx and tilepro entries. + * doc/invoke.texi: Remove tilegx and tilepro entries. + * doc/md.texi: Remove tilegx and tilepro entries. + +2022-06-25 Roger Sayle + Richard Biener + + * regcprop.cc (pass_cprop_hardreg::execute): Perform a third + iteration over each basic block that was updated by the second + iteration. + 2022-06-24 Jason Merrill PR c++/87729 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index e66783e..33c7e14 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220625 +20220626 diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index 4443b48..695e14a 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2022-06-25 Xi Ruoyao + + * exgettext: Remove unneeded fgrep command. + 2022-06-09 Joseph Myers * sv.po: Update. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 105a540..b70006c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,25 @@ +2022-06-25 Aldy Hernandez + + * gcc.dg/sancov/cmp0.c: Adjust for conversion to ranger. + * gcc.dg/tree-ssa/ssa-dom-branch-1.c: Same. + * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same. + * gcc.dg/vect/bb-slp-pr81635-2.c: Same. + * gcc.dg/vect/bb-slp-pr81635-4.c: Same. + * g++.dg/warn/Wstringop-overflow-4.C: Likewise. + * gcc.target/mips/data-sym-multi-pool.c: Likewise. + * gcc.target/mips/mips.exp: Likewise. + +2022-06-25 Jeff Law + + * gcc.dg/lower-subreg-1.c: Remove tilegx and tilepro entries. + * gcc.misc-tests/linkage.exp: Remove tilegx and + tilepro entries. + +2022-06-25 Iain Sandoe + + * gcc.dg/darwin-comm-1.c: Check for the correct error message for + Darwin <= 10. + 2022-06-24 Jason Merrill PR c++/87729 -- cgit v1.1 From 80ace9185dc534e4d6cb19506300c4fcad4bd916 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Sun, 26 Jun 2022 17:30:18 +0200 Subject: XFAIL a test in g++.dg/warn/Wstringop-overflow-4.C As per the explanation in the test, and in the DOM conversion to ranger patch, this is a known regression. I had mentioned I would XFAIL this test, but forgot to do so. There is an analysis in the test itself as to what is going on. Tested on x86-64 Linux. gcc/testsuite/ChangeLog: * g++.dg/warn/Wstringop-overflow-4.C: XFAIL a test. --- gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C index eb48019..c9d6393 100644 --- a/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C +++ b/gcc/testsuite/g++.dg/warn/Wstringop-overflow-4.C @@ -195,7 +195,7 @@ void test_strcpy_new_int16_t (size_t n, const size_t vals[]) iftmp.2_33 = _45 * 2; ;; iftmp.2_33 = 0 _34 = operator new [] (iftmp.2_33); ;; new [] (0) */ - T (S (2), new int16_t[r_dmin_dmax + 1]); + T (S (2), new int16_t[r_dmin_dmax + 1]); // { dg-bogus "into a region of size" "" { xfail *-*-*} } T (S (9), new int16_t[r_dmin_dmax * 2 + 1]); } -- cgit v1.1 From d230906bf692d1f723fe0f21672bed70f73673fa Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Fri, 22 Apr 2022 20:27:22 +0300 Subject: testsuite: Adjust btf-bitfields-1.c for default_packed If target packs structures by default, the bitfield offset which the test validates must be adjusted to not include padding. gcc/testsuite/ChangeLog: * gcc.dg/debug/btf/btf-bitfields-1.c: Adjust the checked offsets for targets which pack structures by default. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c index 3ee07dd..793b4c8 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c @@ -5,7 +5,8 @@ (bit_size << 24) | bit_offset - (0xa << 24) | 0x20 - (0x7 << 24) | 0x2a - - (0x13 << 24) | 0x40 - note that this is aligned to 0x40. */ + - (0x13 << 24) | 0x40 - note that this is aligned to 0x40. + - (0x13 << 24) | 0x31 - in case structures are packed. */ /* { dg-do compile ) */ /* { dg-options "-O0 -gbtf -dA" } */ @@ -15,7 +16,8 @@ /* { dg-final { scan-assembler-times "\[\t \]0xa000020\[\t \]+\[^\n\]*btm_offset" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \]0x700002a\[\t \]+\[^\n\]*btm_offset" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0x13000040\[\t \]+\[^\n\]*btm_offset" 1 } } */ +/* { dg-final { scan-assembler-times "\[\t \]0x13000040\[\t \]+\[^\n\]*btm_offset" 1 { target { ! default_packed } } } } */ +/* { dg-final { scan-assembler-times "\[\t \]0x13000031\[\t \]+\[^\n\]*btm_offset" 1 { target { default_packed } } } } */ struct bitt { int a; -- cgit v1.1 From ff01849dccd4355ac6491c04eff8b2e39ecee70e Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Sun, 26 Jun 2022 15:03:52 -0400 Subject: [PATCH] testsuite: constraint some of fp tests to hard_float These tests validate fp conversions with various rounding modes which would not work on soft-float ABIs. On -march=rv64imac/-mabi=lp64 this reduces 5 unique failures (overall 35 due to multi flag combination builds) gcc/testsuite/Changelog: * gcc.dg/torture/fp-double-convert-float-1.c: Add dg-require-effective-target hard_float. * gcc.dg/torture/fp-int-convert-timode-3.c: Ditto. * gcc.dg/torture/fp-int-convert-timode-4.c: Ditto. * gcc.dg/torture/fp-uint64-convert-double-1.c: Ditto. * gcc.dg/torture/fp-uint64-convert-double-2.c: Ditto. --- gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c | 1 + gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c | 1 + gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c | 1 + gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-1.c | 1 + gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-2.c | 1 + 5 files changed, 5 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c index ec23274..1c28a9e 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c @@ -1,6 +1,7 @@ /* PR57245 */ /* { dg-do run } */ /* { dg-require-effective-target fenv } */ +/* { dg-require-effective-target hard_float } */ /* { dg-additional-options "-frounding-math" } */ #include diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c index 707d539..6f9a8d3 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c +++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-3.c @@ -3,6 +3,7 @@ /* { dg-do run } */ /* { dg-require-effective-target int128 } */ /* { dg-require-effective-target fenv } */ +/* { dg-require-effective-target hard_float } */ /* { dg-options "-frounding-math" } */ #include diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c index 09600f9..15f478d 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c +++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-timode-4.c @@ -3,6 +3,7 @@ /* { dg-do run } */ /* { dg-require-effective-target int128 } */ /* { dg-require-effective-target fenv } */ +/* { dg-require-effective-target hard_float } */ /* { dg-options "-frounding-math" } */ #include diff --git a/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-1.c b/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-1.c index fadad8c..0c7bf00 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-1.c +++ b/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-1.c @@ -1,6 +1,7 @@ /* PR84407 */ /* { dg-do run } */ /* { dg-require-effective-target fenv } */ +/* { dg-require-effective-target hard_float } */ /* { dg-additional-options "-frounding-math -fexcess-precision=standard" } */ #include diff --git a/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-2.c b/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-2.c index 952f96b..ac24b35 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-2.c +++ b/gcc/testsuite/gcc.dg/torture/fp-uint64-convert-double-2.c @@ -1,6 +1,7 @@ /* PR84407 */ /* { dg-do run } */ /* { dg-require-effective-target fenv } */ +/* { dg-require-effective-target hard_float } */ /* { dg-additional-options "-frounding-math" } */ #include -- cgit v1.1 From a312407bd715647f7c11b67e0a52effc94d0f15d Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Mon, 20 Jun 2022 20:59:55 +0200 Subject: Fortran: handle explicit-shape specs with constant bounds [PR105954] gcc/fortran/ChangeLog: PR fortran/105954 * decl.cc (variable_decl): Adjust upper bounds for explicit-shape specs with constant bound expressions to ensure non-negative extents. gcc/testsuite/ChangeLog: PR fortran/105954 * gfortran.dg/pr105954.f90: New test. --- gcc/fortran/decl.cc | 12 ++++++++++++ gcc/testsuite/gfortran.dg/pr105954.f90 | 26 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pr105954.f90 (limited to 'gcc') diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc index bd586e7..26ff54d 100644 --- a/gcc/fortran/decl.cc +++ b/gcc/fortran/decl.cc @@ -2775,6 +2775,18 @@ variable_decl (int elem) else gfc_free_expr (n); } + /* For an explicit-shape spec with constant bounds, ensure + that the effective upper bound is not lower than the + respective lower bound minus one. Otherwise adjust it so + that the extent is trivially derived to be zero. */ + if (as->lower[i]->expr_type == EXPR_CONSTANT + && as->upper[i]->expr_type == EXPR_CONSTANT + && as->lower[i]->ts.type == BT_INTEGER + && as->upper[i]->ts.type == BT_INTEGER + && mpz_cmp (as->upper[i]->value.integer, + as->lower[i]->value.integer) < 0) + mpz_sub_ui (as->upper[i]->value.integer, + as->lower[i]->value.integer, 1); } } } diff --git a/gcc/testsuite/gfortran.dg/pr105954.f90 b/gcc/testsuite/gfortran.dg/pr105954.f90 new file mode 100644 index 0000000..89004bf --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr105954.f90 @@ -0,0 +1,26 @@ +! { dg-do compile } +! { dg-options "-fdump-tree-original" } +! PR fortran/105954 - ICE in gfc_element_size, at fortran/target-memory.cc:132 +! Contributed by G.Steinmetz + +program p + use iso_c_binding, only: c_float, c_sizeof + implicit none + integer, parameter :: n = -99 + type t + real :: b(3,7:n) + end type + type, bind(c) :: u + real(c_float) :: b(3,7:n) + end type + type(t) :: d + type(u) :: e + integer, parameter :: k = storage_size(d) + integer, parameter :: m = sizeof(d) + integer, parameter :: l = c_sizeof(e) + if (k /= 0) stop 1 + if (m /= 0) stop 2 + if (l /= 0) stop 3 +end + +! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "original" } } -- cgit v1.1 From ff35dbc02092fbcd3d814fcd9fe8e871c3f741fd Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Tue, 21 Jun 2022 23:20:18 +0200 Subject: Fortran: fix simplification of INDEX(str1,str2) [PR105691] gcc/fortran/ChangeLog: PR fortran/105691 * simplify.cc (gfc_simplify_index): Replace old simplification code by the equivalent of the runtime library implementation. Use HOST_WIDE_INT instead of int for string index, length variables. gcc/testsuite/ChangeLog: PR fortran/105691 * gfortran.dg/index_6.f90: New test. --- gcc/fortran/simplify.cc | 131 ++++++++-------------------------- gcc/testsuite/gfortran.dg/index_6.f90 | 31 ++++++++ 2 files changed, 60 insertions(+), 102 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/index_6.f90 (limited to 'gcc') diff --git a/gcc/fortran/simplify.cc b/gcc/fortran/simplify.cc index c8f2ef9..e8e3ec6 100644 --- a/gcc/fortran/simplify.cc +++ b/gcc/fortran/simplify.cc @@ -3515,17 +3515,15 @@ gfc_expr * gfc_simplify_index (gfc_expr *x, gfc_expr *y, gfc_expr *b, gfc_expr *kind) { gfc_expr *result; - int back, len, lensub; - int i, j, k, count, index = 0, start; + bool back; + HOST_WIDE_INT len, lensub, start, last, i, index = 0; + int k, delta; if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT || ( b != NULL && b->expr_type != EXPR_CONSTANT)) return NULL; - if (b != NULL && b->value.logical != 0) - back = 1; - else - back = 0; + back = (b != NULL && b->value.logical != 0); k = get_kind (BT_INTEGER, kind, "INDEX", gfc_default_integer_kind); if (k == -1) @@ -3542,111 +3540,40 @@ gfc_simplify_index (gfc_expr *x, gfc_expr *y, gfc_expr *b, gfc_expr *kind) return result; } - if (back == 0) + if (lensub == 0) { - if (lensub == 0) - { - mpz_set_si (result->value.integer, 1); - return result; - } - else if (lensub == 1) - { - for (i = 0; i < len; i++) - { - for (j = 0; j < lensub; j++) - { - if (y->value.character.string[j] - == x->value.character.string[i]) - { - index = i + 1; - goto done; - } - } - } - } + if (back) + index = len + 1; else - { - for (i = 0; i < len; i++) - { - for (j = 0; j < lensub; j++) - { - if (y->value.character.string[j] - == x->value.character.string[i]) - { - start = i; - count = 0; - - for (k = 0; k < lensub; k++) - { - if (y->value.character.string[k] - == x->value.character.string[k + start]) - count++; - } - - if (count == lensub) - { - index = start + 1; - goto done; - } - } - } - } - } + index = 1; + goto done; + } + if (!back) + { + last = len + 1 - lensub; + start = 0; + delta = 1; } else { - if (lensub == 0) - { - mpz_set_si (result->value.integer, len + 1); - return result; - } - else if (lensub == 1) + last = -1; + start = len - lensub; + delta = -1; + } + + for (; start != last; start += delta) + { + for (i = 0; i < lensub; i++) { - for (i = 0; i < len; i++) - { - for (j = 0; j < lensub; j++) - { - if (y->value.character.string[j] - == x->value.character.string[len - i]) - { - index = len - i + 1; - goto done; - } - } - } + if (x->value.character.string[start + i] + != y->value.character.string[i]) + break; } - else + if (i == lensub) { - for (i = 0; i < len; i++) - { - for (j = 0; j < lensub; j++) - { - if (y->value.character.string[j] - == x->value.character.string[len - i]) - { - start = len - i; - if (start <= len - lensub) - { - count = 0; - for (k = 0; k < lensub; k++) - if (y->value.character.string[k] - == x->value.character.string[k + start]) - count++; - - if (count == lensub) - { - index = start + 1; - goto done; - } - } - else - { - continue; - } - } - } - } + index = start + 1; + goto done; } } diff --git a/gcc/testsuite/gfortran.dg/index_6.f90 b/gcc/testsuite/gfortran.dg/index_6.f90 new file mode 100644 index 0000000..61d4929 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/index_6.f90 @@ -0,0 +1,31 @@ +! { dg-do compile } +! { dg-options "-fdump-tree-original" } +! PR fortran/105691 - Incorrect calculation of INDEX(str1,str2) at compile time + +program main + implicit none + integer :: i + character(*), parameter :: s1 = "fortran.f90" + character(*), parameter :: s2 = "fortran" + character(*), parameter :: s3 = s2 // "*" + integer, parameter :: i0 = index(s1, s2) + integer, parameter :: i1 = index(s1, s2, back= .true.) + integer, parameter :: i2(*) = index(s1, s2, back=[.true.,.false.]) + integer, parameter :: i3(*) = index(s1, s2, back=[(i==1, i=1,2)] ) + integer, parameter :: i4 = index(s1, s3) + integer, parameter :: i5 = index(s1, s3, back= .true.) + integer, parameter :: i6(*) = index(s1, s3, back=[.true.,.false.]) + integer, parameter :: i7(*) = index(s1, s3, back=[(i==1, i=1,2)] ) + integer, parameter :: i8 = index(s1, "f", back= .true.) + if ( i0 /= 1 ) stop 1 + if ( i1 /= 1 ) stop 2 + if (any (i2 /= 1)) stop 3 + if (any (i3 /= 1)) stop 4 + if ( i4 /= 0 ) stop 5 + if ( i5 /= 0 ) stop 6 + if (any (i6 /= 0)) stop 7 + if (any (i7 /= 0)) stop 8 + if (i8 /= len(s1)-2) stop 9 +end program + +! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "original" } } -- cgit v1.1 From b2b72757b229fe97cc5320a14a6e61008bc56882 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 27 Jun 2022 00:16:20 +0000 Subject: Daily bump. --- gcc/DATESTAMP | 2 +- gcc/fortran/ChangeLog | 14 ++++++++++++++ gcc/testsuite/ChangeLog | 28 ++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 33c7e14..63c222e 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220626 +20220627 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index f89e088..b9ea237 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,17 @@ +2022-06-26 Harald Anlauf + + PR fortran/105691 + * simplify.cc (gfc_simplify_index): Replace old simplification + code by the equivalent of the runtime library implementation. Use + HOST_WIDE_INT instead of int for string index, length variables. + +2022-06-26 Harald Anlauf + + PR fortran/105954 + * decl.cc (variable_decl): Adjust upper bounds for explicit-shape + specs with constant bound expressions to ensure non-negative + extents. + 2022-06-24 Harald Anlauf PR fortran/105813 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b70006c..38b7c45 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,31 @@ +2022-06-26 Harald Anlauf + + PR fortran/105691 + * gfortran.dg/index_6.f90: New test. + +2022-06-26 Harald Anlauf + + PR fortran/105954 + * gfortran.dg/pr105954.f90: New test. + +2022-06-26 Vineet Gupta + + * gcc.dg/torture/fp-double-convert-float-1.c: Add + dg-require-effective-target hard_float. + * gcc.dg/torture/fp-int-convert-timode-3.c: Ditto. + * gcc.dg/torture/fp-int-convert-timode-4.c: Ditto. + * gcc.dg/torture/fp-uint64-convert-double-1.c: Ditto. + * gcc.dg/torture/fp-uint64-convert-double-2.c: Ditto. + +2022-06-26 Dimitar Dimitrov + + * gcc.dg/debug/btf/btf-bitfields-1.c: Adjust the checked offsets + for targets which pack structures by default. + +2022-06-26 Aldy Hernandez + + * g++.dg/warn/Wstringop-overflow-4.C: XFAIL a test. + 2022-06-25 Aldy Hernandez * gcc.dg/sancov/cmp0.c: Adjust for conversion to ranger. -- cgit v1.1 From 773dffc50fbc768e3282455bd4238a67b1481176 Mon Sep 17 00:00:00 2001 From: Takayuki 'January June' Suwa Date: Sun, 26 Jun 2022 22:28:30 +0900 Subject: xtensa: Optimize integer constant addition that is between -32896 and 32639 Such constants are often subject to the constant synthesis: int test(int a) { return a - 31999; } test: movi a3, 1 addmi a3, a3, -0x7d00 add a2, a2, a3 ret This patch optimizes such case as follows: test: addi a2, a2, 1 addmi a2, a2, -0x7d00 ret gcc/ChangeLog: * config/xtensa/xtensa.md: Suppress unnecessary emitting nop insn in the split patterns for integer/FP constant synthesis, and add new peephole2 pattern that folds such synthesized additions. --- gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'gcc') diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md index f31ec33..9d99858 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -1033,6 +1033,7 @@ FAIL; if (! xtensa_constantsynth (operands[0], INTVAL (x))) emit_move_insn (operands[0], x); + DONE; }) ;; 16-bit Integer moves @@ -1272,6 +1273,7 @@ x = gen_rtx_REG (SImode, REGNO (operands[0])); if (! xtensa_constantsynth (x, l[i])) emit_move_insn (x, GEN_INT (l[i])); + DONE; }) ;; 64-bit floating point moves @@ -2808,3 +2810,36 @@ && REGNO (x) == regno + REG_NREGS (operands[0]) / 2)) FAIL; }) + +(define_peephole2 + [(set (match_operand:SI 0 "register_operand") + (match_operand:SI 1 "const_int_operand")) + (set (match_dup 0) + (plus:SI (match_dup 0) + (match_operand:SI 2 "const_int_operand"))) + (set (match_operand:SI 3 "register_operand") + (plus:SI (match_operand:SI 4 "register_operand") + (match_dup 0)))] + "IN_RANGE (INTVAL (operands[1]) + INTVAL (operands[2]), + (-128 - 32768), (127 + 32512)) + && REGNO (operands[0]) != REGNO (operands[3]) + && REGNO (operands[0]) != REGNO (operands[4]) + && peep2_reg_dead_p (3, operands[0])" + [(set (match_dup 3) + (plus:SI (match_dup 4) + (match_dup 1))) + (set (match_dup 3) + (plus:SI (match_dup 3) + (match_dup 2)))] +{ + HOST_WIDE_INT value = INTVAL (operands[1]) + INTVAL (operands[2]); + int imm0, imm1; + value += 128; + if (value > 32512) + imm1 = 32512; + else + imm1 = value & ~255; + imm0 = value - imm1 - 128; + operands[1] = GEN_INT (imm0); + operands[2] = GEN_INT (imm1); +}) -- cgit v1.1 From 2ae7895416a7aa4fc9e7f9fa646dca1f51bdea56 Mon Sep 17 00:00:00 2001 From: Prathamesh Kulkarni Date: Mon, 27 Jun 2022 11:55:45 +0530 Subject: Emit asmname if set for decl with -fdump-statistics-asmname. gcc/ChangeLog: * statistics.cc: Include tree.h. (get_function_name): New function. (statistics_fini_pass_2): Call get_function_name instead of current_function_name. (statistics_counter_event): Call get_function_name instead of function_name. (statistics_histogram_event): Likewise. --- gcc/statistics.cc | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/statistics.cc b/gcc/statistics.cc index 0d596e3..6c21415 100644 --- a/gcc/statistics.cc +++ b/gcc/statistics.cc @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-pass.h" #include "context.h" #include "pass_manager.h" +#include "tree.h" static int statistics_dump_nr; static dump_flags_t statistics_dump_flags; @@ -113,6 +114,22 @@ curr_statistics_hash (void) return statistics_hashes[idx]; } +/* Helper function to return asmname or name of FN + depending on whether asmname option is set. */ + +static const char * +get_function_name (struct function *fn) +{ + if ((statistics_dump_flags & TDF_ASMNAME) + && DECL_ASSEMBLER_NAME_SET_P (fn->decl)) + { + tree asmname = decl_assembler_name (fn->decl); + if (asmname) + return IDENTIFIER_POINTER (asmname); + } + return function_name (fn); +} + /* Helper for statistics_fini_pass. Print the counter difference since the last dump for the pass dump files. */ @@ -152,7 +169,7 @@ statistics_fini_pass_2 (statistics_counter **slot, current_pass->static_pass_number, current_pass->name, counter->id, counter->val, - current_function_name (), + get_function_name (cfun), count); else fprintf (statistics_dump_file, @@ -160,7 +177,7 @@ statistics_fini_pass_2 (statistics_counter **slot, current_pass->static_pass_number, current_pass->name, counter->id, - current_function_name (), + get_function_name (cfun), count); counter->prev_dumped_count = counter->count; return 1; @@ -329,7 +346,7 @@ statistics_counter_event (struct function *fn, const char *id, int incr) current_pass ? current_pass->static_pass_number : -1, current_pass ? current_pass->name : "none", id, - function_name (fn), + get_function_name (fn), incr); } @@ -359,5 +376,5 @@ statistics_histogram_event (struct function *fn, const char *id, int val) current_pass->static_pass_number, current_pass->name, id, val, - function_name (fn)); + get_function_name (fn)); } -- cgit v1.1 From f3f73e86ec8613f176db3e52bbfbfbb9636cb714 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Mon, 27 Jun 2022 07:44:49 +0100 Subject: [PATCH] PR tree-optimization/94026: Simplify (X>>8)&6 != 0 as X&1536 != 0. This patch implements the missed optimization described in PR 94026, where a the shift can be eliminated from the sequence of a shift, followed by a bit-wise AND followed by an equality/inequality test. Specifically, ((X << C1) & C2) cmp C3 into (X & (C2 >> C1)) cmp (C3 >> C1) and likewise ((X >> C1) & C2) cmp C3 into (X & (C2 << C1)) cmp (C3 << C1) where cmp is == or !=, and C1, C2 and C3 are integer constants. The example in the subject line is taken from the hot function self_atari from the Go program Leela (in SPEC CPU 2017). 2022-06-27 Roger Sayle gcc/ChangeLog PR tree-optimization/94026 * match.pd (((X << C1) & C2) eq/ne C3): New simplification. (((X >> C1) & C2) eq/ne C3): Likewise. gcc/testsuite/ChangeLog PR tree-optimization/94026 * gcc.dg/pr94026.c: New test case. --- gcc/match.pd | 23 +++++++++++++++++++++++ gcc/testsuite/gcc.dg/pr94026.c | 21 +++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr94026.c (limited to 'gcc') diff --git a/gcc/match.pd b/gcc/match.pd index e486b4b..24cbbbb 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3572,6 +3572,29 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) && wi::lshift (wi::to_wide (@0), cand) == wi::to_wide (@2)) (cmp @1 { build_int_cst (TREE_TYPE (@1), cand); })))))) +/* Fold ((X << C1) & C2) cmp C3 into (X & (C2 >> C1)) cmp (C3 >> C1) + ((X >> C1) & C2) cmp C3 into (X & (C2 << C1)) cmp (C3 << C1). */ +(for cmp (ne eq) + (simplify + (cmp (bit_and:s (lshift:s @0 INTEGER_CST@1) INTEGER_CST@2) INTEGER_CST@3) + (if (tree_fits_shwi_p (@1) + && tree_to_shwi (@1) > 0 + && tree_to_shwi (@1) < TYPE_PRECISION (TREE_TYPE (@0)) + && tree_to_shwi (@1) <= wi::ctz (wi::to_wide (@3))) + (with { wide_int c1 = wi::to_wide (@1); + wide_int c2 = wi::lrshift (wi::to_wide (@2), c1); + wide_int c3 = wi::lrshift (wi::to_wide (@3), c1); } + (cmp (bit_and @0 { wide_int_to_tree (TREE_TYPE (@0), c2); }) + { wide_int_to_tree (TREE_TYPE (@0), c3); })))) + (simplify + (cmp (bit_and:s (rshift:s @0 INTEGER_CST@1) INTEGER_CST@2) INTEGER_CST@3) + (if (tree_fits_shwi_p (@1) + && tree_to_shwi (@1) > 0 + && tree_to_shwi (@1) < TYPE_PRECISION (TREE_TYPE (@0)) + && tree_to_shwi (@1) <= wi::clz (wi::to_wide (@2)) + && tree_to_shwi (@1) <= wi::clz (wi::to_wide (@3))) + (cmp (bit_and @0 (lshift @2 @1)) (lshift @3 @1))))) + /* Fold (X << C1) & C2 into (X << C1) & (C2 | ((1 << C1) - 1)) (X >> C1) & C2 into (X >> C1) & (C2 | ~((type) -1 >> C1)) if the new mask might be further optimized. */ diff --git a/gcc/testsuite/gcc.dg/pr94026.c b/gcc/testsuite/gcc.dg/pr94026.c new file mode 100644 index 0000000..deb4efd --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr94026.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +int f1(int x) { return ((x >> 8) & 6) != 0; } +int f2(int x) { return ((x << 2) & 24) != 0; } +int f3(unsigned x) { return ((x << 2) & 15) != 0; } +int f4(unsigned x) { return ((x >> 2) & 14) != 0; } + +int fifth (int c) +{ + int a = (c >> 8) & 7; + + if (a >= 2) { + return 1; + } else { + return 0; + } +} +/* { dg-final { scan-tree-dump-not " << " "optimized" } } */ +/* { dg-final { scan-tree-dump-not " >> " "optimized" } } */ + -- cgit v1.1 From 64d4f27a0ce47e97867512bda7fa5683acf8a134 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Mon, 27 Jun 2022 07:47:40 +0100 Subject: Implement __imag__ of float _Complex using shufps on x86_64. This patch is a follow-up improvement to my recent patch for PR rtl-optimization/7061. That patch added the test case gcc.target/i386/pr7061-2.c: float im(float _Complex a) { return __imag__ a; } For which GCC on x86_64 currently generates: movq %xmm0, %rax shrq $32, %rax movd %eax, %xmm0 ret but with this patch we now generate (the same as LLVM): shufps $85, %xmm0, %xmm0 ret This is achieved by providing a define_insn_and_split that allows truncated lshiftrt:DI by 32 to be performed on either SSE or general regs, where if the register allocator prefers to use SSE, we split to a shufps_v4si, or if not, we use a regular shrq. 2022-06-27 Roger Sayle gcc/ChangeLog PR rtl-optimization/7061 * config/i386/i386.md (*highpartdisi2): New define_insn_and_split. gcc/testsuite/ChangeLog PR rtl-optimization/7061 * gcc.target/i386/pr7061-2.c: Update to look for shufps. --- gcc/config/i386/i386.md | 25 +++++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/pr7061-2.c | 4 ++++ 2 files changed, 29 insertions(+) (limited to 'gcc') diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index dd173f7..125a3b4 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -13249,6 +13249,31 @@ (const_string "*"))) (set_attr "mode" "")]) +;; Specialization of *lshr3_1 below, extracting the SImode +;; highpart of a DI to be extracted, but allowing it to be clobbered. +(define_insn_and_split "*highpartdisi2" + [(set (subreg:DI (match_operand:SI 0 "register_operand" "=r,x,?k") 0) + (lshiftrt:DI (match_operand:DI 1 "register_operand" "0,0,k") + (const_int 32))) + (clobber (reg:CC FLAGS_REG))] + "TARGET_64BIT" + "#" + "&& reload_completed" + [(parallel + [(set (match_dup 0) (lshiftrt:DI (match_dup 1) (const_int 32))) + (clobber (reg:CC FLAGS_REG))])] +{ + if (SSE_REG_P (operands[0])) + { + rtx tmp = gen_rtx_REG (V4SImode, REGNO (operands[0])); + emit_insn (gen_sse_shufps_v4si (tmp, tmp, tmp, + const1_rtx, const1_rtx, + GEN_INT (5), GEN_INT (5))); + DONE; + } + operands[0] = gen_rtx_REG (DImode, REGNO (operands[0])); +}) + (define_insn "*lshr3_1" [(set (match_operand:SWI48 0 "nonimmediate_operand" "=rm,r,?k") (lshiftrt:SWI48 diff --git a/gcc/testsuite/gcc.target/i386/pr7061-2.c b/gcc/testsuite/gcc.target/i386/pr7061-2.c index ac33340..837cd83 100644 --- a/gcc/testsuite/gcc.target/i386/pr7061-2.c +++ b/gcc/testsuite/gcc.target/i386/pr7061-2.c @@ -1,5 +1,9 @@ /* { dg-do compile { target { ! ia32 } } } */ /* { dg-options "-O2" } */ float im(float _Complex a) { return __imag__ a; } +/* { dg-final { scan-assembler "shufps" } } */ +/* { dg-final { scan-assembler-not "movd" } } */ +/* { dg-final { scan-assembler-not "movq" } } */ /* { dg-final { scan-assembler-not "movss" } } */ /* { dg-final { scan-assembler-not "rsp" } } */ +/* { dg-final { scan-assembler-not "shr" } } */ -- cgit v1.1 From b06a282921c71bbc5cab69bc515804bd80f55e92 Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Sun, 12 Jun 2022 00:16:24 +0100 Subject: amdgcn: remove obsolete assembler workarounds This nonsense is no longer required, now that the minimum supported assembler version is LLVM 13.0.1. gcc/ChangeLog: * config/gcn/gcn.md (*movbi): Remove assembler bug workarounds. (jump): Likewise. (movdi_symbol_save_scc): Likewise. --- gcc/config/gcn/gcn.md | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) (limited to 'gcc') diff --git a/gcc/config/gcn/gcn.md b/gcc/config/gcn/gcn.md index 53e846e..033c170 100644 --- a/gcc/config/gcn/gcn.md +++ b/gcc/config/gcn/gcn.md @@ -481,14 +481,7 @@ we emit bytes directly as a workaround. */ switch (which_alternative) { case 0: - if (REG_P (operands[1]) && REGNO (operands[1]) == SCC_REG) - return "; s_mov_b32\t%0,%1 is not supported by the assembler.\;" - ".byte\t0xfd\;" - ".byte\t0x0\;" - ".byte\t0x80|%R0\;" - ".byte\t0xbe"; - else - return "s_mov_b32\t%0, %1"; + return "s_mov_b32\t%0, %1"; case 1: if (REG_P (operands[1]) && REGNO (operands[1]) == SCC_REG) return "; v_mov_b32\t%0, %1\;" @@ -505,16 +498,8 @@ case 4: return "v_cmp_ne_u32\tvcc, 0, %1"; case 5: - if (REGNO (operands[1]) == SCC_REG) - return "; s_mov_b32\t%0, %1 is not supported by the assembler.\;" - ".byte\t0xfd\;" - ".byte\t0x0\;" - ".byte\t0xea\;" - ".byte\t0xbe\;" - "s_mov_b32\tvcc_hi, 0"; - else - return "s_mov_b32\tvcc_lo, %1\;" - "s_mov_b32\tvcc_hi, 0"; + return "s_mov_b32\tvcc_lo, %1\;" + "s_mov_b32\tvcc_hi, 0"; case 6: return "s_load_dword\t%0, %A1\;s_waitcnt\tlgkmcnt(0)"; case 7: @@ -739,8 +724,7 @@ return "s_branch\t%0"; else /* !!! This sequence clobbers EXEC_SAVE_REG and CC_SAVE_REG. */ - return "; s_mov_b32\ts22, scc is not supported by the assembler.\;" - ".long\t0xbe9600fd\;" + return "s_mov_b32\ts22, scc\;" "s_getpc_b64\ts[20:21]\;" "s_add_u32\ts20, s20, %0@rel32@lo+4\;" "s_addc_u32\ts21, s21, %0@rel32@hi+4\;" @@ -801,11 +785,7 @@ } else return "s_cbranch%c1\t.Lskip%=\;" - "; s_mov_b32\ts22, scc is not supported by the assembler.\;" - ".byte\t0xfd\;" - ".byte\t0x0\;" - ".byte\t0x80|22\;" - ".byte\t0xbe\;" + "s_mov_b32\ts22, scc\;" "s_getpc_b64\ts[20:21]\;" "s_add_u32\ts20, s20, %0@rel32@lo+4\;" "s_addc_u32\ts21, s21, %0@rel32@hi+4\;" @@ -890,8 +870,7 @@ if (SYMBOL_REF_P (operands[1]) && SYMBOL_REF_WEAK (operands[1])) - return "; s_mov_b32\ts22, scc is not supported by the assembler.\;" - ".long\t0xbe9600fd\;" + return "s_mov_b32\ts22, scc\;" "s_getpc_b64\t%0\;" "s_add_u32\t%L0, %L0, %1@gotpcrel32@lo+4\;" "s_addc_u32\t%H0, %H0, %1@gotpcrel32@hi+4\;" @@ -899,8 +878,7 @@ "s_cmpk_lg_u32\ts22, 0\;" "s_waitcnt\tlgkmcnt(0)"; - return "; s_mov_b32\ts22, scc is not supported by the assembler.\;" - ".long\t0xbe9600fd\;" + return "s_mov_b32\ts22, scc\;" "s_getpc_b64\t%0\;" "s_add_u32\t%L0, %L0, %1@rel32@lo+4\;" "s_addc_u32\t%H0, %H0, %1@rel32@hi+4\;" -- cgit v1.1 From 0a3bb459e59e61bc52218dc6aa41c746d309f6a2 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 27 Jun 2022 10:34:17 -0300 Subject: testsuite: pthread: call sched_yield for non-preemptive targets Systems without preemptive multi-threading require sched_yield calls to be placed at points in which a context switch might be needed to enable the test to complete. for gcc/testsuite/ChangeLog * gcc.dg/atomic/c11-atomic-exec-4.c: Call sched_yield. * gcc.dg/atomic/c11-atomic-exec-5.c: Likewise. * gcc.dg/atomic/pr80640-2.c: Likewise. * gcc.dg/atomic/pr80640.c: Likewise. * gcc.dg/atomic/pr81316.c: Likewise. * gcc.dg/di-sync-multithread.c: Likewise. --- gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c | 12 +++++++++--- gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c | 6 +++++- gcc/testsuite/gcc.dg/atomic/pr80640-2.c | 6 ++++-- gcc/testsuite/gcc.dg/atomic/pr80640.c | 6 ++++-- gcc/testsuite/gcc.dg/atomic/pr81316.c | 9 +++++++-- gcc/testsuite/gcc.dg/di-sync-multithread.c | 8 ++++++++ 6 files changed, 37 insertions(+), 10 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c index d6bb629..669e7c0 100644 --- a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c +++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c @@ -32,7 +32,10 @@ test_thread_##NAME (void *arg) \ { \ thread_ready = true; \ for (int i = 0; i < ITER_COUNT; i++) \ - PRE var_##NAME POST; \ + { \ + sched_yield (); \ + PRE var_##NAME POST; \ + } \ return NULL; \ } \ \ @@ -49,9 +52,12 @@ test_main_##NAME (void) \ return 1; \ } \ while (!thread_ready) \ - ; \ + sched_yield (); \ for (int i = 0; i < ITER_COUNT; i++) \ - PRE var_##NAME POST; \ + { \ + PRE var_##NAME POST; \ + sched_yield (); \ + } \ pthread_join (thread_id, NULL); \ if (var_##NAME != (FINAL)) \ { \ diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c index 692c64a..f8bfa63 100644 --- a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c +++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c @@ -53,8 +53,11 @@ test_thread_##NAME (void *arg) \ thread_ready = true; \ while (!thread_stop) \ { \ + sched_yield (); \ var_##NAME = (INIT1); \ + sched_yield (); \ var_##NAME = (INIT2); \ + sched_yield (); \ } \ return NULL; \ } \ @@ -75,13 +78,14 @@ test_main_##NAME (void) \ } \ int num_1_pass = 0, num_1_fail = 0, num_2_pass = 0, num_2_fail = 0; \ while (!thread_ready) \ - ; \ + sched_yield (); \ for (int i = 0; i < ITER_COUNT; i++) \ { \ feclearexcept (FE_ALL_EXCEPT); \ feraiseexcept (BEXC); \ LHSTYPE r = (PRE var_##NAME POST); \ int rexc = fetestexcept (TEST_ALL_EXCEPT); \ + sched_yield (); \ if (VALTEST1 (r)) \ { \ if (rexc == ((BEXC) | (EXC1))) \ diff --git a/gcc/testsuite/gcc.dg/atomic/pr80640-2.c b/gcc/testsuite/gcc.dg/atomic/pr80640-2.c index a735054..e33dcc3 100644 --- a/gcc/testsuite/gcc.dg/atomic/pr80640-2.c +++ b/gcc/testsuite/gcc.dg/atomic/pr80640-2.c @@ -12,7 +12,8 @@ static void *f(void *va) void **p = va; if (*p) return *p; sem1 = 1; - while (!__atomic_load_n(&sem2, __ATOMIC_ACQUIRE)); + while (!__atomic_load_n(&sem2, __ATOMIC_ACQUIRE)) + sched_yield (); // GCC used to RTL-CSE this and the first load, causing 0 to be returned return *p; } @@ -23,7 +24,8 @@ int main() pthread_t thr; if (pthread_create(&thr, 0, f, &p)) return 2; - while (!sem1); + while (!sem1) + sched_yield (); __atomic_thread_fence(__ATOMIC_ACQUIRE); p = &p; __atomic_store_n(&sem2, 1, __ATOMIC_RELEASE); diff --git a/gcc/testsuite/gcc.dg/atomic/pr80640.c b/gcc/testsuite/gcc.dg/atomic/pr80640.c index fd17978..2577e0d 100644 --- a/gcc/testsuite/gcc.dg/atomic/pr80640.c +++ b/gcc/testsuite/gcc.dg/atomic/pr80640.c @@ -12,7 +12,8 @@ static void *f(void *va) void **p = va; if (*p) return *p; sem1 = 1; - while (!sem2); + while (!sem2) + sched_yield (); __atomic_thread_fence(__ATOMIC_ACQUIRE); // GCC used to RTL-CSE this and the first load, causing 0 to be returned return *p; @@ -24,7 +25,8 @@ int main() pthread_t thr; if (pthread_create(&thr, 0, f, &p)) return 2; - while (!sem1); + while (!sem1) + sched_yield (); __atomic_thread_fence(__ATOMIC_ACQUIRE); p = &p; __atomic_thread_fence(__ATOMIC_RELEASE); diff --git a/gcc/testsuite/gcc.dg/atomic/pr81316.c b/gcc/testsuite/gcc.dg/atomic/pr81316.c index ef10095..dc6569a 100644 --- a/gcc/testsuite/gcc.dg/atomic/pr81316.c +++ b/gcc/testsuite/gcc.dg/atomic/pr81316.c @@ -10,7 +10,8 @@ static _Atomic int sem1; static void *f(void *va) { void **p = va; - while (!__atomic_load_n(&sem1, __ATOMIC_ACQUIRE)); + while (!__atomic_load_n(&sem1, __ATOMIC_ACQUIRE)) + sched_yield (); exit(!*p); } @@ -24,6 +25,10 @@ int main(int argc) p = &p; __atomic_store_n(&sem1, 1, __ATOMIC_RELEASE); int r = -1; - while (r < 0) asm("":"+r"(r)); + while (r < 0) + { + sched_yield (); + asm("":"+r"(r)); + } return r; } diff --git a/gcc/testsuite/gcc.dg/di-sync-multithread.c b/gcc/testsuite/gcc.dg/di-sync-multithread.c index 493f1e2..1a97df7 100644 --- a/gcc/testsuite/gcc.dg/di-sync-multithread.c +++ b/gcc/testsuite/gcc.dg/di-sync-multithread.c @@ -70,6 +70,8 @@ worker (void* data) case this to carry across the 32bit boundary. */ for (tmp2 = 0; tmp2 < 64; tmp2++) { + sched_yield (); + /* Add 2 using the two different adds. */ tmp1 = __sync_add_and_fetch (&workspace, add1bit); tmp3 = __sync_fetch_and_add (&workspace, add1bit); @@ -103,6 +105,8 @@ worker (void* data) for (tmp2 = 0; tmp2 < 64; tmp2++) { + sched_yield (); + /* Subtract 2 using the two different subs. */ tmp1=__sync_sub_and_fetch (&workspace, add1bit); tmp3=__sync_fetch_and_sub (&workspace, add1bit); @@ -178,6 +182,8 @@ main () t, err); }; + sched_yield (); + #ifdef _WIN32 Sleep (5000); #else @@ -187,6 +193,8 @@ main () /* Stop please. */ __sync_lock_test_and_set (&doquit, 1ll); + sched_yield (); + for (t = 0; t < 3; t++) { err=pthread_join (threads[t], NULL); -- cgit v1.1 From 00063459f683adcd92ada8325984e6b10e9f7a95 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 27 Jun 2022 15:35:25 +0200 Subject: testsuite: Fix up pr106070.c test [PR106070] The test FAILs on 32-bit targets, because when unsigned long is 32-bit, (unsigned long) -1 isn't 0xffffffffffffffff. The options to fix this would be either using -1UL, or switch to unsigned long long and using -1ULL, I chose the latter because the test then FAILs in r13-1242 even on 32-bit targets. And while at it, some deobfuscation and formatting tweaks. 2022-06-27 Jakub Jelinek PR tree-optimization/106070 * gcc.dg/torture/pr106070.c: Use unsigned long long instead of unsigned long and -1ULL instead of 0xffffffffffffffff, deobcuscate and improve formatting. --- gcc/testsuite/gcc.dg/torture/pr106070.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/torture/pr106070.c b/gcc/testsuite/gcc.dg/torture/pr106070.c index c36534f..f031516 100644 --- a/gcc/testsuite/gcc.dg/torture/pr106070.c +++ b/gcc/testsuite/gcc.dg/torture/pr106070.c @@ -1,20 +1,22 @@ /* { dg-do run } */ -unsigned int var_2 = 1; -int var_4 = -1; -int var_10 = 4; -unsigned long arr_252; -void __attribute__((noipa)) test() { - for (int a = 0; a < var_10; a += 2) - arr_252 = var_2 != (int)var_4 ? (unsigned long)var_4 : (unsigned long)var_2; -} +unsigned int a = 1; +int b = -1; +int c = 4; +unsigned long long d; -void test(); +void __attribute__((noipa)) +test (void) +{ + for (int i = 0; i < c; i += 2) + d = a != (int) b ? (unsigned long long) b : (unsigned long long) a; +} -int main() +int +main () { - test(); - if (arr_252 != 0xffffffffffffffff) - __builtin_abort(); + test (); + if (d != -1ULL) + __builtin_abort (); return 0; } -- cgit v1.1 From a1f8a3860fe5c83a023688c29636b5abe03db949 Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Wed, 22 Jun 2022 14:42:06 +0100 Subject: amdgcn: test global constructors The tests are disabled for historical reasons only. gcc/testsuite/ChangeLog: * lib/target-supports.exp (check_effective_target_global_constructor): Remove amdgcn. --- gcc/testsuite/lib/target-supports.exp | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 20171f9..e481a2a 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -851,7 +851,6 @@ proc check_effective_target_nonlocal_goto {} { proc check_effective_target_global_constructor {} { if { [istarget nvptx-*-*] - || [istarget amdgcn-*-*] || [istarget bpf-*-*] } { return 0 } -- cgit v1.1 From 722750a44a93ce7d23e09df240d8ab700a2d30e6 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 24 Jun 2022 17:18:15 -0700 Subject: compiler: always initialize mpfr in integer import Test case is https://go.dev/cl/413980. Fixes golang/go#52862 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413981 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index e20212e..f84347e 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -6a7ba754e5d98efe0875f1f41f40098e976e7958 +6edae0ef6521569e8f949aaaafa9dc1139825051 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 734ecb9..135dae02 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -2715,7 +2715,7 @@ Integer_expression::do_import(Import_expression* imp, Location loc) return Expression::make_error(loc); } if (pos == std::string::npos) - mpfr_set_ui(real, 0, MPFR_RNDN); + mpfr_init_set_ui(real, 0, MPFR_RNDN); else { std::string real_str = num.substr(0, pos); -- cgit v1.1 From 5f6b6494035fb984d745efa28d334f7893e7272b Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 26 Jun 2022 21:52:35 -0700 Subject: compiler: don't use sink as parameter in method expression thunk Also fix a couple of cases where the error led to a later compiler crash. Test case is https://go.dev/cl/414336. Fixes golang/go#52871 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/414354 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 9 +++++++-- gcc/go/gofrontend/types.cc | 7 +++++-- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index f84347e..16d274c 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -6edae0ef6521569e8f949aaaafa9dc1139825051 +927528cdc112fc51e0d07ee79e7a1254b586eabe The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 135dae02..f59f61d 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -1426,7 +1426,12 @@ Sink_expression::do_get_backend(Translate_context* context) Gogo* gogo = context->gogo(); if (this->bvar_ == NULL) { - go_assert(this->type_ != NULL && !this->type_->is_sink_type()); + if (this->type_ == NULL || this->type_->is_sink_type()) + { + go_assert(saw_errors()); + return gogo->backend()->error_expression(); + } + Named_object* fn = context->function(); go_assert(fn != NULL); Bfunction* fn_ctx = fn->func_value()->get_or_make_decl(gogo, fn); @@ -15235,7 +15240,7 @@ Selector_expression::lower_method_expression(Gogo* gogo) p != method_parameters->end(); ++p, ++i) { - if (!p->name().empty()) + if (!p->name().empty() && !Gogo::is_sink_name(p->name())) parameters->push_back(*p); else { diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 39aea76..e82be68 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -4654,8 +4654,11 @@ class Sink_type : public Type { return false; } Btype* - do_get_backend(Gogo*) - { go_unreachable(); } + do_get_backend(Gogo* gogo) + { + go_assert(saw_errors()); + return gogo->backend()->error_type(); + } Expression* do_type_descriptor(Gogo*, Named_type*) -- cgit v1.1 From 508231d54405ac9f120cf30c28cd6eb10ceded30 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Mon, 27 Jun 2022 14:52:58 -0400 Subject: c++: Add fixed test [PR89197] Fixed since bug 97899 was fixed. PR c++/89197 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist130.C: New test. --- gcc/testsuite/g++.dg/cpp0x/initlist130.C | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/initlist130.C (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist130.C b/gcc/testsuite/g++.dg/cpp0x/initlist130.C new file mode 100644 index 0000000..662a5a3 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/initlist130.C @@ -0,0 +1,5 @@ +// PR c++/89197 +// { dg-options "-Wno-c++11-extensions" } +// This used to ICE with std=c++03, therefore we run it in C++03 too. + +template void foo(int i) { const int c = int{i}; } -- cgit v1.1 From 725793af78064fa605ea6d9376aaf99ecb71467b Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 27 Jun 2022 17:00:33 -0400 Subject: Add 'final' and 'override' to opt_pass vfunc impls gcc/ChangeLog: * adjust-alignment.cc: Add "final" and "override" to opt_pass vfunc implementations, removing redundant "virtual" as appropriate. * asan.cc: Likewise. * auto-inc-dec.cc: Likewise. * auto-profile.cc: Likewise. * bb-reorder.cc: Likewise. * cfgcleanup.cc: Likewise. * cfgexpand.cc: Likewise. * cfgrtl.cc: Likewise. * cgraphbuild.cc: Likewise. * combine-stack-adj.cc: Likewise. * combine.cc: Likewise. * compare-elim.cc: Likewise. * config/i386/i386-features.cc: Likewise. * coroutine-passes.cc: Likewise. * cprop.cc: Likewise. * cse.cc: Likewise. * dce.cc: Likewise. * df-core.cc: Likewise. * dse.cc: Likewise. * dwarf2cfi.cc: Likewise. * early-remat.cc: Likewise. * except.cc: Likewise. * final.cc: Likewise. * function.cc: Likewise. * fwprop.cc: Likewise. * gcse.cc: Likewise. * gimple-harden-conditionals.cc: Likewise. * gimple-if-to-switch.cc: Likewise. * gimple-isel.cc: Likewise. * gimple-laddress.cc: Likewise. * gimple-loop-interchange.cc: Likewise. * gimple-loop-jam.cc: Likewise. * gimple-loop-versioning.cc: Likewise. * gimple-low.cc: Likewise. * gimple-ssa-backprop.cc: Likewise. * gimple-ssa-evrp.cc: Likewise. * gimple-ssa-isolate-paths.cc: Likewise. * gimple-ssa-nonnull-compare.cc: Likewise. * gimple-ssa-split-paths.cc: Likewise. * gimple-ssa-store-merging.cc: Likewise. * gimple-ssa-strength-reduction.cc: Likewise. * gimple-ssa-warn-access.cc: Likewise. * gimple-ssa-warn-alloca.cc: Likewise. * gimple-ssa-warn-restrict.cc: Likewise. * gimple-warn-recursion.cc: Likewise. * graphite.cc: Likewise. * ifcvt.cc: Likewise. * init-regs.cc: Likewise. * ipa-comdats.cc: Likewise. * ipa-cp.cc: Likewise. * ipa-devirt.cc: Likewise. * ipa-fnsummary.cc: Likewise. * ipa-free-lang-data.cc: Likewise. * ipa-icf.cc: Likewise. * ipa-inline.cc: Likewise. * ipa-modref.cc: Likewise. * ipa-profile.cc: Likewise. * ipa-pure-const.cc: Likewise. * ipa-reference.cc: Likewise. * ipa-split.cc: Likewise. * ipa-sra.cc: Likewise. * ipa-visibility.cc: Likewise. * ipa.cc: Likewise. * ira.cc: Likewise. * jump.cc: Likewise. * loop-init.cc: Likewise. * lower-subreg.cc: Likewise. * mode-switching.cc: Likewise. * modulo-sched.cc: Likewise. * multiple_target.cc: Likewise. * omp-expand.cc: Likewise. * omp-low.cc: Likewise. * omp-oacc-kernels-decompose.cc: Likewise. * omp-oacc-neuter-broadcast.cc: Likewise. * omp-offload.cc: Likewise. * omp-simd-clone.cc: Likewise. * passes.cc: Likewise. * postreload-gcse.cc: Likewise. * postreload.cc: Likewise. * predict.cc: Likewise. * recog.cc: Likewise. * ree.cc: Likewise. * reg-stack.cc: Likewise. * regcprop.cc: Likewise. * reginfo.cc: Likewise. * regrename.cc: Likewise. * reorg.cc: Likewise. * sancov.cc: Likewise. * sanopt.cc: Likewise. * sched-rgn.cc: Likewise. * stack-ptr-mod.cc: Likewise. * store-motion.cc: Likewise. * tracer.cc: Likewise. * trans-mem.cc: Likewise. * tree-call-cdce.cc: Likewise. * tree-cfg.cc: Likewise. * tree-cfgcleanup.cc: Likewise. * tree-complex.cc: Likewise. * tree-eh.cc: Likewise. * tree-emutls.cc: Likewise. * tree-if-conv.cc: Likewise. * tree-into-ssa.cc: Likewise. * tree-loop-distribution.cc: Likewise. * tree-nrv.cc: Likewise. * tree-object-size.cc: Likewise. * tree-parloops.cc: Likewise. * tree-predcom.cc: Likewise. * tree-profile.cc: Likewise. * tree-sra.cc: Likewise. * tree-ssa-ccp.cc: Likewise. * tree-ssa-copy.cc: Likewise. * tree-ssa-dce.cc: Likewise. * tree-ssa-dom.cc: Likewise. * tree-ssa-dse.cc: Likewise. * tree-ssa-forwprop.cc: Likewise. * tree-ssa-ifcombine.cc: Likewise. * tree-ssa-loop-ch.cc: Likewise. * tree-ssa-loop-im.cc: Likewise. * tree-ssa-loop-ivcanon.cc: Likewise. * tree-ssa-loop-prefetch.cc: Likewise. * tree-ssa-loop-split.cc: Likewise. * tree-ssa-loop-unswitch.cc: Likewise. * tree-ssa-loop.cc: Likewise. * tree-ssa-math-opts.cc: Likewise. * tree-ssa-phiopt.cc: Likewise. * tree-ssa-phiprop.cc: Likewise. * tree-ssa-pre.cc: Likewise. * tree-ssa-reassoc.cc: Likewise. * tree-ssa-sccvn.cc: Likewise. * tree-ssa-sink.cc: Likewise. * tree-ssa-strlen.cc: Likewise. * tree-ssa-structalias.cc: Likewise. * tree-ssa-uncprop.cc: Likewise. * tree-ssa-uninit.cc: Likewise. * tree-ssanames.cc: Likewise. * tree-stdarg.cc: Likewise. * tree-switch-conversion.cc: Likewise. * tree-tailcall.cc: Likewise. * tree-vect-generic.cc: Likewise. * tree-vectorizer.cc: Likewise. * tree-vrp.cc: Likewise. * tsan.cc: Likewise. * ubsan.cc: Likewise. * var-tracking.cc: Likewise. * vtable-verify.cc: Likewise. * web.cc: Likewise. Signed-off-by: David Malcolm --- gcc/adjust-alignment.cc | 2 +- gcc/asan.cc | 19 ++++++++++++++----- gcc/auto-inc-dec.cc | 4 ++-- gcc/auto-profile.cc | 8 ++++---- gcc/bb-reorder.cc | 12 ++++++------ gcc/cfgcleanup.cc | 8 ++++---- gcc/cfgexpand.cc | 2 +- gcc/cfgrtl.cc | 6 +++--- gcc/cgraphbuild.cc | 13 ++++++++----- gcc/combine-stack-adj.cc | 4 ++-- gcc/combine.cc | 4 ++-- gcc/compare-elim.cc | 4 ++-- gcc/config/i386/i386-features.cc | 20 ++++++++++---------- gcc/coroutine-passes.cc | 8 ++++---- gcc/cprop.cc | 9 ++++++--- gcc/cse.cc | 18 ++++++++++++------ gcc/dce.cc | 8 ++++---- gcc/df-core.cc | 10 +++++----- gcc/dse.cc | 14 ++++++++++---- gcc/dwarf2cfi.cc | 7 +++++-- gcc/early-remat.cc | 4 ++-- gcc/except.cc | 6 +++--- gcc/final.cc | 14 ++++++++++---- gcc/function.cc | 10 +++++----- gcc/fwprop.cc | 8 ++++---- gcc/gcse.cc | 14 ++++++++++---- gcc/gimple-harden-conditionals.cc | 20 ++++++++++++++------ gcc/gimple-if-to-switch.cc | 4 ++-- gcc/gimple-isel.cc | 4 ++-- gcc/gimple-laddress.cc | 6 +++--- gcc/gimple-loop-interchange.cc | 6 +++--- gcc/gimple-loop-jam.cc | 4 ++-- gcc/gimple-loop-versioning.cc | 7 +++++-- gcc/gimple-low.cc | 5 ++++- gcc/gimple-ssa-backprop.cc | 6 +++--- gcc/gimple-ssa-evrp.cc | 6 +++--- gcc/gimple-ssa-isolate-paths.cc | 9 ++++++--- gcc/gimple-ssa-nonnull-compare.cc | 4 ++-- gcc/gimple-ssa-split-paths.cc | 9 ++++++--- gcc/gimple-ssa-store-merging.cc | 10 +++++----- gcc/gimple-ssa-strength-reduction.cc | 4 ++-- gcc/gimple-ssa-warn-access.cc | 8 ++++---- gcc/gimple-ssa-warn-alloca.cc | 8 ++++---- gcc/gimple-ssa-warn-restrict.cc | 4 ++-- gcc/gimple-warn-recursion.cc | 4 ++-- gcc/graphite.cc | 9 ++++++--- gcc/ifcvt.cc | 12 ++++++------ gcc/init-regs.cc | 4 ++-- gcc/ipa-comdats.cc | 4 ++-- gcc/ipa-cp.cc | 4 ++-- gcc/ipa-devirt.cc | 8 ++++---- gcc/ipa-fnsummary.cc | 20 +++++++++++++------- gcc/ipa-free-lang-data.cc | 2 +- gcc/ipa-icf.cc | 4 ++-- gcc/ipa-inline.cc | 4 ++-- gcc/ipa-modref.cc | 12 ++++++------ gcc/ipa-profile.cc | 4 ++-- gcc/ipa-pure-const.cc | 26 ++++++++++++++++---------- gcc/ipa-reference.cc | 4 ++-- gcc/ipa-split.cc | 8 ++++---- gcc/ipa-sra.cc | 7 +++++-- gcc/ipa-visibility.cc | 6 +++--- gcc/ipa.cc | 9 ++++++--- gcc/ira.cc | 8 ++++---- gcc/jump.cc | 5 ++++- gcc/loop-init.cc | 18 +++++++++--------- gcc/lower-subreg.cc | 16 +++++++++------- gcc/mode-switching.cc | 6 +++--- gcc/modulo-sched.cc | 4 ++-- gcc/multiple_target.cc | 7 +++++-- gcc/omp-expand.cc | 14 ++++++++++---- gcc/omp-low.cc | 9 ++++++--- gcc/omp-oacc-kernels-decompose.cc | 4 ++-- gcc/omp-oacc-neuter-broadcast.cc | 4 ++-- gcc/omp-offload.cc | 16 ++++++++-------- gcc/omp-simd-clone.cc | 7 +++++-- gcc/passes.cc | 34 ++++++++++++++++++++-------------- gcc/postreload-gcse.cc | 7 +++++-- gcc/postreload.cc | 7 +++++-- gcc/predict.cc | 13 ++++++++----- gcc/recog.cc | 32 +++++++++++++++++++------------- gcc/ree.cc | 7 +++++-- gcc/reg-stack.cc | 4 ++-- gcc/regcprop.cc | 4 ++-- gcc/reginfo.cc | 2 +- gcc/regrename.cc | 7 +++++-- gcc/reorg.cc | 8 ++++---- gcc/sancov.cc | 10 +++++----- gcc/sanopt.cc | 4 ++-- gcc/sched-rgn.cc | 19 +++++++++++-------- gcc/stack-ptr-mod.cc | 2 +- gcc/store-motion.cc | 4 ++-- gcc/tracer.cc | 4 ++-- gcc/trans-mem.cc | 34 +++++++++++++++++++++++----------- gcc/tree-call-cdce.cc | 4 ++-- gcc/tree-cfg.cc | 28 ++++++++++++++++++++-------- gcc/tree-cfgcleanup.cc | 6 +++--- gcc/tree-complex.cc | 14 ++++++++++---- gcc/tree-eh.cc | 23 +++++++++++++---------- gcc/tree-emutls.cc | 7 +++++-- gcc/tree-if-conv.cc | 4 ++-- gcc/tree-into-ssa.cc | 4 ++-- gcc/tree-loop-distribution.cc | 4 ++-- gcc/tree-nrv.cc | 6 +++--- gcc/tree-object-size.cc | 6 +++--- gcc/tree-parloops.cc | 11 +++++++---- gcc/tree-predcom.cc | 8 ++++---- gcc/tree-profile.cc | 4 ++-- gcc/tree-sra.cc | 11 +++++++---- gcc/tree-ssa-ccp.cc | 21 ++++++++++++--------- gcc/tree-ssa-copy.cc | 9 ++++++--- gcc/tree-ssa-dce.cc | 14 +++++++------- gcc/tree-ssa-dom.cc | 8 ++++---- gcc/tree-ssa-dse.cc | 6 +++--- gcc/tree-ssa-forwprop.cc | 6 +++--- gcc/tree-ssa-ifcombine.cc | 2 +- gcc/tree-ssa-loop-ch.cc | 10 +++++----- gcc/tree-ssa-loop-im.cc | 6 +++--- gcc/tree-ssa-loop-ivcanon.cc | 10 +++++----- gcc/tree-ssa-loop-prefetch.cc | 7 +++++-- gcc/tree-ssa-loop-split.cc | 4 ++-- gcc/tree-ssa-loop-unswitch.cc | 4 ++-- gcc/tree-ssa-loop.cc | 27 +++++++++++++++------------ gcc/tree-ssa-math-opts.cc | 15 +++++++++------ gcc/tree-ssa-phiopt.cc | 15 +++++++++------ gcc/tree-ssa-phiprop.cc | 4 ++-- gcc/tree-ssa-pre.cc | 4 ++-- gcc/tree-ssa-reassoc.cc | 8 ++++---- gcc/tree-ssa-sccvn.cc | 8 ++++---- gcc/tree-ssa-sink.cc | 8 ++++---- gcc/tree-ssa-strlen.cc | 10 +++++----- gcc/tree-ssa-structalias.cc | 13 ++++++++----- gcc/tree-ssa-uncprop.cc | 6 +++--- gcc/tree-ssa-uninit.cc | 13 ++++++++----- gcc/tree-ssanames.cc | 2 +- gcc/tree-stdarg.cc | 8 ++++---- gcc/tree-switch-conversion.cc | 15 +++++++++------ gcc/tree-tailcall.cc | 16 +++++++++++----- gcc/tree-vect-generic.cc | 11 +++++++---- gcc/tree-vectorizer.cc | 26 ++++++++++++++++---------- gcc/tree-vrp.cc | 8 ++++---- gcc/tsan.cc | 10 +++++----- gcc/ubsan.cc | 4 ++-- gcc/var-tracking.cc | 4 ++-- gcc/vtable-verify.cc | 4 ++-- gcc/web.cc | 4 ++-- 146 files changed, 769 insertions(+), 552 deletions(-) (limited to 'gcc') diff --git a/gcc/adjust-alignment.cc b/gcc/adjust-alignment.cc index 2db41e8..5c5f8f4 100644 --- a/gcc/adjust-alignment.cc +++ b/gcc/adjust-alignment.cc @@ -50,7 +50,7 @@ public: : gimple_opt_pass (pass_data_adjust_alignment, ctxt) {} - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_adjust_alignment } // anon namespace diff --git a/gcc/asan.cc b/gcc/asan.cc index 15b2cf8..8276f12 100644 --- a/gcc/asan.cc +++ b/gcc/asan.cc @@ -4222,9 +4222,15 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_asan (m_ctxt); } - virtual bool gate (function *) { return gate_asan () || gate_hwasan (); } - virtual unsigned int execute (function *) { return asan_instrument (); } + opt_pass * clone () final override { return new pass_asan (m_ctxt); } + bool gate (function *) final override + { + return gate_asan () || gate_hwasan (); + } + unsigned int execute (function *) final override + { + return asan_instrument (); + } }; // class pass_asan @@ -4259,11 +4265,14 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return !optimize && (gate_asan () || gate_hwasan ()); } - virtual unsigned int execute (function *) { return asan_instrument (); } + unsigned int execute (function *) final override + { + return asan_instrument (); + } }; // class pass_asan_O0 diff --git a/gcc/auto-inc-dec.cc b/gcc/auto-inc-dec.cc index 85fe9d1..481e7af 100644 --- a/gcc/auto-inc-dec.cc +++ b/gcc/auto-inc-dec.cc @@ -1692,7 +1692,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { if (!AUTO_INC_DEC) return false; @@ -1701,7 +1701,7 @@ public: } - unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_inc_dec diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc index 2b34b80..6533722 100644 --- a/gcc/auto-profile.cc +++ b/gcc/auto-profile.cc @@ -1752,13 +1752,13 @@ public: } /* opt_pass methods: */ - virtual bool - gate (function *) + bool + gate (function *) final override { return flag_auto_profile; } - virtual unsigned int - execute (function *) + unsigned int + execute (function *) final override { return autofdo::auto_profile (); } diff --git a/gcc/bb-reorder.cc b/gcc/bb-reorder.cc index 6600f44..5cd4825 100644 --- a/gcc/bb-reorder.cc +++ b/gcc/bb-reorder.cc @@ -2633,7 +2633,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { if (targetm.cannot_modify_jumps_p ()) return false; @@ -2641,7 +2641,7 @@ public: && (flag_reorder_blocks || flag_reorder_blocks_and_partition)); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_reorder_blocks @@ -2794,8 +2794,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *); + bool gate (function *) final override; + unsigned int execute (function *) final override; }; // class pass_duplicate_computed_gotos @@ -2937,8 +2937,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *); + bool gate (function *) final override; + unsigned int execute (function *) final override; }; // class pass_partition_blocks diff --git a/gcc/cfgcleanup.cc b/gcc/cfgcleanup.cc index 335af49..18047da 100644 --- a/gcc/cfgcleanup.cc +++ b/gcc/cfgcleanup.cc @@ -3227,7 +3227,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_jump @@ -3274,11 +3274,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return flag_thread_jumps && flag_expensive_optimizations; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_jump_after_combine @@ -3322,7 +3322,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { cleanup_cfg (flag_crossjumping ? CLEANUP_CROSSJUMP : 0); return 0; diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc index bb33c1b..1d7f6b2 100644 --- a/gcc/cfgexpand.cc +++ b/gcc/cfgexpand.cc @@ -6573,7 +6573,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_expand diff --git a/gcc/cfgrtl.cc b/gcc/cfgrtl.cc index afbdbfe..a05c338 100644 --- a/gcc/cfgrtl.cc +++ b/gcc/cfgrtl.cc @@ -483,7 +483,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_free_cfg @@ -3698,7 +3698,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { cfg_layout_initialize (0); return 0; @@ -3737,7 +3737,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_outof_cfg_layout_mode diff --git a/gcc/cgraphbuild.cc b/gcc/cgraphbuild.cc index fdd17aa..bae4459 100644 --- a/gcc/cgraphbuild.cc +++ b/gcc/cgraphbuild.cc @@ -290,7 +290,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_build_cgraph_edges @@ -484,8 +484,11 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_rebuild_cgraph_edges (m_ctxt); } - virtual unsigned int execute (function *) + opt_pass * clone () final override + { + return new pass_rebuild_cgraph_edges (m_ctxt); + } + unsigned int execute (function *) final override { return cgraph_edge::rebuild_edges (); } @@ -524,10 +527,10 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { + opt_pass * clone () final override { return new pass_remove_cgraph_callee_edges (m_ctxt); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_remove_cgraph_callee_edges diff --git a/gcc/combine-stack-adj.cc b/gcc/combine-stack-adj.cc index e8ba271..e76d60a 100644 --- a/gcc/combine-stack-adj.cc +++ b/gcc/combine-stack-adj.cc @@ -823,8 +823,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) + bool gate (function *) final override; + unsigned int execute (function *) final override { return rest_of_handle_stack_adjustments (); } diff --git a/gcc/combine.cc b/gcc/combine.cc index 9a34ef8..a830527 100644 --- a/gcc/combine.cc +++ b/gcc/combine.cc @@ -15015,8 +15015,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return (optimize > 0); } - virtual unsigned int execute (function *) + bool gate (function *) final override { return (optimize > 0); } + unsigned int execute (function *) final override { return rest_of_handle_combine (); } diff --git a/gcc/compare-elim.cc b/gcc/compare-elim.cc index 985c0c9..e869d9d 100644 --- a/gcc/compare-elim.cc +++ b/gcc/compare-elim.cc @@ -954,7 +954,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* Setting this target hook value is how a backend indicates the need. */ if (targetm.flags_regnum == INVALID_REGNUM) @@ -962,7 +962,7 @@ public: return flag_compare_elim_after_reload; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return execute_compare_elim_after_reload (); } diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc index 8908e42..be38586 100644 --- a/gcc/config/i386/i386-features.cc +++ b/gcc/config/i386/i386-features.cc @@ -1880,13 +1880,13 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return TARGET_AVX && TARGET_VZEROUPPER && flag_expensive_optimizations && !optimize_size; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_insert_vzeroupper (); } @@ -1915,23 +1915,23 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return ((!timode_p || TARGET_64BIT) && TARGET_STV && TARGET_SSE2 && optimize > 1); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return convert_scalars_to_vector (timode_p); } - opt_pass *clone () + opt_pass *clone () final override { return new pass_stv (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); timode_p = param; @@ -2142,14 +2142,14 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { need_endbr = (flag_cf_protection & CF_BRANCH) != 0; patchable_area_size = crtl->patch_area_size - crtl->patch_area_entry; return need_endbr || patchable_area_size; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { timevar_push (TV_MACH_DEP); rest_of_insert_endbr_and_patchable_area (need_endbr, @@ -2406,7 +2406,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (TARGET_AVX && TARGET_SSE_PARTIAL_REG_DEPENDENCY @@ -2415,7 +2415,7 @@ public: && optimize_function_for_speed_p (cfun)); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return remove_partial_avx_dependency (); } diff --git a/gcc/coroutine-passes.cc b/gcc/coroutine-passes.cc index 7b9a97a..21ac946 100644 --- a/gcc/coroutine-passes.cc +++ b/gcc/coroutine-passes.cc @@ -213,9 +213,9 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_coroutines; }; + bool gate (function *) final override { return flag_coroutines; }; - virtual unsigned int execute (function *f ATTRIBUTE_UNUSED) + unsigned int execute (function *f ATTRIBUTE_UNUSED) final override { return execute_lower_coro_builtins (); } @@ -511,12 +511,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *f) + bool gate (function *f) final override { return flag_coroutines && f->coroutine_component; } - virtual unsigned int execute (function *f ATTRIBUTE_UNUSED) + unsigned int execute (function *f ATTRIBUTE_UNUSED) final override { return execute_early_expand_coro_ifns (); } diff --git a/gcc/cprop.cc b/gcc/cprop.cc index cf01c2d..580f811 100644 --- a/gcc/cprop.cc +++ b/gcc/cprop.cc @@ -1953,15 +1953,18 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_rtl_cprop (m_ctxt); } - virtual bool gate (function *fun) + opt_pass * clone () final override { return new pass_rtl_cprop (m_ctxt); } + bool gate (function *fun) final override { return optimize > 0 && flag_gcse && !fun->calls_setjmp && dbg_cnt (cprop); } - virtual unsigned int execute (function *) { return execute_rtl_cprop (); } + unsigned int execute (function *) final override + { + return execute_rtl_cprop (); + } }; // class pass_rtl_cprop diff --git a/gcc/cse.cc b/gcc/cse.cc index a18b599..b13afd4 100644 --- a/gcc/cse.cc +++ b/gcc/cse.cc @@ -7571,8 +7571,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return optimize > 0; } - virtual unsigned int execute (function *) { return rest_of_handle_cse (); } + bool gate (function *) final override { return optimize > 0; } + unsigned int execute (function *) final override + { + return rest_of_handle_cse (); + } }; // class pass_cse @@ -7642,12 +7645,15 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return optimize > 0 && flag_rerun_cse_after_loop; } - virtual unsigned int execute (function *) { return rest_of_handle_cse2 (); } + unsigned int execute (function *) final override + { + return rest_of_handle_cse2 (); + } }; // class pass_cse2 @@ -7715,12 +7721,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return optimize > 0 && flag_rerun_cse_after_global_opts; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_cse_after_global_opts (); } diff --git a/gcc/dce.cc b/gcc/dce.cc index 6676cbc..64aa0aa 100644 --- a/gcc/dce.cc +++ b/gcc/dce.cc @@ -849,12 +849,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return optimize > 1 && flag_dce && dbg_cnt (dce_ud); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_ud_dce (); } @@ -1280,12 +1280,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return optimize > 0 && flag_dce && dbg_cnt (dce_fast); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_fast_dce (); } diff --git a/gcc/df-core.cc b/gcc/df-core.cc index e3a56bf..b53464c 100644 --- a/gcc/df-core.cc +++ b/gcc/df-core.cc @@ -741,8 +741,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return optimize > 0; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return optimize > 0; } + unsigned int execute (function *) final override { return rest_of_handle_df_initialize (); } @@ -781,8 +781,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return optimize == 0; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return optimize == 0; } + unsigned int execute (function *) final override { return rest_of_handle_df_initialize (); } @@ -848,7 +848,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_df_finish (); } diff --git a/gcc/dse.cc b/gcc/dse.cc index 994c60d..90a4c1f 100644 --- a/gcc/dse.cc +++ b/gcc/dse.cc @@ -3755,12 +3755,15 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return optimize > 0 && flag_dse && dbg_cnt (dse1); } - virtual unsigned int execute (function *) { return rest_of_handle_dse (); } + unsigned int execute (function *) final override + { + return rest_of_handle_dse (); + } }; // class pass_rtl_dse1 @@ -3795,12 +3798,15 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return optimize > 0 && flag_dse && dbg_cnt (dse2); } - virtual unsigned int execute (function *) { return rest_of_handle_dse (); } + unsigned int execute (function *) final override + { + return rest_of_handle_dse (); + } }; // class pass_rtl_dse2 diff --git a/gcc/dwarf2cfi.cc b/gcc/dwarf2cfi.cc index ab7c5cc..bef3165 100644 --- a/gcc/dwarf2cfi.cc +++ b/gcc/dwarf2cfi.cc @@ -3788,8 +3788,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) { return execute_dwarf2_frame (); } + bool gate (function *) final override; + unsigned int execute (function *) final override + { + return execute_dwarf2_frame (); + } }; // class pass_dwarf2_frame diff --git a/gcc/early-remat.cc b/gcc/early-remat.cc index 2738892..5c36829 100644 --- a/gcc/early-remat.cc +++ b/gcc/early-remat.cc @@ -2615,12 +2615,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return optimize > 1 && NUM_POLY_INT_COEFFS > 1; } - virtual unsigned int execute (function *f) + unsigned int execute (function *f) final override { auto_sbitmap selected_modes (NUM_MACHINE_MODES); bitmap_clear (selected_modes); diff --git a/gcc/except.cc b/gcc/except.cc index b94de42..7d7ce40 100644 --- a/gcc/except.cc +++ b/gcc/except.cc @@ -2047,7 +2047,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return set_nothrow_function_flags (); } @@ -2722,8 +2722,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) + bool gate (function *) final override; + unsigned int execute (function *) final override { int ret = convert_to_eh_region_ranges (); maybe_add_nop_after_section_switch (); diff --git a/gcc/final.cc b/gcc/final.cc index c5427d2..0352786 100644 --- a/gcc/final.cc +++ b/gcc/final.cc @@ -804,7 +804,10 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return compute_alignments (); } + unsigned int execute (function *) final override + { + return compute_alignments (); + } }; // class pass_compute_alignments @@ -4356,7 +4359,10 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return rest_of_handle_final (); } + unsigned int execute (function *) final override + { + return rest_of_handle_final (); + } }; // class pass_final @@ -4400,7 +4406,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_shorten_branches (); } @@ -4575,7 +4581,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_clean_state (); } diff --git a/gcc/function.cc b/gcc/function.cc index ad0096a..0c3e4ff 100644 --- a/gcc/function.cc +++ b/gcc/function.cc @@ -2029,7 +2029,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return instantiate_virtual_regs (); } @@ -6516,7 +6516,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_check_leaf_regs (); } @@ -6617,7 +6617,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_thread_prologue_and_epilogue (); } @@ -6655,7 +6655,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_zero_call_used_regs @@ -6926,7 +6926,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_match_asm_constraints diff --git a/gcc/fwprop.cc b/gcc/fwprop.cc index d12fc2f..fc652ab 100644 --- a/gcc/fwprop.cc +++ b/gcc/fwprop.cc @@ -1029,8 +1029,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return gate_fwprop (); } - virtual unsigned int execute (function *) { return fwprop (false); } + bool gate (function *) final override { return gate_fwprop (); } + unsigned int execute (function *) final override { return fwprop (false); } }; // class pass_rtl_fwprop @@ -1065,8 +1065,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return gate_fwprop (); } - virtual unsigned int execute (function *) { return fwprop (true); } + bool gate (function *) final override { return gate_fwprop (); } + unsigned int execute (function *) final override { return fwprop (true); } }; // class pass_rtl_fwprop_addr diff --git a/gcc/gcse.cc b/gcc/gcse.cc index b673531..f06278a 100644 --- a/gcc/gcse.cc +++ b/gcc/gcse.cc @@ -4049,8 +4049,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) { return execute_rtl_pre (); } + bool gate (function *) final override; + unsigned int execute (function *) final override + { + return execute_rtl_pre (); + } }; // class pass_rtl_pre @@ -4099,8 +4102,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) { return execute_rtl_hoist (); } + bool gate (function *) final override; + unsigned int execute (function *) final override + { + return execute_rtl_hoist (); + } }; // class pass_rtl_hoist diff --git a/gcc/gimple-harden-conditionals.cc b/gcc/gimple-harden-conditionals.cc index 79c0a57..4ca6776 100644 --- a/gcc/gimple-harden-conditionals.cc +++ b/gcc/gimple-harden-conditionals.cc @@ -71,11 +71,15 @@ public: pass_harden_compares (gcc::context *ctxt) : gimple_opt_pass (pass_data_harden_compares, ctxt) {} - opt_pass *clone () { return new pass_harden_compares (m_ctxt); } - virtual bool gate (function *) { + opt_pass *clone () final override + { + return new pass_harden_compares (m_ctxt); + } + bool gate (function *) final override + { return flag_harden_compares; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; /* Define a pass to harden conditionals in branches. This pass must @@ -102,11 +106,15 @@ public: pass_harden_conditional_branches (gcc::context *ctxt) : gimple_opt_pass (pass_data_harden_conditional_branches, ctxt) {} - opt_pass *clone () { return new pass_harden_conditional_branches (m_ctxt); } - virtual bool gate (function *) { + opt_pass *clone () final override + { + return new pass_harden_conditional_branches (m_ctxt); + } + bool gate (function *) final override + { return flag_harden_conditional_branches; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; } diff --git a/gcc/gimple-if-to-switch.cc b/gcc/gimple-if-to-switch.cc index ca276d7..70daae2 100644 --- a/gcc/gimple-if-to-switch.cc +++ b/gcc/gimple-if-to-switch.cc @@ -480,13 +480,13 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (jump_table_cluster::is_enabled () || bit_test_cluster::is_enabled ()); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_if_to_switch diff --git a/gcc/gimple-isel.cc b/gcc/gimple-isel.cc index 44d086d..aa9c129 100644 --- a/gcc/gimple-isel.cc +++ b/gcc/gimple-isel.cc @@ -355,12 +355,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return true; } - virtual unsigned int execute (function *fun) + unsigned int execute (function *fun) final override { return gimple_expand_vec_exprs (fun); } diff --git a/gcc/gimple-laddress.cc b/gcc/gimple-laddress.cc index 13c7858..11754da 100644 --- a/gcc/gimple-laddress.cc +++ b/gcc/gimple-laddress.cc @@ -66,9 +66,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_laddress (m_ctxt); } - virtual bool gate (function *) { return optimize != 0; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_laddress (m_ctxt); } + bool gate (function *) final override { return optimize != 0; } + unsigned int execute (function *) final override; }; // class pass_laddress diff --git a/gcc/gimple-loop-interchange.cc b/gcc/gimple-loop-interchange.cc index d5d690b..71772b6 100644 --- a/gcc/gimple-loop-interchange.cc +++ b/gcc/gimple-loop-interchange.cc @@ -1705,9 +1705,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_linterchange (m_ctxt); } - virtual bool gate (function *) { return flag_loop_interchange; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_linterchange (m_ctxt); } + bool gate (function *) final override { return flag_loop_interchange; } + unsigned int execute (function *) final override; }; // class pass_linterchange diff --git a/gcc/gimple-loop-jam.cc b/gcc/gimple-loop-jam.cc index e33dd90..9b18b52 100644 --- a/gcc/gimple-loop-jam.cc +++ b/gcc/gimple-loop-jam.cc @@ -641,8 +641,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_unroll_jam != 0; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_unroll_jam != 0; } + unsigned int execute (function *) final override; }; diff --git a/gcc/gimple-loop-versioning.cc b/gcc/gimple-loop-versioning.cc index ab02bdd..6bcf6eb 100644 --- a/gcc/gimple-loop-versioning.cc +++ b/gcc/gimple-loop-versioning.cc @@ -1782,8 +1782,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_version_loops_for_strides; } - virtual unsigned int execute (function *); + bool gate (function *) final override + { + return flag_version_loops_for_strides; + } + unsigned int execute (function *) final override; }; unsigned int diff --git a/gcc/gimple-low.cc b/gcc/gimple-low.cc index 2ec19d5..4cd27dd 100644 --- a/gcc/gimple-low.cc +++ b/gcc/gimple-low.cc @@ -192,7 +192,10 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return lower_function_body (); } + unsigned int execute (function *) final override + { + return lower_function_body (); + } }; // class pass_lower_cf diff --git a/gcc/gimple-ssa-backprop.cc b/gcc/gimple-ssa-backprop.cc index 74f9811..55986dd 100644 --- a/gcc/gimple-ssa-backprop.cc +++ b/gcc/gimple-ssa-backprop.cc @@ -945,9 +945,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_backprop (m_ctxt); } - virtual bool gate (function *) { return flag_ssa_backprop; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_backprop (m_ctxt); } + bool gate (function *) final override { return flag_ssa_backprop; } + unsigned int execute (function *) final override; }; // class pass_backprop diff --git a/gcc/gimple-ssa-evrp.cc b/gcc/gimple-ssa-evrp.cc index 20388ed..793a3ea 100644 --- a/gcc/gimple-ssa-evrp.cc +++ b/gcc/gimple-ssa-evrp.cc @@ -377,12 +377,12 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_early_vrp (m_ctxt); } - virtual bool gate (function *) + opt_pass * clone () final override { return new pass_early_vrp (m_ctxt); } + bool gate (function *) final override { return flag_tree_vrp != 0; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return execute_early_vrp (); } }; // class pass_vrp diff --git a/gcc/gimple-ssa-isolate-paths.cc b/gcc/gimple-ssa-isolate-paths.cc index cc0ed97..87ecd19 100644 --- a/gcc/gimple-ssa-isolate-paths.cc +++ b/gcc/gimple-ssa-isolate-paths.cc @@ -969,8 +969,11 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_isolate_erroneous_paths (m_ctxt); } - virtual bool gate (function *) + opt_pass * clone () final override + { + return new pass_isolate_erroneous_paths (m_ctxt); + } + bool gate (function *) final override { /* If we do not have a suitable builtin function for the trap statement, then do not perform the optimization. */ @@ -979,7 +982,7 @@ public: || warn_null_dereference); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return gimple_ssa_isolate_erroneous_paths (); } diff --git a/gcc/gimple-ssa-nonnull-compare.cc b/gcc/gimple-ssa-nonnull-compare.cc index cc52b91..f9ce8c7 100644 --- a/gcc/gimple-ssa-nonnull-compare.cc +++ b/gcc/gimple-ssa-nonnull-compare.cc @@ -126,9 +126,9 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return warn_nonnull_compare; } + bool gate (function *) final override { return warn_nonnull_compare; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_warn_nonnull_compare diff --git a/gcc/gimple-ssa-split-paths.cc b/gcc/gimple-ssa-split-paths.cc index 6abe1d5..f2e43e5 100644 --- a/gcc/gimple-ssa-split-paths.cc +++ b/gcc/gimple-ssa-split-paths.cc @@ -579,9 +579,12 @@ class pass_split_paths : public gimple_opt_pass : gimple_opt_pass (pass_data_split_paths, ctxt) {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_split_paths (m_ctxt); } - virtual bool gate (function *) { return gate_split_paths (); } - virtual unsigned int execute (function *) { return execute_split_paths (); } + opt_pass * clone () final override { return new pass_split_paths (m_ctxt); } + bool gate (function *) final override { return gate_split_paths (); } + unsigned int execute (function *) final override + { + return execute_split_paths (); + } }; // class pass_split_paths diff --git a/gcc/gimple-ssa-store-merging.cc b/gcc/gimple-ssa-store-merging.cc index b952ce5..0640168 100644 --- a/gcc/gimple-ssa-store-merging.cc +++ b/gcc/gimple-ssa-store-merging.cc @@ -1037,12 +1037,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return flag_expensive_optimizations && optimize && BITS_PER_UNIT == 8; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_optimize_bswap @@ -2433,8 +2433,8 @@ public: /* Pass not supported for PDP-endian, nor for insane hosts or target character sizes where native_{encode,interpret}_expr doesn't work properly. */ - virtual bool - gate (function *) + bool + gate (function *) final override { return flag_store_merging && BYTES_BIG_ENDIAN == WORDS_BIG_ENDIAN @@ -2442,7 +2442,7 @@ public: && BITS_PER_UNIT == 8; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; private: hash_map m_stores; diff --git a/gcc/gimple-ssa-strength-reduction.cc b/gcc/gimple-ssa-strength-reduction.cc index dad73d3..2b559e9 100644 --- a/gcc/gimple-ssa-strength-reduction.cc +++ b/gcc/gimple-ssa-strength-reduction.cc @@ -4002,8 +4002,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_slsr; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_tree_slsr; } + unsigned int execute (function *) final override; }; // class pass_strength_reduction diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc index eb9297a..04aa849 100644 --- a/gcc/gimple-ssa-warn-access.cc +++ b/gcc/gimple-ssa-warn-access.cc @@ -2075,13 +2075,13 @@ class pass_waccess : public gimple_opt_pass ~pass_waccess (); - opt_pass *clone (); + opt_pass *clone () final override; - virtual bool gate (function *); + bool gate (function *) final override; - void set_pass_param (unsigned, bool); + void set_pass_param (unsigned, bool) final override; - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; private: /* Not copyable or assignable. */ diff --git a/gcc/gimple-ssa-warn-alloca.cc b/gcc/gimple-ssa-warn-alloca.cc index 273b88e..83a241a 100644 --- a/gcc/gimple-ssa-warn-alloca.cc +++ b/gcc/gimple-ssa-warn-alloca.cc @@ -58,8 +58,8 @@ public: pass_walloca (gcc::context *ctxt) : gimple_opt_pass(pass_data_walloca, ctxt), xlimit_certain_p (false) {} - opt_pass *clone () { return new pass_walloca (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + opt_pass *clone () final override { return new pass_walloca (m_ctxt); } + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); // Set to true to enable only warnings for alloca calls that @@ -69,8 +69,8 @@ public: // the "may be too large" kind. xlimit_certain_p = param; } - virtual bool gate (function *); - virtual unsigned int execute (function *); + bool gate (function *) final override; + unsigned int execute (function *) final override; private: // Set to TRUE the first time we run this pass on a function. diff --git a/gcc/gimple-ssa-warn-restrict.cc b/gcc/gimple-ssa-warn-restrict.cc index 734cdd7..6b6097a 100644 --- a/gcc/gimple-ssa-warn-restrict.cc +++ b/gcc/gimple-ssa-warn-restrict.cc @@ -64,8 +64,8 @@ class pass_wrestrict : public gimple_opt_pass public: pass_wrestrict (gcc::context *); - virtual bool gate (function *); - virtual unsigned int execute (function *); + bool gate (function *) final override; + unsigned int execute (function *) final override; void check_call (gimple *); diff --git a/gcc/gimple-warn-recursion.cc b/gcc/gimple-warn-recursion.cc index 91a3cdb..9b04899 100644 --- a/gcc/gimple-warn-recursion.cc +++ b/gcc/gimple-warn-recursion.cc @@ -52,9 +52,9 @@ public: pass_warn_recursion (gcc::context *); private: - virtual bool gate (function *) { return warn_infinite_recursion; } + bool gate (function *) final override { return warn_infinite_recursion; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; bool find_function_exit (basic_block); diff --git a/gcc/graphite.cc b/gcc/graphite.cc index ab8683b..a88b13c 100644 --- a/gcc/graphite.cc +++ b/gcc/graphite.cc @@ -574,7 +574,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return gate_graphite_transforms (); } + bool gate (function *) final override { return gate_graphite_transforms (); } }; // class pass_graphite @@ -609,8 +609,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return gate_graphite_transforms (); } - virtual unsigned int execute (function *fun) { return graphite_transforms (fun); } + bool gate (function *) final override { return gate_graphite_transforms (); } + unsigned int execute (function *fun) final override + { + return graphite_transforms (fun); + } }; // class pass_graphite_transforms diff --git a/gcc/ifcvt.cc b/gcc/ifcvt.cc index e007b17..25aff38 100644 --- a/gcc/ifcvt.cc +++ b/gcc/ifcvt.cc @@ -5934,12 +5934,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (optimize > 0) && dbg_cnt (if_conversion); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_if_conversion (); } @@ -5981,13 +5981,13 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return optimize > 0 && flag_if_conversion && dbg_cnt (if_after_combine); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { if_convert (true); return 0; @@ -6027,13 +6027,13 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return optimize > 0 && flag_if_conversion2 && dbg_cnt (if_after_reload); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { if_convert (true); return 0; diff --git a/gcc/init-regs.cc b/gcc/init-regs.cc index 220ef70..652befe 100644 --- a/gcc/init-regs.cc +++ b/gcc/init-regs.cc @@ -153,8 +153,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return optimize > 0; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return optimize > 0; } + unsigned int execute (function *) final override { initialize_uninitialized_regs (); return 0; diff --git a/gcc/ipa-comdats.cc b/gcc/ipa-comdats.cc index 566faf3..da79206 100644 --- a/gcc/ipa-comdats.cc +++ b/gcc/ipa-comdats.cc @@ -420,8 +420,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) { return ipa_comdats (); } + bool gate (function *) final override; + unsigned int execute (function *) final override { return ipa_comdats (); } }; // class pass_ipa_comdats diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc index f26bfcc..18d2559 100644 --- a/gcc/ipa-cp.cc +++ b/gcc/ipa-cp.cc @@ -6657,14 +6657,14 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* FIXME: We should remove the optimize check after we ensure we never run IPA passes when not optimizing. */ return (flag_ipa_cp && optimize) || in_lto_p; } - virtual unsigned int execute (function *) { return ipcp_driver (); } + unsigned int execute (function *) final override { return ipcp_driver (); } }; // class pass_ipa_cp diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc index 9f1442d..412ca14 100644 --- a/gcc/ipa-devirt.cc +++ b/gcc/ipa-devirt.cc @@ -3969,7 +3969,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* In LTO, always run the IPA passes and decide on function basis if the pass is enabled. */ @@ -3982,7 +3982,7 @@ public: && optimize); } - virtual unsigned int execute (function *) { return ipa_devirt (); } + unsigned int execute (function *) final override { return ipa_devirt (); } }; // class pass_ipa_devirt @@ -4361,12 +4361,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (in_lto_p || flag_lto); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return 0; } diff --git a/gcc/ipa-fnsummary.cc b/gcc/ipa-fnsummary.cc index c956445..e2a8668 100644 --- a/gcc/ipa-fnsummary.cc +++ b/gcc/ipa-fnsummary.cc @@ -4846,8 +4846,11 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_local_fn_summary (m_ctxt); } - virtual unsigned int execute (function *) + opt_pass * clone () final override + { + return new pass_local_fn_summary (m_ctxt); + } + unsigned int execute (function *) final override { return compute_fn_summary_for_current (); } @@ -4889,14 +4892,17 @@ public: {} /* opt_pass methods: */ - opt_pass *clone () { return new pass_ipa_free_fn_summary (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + opt_pass *clone () final override + { + return new pass_ipa_free_fn_summary (m_ctxt); + } + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); small_p = param; } - virtual bool gate (function *) { return true; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return true; } + unsigned int execute (function *) final override { ipa_free_fn_summary (); /* Free ipa-prop structures if they are no longer needed. */ @@ -4950,7 +4956,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return 0; } + unsigned int execute (function *) final override { return 0; } }; // class pass_ipa_fn_summary diff --git a/gcc/ipa-free-lang-data.cc b/gcc/ipa-free-lang-data.cc index f99f7be..ccdbf84 100644 --- a/gcc/ipa-free-lang-data.cc +++ b/gcc/ipa-free-lang-data.cc @@ -1173,7 +1173,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return free_lang_data (); } + unsigned int execute (function *) final override { return free_lang_data (); } }; // class pass_ipa_free_lang_data diff --git a/gcc/ipa-icf.cc b/gcc/ipa-icf.cc index 6528a7a..65baa84 100644 --- a/gcc/ipa-icf.cc +++ b/gcc/ipa-icf.cc @@ -3638,12 +3638,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return in_lto_p || flag_ipa_icf_variables || flag_ipa_icf_functions; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return ipa_icf_driver(); } diff --git a/gcc/ipa-inline.cc b/gcc/ipa-inline.cc index 22a009b..1496919 100644 --- a/gcc/ipa-inline.cc +++ b/gcc/ipa-inline.cc @@ -3100,7 +3100,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_early_inline @@ -3150,7 +3150,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return ipa_inline (); } + unsigned int execute (function *) final override { return ipa_inline (); } }; // class pass_ipa_inline diff --git a/gcc/ipa-modref.cc b/gcc/ipa-modref.cc index c053f8b..0d9abac 100644 --- a/gcc/ipa-modref.cc +++ b/gcc/ipa-modref.cc @@ -3508,15 +3508,15 @@ class pass_modref : public gimple_opt_pass : gimple_opt_pass (pass_data_modref, ctxt) {} /* opt_pass methods: */ - opt_pass *clone () + opt_pass *clone () final override { return new pass_modref (m_ctxt); } - virtual bool gate (function *) + bool gate (function *) final override { return flag_ipa_modref; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; /* Encode TT to the output block OB using the summary streaming API. */ @@ -4170,12 +4170,12 @@ public: {} /* opt_pass methods: */ - opt_pass *clone () { return new pass_ipa_modref (m_ctxt); } - virtual bool gate (function *) + opt_pass *clone () final override { return new pass_ipa_modref (m_ctxt); } + bool gate (function *) final override { return true; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; diff --git a/gcc/ipa-profile.cc b/gcc/ipa-profile.cc index 8763b38..e0acc5d 100644 --- a/gcc/ipa-profile.cc +++ b/gcc/ipa-profile.cc @@ -1053,8 +1053,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_ipa_profile || in_lto_p; } - virtual unsigned int execute (function *) { return ipa_profile (); } + bool gate (function *) final override { return flag_ipa_profile || in_lto_p; } + unsigned int execute (function *) final override { return ipa_profile (); } }; // class pass_ipa_profile diff --git a/gcc/ipa-pure-const.cc b/gcc/ipa-pure-const.cc index 6f8006a..572a6da 100644 --- a/gcc/ipa-pure-const.cc +++ b/gcc/ipa-pure-const.cc @@ -168,8 +168,8 @@ public: pass_ipa_pure_const(gcc::context *ctxt); /* opt_pass methods: */ - bool gate (function *) { return gate_pure_const (); } - unsigned int execute (function *fun); + bool gate (function *) final override { return gate_pure_const (); } + unsigned int execute (function *fun) final override; void register_hooks (void); @@ -2154,9 +2154,12 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_local_pure_const (m_ctxt); } - virtual bool gate (function *) { return gate_pure_const (); } - virtual unsigned int execute (function *); + opt_pass * clone () final override + { + return new pass_local_pure_const (m_ctxt); + } + bool gate (function *) final override { return gate_pure_const (); } + unsigned int execute (function *) final override; }; // class pass_local_pure_const @@ -2270,8 +2273,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return warn_suggest_attribute_noreturn; } - virtual unsigned int execute (function *fun) + bool gate (function *) final override + { + return warn_suggest_attribute_noreturn; + } + unsigned int execute (function *fun) final override { if (!TREE_THIS_VOLATILE (current_function_decl) && EDGE_COUNT (EXIT_BLOCK_PTR_FOR_FN (fun)->preds) == 0) @@ -2316,9 +2322,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_nothrow (m_ctxt); } - virtual bool gate (function *) { return optimize; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_nothrow (m_ctxt); } + bool gate (function *) final override { return optimize; } + unsigned int execute (function *) final override; }; // class pass_nothrow diff --git a/gcc/ipa-reference.cc b/gcc/ipa-reference.cc index 40b0209e..bd6ee0d 100644 --- a/gcc/ipa-reference.cc +++ b/gcc/ipa-reference.cc @@ -1299,14 +1299,14 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return ((in_lto_p || flag_ipa_reference) /* Don't bother doing anything if the program has errors. */ && !seen_error ()); } - virtual unsigned int execute (function *) { return propagate (); } + unsigned int execute (function *) final override { return propagate (); } }; // class pass_ipa_reference diff --git a/gcc/ipa-split.cc b/gcc/ipa-split.cc index 60021ba..1673461 100644 --- a/gcc/ipa-split.cc +++ b/gcc/ipa-split.cc @@ -1915,8 +1915,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) + bool gate (function *) final override; + unsigned int execute (function *) final override { return execute_split_functions (); } @@ -1974,8 +1974,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) + bool gate (function *) final override; + unsigned int execute (function *) final override { return execute_feedback_split_functions (); } diff --git a/gcc/ipa-sra.cc b/gcc/ipa-sra.cc index 96b020f..2237ac6 100644 --- a/gcc/ipa-sra.cc +++ b/gcc/ipa-sra.cc @@ -4049,14 +4049,17 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* TODO: We should remove the optimize check after we ensure we never run IPA passes when not optimizing. */ return (flag_ipa_sra && optimize); } - virtual unsigned int execute (function *) { return ipa_sra_analysis (); } + unsigned int execute (function *) final override + { + return ipa_sra_analysis (); + } }; // class pass_ipa_sra diff --git a/gcc/ipa-visibility.cc b/gcc/ipa-visibility.cc index e95a0dd..8a27e7b 100644 --- a/gcc/ipa-visibility.cc +++ b/gcc/ipa-visibility.cc @@ -959,12 +959,12 @@ public: /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* Do not re-run on ltrans stage. */ return !flag_ltrans; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return whole_program_function_and_variable_visibility (); } @@ -988,7 +988,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return function_and_variable_visibility (flag_whole_program && !flag_lto); } diff --git a/gcc/ipa.cc b/gcc/ipa.cc index 4d5729f..d17aa86 100644 --- a/gcc/ipa.cc +++ b/gcc/ipa.cc @@ -1342,8 +1342,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) { return ipa_cdtor_merge (); } + bool gate (function *) final override; + unsigned int execute (function *) final override + { + return ipa_cdtor_merge (); + } }; // class pass_ipa_cdtor_merge @@ -1565,7 +1568,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return ipa_single_use (); } + unsigned int execute (function *) final override { return ipa_single_use (); } }; // class pass_ipa_single_use diff --git a/gcc/ira.cc b/gcc/ira.cc index e3b3c54..42c9cea 100644 --- a/gcc/ira.cc +++ b/gcc/ira.cc @@ -6074,11 +6074,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return !targetm.no_register_allocation; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { ira (dump_file); return 0; @@ -6117,11 +6117,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return !targetm.no_register_allocation; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { do_reload (); return 0; diff --git a/gcc/jump.cc b/gcc/jump.cc index 332f868..e620716 100644 --- a/gcc/jump.cc +++ b/gcc/jump.cc @@ -182,7 +182,10 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return cleanup_barriers (); } + unsigned int execute (function *) final override + { + return cleanup_barriers (); + } }; // class pass_cleanup_barriers diff --git a/gcc/loop-init.cc b/gcc/loop-init.cc index 1e4f6cf..648aa29 100644 --- a/gcc/loop-init.cc +++ b/gcc/loop-init.cc @@ -357,7 +357,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); + bool gate (function *) final override; }; // class pass_loop2 @@ -429,7 +429,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return rtl_loop_init (); } + unsigned int execute (function *) final override { return rtl_loop_init (); } }; // class pass_rtl_loop_init @@ -467,7 +467,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_rtl_loop_done @@ -523,8 +523,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_move_loop_invariants; } - virtual unsigned int execute (function *fun) + bool gate (function *) final override { return flag_move_loop_invariants; } + unsigned int execute (function *fun) final override { if (number_of_loops (fun) > 1) move_loop_invariants (); @@ -565,12 +565,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (flag_unroll_loops || flag_unroll_all_loops || cfun->has_unroll); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_rtl_unroll_loops @@ -625,8 +625,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *); + bool gate (function *) final override; + unsigned int execute (function *) final override; }; // class pass_rtl_doloop diff --git a/gcc/lower-subreg.cc b/gcc/lower-subreg.cc index d30bbee..03e9326 100644 --- a/gcc/lower-subreg.cc +++ b/gcc/lower-subreg.cc @@ -1769,8 +1769,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_split_wide_types != 0; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return flag_split_wide_types != 0; } + unsigned int execute (function *) final override { decompose_multiword_subregs (false); return 0; @@ -1811,9 +1811,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_split_wide_types - && flag_split_wide_types_early; } - virtual unsigned int execute (function *) + bool gate (function *) final override + { + return flag_split_wide_types && flag_split_wide_types_early; + } + unsigned int execute (function *) final override { decompose_multiword_subregs (true); return 0; @@ -1854,8 +1856,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_split_wide_types; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return flag_split_wide_types; } + unsigned int execute (function *) final override { decompose_multiword_subregs (true); return 0; diff --git a/gcc/mode-switching.cc b/gcc/mode-switching.cc index 6e3f1dc..b0f6e7c 100644 --- a/gcc/mode-switching.cc +++ b/gcc/mode-switching.cc @@ -893,8 +893,8 @@ public: /* opt_pass methods: */ /* The epiphany backend creates a second instance of this pass, so we need a clone method. */ - opt_pass * clone () { return new pass_mode_switching (m_ctxt); } - virtual bool gate (function *) + opt_pass * clone () final override { return new pass_mode_switching (m_ctxt); } + bool gate (function *) final override { #ifdef OPTIMIZE_MODE_SWITCHING return true; @@ -903,7 +903,7 @@ public: #endif } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { #ifdef OPTIMIZE_MODE_SWITCHING optimize_mode_switching (); diff --git a/gcc/modulo-sched.cc b/gcc/modulo-sched.cc index 2c95c09..162de19 100644 --- a/gcc/modulo-sched.cc +++ b/gcc/modulo-sched.cc @@ -3338,12 +3338,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (optimize > 0 && flag_modulo_sched); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_sms diff --git a/gcc/multiple_target.cc b/gcc/multiple_target.cc index 7fe02fb..3e2d268 100644 --- a/gcc/multiple_target.cc +++ b/gcc/multiple_target.cc @@ -526,8 +526,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) { return ipa_target_clone (); } + bool gate (function *) final override; + unsigned int execute (function *) final override + { + return ipa_target_clone (); + } }; bool diff --git a/gcc/omp-expand.cc b/gcc/omp-expand.cc index 2572957..1023c56 100644 --- a/gcc/omp-expand.cc +++ b/gcc/omp-expand.cc @@ -10625,7 +10625,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { bool gate = ((flag_openacc != 0 || flag_openmp != 0 || flag_openmp_simd != 0) @@ -10672,12 +10672,18 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { return !(fun->curr_properties & PROP_gimple_eomp); } - virtual unsigned int execute (function *) { return execute_expand_omp (); } - opt_pass * clone () { return new pass_expand_omp_ssa (m_ctxt); } + unsigned int execute (function *) final override + { + return execute_expand_omp (); + } + opt_pass * clone () final override + { + return new pass_expand_omp_ssa (m_ctxt); + } }; // class pass_expand_omp_ssa diff --git a/gcc/omp-low.cc b/gcc/omp-low.cc index f976e3a..b9d5529 100644 --- a/gcc/omp-low.cc +++ b/gcc/omp-low.cc @@ -14697,7 +14697,10 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return execute_lower_omp (); } + unsigned int execute (function *) final override + { + return execute_lower_omp (); + } }; // class pass_lower_omp @@ -15005,11 +15008,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return flag_openacc || flag_openmp || flag_openmp_simd; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return diagnose_omp_structured_block_errors (); } diff --git a/gcc/omp-oacc-kernels-decompose.cc b/gcc/omp-oacc-kernels-decompose.cc index ec9b0fa..524060e 100644 --- a/gcc/omp-oacc-kernels-decompose.cc +++ b/gcc/omp-oacc-kernels-decompose.cc @@ -1615,12 +1615,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (flag_openacc && param_openacc_kernels == OPENACC_KERNELS_DECOMPOSE); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return omp_oacc_kernels_decompose (); } diff --git a/gcc/omp-oacc-neuter-broadcast.cc b/gcc/omp-oacc-neuter-broadcast.cc index 81e3223..b617779 100644 --- a/gcc/omp-oacc-neuter-broadcast.cc +++ b/gcc/omp-oacc-neuter-broadcast.cc @@ -1945,7 +1945,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { if (!flag_openacc) return false; @@ -1961,7 +1961,7 @@ public: return true; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return execute_omp_oacc_neuter_broadcast (); } diff --git a/gcc/omp-offload.cc b/gcc/omp-offload.cc index fcbe6cf..3a89119 100644 --- a/gcc/omp-offload.cc +++ b/gcc/omp-offload.cc @@ -2450,9 +2450,9 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_openacc; }; + bool gate (function *) final override { return flag_openacc; }; - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return execute_oacc_loop_designation (); } @@ -2480,9 +2480,9 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_openacc; }; + bool gate (function *) final override { return flag_openacc; }; - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return execute_oacc_device_lower (); } @@ -2714,13 +2714,13 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { return (!(fun->curr_properties & PROP_gimple_lomp_dev) || (flag_openmp && cgraph_node::get (fun->decl)->calls_declare_variant_alt)); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return execute_omp_device_lower (); } @@ -2760,7 +2760,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { #ifdef ACCEL_COMPILER return offloading_function_p (fun->decl); @@ -2770,7 +2770,7 @@ public: #endif } - virtual unsigned execute (function *); + unsigned execute (function *) final override; }; /* Callback for walk_gimple_stmt used to scan for link var operands. */ diff --git a/gcc/omp-simd-clone.cc b/gcc/omp-simd-clone.cc index 04fe03c..32649bc 100644 --- a/gcc/omp-simd-clone.cc +++ b/gcc/omp-simd-clone.cc @@ -1819,8 +1819,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) { return ipa_omp_simd_clone (); } + bool gate (function *) final override; + unsigned int execute (function *) final override + { + return ipa_omp_simd_clone (); + } }; bool diff --git a/gcc/passes.cc b/gcc/passes.cc index 36e5b4a..78a07f8 100644 --- a/gcc/passes.cc +++ b/gcc/passes.cc @@ -417,13 +417,13 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* Don't bother doing anything if the program has errors. */ return (!seen_error () && !in_lto_p); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return execute_build_ssa_passes (); } @@ -451,7 +451,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* Don't bother doing anything if the program has errors. */ return (!seen_error () && !in_lto_p); @@ -480,7 +480,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* Don't bother doing anything if the program has errors. */ return (!seen_error () && !in_lto_p); @@ -531,7 +531,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (optimize >= 1 /* Don't bother doing anything if the program has errors. */ @@ -571,7 +571,10 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return optimize >= 1 && !optimize_debug; } + bool gate (function *) final override + { + return optimize >= 1 && !optimize_debug; + } }; // class pass_all_optimizations @@ -606,7 +609,10 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return optimize >= 1 && optimize_debug; } + bool gate (function *) final override + { + return optimize >= 1 && optimize_debug; + } }; // class pass_all_optimizations_g @@ -641,7 +647,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* Early return if there were errors. We can run afoul of our consistency checks, and there's not really much point in fixing them. */ @@ -681,7 +687,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return reload_completed; } + bool gate (function *) final override { return reload_completed; } }; // class pass_postreload @@ -716,7 +722,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return reload_completed || targetm.no_register_allocation; } @@ -756,15 +762,15 @@ public: { } - virtual bool - gate (function *fun) + bool + gate (function *fun) final override { return flag_tree_slp_vectorize && (fun->pending_TODOs & PENDING_TODO_force_next_scalar_cleanup); } - virtual unsigned int - execute (function *fun) + unsigned int + execute (function *fun) final override { fun->pending_TODOs &= ~PENDING_TODO_force_next_scalar_cleanup; return 0; diff --git a/gcc/postreload-gcse.cc b/gcc/postreload-gcse.cc index fc63f0b..1c795b4 100644 --- a/gcc/postreload-gcse.cc +++ b/gcc/postreload-gcse.cc @@ -1447,13 +1447,16 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { return (optimize > 0 && flag_gcse_after_reload && optimize_function_for_speed_p (fun)); } - virtual unsigned int execute (function *) { return rest_of_handle_gcse2 (); } + unsigned int execute (function *) final override + { + return rest_of_handle_gcse2 (); + } }; // class pass_gcse2 diff --git a/gcc/postreload.cc b/gcc/postreload.cc index 4a67d0d..d1c99fe 100644 --- a/gcc/postreload.cc +++ b/gcc/postreload.cc @@ -2339,9 +2339,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return (optimize > 0 && reload_completed); } + bool gate (function *) final override + { + return (optimize > 0 && reload_completed); + } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_postreload_cse diff --git a/gcc/predict.cc b/gcc/predict.cc index 62da149..b36caa3 100644 --- a/gcc/predict.cc +++ b/gcc/predict.cc @@ -4078,8 +4078,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_guess_branch_prob; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_guess_branch_prob; } + unsigned int execute (function *) final override; }; // class pass_profile @@ -4232,14 +4232,17 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_strip_predict_hints (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + opt_pass * clone () final override + { + return new pass_strip_predict_hints (m_ctxt); + } + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); early_p = param; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; private: bool early_p; diff --git a/gcc/recog.cc b/gcc/recog.cc index cd2410a..dac172b 100644 --- a/gcc/recog.cc +++ b/gcc/recog.cc @@ -4358,9 +4358,12 @@ public: /* opt_pass methods: */ /* The epiphany backend creates a second instance of this pass, so we need a clone method. */ - opt_pass * clone () { return new pass_peephole2 (m_ctxt); } - virtual bool gate (function *) { return (optimize > 0 && flag_peephole2); } - virtual unsigned int execute (function *) + opt_pass * clone () final override { return new pass_peephole2 (m_ctxt); } + bool gate (function *) final override + { + return (optimize > 0 && flag_peephole2); + } + unsigned int execute (function *) final override { return rest_of_handle_peephole2 (); } @@ -4400,8 +4403,11 @@ public: /* opt_pass methods: */ /* The epiphany backend creates a second instance of this pass, so we need a clone method. */ - opt_pass * clone () { return new pass_split_all_insns (m_ctxt); } - virtual unsigned int execute (function *) + opt_pass * clone () final override + { + return new pass_split_all_insns (m_ctxt); + } + unsigned int execute (function *) final override { split_all_insns (); return 0; @@ -4440,13 +4446,13 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* If optimizing, then go ahead and split insns now. */ return optimize > 0; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { split_all_insns (); return 0; @@ -4495,12 +4501,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return enable_split_before_sched2 (); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { split_all_insns (); return 0; @@ -4539,8 +4545,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) + bool gate (function *) final override; + unsigned int execute (function *) final override { split_all_insns (); return 0; @@ -4598,7 +4604,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* The placement of the splitting that we do for shorten_branches depends on whether regstack is used by the target or not. */ @@ -4609,7 +4615,7 @@ public: #endif } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return split_all_insns_noflow (); } diff --git a/gcc/ree.cc b/gcc/ree.cc index de4f18e..da64ef6 100644 --- a/gcc/ree.cc +++ b/gcc/ree.cc @@ -1403,8 +1403,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return (optimize > 0 && flag_ree); } - virtual unsigned int execute (function *) { return rest_of_handle_ree (); } + bool gate (function *) final override { return (optimize > 0 && flag_ree); } + unsigned int execute (function *) final override + { + return rest_of_handle_ree (); + } }; // class pass_ree diff --git a/gcc/reg-stack.cc b/gcc/reg-stack.cc index 5afeadf..fd03250 100644 --- a/gcc/reg-stack.cc +++ b/gcc/reg-stack.cc @@ -3413,7 +3413,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { #ifdef STACK_REGS return true; @@ -3468,7 +3468,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_stack_regs (); } diff --git a/gcc/regcprop.cc b/gcc/regcprop.cc index eacc59f..ce9d32a 100644 --- a/gcc/regcprop.cc +++ b/gcc/regcprop.cc @@ -1293,12 +1293,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (optimize > 0 && (flag_cprop_registers)); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_cprop_hardreg diff --git a/gcc/reginfo.cc b/gcc/reginfo.cc index 2ab7bbb..705779d 100644 --- a/gcc/reginfo.cc +++ b/gcc/reginfo.cc @@ -953,7 +953,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return reginfo_init (); } + unsigned int execute (function *) final override { return reginfo_init (); } }; // class pass_reginfo_init diff --git a/gcc/regrename.cc b/gcc/regrename.cc index f651351..b15eb80 100644 --- a/gcc/regrename.cc +++ b/gcc/regrename.cc @@ -2012,12 +2012,15 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (optimize > 0 && (flag_rename_registers)); } - virtual unsigned int execute (function *) { return regrename_optimize (); } + unsigned int execute (function *) final override + { + return regrename_optimize (); + } }; // class pass_regrename diff --git a/gcc/reorg.cc b/gcc/reorg.cc index 7624f51..07b2045 100644 --- a/gcc/reorg.cc +++ b/gcc/reorg.cc @@ -3866,8 +3866,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) + bool gate (function *) final override; + unsigned int execute (function *) final override { return rest_of_handle_delay_slots (); } @@ -3917,12 +3917,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return targetm.machine_dependent_reorg != 0; } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { targetm.machine_dependent_reorg (); return 0; diff --git a/gcc/sancov.cc b/gcc/sancov.cc index 9c10252..052fa4e 100644 --- a/gcc/sancov.cc +++ b/gcc/sancov.cc @@ -308,17 +308,17 @@ public: static const pass_data data; opt_pass * - clone () + clone () final override { return new pass_sancov (m_ctxt); } - virtual bool - gate (function *fun) + bool + gate (function *fun) final override { return sanitize_coverage_p (fun->decl) && (!O0 || !optimize); } - virtual unsigned int - execute (function *fun) + unsigned int + execute (function *fun) final override { return sancov_pass (fun); } diff --git a/gcc/sanopt.cc b/gcc/sanopt.cc index 2b05553..e9d188d 100644 --- a/gcc/sanopt.cc +++ b/gcc/sanopt.cc @@ -942,7 +942,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* SANITIZE_RETURN is handled in the front-end. When trapping, SANITIZE_UNREACHABLE is handled by builtin_decl_unreachable. */ @@ -951,7 +951,7 @@ public: mask |= SANITIZE_UNREACHABLE; return flag_sanitize & ~mask; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_sanopt diff --git a/gcc/sched-rgn.cc b/gcc/sched-rgn.cc index a0dfdb7..0dc2a8f 100644 --- a/gcc/sched-rgn.cc +++ b/gcc/sched-rgn.cc @@ -3779,7 +3779,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { #ifdef INSN_SCHEDULING return flag_live_range_shrinkage; @@ -3788,7 +3788,7 @@ public: #endif } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return rest_of_handle_live_range_shrinkage (); } @@ -3826,8 +3826,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) { return rest_of_handle_sched (); } + bool gate (function *) final override; + unsigned int execute (function *) final override + { + return rest_of_handle_sched (); + } }; // class pass_sched @@ -3872,8 +3875,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) + bool gate (function *) final override; + unsigned int execute (function *) final override { return rest_of_handle_sched2 (); } @@ -3922,8 +3925,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) + bool gate (function *) final override; + unsigned int execute (function *) final override { return rest_of_handle_sched_fusion (); } diff --git a/gcc/stack-ptr-mod.cc b/gcc/stack-ptr-mod.cc index b14bef9..4ccbb1c 100644 --- a/gcc/stack-ptr-mod.cc +++ b/gcc/stack-ptr-mod.cc @@ -71,7 +71,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_stack_ptr_mod diff --git a/gcc/store-motion.cc b/gcc/store-motion.cc index 0f70870..b61c068 100644 --- a/gcc/store-motion.cc +++ b/gcc/store-motion.cc @@ -1243,8 +1243,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) + bool gate (function *) final override; + unsigned int execute (function *) final override { return execute_rtl_store_motion (); } diff --git a/gcc/tracer.cc b/gcc/tracer.cc index 4d054fe..6451784 100644 --- a/gcc/tracer.cc +++ b/gcc/tracer.cc @@ -424,12 +424,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (optimize > 0 && flag_tracer && flag_reorder_blocks); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_tracer diff --git a/gcc/trans-mem.cc b/gcc/trans-mem.cc index ae2921f..131dce0 100644 --- a/gcc/trans-mem.cc +++ b/gcc/trans-mem.cc @@ -864,8 +864,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tm; } - virtual unsigned int execute (function *) { return diagnose_tm_blocks (); } + bool gate (function *) final override { return flag_tm; } + unsigned int execute (function *) final override + { + return diagnose_tm_blocks (); + } }; // class pass_diagnose_tm_blocks @@ -1850,8 +1853,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tm; } - virtual unsigned int execute (function *) { return execute_lower_tm (); } + bool gate (function *) final override { return flag_tm; } + unsigned int execute (function *) final override + { + return execute_lower_tm (); + } }; // class pass_lower_tm @@ -2144,7 +2150,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return gate_tm_init (); } + bool gate (function *) final override { return gate_tm_init (); } }; // class pass_tm_init @@ -3162,7 +3168,10 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return execute_tm_mark (); } + unsigned int execute (function *) final override + { + return execute_tm_mark (); + } }; // class pass_tm_mark @@ -3324,7 +3333,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_tm_edges @@ -4085,8 +4094,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tm && optimize > 0; } - virtual unsigned int execute (function *) { return execute_tm_memopt (); } + bool gate (function *) final override { return flag_tm && optimize > 0; } + unsigned int execute (function *) final override + { + return execute_tm_memopt (); + } }; // class pass_tm_memopt @@ -5667,8 +5679,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tm; } - virtual unsigned int execute (function *) { return ipa_tm_execute (); } + bool gate (function *) final override { return flag_tm; } + unsigned int execute (function *) final override { return ipa_tm_execute (); } }; // class pass_ipa_tm diff --git a/gcc/tree-call-cdce.cc b/gcc/tree-call-cdce.cc index 83991fe..feb61f3 100644 --- a/gcc/tree-call-cdce.cc +++ b/gcc/tree-call-cdce.cc @@ -1171,7 +1171,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* The limit constants used in the implementation assume IEEE floating point format. Other formats @@ -1179,7 +1179,7 @@ public: return flag_tree_builtin_call_dce != 0; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_call_cdce diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index 734fddd..bfcb142 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -407,7 +407,10 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return execute_build_cfg (); } + unsigned int execute (function *) final override + { + return execute_build_cfg (); + } }; // class pass_build_cfg @@ -9209,9 +9212,15 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return split_critical_edges (); } + unsigned int execute (function *) final override + { + return split_critical_edges (); + } - opt_pass * clone () { return new pass_split_crit_edges (m_ctxt); } + opt_pass * clone () final override + { + return new pass_split_crit_edges (m_ctxt); + } }; // class pass_split_crit_edges } // anon namespace @@ -9468,7 +9477,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_warn_function_return @@ -9674,8 +9683,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_warn_unused_result; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return flag_warn_unused_result; } + unsigned int execute (function *) final override { do_warn_unused_result (gimple_body (current_function_decl)); return 0; @@ -9884,8 +9893,11 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_fixup_cfg (m_ctxt); } - virtual unsigned int execute (function *) { return execute_fixup_cfg (); } + opt_pass * clone () final override { return new pass_fixup_cfg (m_ctxt); } + unsigned int execute (function *) final override + { + return execute_fixup_cfg (); + } }; // class pass_fixup_cfg diff --git a/gcc/tree-cfgcleanup.cc b/gcc/tree-cfgcleanup.cc index 893619e..a6d0bf2 100644 --- a/gcc/tree-cfgcleanup.cc +++ b/gcc/tree-cfgcleanup.cc @@ -1406,8 +1406,8 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_merge_phi (m_ctxt); } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_merge_phi (m_ctxt); } + unsigned int execute (function *) final override; }; // class pass_merge_phi @@ -1584,7 +1584,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return execute_cleanup_cfg_post_optimizing (); } diff --git a/gcc/tree-complex.cc b/gcc/tree-complex.cc index f722057..61950a0 100644 --- a/gcc/tree-complex.cc +++ b/gcc/tree-complex.cc @@ -1915,8 +1915,11 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_lower_complex (m_ctxt); } - virtual unsigned int execute (function *) { return tree_lower_complex (); } + opt_pass * clone () final override { return new pass_lower_complex (m_ctxt); } + unsigned int execute (function *) final override + { + return tree_lower_complex (); + } }; // class pass_lower_complex @@ -1952,14 +1955,17 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { /* With errors, normal optimization passes are not run. If we don't lower complex operations at all, rtl expansion will abort. */ return !(fun->curr_properties & PROP_gimple_lcx); } - virtual unsigned int execute (function *) { return tree_lower_complex (); } + unsigned int execute (function *) final override + { + return tree_lower_complex (); + } }; // class pass_lower_complex_O0 diff --git a/gcc/tree-eh.cc b/gcc/tree-eh.cc index c37a584..076ecd3 100644 --- a/gcc/tree-eh.cc +++ b/gcc/tree-eh.cc @@ -2176,7 +2176,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_lower_eh @@ -3295,8 +3295,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_exceptions != 0; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return flag_exceptions != 0; } + unsigned int execute (function *) final override { refactor_eh_r (gimple_body (current_function_decl)); return 0; @@ -3497,8 +3497,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_exceptions != 0; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_exceptions != 0; } + unsigned int execute (function *) final override; }; // class pass_lower_resx @@ -3922,8 +3922,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) { return fun->eh->region_tree != NULL; } - virtual unsigned int execute (function *); + bool gate (function *fun) final override + { + return fun->eh->region_tree != NULL; + } + unsigned int execute (function *) final override; }; // class pass_lower_eh_dispatch @@ -4859,13 +4862,13 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_cleanup_eh (m_ctxt); } - virtual bool gate (function *fun) + opt_pass * clone () final override { return new pass_cleanup_eh (m_ctxt); } + bool gate (function *fun) final override { return fun->eh != NULL && fun->eh->region_tree != NULL; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_cleanup_eh diff --git a/gcc/tree-emutls.cc b/gcc/tree-emutls.cc index 5f68703..b5aa307 100644 --- a/gcc/tree-emutls.cc +++ b/gcc/tree-emutls.cc @@ -838,13 +838,16 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* If the target supports TLS natively, we need do nothing here. */ return !targetm.have_tls; } - virtual unsigned int execute (function *) { return ipa_lower_emutls (); } + unsigned int execute (function *) final override + { + return ipa_lower_emutls (); + } }; // class pass_ipa_lower_emutls diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc index 2245b6b..3c659f6 100644 --- a/gcc/tree-if-conv.cc +++ b/gcc/tree-if-conv.cc @@ -3424,8 +3424,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *); + bool gate (function *) final override; + unsigned int execute (function *) final override; }; // class pass_if_conversion diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc index 22c2e5b..46df57a 100644 --- a/gcc/tree-into-ssa.cc +++ b/gcc/tree-into-ssa.cc @@ -2403,13 +2403,13 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { /* Do nothing for funcions that was produced already in SSA form. */ return !(fun->curr_properties & PROP_ssa); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_build_ssa diff --git a/gcc/tree-loop-distribution.cc b/gcc/tree-loop-distribution.cc index 086b59c..18b97fc 100644 --- a/gcc/tree-loop-distribution.cc +++ b/gcc/tree-loop-distribution.cc @@ -3897,13 +3897,13 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return flag_tree_loop_distribution || flag_tree_loop_distribute_patterns; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_loop_distribution diff --git a/gcc/tree-nrv.cc b/gcc/tree-nrv.cc index b96d5b8..1faa481 100644 --- a/gcc/tree-nrv.cc +++ b/gcc/tree-nrv.cc @@ -125,9 +125,9 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return optimize > 0; } + bool gate (function *) final override { return optimize > 0; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_nrv @@ -344,7 +344,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_return_slot diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc index 12bc086..4eb454a 100644 --- a/gcc/tree-object-size.cc +++ b/gcc/tree-object-size.cc @@ -2124,8 +2124,8 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_object_sizes (m_ctxt); } - virtual unsigned int execute (function *fun) + opt_pass * clone () final override { return new pass_object_sizes (m_ctxt); } + unsigned int execute (function *fun) final override { return object_sizes_execute (fun, false); } @@ -2164,7 +2164,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *fun) + unsigned int execute (function *fun) final override { return object_sizes_execute (fun, true); } diff --git a/gcc/tree-parloops.cc b/gcc/tree-parloops.cc index da10696..2c3ef43 100644 --- a/gcc/tree-parloops.cc +++ b/gcc/tree-parloops.cc @@ -4173,16 +4173,19 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { if (oacc_kernels_p) return flag_openacc; else return flag_tree_parallelize_loops > 1; } - virtual unsigned int execute (function *); - opt_pass * clone () { return new pass_parallelize_loops (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + unsigned int execute (function *) final override; + opt_pass * clone () final override + { + return new pass_parallelize_loops (m_ctxt); + } + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); oacc_kernels_p = param; diff --git a/gcc/tree-predcom.cc b/gcc/tree-predcom.cc index fb45725..5d923fb 100644 --- a/gcc/tree-predcom.cc +++ b/gcc/tree-predcom.cc @@ -3514,8 +3514,8 @@ public: {} /* opt_pass methods: */ - virtual bool - gate (function *) + bool + gate (function *) final override { if (flag_predictive_commoning != 0) return true; @@ -3529,8 +3529,8 @@ public: return false; } - virtual unsigned int - execute (function *fun) + unsigned int + execute (function *fun) final override { bool allow_unroll_p = flag_predictive_commoning != 0; return run_tree_predictive_commoning (fun, allow_unroll_p); diff --git a/gcc/tree-profile.cc b/gcc/tree-profile.cc index 97aab88..2beb492 100644 --- a/gcc/tree-profile.cc +++ b/gcc/tree-profile.cc @@ -884,8 +884,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *); - virtual unsigned int execute (function *) { return tree_profiling (); } + bool gate (function *) final override; + unsigned int execute (function *) final override { return tree_profiling (); } }; // class pass_ipa_tree_profile diff --git a/gcc/tree-sra.cc b/gcc/tree-sra.cc index 081c51b..461c8e0 100644 --- a/gcc/tree-sra.cc +++ b/gcc/tree-sra.cc @@ -4743,8 +4743,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return gate_intra_sra (); } - virtual unsigned int execute (function *) { return early_intra_sra (); } + bool gate (function *) final override { return gate_intra_sra (); } + unsigned int execute (function *) final override + { + return early_intra_sra (); + } }; // class pass_sra_early @@ -4779,8 +4782,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return gate_intra_sra (); } - virtual unsigned int execute (function *) { return late_intra_sra (); } + bool gate (function *) final override { return gate_intra_sra (); } + unsigned int execute (function *) final override { return late_intra_sra (); } }; // class pass_sra diff --git a/gcc/tree-ssa-ccp.cc b/gcc/tree-ssa-ccp.cc index 58e0fac..85c0460 100644 --- a/gcc/tree-ssa-ccp.cc +++ b/gcc/tree-ssa-ccp.cc @@ -2994,14 +2994,17 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_ccp (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + opt_pass * clone () final override { return new pass_ccp (m_ctxt); } + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); nonzero_p = param; } - virtual bool gate (function *) { return flag_tree_ccp != 0; } - virtual unsigned int execute (function *) { return do_ssa_ccp (nonzero_p); } + bool gate (function *) final override { return flag_tree_ccp != 0; } + unsigned int execute (function *) final override + { + return do_ssa_ccp (nonzero_p); + } private: /* Determines whether the pass instance records nonzero bits. */ @@ -4202,8 +4205,8 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_fold_builtins (m_ctxt); } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_fold_builtins (m_ctxt); } + unsigned int execute (function *) final override; }; // class pass_fold_builtins @@ -4553,9 +4556,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_post_ipa_warn (m_ctxt); } - virtual bool gate (function *) { return warn_nonnull != 0; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_post_ipa_warn (m_ctxt); } + bool gate (function *) final override { return warn_nonnull != 0; } + unsigned int execute (function *) final override; }; // class pass_fold_builtins diff --git a/gcc/tree-ssa-copy.cc b/gcc/tree-ssa-copy.cc index 050a6d1..782ceb5 100644 --- a/gcc/tree-ssa-copy.cc +++ b/gcc/tree-ssa-copy.cc @@ -642,9 +642,12 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_copy_prop (m_ctxt); } - virtual bool gate (function *) { return flag_tree_copy_prop != 0; } - virtual unsigned int execute (function *) { return execute_copy_prop (); } + opt_pass * clone () final override { return new pass_copy_prop (m_ctxt); } + bool gate (function *) final override { return flag_tree_copy_prop != 0; } + unsigned int execute (function *) final override + { + return execute_copy_prop (); + } }; // class pass_copy_prop diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc index a6b2840..5df6492 100644 --- a/gcc/tree-ssa-dce.cc +++ b/gcc/tree-ssa-dce.cc @@ -1974,9 +1974,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_dce (m_ctxt); } - virtual bool gate (function *) { return flag_tree_dce != 0; } - virtual unsigned int execute (function *) { return tree_ssa_dce (); } + opt_pass * clone () final override { return new pass_dce (m_ctxt); } + bool gate (function *) final override { return flag_tree_dce != 0; } + unsigned int execute (function *) final override { return tree_ssa_dce (); } }; // class pass_dce @@ -2011,14 +2011,14 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_cd_dce (m_ctxt); } - void set_pass_param (unsigned n, bool param) + opt_pass * clone () final override { return new pass_cd_dce (m_ctxt); } + void set_pass_param (unsigned n, bool param) final override { gcc_assert (n == 0); update_address_taken_p = param; } - virtual bool gate (function *) { return flag_tree_dce != 0; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return flag_tree_dce != 0; } + unsigned int execute (function *) final override { return (tree_ssa_cd_dce () | (update_address_taken_p ? TODO_update_address_taken : 0)); diff --git a/gcc/tree-ssa-dom.cc b/gcc/tree-ssa-dom.cc index 208b0a0..e282123 100644 --- a/gcc/tree-ssa-dom.cc +++ b/gcc/tree-ssa-dom.cc @@ -728,14 +728,14 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_dominator (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + opt_pass * clone () final override { return new pass_dominator (m_ctxt); } + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); may_peel_loop_headers_p = param; } - virtual bool gate (function *) { return flag_tree_dom != 0; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_tree_dom != 0; } + unsigned int execute (function *) final override; private: /* This flag is used to prevent loops from being peeled repeatedly in jump diff --git a/gcc/tree-ssa-dse.cc b/gcc/tree-ssa-dse.cc index ea50de7..62efafe 100644 --- a/gcc/tree-ssa-dse.cc +++ b/gcc/tree-ssa-dse.cc @@ -1491,9 +1491,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_dse (m_ctxt); } - virtual bool gate (function *) { return flag_tree_dse != 0; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_dse (m_ctxt); } + bool gate (function *) final override { return flag_tree_dse != 0; } + unsigned int execute (function *) final override; }; // class pass_dse diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc index c387e84..69567ab 100644 --- a/gcc/tree-ssa-forwprop.cc +++ b/gcc/tree-ssa-forwprop.cc @@ -3266,9 +3266,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_forwprop (m_ctxt); } - virtual bool gate (function *) { return flag_tree_forwprop; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_forwprop (m_ctxt); } + bool gate (function *) final override { return flag_tree_forwprop; } + unsigned int execute (function *) final override; }; // class pass_forwprop diff --git a/gcc/tree-ssa-ifcombine.cc b/gcc/tree-ssa-ifcombine.cc index 88a9f06..80c41c4 100644 --- a/gcc/tree-ssa-ifcombine.cc +++ b/gcc/tree-ssa-ifcombine.cc @@ -829,7 +829,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_tree_ifcombine diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc index 26d96c0..843a436 100644 --- a/gcc/tree-ssa-loop-ch.cc +++ b/gcc/tree-ssa-loop-ch.cc @@ -311,12 +311,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_ch != 0; } + bool gate (function *) final override { return flag_tree_ch != 0; } /* Initialize and finalize loop structures, copying headers inbetween. */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; - opt_pass * clone () { return new pass_ch (m_ctxt); } + opt_pass * clone () final override { return new pass_ch (m_ctxt); } protected: /* ch_base method: */ @@ -347,14 +347,14 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { return flag_tree_ch != 0 && (flag_tree_loop_vectorize != 0 || fun->has_force_vectorize_loops); } /* Just copy headers, no initialization/finalization of loop structures. */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; protected: /* ch_base method: */ diff --git a/gcc/tree-ssa-loop-im.cc b/gcc/tree-ssa-loop-im.cc index bfd6126..2ea8150 100644 --- a/gcc/tree-ssa-loop-im.cc +++ b/gcc/tree-ssa-loop-im.cc @@ -3600,9 +3600,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_lim (m_ctxt); } - virtual bool gate (function *) { return flag_tree_loop_im != 0; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_lim (m_ctxt); } + bool gate (function *) final override { return flag_tree_loop_im != 0; } + unsigned int execute (function *) final override; }; // class pass_lim diff --git a/gcc/tree-ssa-loop-ivcanon.cc b/gcc/tree-ssa-loop-ivcanon.cc index 6a38b77..766bffa 100644 --- a/gcc/tree-ssa-loop-ivcanon.cc +++ b/gcc/tree-ssa-loop-ivcanon.cc @@ -1538,8 +1538,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_loop_ivcanon != 0; } - virtual unsigned int execute (function *fun); + bool gate (function *) final override { return flag_tree_loop_ivcanon != 0; } + unsigned int execute (function *fun) final override; }; // class pass_iv_canon @@ -1585,7 +1585,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_complete_unroll @@ -1643,8 +1643,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return optimize >= 2; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return optimize >= 2; } + unsigned int execute (function *) final override; }; // class pass_complete_unrolli diff --git a/gcc/tree-ssa-loop-prefetch.cc b/gcc/tree-ssa-loop-prefetch.cc index aebd7c9..8f190ae 100644 --- a/gcc/tree-ssa-loop-prefetch.cc +++ b/gcc/tree-ssa-loop-prefetch.cc @@ -2069,8 +2069,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_prefetch_loop_arrays > 0; } - virtual unsigned int execute (function *); + bool gate (function *) final override + { + return flag_prefetch_loop_arrays > 0; + } + unsigned int execute (function *) final override; }; // class pass_loop_prefetch diff --git a/gcc/tree-ssa-loop-split.cc b/gcc/tree-ssa-loop-split.cc index b93ee4c..d61bad5 100644 --- a/gcc/tree-ssa-loop-split.cc +++ b/gcc/tree-ssa-loop-split.cc @@ -1724,8 +1724,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_split_loops != 0; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_split_loops != 0; } + unsigned int execute (function *) final override; }; // class pass_loop_split diff --git a/gcc/tree-ssa-loop-unswitch.cc b/gcc/tree-ssa-loop-unswitch.cc index 50b66c1..afae982 100644 --- a/gcc/tree-ssa-loop-unswitch.cc +++ b/gcc/tree-ssa-loop-unswitch.cc @@ -1614,8 +1614,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_unswitch_loops != 0; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_unswitch_loops != 0; } + unsigned int execute (function *) final override; }; // class pass_tree_unswitch diff --git a/gcc/tree-ssa-loop.cc b/gcc/tree-ssa-loop.cc index 73aa466..1c058b0 100644 --- a/gcc/tree-ssa-loop.cc +++ b/gcc/tree-ssa-loop.cc @@ -67,9 +67,9 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_loop_optimize; } + bool gate (function *) final override { return flag_tree_loop_optimize; } - virtual unsigned int execute (function *fn); + unsigned int execute (function *fn) final override; }; // class pass_fix_loops unsigned int @@ -134,7 +134,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fn) { return gate_loop (fn); } + bool gate (function *fn) final override { return gate_loop (fn); } }; // class pass_tree_loop @@ -189,7 +189,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fn) { return gate_oacc_kernels (fn); } + bool gate (function *fn) final override { return gate_oacc_kernels (fn); } }; // class pass_oacc_kernels @@ -226,7 +226,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (optimize && flag_openacc @@ -303,7 +303,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fn) { return !gate_loop (fn); } + bool gate (function *fn) final override { return !gate_loop (fn); } }; // class pass_tree_no_loop @@ -341,7 +341,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_tree_loop_init @@ -395,8 +395,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_scev_cprop; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_tree_scev_cprop; } + unsigned int execute (function *) final override; }; // class pass_scev_cprop @@ -446,8 +446,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_ivopts != 0; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_ivopts != 0; } + unsigned int execute (function *) final override; }; // class pass_iv_optimize @@ -503,7 +503,10 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *) { return tree_ssa_loop_done (); } + unsigned int execute (function *) final override + { + return tree_ssa_loop_done (); + } }; // class pass_tree_loop_done diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc index ce1df01..fe9f37b 100644 --- a/gcc/tree-ssa-math-opts.cc +++ b/gcc/tree-ssa-math-opts.cc @@ -920,8 +920,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return optimize && flag_reciprocal_math; } - virtual unsigned int execute (function *); + bool gate (function *) final override + { + return optimize && flag_reciprocal_math; + } + unsigned int execute (function *) final override; }; // class pass_cse_reciprocals @@ -2249,14 +2252,14 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* We no longer require either sincos or cexp, since powi expansion piggybacks on this pass. */ return optimize; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_cse_sincos @@ -4892,12 +4895,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return flag_expensive_optimizations && optimize; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_optimize_widening_mul diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index e61d973..7efcc07 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -3960,14 +3960,14 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_phiopt (m_ctxt); } - void set_pass_param (unsigned n, bool param) + opt_pass * clone () final override { return new pass_phiopt (m_ctxt); } + void set_pass_param (unsigned n, bool param) final override { gcc_assert (n == 0); early_p = param; } - virtual bool gate (function *) { return flag_ssa_phiopt; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return flag_ssa_phiopt; } + unsigned int execute (function *) final override { return tree_ssa_phiopt_worker (false, !early_p ? gate_hoist_loads () : false, @@ -4009,8 +4009,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_cselim; } - virtual unsigned int execute (function *) { return tree_ssa_cs_elim (); } + bool gate (function *) final override { return flag_tree_cselim; } + unsigned int execute (function *) final override + { + return tree_ssa_cs_elim (); + } }; // class pass_cselim diff --git a/gcc/tree-ssa-phiprop.cc b/gcc/tree-ssa-phiprop.cc index 7bbfc8c..965f1d1 100644 --- a/gcc/tree-ssa-phiprop.cc +++ b/gcc/tree-ssa-phiprop.cc @@ -476,8 +476,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_phiprop; } - virtual unsigned int execute (function *); + bool gate (function *) final override { return flag_tree_phiprop; } + unsigned int execute (function *) final override; }; // class pass_phiprop diff --git a/gcc/tree-ssa-pre.cc b/gcc/tree-ssa-pre.cc index 09a5e20..e029bd3 100644 --- a/gcc/tree-ssa-pre.cc +++ b/gcc/tree-ssa-pre.cc @@ -4339,9 +4339,9 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return flag_tree_pre != 0 || flag_code_hoisting != 0; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_pre diff --git a/gcc/tree-ssa-reassoc.cc b/gcc/tree-ssa-reassoc.cc index 406523b..e13e2cb 100644 --- a/gcc/tree-ssa-reassoc.cc +++ b/gcc/tree-ssa-reassoc.cc @@ -7132,15 +7132,15 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_reassoc (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + opt_pass * clone () final override { return new pass_reassoc (m_ctxt); } + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); insert_powi_p = param; bias_loop_carried_phi_ranks_p = !param; } - virtual bool gate (function *) { return flag_tree_reassoc != 0; } - virtual unsigned int execute (function *) + bool gate (function *) final override { return flag_tree_reassoc != 0; } + unsigned int execute (function *) final override { return execute_reassoc (insert_powi_p, bias_loop_carried_phi_ranks_p); } diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index 776dccb..ee5b95c 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -8295,17 +8295,17 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_fre (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + opt_pass * clone () final override { return new pass_fre (m_ctxt); } + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); may_iterate = param; } - virtual bool gate (function *) + bool gate (function *) final override { return flag_tree_fre != 0 && (may_iterate || optimize > 1); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; private: bool may_iterate; diff --git a/gcc/tree-ssa-sink.cc b/gcc/tree-ssa-sink.cc index bb50cbc..2e744d6 100644 --- a/gcc/tree-ssa-sink.cc +++ b/gcc/tree-ssa-sink.cc @@ -828,10 +828,10 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_sink != 0; } - virtual unsigned int execute (function *); - opt_pass *clone (void) { return new pass_sink_code (m_ctxt); } - void set_pass_param (unsigned n, bool param) + bool gate (function *) final override { return flag_tree_sink != 0; } + unsigned int execute (function *) final override; + opt_pass *clone (void) final override { return new pass_sink_code (m_ctxt); } + void set_pass_param (unsigned n, bool param) final override { gcc_assert (n == 0); unsplit_edges = param; diff --git a/gcc/tree-ssa-strlen.cc b/gcc/tree-ssa-strlen.cc index 1d4c0f7..2cceba6 100644 --- a/gcc/tree-ssa-strlen.cc +++ b/gcc/tree-ssa-strlen.cc @@ -5962,8 +5962,8 @@ public: : gimple_opt_pass (pass_data_warn_printf, ctxt) {} - virtual bool gate (function *); - virtual unsigned int execute (function *fun) + bool gate (function *) final override; + unsigned int execute (function *fun) final override { return printf_strlen_execute (fun, true); } @@ -5999,10 +5999,10 @@ public: : gimple_opt_pass (pass_data_strlen, ctxt) {} - opt_pass * clone () { return new pass_strlen (m_ctxt); } + opt_pass * clone () final override { return new pass_strlen (m_ctxt); } - virtual bool gate (function *); - virtual unsigned int execute (function *fun) + bool gate (function *) final override; + unsigned int execute (function *fun) final override { return printf_strlen_execute (fun, false); } diff --git a/gcc/tree-ssa-structalias.cc b/gcc/tree-ssa-structalias.cc index 581bdcf..dcf13d9 100644 --- a/gcc/tree-ssa-structalias.cc +++ b/gcc/tree-ssa-structalias.cc @@ -8085,7 +8085,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_pta; } + bool gate (function *) final override { return flag_tree_pta; } }; // class pass_build_alias @@ -8123,7 +8123,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_pta; } + bool gate (function *) final override { return flag_tree_pta; } }; // class pass_build_ealias @@ -8737,7 +8737,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (optimize && flag_ipa_pta @@ -8745,9 +8745,12 @@ public: && !seen_error ()); } - opt_pass * clone () { return new pass_ipa_pta (m_ctxt); } + opt_pass * clone () final override { return new pass_ipa_pta (m_ctxt); } - virtual unsigned int execute (function *) { return ipa_pta_execute (); } + unsigned int execute (function *) final override + { + return ipa_pta_execute (); + } }; // class pass_ipa_pta diff --git a/gcc/tree-ssa-uncprop.cc b/gcc/tree-ssa-uncprop.cc index aea7d69..510f831 100644 --- a/gcc/tree-ssa-uncprop.cc +++ b/gcc/tree-ssa-uncprop.cc @@ -453,9 +453,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_uncprop (m_ctxt); } - virtual bool gate (function *) { return flag_tree_dom != 0; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_uncprop (m_ctxt); } + bool gate (function *) final override { return flag_tree_dom != 0; } + unsigned int execute (function *) final override; }; // class pass_uncprop diff --git a/gcc/tree-ssa-uninit.cc b/gcc/tree-ssa-uninit.cc index f326f17..06a1982 100644 --- a/gcc/tree-ssa-uninit.cc +++ b/gcc/tree-ssa-uninit.cc @@ -1320,9 +1320,12 @@ public: {} /* opt_pass methods: */ - opt_pass *clone () { return new pass_late_warn_uninitialized (m_ctxt); } - virtual bool gate (function *) { return gate_warn_uninitialized (); } - virtual unsigned int execute (function *); + opt_pass *clone () final override + { + return new pass_late_warn_uninitialized (m_ctxt); + } + bool gate (function *) final override { return gate_warn_uninitialized (); } + unsigned int execute (function *) final override; }; // class pass_late_warn_uninitialized @@ -1462,8 +1465,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return gate_warn_uninitialized (); } - virtual unsigned int execute (function *fun) + bool gate (function *) final override { return gate_warn_uninitialized (); } + unsigned int execute (function *fun) final override { return execute_early_warn_uninitialized (fun); } diff --git a/gcc/tree-ssanames.cc b/gcc/tree-ssanames.cc index 05536cd..bc22ece 100644 --- a/gcc/tree-ssanames.cc +++ b/gcc/tree-ssanames.cc @@ -920,7 +920,7 @@ public: {} /* opt_pass methods: */ - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_release_ssa_names diff --git a/gcc/tree-stdarg.cc b/gcc/tree-stdarg.cc index 9038cd4..ed4c8d8 100644 --- a/gcc/tree-stdarg.cc +++ b/gcc/tree-stdarg.cc @@ -1126,7 +1126,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { /* Always run this pass, in order to expand va_arg internal_fns. We also need to do that if fun->stdarg == 0, because a va_arg may also @@ -1135,7 +1135,7 @@ public: return true; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_stdarg @@ -1185,12 +1185,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (cfun->curr_properties & PROP_gimple_lva) == 0; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_lower_vaarg diff --git a/gcc/tree-switch-conversion.cc b/gcc/tree-switch-conversion.cc index 990f5e1..5291fb8 100644 --- a/gcc/tree-switch-conversion.cc +++ b/gcc/tree-switch-conversion.cc @@ -2427,8 +2427,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return flag_tree_switch_conversion != 0; } - virtual unsigned int execute (function *); + bool gate (function *) final override + { + return flag_tree_switch_conversion != 0; + } + unsigned int execute (function *) final override; }; // class pass_convert_switch @@ -2506,18 +2509,18 @@ public: static const pass_data data; opt_pass * - clone () + clone () final override { return new pass_lower_switch (m_ctxt); } - virtual bool - gate (function *) + bool + gate (function *) final override { return !O0 || !optimize; } - virtual unsigned int execute (function *fun); + unsigned int execute (function *fun) final override; }; // class pass_lower_switch template diff --git a/gcc/tree-tailcall.cc b/gcc/tree-tailcall.cc index 5a3466e..6745d57 100644 --- a/gcc/tree-tailcall.cc +++ b/gcc/tree-tailcall.cc @@ -1261,9 +1261,12 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_tail_recursion (m_ctxt); } - virtual bool gate (function *) { return gate_tail_calls (); } - virtual unsigned int execute (function *) + opt_pass * clone () final override + { + return new pass_tail_recursion (m_ctxt); + } + bool gate (function *) final override { return gate_tail_calls (); } + unsigned int execute (function *) final override { return tree_optimize_tail_calls_1 (false); } @@ -1301,8 +1304,11 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return gate_tail_calls (); } - virtual unsigned int execute (function *) { return execute_tail_calls (); } + bool gate (function *) final override { return gate_tail_calls (); } + unsigned int execute (function *) final override + { + return execute_tail_calls (); + } }; // class pass_tail_calls diff --git a/gcc/tree-vect-generic.cc b/gcc/tree-vect-generic.cc index 92aba5d..3501295 100644 --- a/gcc/tree-vect-generic.cc +++ b/gcc/tree-vect-generic.cc @@ -2418,12 +2418,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { return !(fun->curr_properties & PROP_gimple_lvec); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return expand_vector_operations (); } @@ -2462,8 +2462,11 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_lower_vector_ssa (m_ctxt); } - virtual unsigned int execute (function *) + opt_pass * clone () final override + { + return new pass_lower_vector_ssa (m_ctxt); + } + unsigned int execute (function *) final override { return expand_vector_operations (); } diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc index a63fa39..53dc452 100644 --- a/gcc/tree-vectorizer.cc +++ b/gcc/tree-vectorizer.cc @@ -1193,12 +1193,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *fun) + bool gate (function *fun) final override { return flag_tree_loop_vectorize || fun->has_force_vectorize_loops; } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_vectorize @@ -1405,9 +1405,12 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_simduid_cleanup (m_ctxt); } - virtual bool gate (function *fun) { return fun->has_simduid_loops; } - virtual unsigned int execute (function *); + opt_pass * clone () final override + { + return new pass_simduid_cleanup (m_ctxt); + } + bool gate (function *fun) final override { return fun->has_simduid_loops; } + unsigned int execute (function *) final override; }; // class pass_simduid_cleanup @@ -1463,9 +1466,9 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_slp_vectorize (m_ctxt); } - virtual bool gate (function *) { return flag_tree_slp_vectorize != 0; } - virtual unsigned int execute (function *); + opt_pass * clone () final override { return new pass_slp_vectorize (m_ctxt); } + bool gate (function *) final override { return flag_tree_slp_vectorize != 0; } + unsigned int execute (function *) final override; }; // class pass_slp_vectorize @@ -1696,12 +1699,15 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return flag_section_anchors && flag_tree_loop_vectorize; } - virtual unsigned int execute (function *) { return increase_alignment (); } + unsigned int execute (function *) final override + { + return increase_alignment (); + } }; // class pass_ipa_increase_alignment diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc index 30022da..ef7978d 100644 --- a/gcc/tree-vrp.cc +++ b/gcc/tree-vrp.cc @@ -4398,14 +4398,14 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_vrp (m_ctxt); } - void set_pass_param (unsigned int n, bool param) + opt_pass * clone () final override { return new pass_vrp (m_ctxt); } + void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); warn_array_bounds_p = param; } - virtual bool gate (function *) { return flag_tree_vrp != 0; } - virtual unsigned int execute (function *fun) + bool gate (function *) final override { return flag_tree_vrp != 0; } + unsigned int execute (function *fun) final override { if ((my_pass == 1 && param_vrp1_mode == VRP_MODE_RANGER) || (my_pass == 2 && param_vrp2_mode == VRP_MODE_RANGER)) diff --git a/gcc/tsan.cc b/gcc/tsan.cc index 02e8ac7..79d4582 100644 --- a/gcc/tsan.cc +++ b/gcc/tsan.cc @@ -909,13 +909,13 @@ public: {} /* opt_pass methods: */ - opt_pass * clone () { return new pass_tsan (m_ctxt); } - virtual bool gate (function *) + opt_pass * clone () final override { return new pass_tsan (m_ctxt); } + bool gate (function *) final override { return sanitize_flags_p (SANITIZE_THREAD); } - virtual unsigned int execute (function *) { return tsan_pass (); } + unsigned int execute (function *) final override { return tsan_pass (); } }; // class pass_tsan @@ -950,12 +950,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (sanitize_flags_p (SANITIZE_THREAD) && !optimize); } - virtual unsigned int execute (function *) { return tsan_pass (); } + unsigned int execute (function *) final override { return tsan_pass (); } }; // class pass_tsan_O0 diff --git a/gcc/ubsan.cc b/gcc/ubsan.cc index b6c4301..e51d1e4 100644 --- a/gcc/ubsan.cc +++ b/gcc/ubsan.cc @@ -2348,7 +2348,7 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return sanitize_flags_p ((SANITIZE_NULL | SANITIZE_SI_OVERFLOW | SANITIZE_BOOL | SANITIZE_ENUM @@ -2360,7 +2360,7 @@ public: | SANITIZE_BUILTIN)); } - virtual unsigned int execute (function *); + unsigned int execute (function *) final override; }; // class pass_ubsan diff --git a/gcc/var-tracking.cc b/gcc/var-tracking.cc index 7c3ad0a..235981d 100644 --- a/gcc/var-tracking.cc +++ b/gcc/var-tracking.cc @@ -10592,12 +10592,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + bool gate (function *) final override { return (flag_var_tracking && !targetm.delay_vartrack); } - virtual unsigned int execute (function *) + unsigned int execute (function *) final override { return variable_tracking_main (); } diff --git a/gcc/vtable-verify.cc b/gcc/vtable-verify.cc index 48f9987..24894e7 100644 --- a/gcc/vtable-verify.cc +++ b/gcc/vtable-verify.cc @@ -818,8 +818,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return (flag_vtable_verify); } - virtual unsigned int execute (function *); + bool gate (function *) final override { return (flag_vtable_verify); } + unsigned int execute (function *) final override; }; // class pass_vtable_verify diff --git a/gcc/web.cc b/gcc/web.cc index a5874a9..bd0ec94 100644 --- a/gcc/web.cc +++ b/gcc/web.cc @@ -323,8 +323,8 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) { return (optimize > 0 && flag_web); } - virtual unsigned int execute (function *); + bool gate (function *) final override { return (optimize > 0 && flag_web); } + unsigned int execute (function *) final override; }; // class pass_web -- cgit v1.1 From 894ddeacdaeacbd29e5ebcfd51f423050ae8d56b Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 27 Jun 2022 17:00:33 -0400 Subject: Add 'final' and 'override' on dom_walker vfunc impls gcc/ChangeLog: * compare-elim.cc: Add "final" and "override" to dom_walker vfunc implementations, removing redundant "virtual" as appropriate. * gimple-ssa-strength-reduction.cc: Likewise. * ipa-prop.cc: Likewise. * rtl-ssa/blocks.cc: Likewise. * tree-into-ssa.cc: Likewise. * tree-ssa-dom.cc: Likewise. * tree-ssa-math-opts.cc: Likewise. * tree-ssa-phiopt.cc: Likewise. * tree-ssa-propagate.cc: Likewise. * tree-ssa-sccvn.cc: Likewise. * tree-ssa-strlen.cc: Likewise. * tree-ssa-uncprop.cc: Likewise. Signed-off-by: David Malcolm --- gcc/compare-elim.cc | 2 +- gcc/gimple-ssa-strength-reduction.cc | 2 +- gcc/ipa-prop.cc | 4 ++-- gcc/rtl-ssa/blocks.cc | 4 ++-- gcc/tree-into-ssa.cc | 10 +++++----- gcc/tree-ssa-dom.cc | 4 ++-- gcc/tree-ssa-math-opts.cc | 2 +- gcc/tree-ssa-phiopt.cc | 4 ++-- gcc/tree-ssa-propagate.cc | 4 ++-- gcc/tree-ssa-sccvn.cc | 4 ++-- gcc/tree-ssa-strlen.cc | 4 ++-- gcc/tree-ssa-uncprop.cc | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) (limited to 'gcc') diff --git a/gcc/compare-elim.cc b/gcc/compare-elim.cc index e869d9d..4a23202 100644 --- a/gcc/compare-elim.cc +++ b/gcc/compare-elim.cc @@ -283,7 +283,7 @@ public: find_comparison_dom_walker (cdi_direction direction) : dom_walker (direction) {} - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; }; /* Return true if conforming COMPARE with EH_NOTE is redundant with comparison diff --git a/gcc/gimple-ssa-strength-reduction.cc b/gcc/gimple-ssa-strength-reduction.cc index 2b559e9..fb2bb9f 100644 --- a/gcc/gimple-ssa-strength-reduction.cc +++ b/gcc/gimple-ssa-strength-reduction.cc @@ -1729,7 +1729,7 @@ class find_candidates_dom_walker : public dom_walker public: find_candidates_dom_walker (cdi_direction direction) : dom_walker (direction) {} - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; }; /* Find strength-reduction candidates in block BB. */ diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc index e1fc481..7791563 100644 --- a/gcc/ipa-prop.cc +++ b/gcc/ipa-prop.cc @@ -3008,7 +3008,7 @@ public: analysis_dom_walker (struct ipa_func_body_info *fbi) : dom_walker (CDI_DOMINATORS), m_fbi (fbi) {} - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; private: struct ipa_func_body_info *m_fbi; @@ -5655,7 +5655,7 @@ public: : dom_walker (CDI_DOMINATORS), m_fbi (fbi), m_descriptors (descs), m_aggval (av), m_something_changed (sc) {} - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; bool cleanup_eh () { return gimple_purge_all_dead_eh_edges (m_need_eh_cleanup); } diff --git a/gcc/rtl-ssa/blocks.cc b/gcc/rtl-ssa/blocks.cc index 959fad8..6b03dd0 100644 --- a/gcc/rtl-ssa/blocks.cc +++ b/gcc/rtl-ssa/blocks.cc @@ -85,8 +85,8 @@ class function_info::bb_walker : public dom_walker { public: bb_walker (function_info *, build_info &); - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; private: // Information about the function we're building. diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc index 46df57a..9631d8c 100644 --- a/gcc/tree-into-ssa.cc +++ b/gcc/tree-into-ssa.cc @@ -1462,8 +1462,8 @@ public: rewrite_dom_walker (cdi_direction direction) : dom_walker (direction, ALL_BLOCKS, NULL) {} - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; }; /* SSA Rewriting Step 1. Initialization, create a block local stack @@ -2148,8 +2148,8 @@ public: rewrite_update_dom_walker (cdi_direction direction) : dom_walker (direction, ALL_BLOCKS, NULL) {} - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; }; /* Initialization of block data structures for the incremental SSA @@ -2300,7 +2300,7 @@ public: mark_def_dom_walker (cdi_direction direction); ~mark_def_dom_walker (); - virtual edge before_dom_children (basic_block); + edge before_dom_children (basic_block) final override; private: /* Notice that this bitmap is indexed using variable UIDs, so it must be diff --git a/gcc/tree-ssa-dom.cc b/gcc/tree-ssa-dom.cc index e282123..dcaf467 100644 --- a/gcc/tree-ssa-dom.cc +++ b/gcc/tree-ssa-dom.cc @@ -670,8 +670,8 @@ public: m_threader = threader; } - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; private: diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc index fe9f37b..a4492c9 100644 --- a/gcc/tree-ssa-math-opts.cc +++ b/gcc/tree-ssa-math-opts.cc @@ -4918,7 +4918,7 @@ public: /* The actual actions performed in the walk. */ - virtual void after_dom_children (basic_block); + void after_dom_children (basic_block) final override; /* Set of results of chains of multiply and add statement combinations that were not transformed into FMAs because of active deferring. */ diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index 7efcc07..2f4bebe 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -2978,8 +2978,8 @@ public: : dom_walker (direction), m_nontrapping (ps), m_seen_refs (128) {} - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; private: diff --git a/gcc/tree-ssa-propagate.cc b/gcc/tree-ssa-propagate.cc index 5983f02..163b24f 100644 --- a/gcc/tree-ssa-propagate.cc +++ b/gcc/tree-ssa-propagate.cc @@ -679,8 +679,8 @@ public: BITMAP_FREE (need_eh_cleanup); } - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block bb) + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block bb) final override { substitute_and_fold_engine->post_fold_bb (bb); } diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index ee5b95c..ef833f5 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -2493,8 +2493,8 @@ public: eliminate_dom_walker (cdi_direction, bitmap); ~eliminate_dom_walker (); - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; virtual tree eliminate_avail (basic_block, tree op); virtual void eliminate_push_avail (basic_block, tree op); diff --git a/gcc/tree-ssa-strlen.cc b/gcc/tree-ssa-strlen.cc index 2cceba6..7b3e389 100644 --- a/gcc/tree-ssa-strlen.cc +++ b/gcc/tree-ssa-strlen.cc @@ -243,8 +243,8 @@ public: ~strlen_pass (); - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; bool check_and_optimize_stmt (bool *cleanup_eh); bool check_and_optimize_call (bool *zero_write); diff --git a/gcc/tree-ssa-uncprop.cc b/gcc/tree-ssa-uncprop.cc index 510f831..900bf33 100644 --- a/gcc/tree-ssa-uncprop.cc +++ b/gcc/tree-ssa-uncprop.cc @@ -298,8 +298,8 @@ class uncprop_dom_walker : public dom_walker public: uncprop_dom_walker (cdi_direction direction) : dom_walker (direction) {} - virtual edge before_dom_children (basic_block); - virtual void after_dom_children (basic_block); + edge before_dom_children (basic_block) final override; + void after_dom_children (basic_block) final override; private: -- cgit v1.1 From ddff65d64d5fb20da7dea3adaa406e2244d055e9 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 27 Jun 2022 17:00:33 -0400 Subject: expr.cc: use final/override on op_by_pieces_d vfuncs gcc/ChangeLog: * expr.cc: Add "final" and "override" to op_by_pieces_d vfunc implementations as appropriate. Signed-off-by: David Malcolm --- gcc/expr.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/expr.cc b/gcc/expr.cc index c90cde3..5d66c9f 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -1355,8 +1355,8 @@ op_by_pieces_d::run () class move_by_pieces_d : public op_by_pieces_d { insn_gen_fn m_gen_fun; - void generate (rtx, rtx, machine_mode); - bool prepare_mode (machine_mode, unsigned int); + void generate (rtx, rtx, machine_mode) final override; + bool prepare_mode (machine_mode, unsigned int) final override; public: move_by_pieces_d (rtx to, rtx from, unsigned HOST_WIDE_INT len, @@ -1451,8 +1451,8 @@ move_by_pieces (rtx to, rtx from, unsigned HOST_WIDE_INT len, class store_by_pieces_d : public op_by_pieces_d { insn_gen_fn m_gen_fun; - void generate (rtx, rtx, machine_mode); - bool prepare_mode (machine_mode, unsigned int); + void generate (rtx, rtx, machine_mode) final override; + bool prepare_mode (machine_mode, unsigned int) final override; public: store_by_pieces_d (rtx to, by_pieces_constfn cfn, void *cfn_data, @@ -1648,9 +1648,9 @@ class compare_by_pieces_d : public op_by_pieces_d rtx m_accumulator; int m_count, m_batch; - void generate (rtx, rtx, machine_mode); - bool prepare_mode (machine_mode, unsigned int); - void finish_mode (machine_mode); + void generate (rtx, rtx, machine_mode) final override; + bool prepare_mode (machine_mode, unsigned int) final override; + void finish_mode (machine_mode) final override; public: compare_by_pieces_d (rtx op0, rtx op1, by_pieces_constfn op1_cfn, void *op1_cfn_data, HOST_WIDE_INT len, int align, -- cgit v1.1 From a2f2e0ffa2a270043a1c16ba4553652c7b8d4525 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 27 Jun 2022 17:00:33 -0400 Subject: tree-switch-conversion.h: use final/override for cluster vfunc impls gcc/ChangeLog: * tree-switch-conversion.h: Add "final" and "override" to cluster vfunc implementations as appropriate. Signed-off-by: David Malcolm --- gcc/tree-switch-conversion.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-switch-conversion.h b/gcc/tree-switch-conversion.h index 4063a6c..6861572 100644 --- a/gcc/tree-switch-conversion.h +++ b/gcc/tree-switch-conversion.h @@ -130,19 +130,19 @@ public: {} cluster_type - get_type () + get_type () final override { return SIMPLE_CASE; } tree - get_low () + get_low () final override { return m_low; } tree - get_high () + get_high () final override { return m_high; } @@ -153,13 +153,13 @@ public: } void - debug () + debug () final override { dump (stderr); } void - dump (FILE *f, bool details ATTRIBUTE_UNUSED = false) + dump (FILE *f, bool details ATTRIBUTE_UNUSED = false) final override { PRINT_CASE (f, get_low ()); if (get_low () != get_high ()) @@ -170,12 +170,12 @@ public: fprintf (f, " "); } - void emit (tree, tree, tree, basic_block, location_t) + void emit (tree, tree, tree, basic_block, location_t) final override { gcc_unreachable (); } - bool is_single_value_p () + bool is_single_value_p () final override { return tree_int_cst_equal (get_low (), get_high ()); } @@ -224,24 +224,24 @@ public: ~group_cluster (); tree - get_low () + get_low () final override { return m_cases[0]->get_low (); } tree - get_high () + get_high () final override { return m_cases[m_cases.length () - 1]->get_high (); } void - debug () + debug () final override { dump (stderr); } - void dump (FILE *f, bool details = false); + void dump (FILE *f, bool details = false) final override; /* List of simple clusters handled by the group. */ vec m_cases; @@ -261,13 +261,14 @@ public: {} cluster_type - get_type () + get_type () final override { return JUMP_TABLE; } void emit (tree index_expr, tree index_type, - tree default_label_expr, basic_block default_bb, location_t loc); + tree default_label_expr, basic_block default_bb, location_t loc) + final override; /* Find jump tables of given CLUSTERS, where all members of the vector are of type simple_cluster. New clusters are returned. */ @@ -366,7 +367,7 @@ public: {} cluster_type - get_type () + get_type () final override { return BIT_TEST; } @@ -388,7 +389,8 @@ public: There *MUST* be max_case_bit_tests or less unique case node targets. */ void emit (tree index_expr, tree index_type, - tree default_label_expr, basic_block default_bb, location_t loc); + tree default_label_expr, basic_block default_bb, location_t loc) + final override; /* Find bit tests of given CLUSTERS, where all members of the vector are of type simple_cluster. New clusters are returned. */ -- cgit v1.1 From 0a8333ade9a03fc203055e69c05008d9733e9e9d Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 27 Jun 2022 17:00:34 -0400 Subject: i386: add 'final' and 'override' to scalar_chain vfunc impls gcc/ChangeLog: * config/i386/i386-features.h: Add "final" and "override" to scalar_chain vfunc implementations as appropriate. Signed-off-by: David Malcolm --- gcc/config/i386/i386-features.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/config/i386/i386-features.h b/gcc/config/i386/i386-features.h index 891cb46..839b63c 100644 --- a/gcc/config/i386/i386-features.h +++ b/gcc/config/i386/i386-features.h @@ -169,18 +169,18 @@ class general_scalar_chain : public scalar_chain public: general_scalar_chain (enum machine_mode smode_, enum machine_mode vmode_); ~general_scalar_chain (); - int compute_convert_gain (); + int compute_convert_gain () final override; private: hash_map defs_map; bitmap insns_conv; unsigned n_sse_to_integer; unsigned n_integer_to_sse; - void mark_dual_mode_def (df_ref def); - void convert_insn (rtx_insn *insn); + void mark_dual_mode_def (df_ref def) final override; + void convert_insn (rtx_insn *insn) final override; void convert_op (rtx *op, rtx_insn *insn); void convert_reg (rtx_insn *insn, rtx dst, rtx src); void make_vector_copies (rtx_insn *, rtx); - void convert_registers (); + void convert_registers () final override; rtx convert_compare (rtx op1, rtx op2, rtx_insn *insn); int vector_const_cost (rtx exp); }; @@ -191,14 +191,14 @@ class timode_scalar_chain : public scalar_chain timode_scalar_chain () : scalar_chain (TImode, V1TImode) {} /* Convert from TImode to V1TImode is always faster. */ - int compute_convert_gain () { return 1; } + int compute_convert_gain () final override { return 1; } private: - void mark_dual_mode_def (df_ref def); + void mark_dual_mode_def (df_ref def) final override; void fix_debug_reg_uses (rtx reg); - void convert_insn (rtx_insn *insn); + void convert_insn (rtx_insn *insn) final override; /* We don't convert registers to difference size. */ - void convert_registers () {} + void convert_registers () final override {} }; } // anon namespace -- cgit v1.1 From 26f77c4d19b827f3a2a8a9323df8e182e1389cb9 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 27 Jun 2022 17:00:34 -0400 Subject: Add 'final' and 'override' in various places gcc/cp/ChangeLog: * cxx-pretty-print.h: Add "final" and "override" to various vfunc implementations, removing redundant "virtual" as appropriate. * module.cc: Likewise. gcc/ChangeLog: * genmatch.cc: Add "final" and "override" to various vfunc implementations, removing redundant "virtual" as appropriate. * gensupport.cc: Likewise. * gimple-range-cache.h: Likewise. * ipa-icf-gimple.h: Likewise. * ipa-icf.h: Likewise. * read-md.h: Likewise. * read-rtl-function.cc: Likewise. * tree-ssa-loop-ch.cc: Likewise. * tree-ssa-sccvn.cc: Likewise. gcc/lto/ChangeLog: * lto-dump.cc: Add "final" and "override" to various vfunc implementations, removing redundant "virtual" as appropriate. Signed-off-by: David Malcolm --- gcc/cp/cxx-pretty-print.h | 38 +++++++++++++++++++------------------- gcc/cp/module.cc | 4 ++-- gcc/genmatch.cc | 22 +++++++++++----------- gcc/gensupport.cc | 2 +- gcc/gimple-range-cache.h | 4 ++-- gcc/ipa-icf-gimple.h | 6 ++++-- gcc/ipa-icf.h | 36 ++++++++++++++++++++---------------- gcc/lto/lto-dump.cc | 8 ++++---- gcc/read-md.h | 2 +- gcc/read-rtl-function.cc | 6 +++--- gcc/tree-ssa-loop-ch.cc | 4 ++-- gcc/tree-ssa-sccvn.cc | 4 ++-- 12 files changed, 71 insertions(+), 65 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/cxx-pretty-print.h b/gcc/cp/cxx-pretty-print.h index 5080f70..593bd91 100644 --- a/gcc/cp/cxx-pretty-print.h +++ b/gcc/cp/cxx-pretty-print.h @@ -36,25 +36,25 @@ public: pretty_printer *clone () const override; - void constant (tree); - void id_expression (tree); - void primary_expression (tree); - void postfix_expression (tree); - void unary_expression (tree); - void multiplicative_expression (tree); - void conditional_expression (tree); - void assignment_expression (tree); - void expression (tree); - void type_id (tree); - void statement (tree); - void declaration (tree); - void declaration_specifiers (tree); - void simple_type_specifier (tree); - void function_specifier (tree); - void declarator (tree); - void direct_declarator (tree); - void abstract_declarator (tree); - void direct_abstract_declarator (tree); + void constant (tree) final override; + void id_expression (tree) final override; + void primary_expression (tree) final override; + void postfix_expression (tree) final override; + void unary_expression (tree) final override; + void multiplicative_expression (tree) final override; + void conditional_expression (tree) final override; + void assignment_expression (tree) final override; + void expression (tree) final override; + void type_id (tree) final override; + void statement (tree) final override; + void declaration (tree) final override; + void declaration_specifiers (tree) final override; + void simple_type_specifier (tree) final override; + void function_specifier (tree) final override; + void declarator (tree) final override; + void direct_declarator (tree) final override; + void abstract_declarator (tree) final override; + void direct_abstract_declarator (tree) final override; /* This is the enclosing scope of the entity being pretty-printed. */ tree enclosing_scope; diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 7ee779d..753963a 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -1483,10 +1483,10 @@ private: protected: using allocator::grow; - virtual char *grow (char *, unsigned needed); + char *grow (char *, unsigned needed) final override; #if MAPPED_WRITING using allocator::shrink; - virtual void shrink (char *); + void shrink (char *) final override; #endif public: diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc index 2b84b84..a0b22c5 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -723,9 +723,9 @@ public: bool force_leaf; /* If non-zero, the group for optional handling. */ unsigned char opt_grp; - virtual void gen_transform (FILE *f, int, const char *, bool, int, - const char *, capture_info *, - dt_operand ** = 0, int = 0); + void gen_transform (FILE *f, int, const char *, bool, int, + const char *, capture_info *, + dt_operand ** = 0, int = 0) override; }; /* An operator that is represented by native C code. This is always @@ -757,9 +757,9 @@ public: unsigned nr_stmts; /* The identifier replacement vector. */ vec ids; - virtual void gen_transform (FILE *f, int, const char *, bool, int, - const char *, capture_info *, - dt_operand ** = 0, int = 0); + void gen_transform (FILE *f, int, const char *, bool, int, + const char *, capture_info *, + dt_operand ** = 0, int = 0) final override; }; /* A wrapper around another operand that captures its value. */ @@ -778,9 +778,9 @@ public: bool value_match; /* The captured value. */ operand *what; - virtual void gen_transform (FILE *f, int, const char *, bool, int, - const char *, capture_info *, - dt_operand ** = 0, int = 0); + void gen_transform (FILE *f, int, const char *, bool, int, + const char *, capture_info *, + dt_operand ** = 0, int = 0) final override; }; /* if expression. */ @@ -1655,7 +1655,7 @@ public: : dt_node (type, parent_), op (op_), match_dop (match_dop_), pos (pos_), value_match (false), for_id (current_id) {} - void gen (FILE *, int, bool, int); + void gen (FILE *, int, bool, int) final override; unsigned gen_predicate (FILE *, int, const char *, bool); unsigned gen_match_op (FILE *, int, const char *, bool); @@ -1681,7 +1681,7 @@ public: indexes (indexes_), info (NULL) {} void gen_1 (FILE *, int, bool, operand *); - void gen (FILE *f, int, bool, int); + void gen (FILE *f, int, bool, int) final override; }; template<> diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc index 4268049..8fcacf8 100644 --- a/gcc/gensupport.cc +++ b/gcc/gensupport.cc @@ -2310,7 +2310,7 @@ class gen_reader : public rtx_reader { public: gen_reader () : rtx_reader (false) {} - void handle_unknown_directive (file_location, const char *); + void handle_unknown_directive (file_location, const char *) final override; }; void diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h index 1e4b5b3..a784eba 100644 --- a/gcc/gimple-range-cache.h +++ b/gcc/gimple-range-cache.h @@ -77,8 +77,8 @@ public: ranger_cache (int not_executable_flag, bool use_imm_uses); ~ranger_cache (); - virtual bool range_of_expr (vrange &r, tree name, gimple *stmt); - virtual bool range_on_edge (vrange &r, edge e, tree expr); + bool range_of_expr (vrange &r, tree name, gimple *stmt) final override; + bool range_on_edge (vrange &r, edge e, tree expr) final override; bool block_range (vrange &r, basic_block bb, tree name, bool calc = true); bool get_global_range (vrange &r, tree name) const; diff --git a/gcc/ipa-icf-gimple.h b/gcc/ipa-icf-gimple.h index 1545e4a..8f498b3 100644 --- a/gcc/ipa-icf-gimple.h +++ b/gcc/ipa-icf-gimple.h @@ -282,11 +282,13 @@ private: public: /* Return true if two operands are equal. The flags fields can be used to specify OEP flags described above. */ - virtual bool operand_equal_p (const_tree, const_tree, unsigned int flags); + bool operand_equal_p (const_tree, const_tree, unsigned int flags) + final override; /* Generate a hash value for an expression. This can be used iteratively by passing a previous result as the HSTATE argument. */ - virtual void hash_operand (const_tree, inchash::hash &, unsigned flags); + void hash_operand (const_tree, inchash::hash &, unsigned flags) + final override; void hash_operand (const_tree, inchash::hash &, unsigned flags, operand_access_type access); }; diff --git a/gcc/ipa-icf.h b/gcc/ipa-icf.h index dbae2cc..bb55092 100644 --- a/gcc/ipa-icf.h +++ b/gcc/ipa-icf.h @@ -317,16 +317,18 @@ public: ~sem_function (); - virtual void init (ipa_icf_gimple::func_checker *); - virtual bool equals_wpa (sem_item *item, - hash_map &ignored_nodes); - virtual hashval_t get_hash (void); - virtual bool equals (sem_item *item, - hash_map &ignored_nodes); - virtual bool merge (sem_item *alias_item); + void init (ipa_icf_gimple::func_checker *) final override; + bool equals_wpa (sem_item *item, + hash_map &ignored_nodes) + final override; + hashval_t get_hash (void) final override; + bool equals (sem_item *item, + hash_map &ignored_nodes) + final override; + bool merge (sem_item *alias_item) final override; /* Dump symbol to FILE. */ - virtual void dump_to_file (FILE *file) + void dump_to_file (FILE *file) final override { gcc_assert (file); dump_function_to_file (decl, file, TDF_DETAILS); @@ -426,17 +428,19 @@ public: sem_variable (varpool_node *_node, bitmap_obstack *stack); /* Semantic variable initialization function. */ - virtual void init (ipa_icf_gimple::func_checker *); + void init (ipa_icf_gimple::func_checker *) final override; - virtual hashval_t get_hash (void); - virtual bool merge (sem_item *alias_item); - virtual void dump_to_file (FILE *file); - virtual bool equals (sem_item *item, - hash_map &ignored_nodes); + hashval_t get_hash (void) final override; + bool merge (sem_item *alias_item) final override; + void dump_to_file (FILE *file) final override; + bool equals (sem_item *item, + hash_map &ignored_nodes) + final override; /* Fast equality variable based on knowledge known in WPA. */ - virtual bool equals_wpa (sem_item *item, - hash_map &ignored_nodes); + bool equals_wpa (sem_item *item, + hash_map &ignored_nodes) + final override; /* Returns varpool_node. */ inline varpool_node *get_node (void) diff --git a/gcc/lto/lto-dump.cc b/gcc/lto/lto-dump.cc index 1fb3fb8..f88486b 100644 --- a/gcc/lto/lto-dump.cc +++ b/gcc/lto/lto-dump.cc @@ -80,7 +80,7 @@ public: virtual ~variable_entry () {} - virtual size_t get_size () const + size_t get_size () const final override { varpool_node *vnode = dyn_cast (node); if (DECL_SIZE (vnode->decl) && tree_fits_shwi_p (DECL_SIZE (vnode->decl))) @@ -88,7 +88,7 @@ public: return 0; } - virtual void dump () + void dump () final override { symbol_entry :: dump (); varpool_node *vnode = dyn_cast (node); @@ -111,13 +111,13 @@ public: virtual ~function_entry () {} - virtual void dump () + void dump () final override { symbol_entry :: dump (); printf ("\n"); } - virtual size_t get_size () const + size_t get_size () const final override { cgraph_node *cnode = dyn_cast (node); gcc_assert (cnode); diff --git a/gcc/read-md.h b/gcc/read-md.h index 34a64fa..7d8cd4a 100644 --- a/gcc/read-md.h +++ b/gcc/read-md.h @@ -330,7 +330,7 @@ class noop_reader : public md_reader noop_reader () : md_reader (false) {} /* A dummy implementation which skips unknown directives. */ - void handle_unknown_directive (file_location, const char *); + void handle_unknown_directive (file_location, const char *) override; }; /* An md_reader subclass that actually handles full hierarchical diff --git a/gcc/read-rtl-function.cc b/gcc/read-rtl-function.cc index eacbe4c..3bcff15 100644 --- a/gcc/read-rtl-function.cc +++ b/gcc/read-rtl-function.cc @@ -188,7 +188,7 @@ class fixup_insn_uid : public operand_fixup m_insn_uid (insn_uid) {} - void apply (function_reader *reader) const; + void apply (function_reader *reader) const final override; private: int m_insn_uid; @@ -206,7 +206,7 @@ class fixup_note_insn_basic_block : public operand_fixup m_bb_idx (bb_idx) {} - void apply (function_reader *reader) const; + void apply (function_reader *reader) const final override; private: int m_bb_idx; @@ -225,7 +225,7 @@ class fixup_expr : public fixup ~fixup_expr () { free (m_desc); } - void apply (function_reader *reader) const; + void apply (function_reader *reader) const final override; private: char *m_desc; diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc index 843a436..c17a3e4 100644 --- a/gcc/tree-ssa-loop-ch.cc +++ b/gcc/tree-ssa-loop-ch.cc @@ -320,7 +320,7 @@ public: protected: /* ch_base method: */ - virtual bool process_loop_p (class loop *loop); + bool process_loop_p (class loop *loop) final override; }; // class pass_ch const pass_data pass_data_ch_vect = @@ -358,7 +358,7 @@ public: protected: /* ch_base method: */ - virtual bool process_loop_p (class loop *loop); + bool process_loop_p (class loop *loop) final override; }; // class pass_ch_vect /* For all loops, copy the condition at the end of the loop body in front diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index ef833f5..5214f14 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -2534,9 +2534,9 @@ public: : eliminate_dom_walker (CDI_DOMINATORS, NULL), entry (entry_), m_avail_freelist (NULL) {} - virtual tree eliminate_avail (basic_block, tree op); + tree eliminate_avail (basic_block, tree op) final override; - virtual void eliminate_push_avail (basic_block, tree); + void eliminate_push_avail (basic_block, tree) final override; basic_block entry; /* Freelist of avail entries which are allocated from the vn_ssa_aux -- cgit v1.1 From 3b21c21f3f5726823e19728fdd1571a14aae0fb3 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 27 Jun 2022 13:27:24 +0100 Subject: c++: avoid poisoning on musl [PR106102] On musl uses calloc() (via ). includes it indirectly and exposes use of poisoned calloc() when module code is built: /build/build/./prev-gcc/xg++ ... ../../gcc-13-20220626/gcc/cp/mapper-resolver.cc In file included from /<>/musl-1.2.3-dev/include/pthread.h:30, from /build/build/prev-x86_64-unknown-linux-musl/libstdc++-v3/include/x86_64-unknown-linux-musl/bits/gthr-default.h:35, .... from /build/build/prev-x86_64-unknown-linux-musl/libstdc++-v3/include/memory:77, from ../../gcc-13-20220626/gcc/../libcody/cody.hh:24, from ../../gcc-13-20220626/gcc/cp/../../c++tools/resolver.h:25, from ../../gcc-13-20220626/gcc/cp/../../c++tools/resolver.cc:23, from ../../gcc-13-20220626/gcc/cp/mapper-resolver.cc:32: /<>/musl-1.2.3-dev/include/sched.h:84:7: error: attempt to use poisoned "calloc" 84 | void *calloc(size_t, size_t); | ^ /<>/musl-1.2.3-dev/include/sched.h:124:36: error: attempt to use poisoned "calloc" 124 | #define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n))) | ^ gcc/cp/ PR c++/106102 * mapper-client.cc: Include via "system.h". * mapper-resolver.cc: Ditto. * module.cc: Ditto. libcc1/ PR c++/106102 * libcc1plugin.cc: Include via "system.h". * libcp1plugin.cc: Ditto. --- gcc/cp/mapper-client.cc | 1 + gcc/cp/mapper-resolver.cc | 1 + gcc/cp/module.cc | 1 + 3 files changed, 3 insertions(+) (limited to 'gcc') diff --git a/gcc/cp/mapper-client.cc b/gcc/cp/mapper-client.cc index 8603a88..fe9544b 100644 --- a/gcc/cp/mapper-client.cc +++ b/gcc/cp/mapper-client.cc @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see #define INCLUDE_STRING #define INCLUDE_VECTOR #define INCLUDE_MAP +#define INCLUDE_MEMORY #include "system.h" #include "line-map.h" diff --git a/gcc/cp/mapper-resolver.cc b/gcc/cp/mapper-resolver.cc index e3d29fb..e70d1b4 100644 --- a/gcc/cp/mapper-resolver.cc +++ b/gcc/cp/mapper-resolver.cc @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #define INCLUDE_VECTOR #define INCLUDE_ALGORITHM #define INCLUDE_MAP +#define INCLUDE_MEMORY #include "system.h" // We don't want or need to be aware of networking diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 753963a..8bb22c2 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -206,6 +206,7 @@ Classes used: #define _DEFAULT_SOURCE 1 /* To get TZ field of struct tm, if available. */ #include "config.h" +#define INCLUDE_MEMORY #define INCLUDE_STRING #define INCLUDE_VECTOR #include "system.h" -- cgit v1.1 From 9d3dd2185651c0a70919f6f3a35841cab68a81a6 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 28 Jun 2022 00:16:58 +0000 Subject: Daily bump. --- gcc/ChangeLog | 229 ++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/cp/ChangeLog | 13 +++ gcc/lto/ChangeLog | 5 ++ gcc/testsuite/ChangeLog | 36 ++++++++ 5 files changed, 284 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e5c3b66..d995063 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,232 @@ +2022-06-27 David Malcolm + + * genmatch.cc: Add "final" and "override" to various vfunc + implementations, removing redundant "virtual" as appropriate. + * gensupport.cc: Likewise. + * gimple-range-cache.h: Likewise. + * ipa-icf-gimple.h: Likewise. + * ipa-icf.h: Likewise. + * read-md.h: Likewise. + * read-rtl-function.cc: Likewise. + * tree-ssa-loop-ch.cc: Likewise. + * tree-ssa-sccvn.cc: Likewise. + +2022-06-27 David Malcolm + + * config/i386/i386-features.h: Add "final" and "override" to + scalar_chain vfunc implementations as appropriate. + +2022-06-27 David Malcolm + + * tree-switch-conversion.h: Add "final" and "override" to cluster + vfunc implementations as appropriate. + +2022-06-27 David Malcolm + + * expr.cc: Add "final" and "override" to op_by_pieces_d vfunc + implementations as appropriate. + +2022-06-27 David Malcolm + + * compare-elim.cc: Add "final" and "override" to dom_walker vfunc + implementations, removing redundant "virtual" as appropriate. + * gimple-ssa-strength-reduction.cc: Likewise. + * ipa-prop.cc: Likewise. + * rtl-ssa/blocks.cc: Likewise. + * tree-into-ssa.cc: Likewise. + * tree-ssa-dom.cc: Likewise. + * tree-ssa-math-opts.cc: Likewise. + * tree-ssa-phiopt.cc: Likewise. + * tree-ssa-propagate.cc: Likewise. + * tree-ssa-sccvn.cc: Likewise. + * tree-ssa-strlen.cc: Likewise. + * tree-ssa-uncprop.cc: Likewise. + +2022-06-27 David Malcolm + + * adjust-alignment.cc: Add "final" and "override" to opt_pass + vfunc implementations, removing redundant "virtual" as + appropriate. + * asan.cc: Likewise. + * auto-inc-dec.cc: Likewise. + * auto-profile.cc: Likewise. + * bb-reorder.cc: Likewise. + * cfgcleanup.cc: Likewise. + * cfgexpand.cc: Likewise. + * cfgrtl.cc: Likewise. + * cgraphbuild.cc: Likewise. + * combine-stack-adj.cc: Likewise. + * combine.cc: Likewise. + * compare-elim.cc: Likewise. + * config/i386/i386-features.cc: Likewise. + * coroutine-passes.cc: Likewise. + * cprop.cc: Likewise. + * cse.cc: Likewise. + * dce.cc: Likewise. + * df-core.cc: Likewise. + * dse.cc: Likewise. + * dwarf2cfi.cc: Likewise. + * early-remat.cc: Likewise. + * except.cc: Likewise. + * final.cc: Likewise. + * function.cc: Likewise. + * fwprop.cc: Likewise. + * gcse.cc: Likewise. + * gimple-harden-conditionals.cc: Likewise. + * gimple-if-to-switch.cc: Likewise. + * gimple-isel.cc: Likewise. + * gimple-laddress.cc: Likewise. + * gimple-loop-interchange.cc: Likewise. + * gimple-loop-jam.cc: Likewise. + * gimple-loop-versioning.cc: Likewise. + * gimple-low.cc: Likewise. + * gimple-ssa-backprop.cc: Likewise. + * gimple-ssa-evrp.cc: Likewise. + * gimple-ssa-isolate-paths.cc: Likewise. + * gimple-ssa-nonnull-compare.cc: Likewise. + * gimple-ssa-split-paths.cc: Likewise. + * gimple-ssa-store-merging.cc: Likewise. + * gimple-ssa-strength-reduction.cc: Likewise. + * gimple-ssa-warn-access.cc: Likewise. + * gimple-ssa-warn-alloca.cc: Likewise. + * gimple-ssa-warn-restrict.cc: Likewise. + * gimple-warn-recursion.cc: Likewise. + * graphite.cc: Likewise. + * ifcvt.cc: Likewise. + * init-regs.cc: Likewise. + * ipa-comdats.cc: Likewise. + * ipa-cp.cc: Likewise. + * ipa-devirt.cc: Likewise. + * ipa-fnsummary.cc: Likewise. + * ipa-free-lang-data.cc: Likewise. + * ipa-icf.cc: Likewise. + * ipa-inline.cc: Likewise. + * ipa-modref.cc: Likewise. + * ipa-profile.cc: Likewise. + * ipa-pure-const.cc: Likewise. + * ipa-reference.cc: Likewise. + * ipa-split.cc: Likewise. + * ipa-sra.cc: Likewise. + * ipa-visibility.cc: Likewise. + * ipa.cc: Likewise. + * ira.cc: Likewise. + * jump.cc: Likewise. + * loop-init.cc: Likewise. + * lower-subreg.cc: Likewise. + * mode-switching.cc: Likewise. + * modulo-sched.cc: Likewise. + * multiple_target.cc: Likewise. + * omp-expand.cc: Likewise. + * omp-low.cc: Likewise. + * omp-oacc-kernels-decompose.cc: Likewise. + * omp-oacc-neuter-broadcast.cc: Likewise. + * omp-offload.cc: Likewise. + * omp-simd-clone.cc: Likewise. + * passes.cc: Likewise. + * postreload-gcse.cc: Likewise. + * postreload.cc: Likewise. + * predict.cc: Likewise. + * recog.cc: Likewise. + * ree.cc: Likewise. + * reg-stack.cc: Likewise. + * regcprop.cc: Likewise. + * reginfo.cc: Likewise. + * regrename.cc: Likewise. + * reorg.cc: Likewise. + * sancov.cc: Likewise. + * sanopt.cc: Likewise. + * sched-rgn.cc: Likewise. + * stack-ptr-mod.cc: Likewise. + * store-motion.cc: Likewise. + * tracer.cc: Likewise. + * trans-mem.cc: Likewise. + * tree-call-cdce.cc: Likewise. + * tree-cfg.cc: Likewise. + * tree-cfgcleanup.cc: Likewise. + * tree-complex.cc: Likewise. + * tree-eh.cc: Likewise. + * tree-emutls.cc: Likewise. + * tree-if-conv.cc: Likewise. + * tree-into-ssa.cc: Likewise. + * tree-loop-distribution.cc: Likewise. + * tree-nrv.cc: Likewise. + * tree-object-size.cc: Likewise. + * tree-parloops.cc: Likewise. + * tree-predcom.cc: Likewise. + * tree-profile.cc: Likewise. + * tree-sra.cc: Likewise. + * tree-ssa-ccp.cc: Likewise. + * tree-ssa-copy.cc: Likewise. + * tree-ssa-dce.cc: Likewise. + * tree-ssa-dom.cc: Likewise. + * tree-ssa-dse.cc: Likewise. + * tree-ssa-forwprop.cc: Likewise. + * tree-ssa-ifcombine.cc: Likewise. + * tree-ssa-loop-ch.cc: Likewise. + * tree-ssa-loop-im.cc: Likewise. + * tree-ssa-loop-ivcanon.cc: Likewise. + * tree-ssa-loop-prefetch.cc: Likewise. + * tree-ssa-loop-split.cc: Likewise. + * tree-ssa-loop-unswitch.cc: Likewise. + * tree-ssa-loop.cc: Likewise. + * tree-ssa-math-opts.cc: Likewise. + * tree-ssa-phiopt.cc: Likewise. + * tree-ssa-phiprop.cc: Likewise. + * tree-ssa-pre.cc: Likewise. + * tree-ssa-reassoc.cc: Likewise. + * tree-ssa-sccvn.cc: Likewise. + * tree-ssa-sink.cc: Likewise. + * tree-ssa-strlen.cc: Likewise. + * tree-ssa-structalias.cc: Likewise. + * tree-ssa-uncprop.cc: Likewise. + * tree-ssa-uninit.cc: Likewise. + * tree-ssanames.cc: Likewise. + * tree-stdarg.cc: Likewise. + * tree-switch-conversion.cc: Likewise. + * tree-tailcall.cc: Likewise. + * tree-vect-generic.cc: Likewise. + * tree-vectorizer.cc: Likewise. + * tree-vrp.cc: Likewise. + * tsan.cc: Likewise. + * ubsan.cc: Likewise. + * var-tracking.cc: Likewise. + * vtable-verify.cc: Likewise. + * web.cc: Likewise. + +2022-06-27 Andrew Stubbs + + * config/gcn/gcn.md (*movbi): Remove assembler bug workarounds. + (jump): Likewise. + (movdi_symbol_save_scc): Likewise. + +2022-06-27 Roger Sayle + + PR rtl-optimization/7061 + * config/i386/i386.md (*highpartdisi2): New define_insn_and_split. + +2022-06-27 Roger Sayle + + PR tree-optimization/94026 + * match.pd (((X << C1) & C2) eq/ne C3): New simplification. + (((X >> C1) & C2) eq/ne C3): Likewise. + +2022-06-27 Prathamesh Kulkarni + + * statistics.cc: Include tree.h. + (get_function_name): New function. + (statistics_fini_pass_2): Call get_function_name instead of + current_function_name. + (statistics_counter_event): Call get_function_name instead of + function_name. + (statistics_histogram_event): Likewise. + +2022-06-27 Takayuki 'January June' Suwa + + * config/xtensa/xtensa.md: + Suppress unnecessary emitting nop insn in the split patterns for + integer/FP constant synthesis, and add new peephole2 pattern that + folds such synthesized additions. + 2022-06-25 Aldy Hernandez * tree-ssa-dom.cc (dom_jt_state): Pass ranger to constructor diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 63c222e..73287f2 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220627 +20220628 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a50f5eb..d7bdd16 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,16 @@ +2022-06-27 Sergei Trofimovich + + PR c++/106102 + * mapper-client.cc: Include via "system.h". + * mapper-resolver.cc: Ditto. + * module.cc: Ditto. + +2022-06-27 David Malcolm + + * cxx-pretty-print.h: Add "final" and "override" to various vfunc + implementations, removing redundant "virtual" as appropriate. + * module.cc: Likewise. + 2022-06-24 Jason Merrill PR c++/87729 diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 31c3bc2..fc61246 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2022-06-27 David Malcolm + + * lto-dump.cc: Add "final" and "override" to various vfunc + implementations, removing redundant "virtual" as appropriate. + 2022-05-16 Martin Liska * lto-common.cc (lto_resolution_read): Use ARRAY_SIZE. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 38b7c45..c88004e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,39 @@ +2022-06-27 Marek Polacek + + PR c++/89197 + * g++.dg/cpp0x/initlist130.C: New test. + +2022-06-27 Andrew Stubbs + + * lib/target-supports.exp (check_effective_target_global_constructor): + Remove amdgcn. + +2022-06-27 Jakub Jelinek + + PR tree-optimization/106070 + * gcc.dg/torture/pr106070.c: Use unsigned long long instead of + unsigned long and -1ULL instead of 0xffffffffffffffff, deobcuscate + and improve formatting. + +2022-06-27 Alexandre Oliva + + * gcc.dg/atomic/c11-atomic-exec-4.c: Call sched_yield. + * gcc.dg/atomic/c11-atomic-exec-5.c: Likewise. + * gcc.dg/atomic/pr80640-2.c: Likewise. + * gcc.dg/atomic/pr80640.c: Likewise. + * gcc.dg/atomic/pr81316.c: Likewise. + * gcc.dg/di-sync-multithread.c: Likewise. + +2022-06-27 Roger Sayle + + PR rtl-optimization/7061 + * gcc.target/i386/pr7061-2.c: Update to look for shufps. + +2022-06-27 Roger Sayle + + PR tree-optimization/94026 + * gcc.dg/pr94026.c: New test case. + 2022-06-26 Harald Anlauf PR fortran/105691 -- cgit v1.1 From f9764ea128c99ba1c10de21a092266cd7da8700a Mon Sep 17 00:00:00 2001 From: Kewen Lin Date: Mon, 27 Jun 2022 21:50:26 -0500 Subject: rs6000: Simplify *rotl3_insert_4 by removing DImode define_insn *rotl3_insert_4 use mode iterator GPR which consists of SImode and conditional DImode, but the condition of this define_insn requires the mode should be SImode. By further checking, it's found that the rldimi instruction can not be used for this pattern since the required mask can not be represented correctly. We can have the fixed mask end 31 with rlwimi, but can not have the fixed mask end 63 with rldimi as it has to be (63 - SH) always. So this patch simplifies this define_insn to use SImode only. gcc/ChangeLog: * config/rs6000/rs6000.md (*rotl3_insert_4): Replace mode iterator GPR with SImode, adjust the condition and output template, rename to ... (*rotlsi3_insert_4): ... this. --- gcc/config/rs6000/rs6000.md | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'gcc') diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 090dbcf..1367a2c 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -4225,23 +4225,14 @@ operands[4] = GEN_INT ((HOST_WIDE_INT_1U << INTVAL (operands[2])) - 1); }) -(define_insn "*rotl3_insert_4" - [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") - (ior:GPR (and:GPR (match_operand:GPR 3 "gpc_reg_operand" "0") - (match_operand:GPR 4 "const_int_operand" "n")) - (lshiftrt:GPR (match_operand:GPR 1 "gpc_reg_operand" "r") - (match_operand:SI 2 "const_int_operand" "n"))))] - "mode == SImode && - GET_MODE_PRECISION (mode) - == INTVAL (operands[2]) + exact_log2 (-UINTVAL (operands[4]))" -{ - operands[2] = GEN_INT (GET_MODE_PRECISION (mode) - - INTVAL (operands[2])); - if (mode == SImode) - return "rlwimi %0,%1,%h2,32-%h2,31"; - else - return "rldimi %0,%1,%H2,64-%H2"; -} +(define_insn "*rotlsi3_insert_4" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") + (ior:SI (and:SI (match_operand:SI 3 "gpc_reg_operand" "0") + (match_operand:SI 4 "const_int_operand" "n")) + (lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r") + (match_operand:SI 2 "const_int_operand" "n"))))] + "INTVAL (operands[2]) + exact_log2 (-UINTVAL (operands[4])) == 32" + "rlwimi %0,%1,32-%h2,%h2,31" [(set_attr "type" "insert")]) (define_insn "*rotlsi3_insert_5" -- cgit v1.1 From a3ca1fc5f409e257e9fb9a8165bb4a7068ddebbe Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 28 Jun 2022 10:50:34 +0200 Subject: middle-end/106053 - fold_sign_changed_comparison and large bools The following fixes a latent issue in the match.pd variant of fold_sign_changed_comparison which replaces an unsigned integer comparison with a signed boolean comparison of the same precision despite the fact that we treat BOOLEAN_TYPEs as only having two valid values. 2022-06-28 Richard Biener PR middle-end/106053 * match.pd ((T)a == (T)b): Avoid folding away sign changes in a comparison if we'd truncate to a boolean. * gcc.target/i386/pr106053.c: New testcase. --- gcc/match.pd | 7 +++++- gcc/testsuite/gcc.target/i386/pr106053.c | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr106053.c (limited to 'gcc') diff --git a/gcc/match.pd b/gcc/match.pd index 24cbbbb..c43c528 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -5542,7 +5542,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) && (TYPE_UNSIGNED (TREE_TYPE (@00)) == TYPE_UNSIGNED (TREE_TYPE (@0)) || cmp == NE_EXPR || cmp == EQ_EXPR) - && !POINTER_TYPE_P (TREE_TYPE (@00))) + && !POINTER_TYPE_P (TREE_TYPE (@00)) + /* (int)bool:32 != (int)uint is not the same as + bool:32 != (bool:32)uint since boolean types only have two valid + values independent of their precision. */ + && (TREE_CODE (TREE_TYPE (@00)) != BOOLEAN_TYPE + || TREE_CODE (TREE_TYPE (@10)) == BOOLEAN_TYPE)) /* ??? The special-casing of INTEGER_CST conversion was in the original code and here to avoid a spurious overflow flag on the resulting constant which fold_convert produces. */ diff --git a/gcc/testsuite/gcc.target/i386/pr106053.c b/gcc/testsuite/gcc.target/i386/pr106053.c new file mode 100644 index 0000000..69baa3e --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr106053.c @@ -0,0 +1,37 @@ +/* { dg-do run { target lp64 } } */ +/* { dg-options "-O -fno-tree-fre -w -mno-avx" } */ + +typedef unsigned __attribute__((__vector_size__ (32))) v256u8; +typedef unsigned __attribute__((__vector_size__ (64))) v512u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; +typedef unsigned long __attribute__((__vector_size__ (64))) v512u64; +typedef unsigned __int128 __attribute__((__vector_size__ (32))) v256u128; +unsigned u; +v512u64 foo0_v512u64_0; + +static inline v256u8 +foo (u32 u32_0, u64 u64_0, v256u128 v256u128_0) +{ + int o = __builtin_add_overflow_p (u64_0, 0, 0); + v512u64 v512u64_1 = + foo0_v512u64_0 & (u32) __builtin_sub_overflow_p (0, o, 0); + u64_0 |= u; + v256u128 v256u128_2 = u64_0 < v256u128_0; + v256u128 v256u128_3 = -v256u128_2 == u64_0 * u32_0; + v256u8 v256u8_r = ((union { + v512u8 a; v256u8 b[2]; + }) (v512u8) v512u64_1).b[0] + (v256u8) v256u128_3; + return v256u8_r; +} + +int +main (void) +{ + v256u8 x = foo (3095179400, 23725760132, (v256u128) { 2, 2 }); + for (unsigned i = 0; i < sizeof (x) / sizeof (x[0]); i++) + if (x[i]) + __builtin_abort (); + return 0; +} -- cgit v1.1 From 88417d77fec57c9d15ac2864b37e84eee575a781 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 27 Jun 2022 20:50:03 +0200 Subject: Allow all types supported by ranger in loop-ch. This converts the ranger use in loop-ch to allow any types allowed by the ranger infrastructure. Since the range of a GIMPLE_COND is always an integer we can remove the check because the only temporary is already an int_range. gcc/ChangeLog: * tree-ssa-loop-ch.cc (entry_loop_condition_is_static): Remove irange::supports_p. --- gcc/tree-ssa-loop-ch.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc index c17a3e4..3b91a89 100644 --- a/gcc/tree-ssa-loop-ch.cc +++ b/gcc/tree-ssa-loop-ch.cc @@ -54,8 +54,7 @@ entry_loop_condition_is_static (class loop *l, path_range_query *query) edge e = loop_preheader_edge (l); gcond *last = safe_dyn_cast (last_stmt (e->dest)); - if (!last - || !irange::supports_p (TREE_TYPE (gimple_cond_lhs (last)))) + if (!last) return false; edge true_e, false_e; -- cgit v1.1 From 020b7d98589bbc928b5a66b1ed56b42af8791355 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 28 Jun 2022 16:00:14 +0800 Subject: loongarch: exclude LARCH_PROLOGUE_TEMP from SIBCALL_REGS [PR 106096] The epilogue may clobber LARCH_PROLOGUE_TEMP ($r13/$t1), so it cannot be used for sibcalls. gcc/ChangeLog: PR target/106096 * config/loongarch/loongarch.h (REG_CLASS_CONTENTS): Exclude $r13 from SIBCALL_REGS. * config/loongarch/loongarch.cc (loongarch_regno_to_class): Change $r13 to JIRL_REGS. gcc/testsuite/ChangeLog: PR target/106096 * g++.target/loongarch/loongarch.exp: New test support file. * g++.target/loongarch/pr106096.C: New test. --- gcc/config/loongarch/loongarch.cc | 2 +- gcc/config/loongarch/loongarch.h | 2 +- gcc/testsuite/g++.target/loongarch/loongarch.exp | 34 +++++++++++ gcc/testsuite/g++.target/loongarch/pr106096.C | 75 ++++++++++++++++++++++++ 4 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.target/loongarch/loongarch.exp create mode 100644 gcc/testsuite/g++.target/loongarch/pr106096.C (limited to 'gcc') diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index 80046b6..c8502b0 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -189,7 +189,7 @@ const enum reg_class loongarch_regno_to_class[FIRST_PSEUDO_REGISTER] = { GR_REGS, GR_REGS, GR_REGS, GR_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, - SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, + SIBCALL_REGS, JIRL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, SIBCALL_REGS, GR_REGS, GR_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, JIRL_REGS, diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h index 4d107a4..f9de9a6 100644 --- a/gcc/config/loongarch/loongarch.h +++ b/gcc/config/loongarch/loongarch.h @@ -511,7 +511,7 @@ enum reg_class #define REG_CLASS_CONTENTS \ { \ { 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \ - { 0x001ff000, 0x00000000, 0x00000000 }, /* SIBCALL_REGS */ \ + { 0x001fd000, 0x00000000, 0x00000000 }, /* SIBCALL_REGS */ \ { 0xff9ffff0, 0x00000000, 0x00000000 }, /* JIRL_REGS */ \ { 0xfffffffc, 0x00000000, 0x00000000 }, /* CSR_REGS */ \ { 0xffffffff, 0x00000000, 0x00000000 }, /* GR_REGS */ \ diff --git a/gcc/testsuite/g++.target/loongarch/loongarch.exp b/gcc/testsuite/g++.target/loongarch/loongarch.exp new file mode 100644 index 0000000..4fd1194 --- /dev/null +++ b/gcc/testsuite/g++.target/loongarch/loongarch.exp @@ -0,0 +1,34 @@ +# Copyright (C) 2019-2022 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# GCC testsuite that uses the `dg.exp' driver. + +# Exit immediately if this isn't a LoongArch target. +if ![istarget loongarch*-*-*] then { + return +} + +# Load support procs. +load_lib g++-dg.exp + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] "" "" + +# All done. +dg-finish diff --git a/gcc/testsuite/g++.target/loongarch/pr106096.C b/gcc/testsuite/g++.target/loongarch/pr106096.C new file mode 100644 index 0000000..5edbda2 --- /dev/null +++ b/gcc/testsuite/g++.target/loongarch/pr106096.C @@ -0,0 +1,75 @@ +/* PR target/106096 + Reduced from gimple-range-path.cc. It was miscompiled with -O2 and + caused ICE (segfault) building stage 2 libgcc. */ + +/* { dg-do run } */ +/* { dg-options "-O2" } */ +enum E +{ + TS_TYPED +} a; +int b, c; +char d, e; + +__attribute__ ((cold, noipa, noinline)) void +cold (int *, E, char *, int, char *) +{ + __builtin_trap (); +} + +int * +contains_struct_check (E x) +{ + if (a) + cold (&b, x, &d, c, &e); + return &b; +} + +struct vrange +{ + virtual void set_varying (int *); +}; + +struct int_range : vrange +{ + int *m_ranges[510]; +}; + +__attribute__ ((noipa, noinline)) void +vrange::set_varying (int *) +{ +} + +struct Value_Range +{ + Value_Range (int *); + int_range m_irange; +}; + +__attribute__ ((noipa, noinline)) Value_Range::Value_Range (int *) {} + +struct path_range_query +{ + void ssa_range_in_phi (vrange &); + bool m_resolve; +}; + +__attribute__ ((noipa, noinline)) void +path_range_query::ssa_range_in_phi (vrange &r) +{ + if (m_resolve) + { + Value_Range (contains_struct_check (TS_TYPED)); + return; + } + r.set_varying (contains_struct_check (TS_TYPED)); +} + +int +main () +{ + path_range_query prq{ 0 }; + vrange vr; + prq.ssa_range_in_phi (vr); + return 0; +} -- cgit v1.1 From 07f49e855b50d06181b08aa2498e631be27e8055 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 28 Jun 2022 12:03:22 +0200 Subject: Use mark_block_for_update properly in insert_updated_phi_nodes_for This makes sure to use mark_block_for_update when adding a block for rewriting in insert_updated_phi_nodes_for as otherwise stmt flags are not initialized. 2022-06-28 Richard Biener * tree-into-ssa.cc (insert_updated_phi_nodes_for): Use mark_block_for_update. (update_ssa): Adjust. --- gcc/tree-into-ssa.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc index 9631d8c..f9655ce 100644 --- a/gcc/tree-into-ssa.cc +++ b/gcc/tree-into-ssa.cc @@ -3109,7 +3109,7 @@ release_ssa_name_after_update_ssa (tree name) /* Insert new PHI nodes to replace VAR. DFS contains dominance - frontier information. BLOCKS is the set of blocks to be updated. + frontier information. This is slightly different than the regular PHI insertion algorithm. The value of UPDATE_FLAGS controls how PHI nodes for @@ -3132,8 +3132,8 @@ release_ssa_name_after_update_ssa (tree name) names is not pruned. PHI nodes are inserted at every IDF block. */ static void -insert_updated_phi_nodes_for (tree var, bitmap_head *dfs, bitmap blocks, - unsigned update_flags) +insert_updated_phi_nodes_for (tree var, bitmap_head *dfs, + unsigned update_flags) { basic_block entry; def_blocks *db; @@ -3197,16 +3197,16 @@ insert_updated_phi_nodes_for (tree var, bitmap_head *dfs, bitmap blocks, /* FIXME, this is not needed if we are updating symbols. We are already starting at the ENTRY block anyway. */ - bitmap_ior_into (blocks, pruned_idf); EXECUTE_IF_SET_IN_BITMAP (pruned_idf, 0, i, bi) { edge e; edge_iterator ei; basic_block bb = BASIC_BLOCK_FOR_FN (cfun, i); + mark_block_for_update (bb); FOR_EACH_EDGE (e, ei, bb->preds) if (e->src->index >= 0) - bitmap_set_bit (blocks, e->src->index); + mark_block_for_update (e->src); } insert_phi_nodes_for (var, pruned_idf, true); @@ -3475,14 +3475,12 @@ update_ssa (unsigned update_flags) auto_sbitmap tmp (SBITMAP_SIZE (old_ssa_names)); bitmap_copy (tmp, old_ssa_names); EXECUTE_IF_SET_IN_BITMAP (tmp, 0, i, sbi) - insert_updated_phi_nodes_for (ssa_name (i), dfs, blocks_to_update, - update_flags); + insert_updated_phi_nodes_for (ssa_name (i), dfs, update_flags); } symbols_to_rename.qsort (insert_updated_phi_nodes_compare_uids); FOR_EACH_VEC_ELT (symbols_to_rename, i, sym) - insert_updated_phi_nodes_for (sym, dfs, blocks_to_update, - update_flags); + insert_updated_phi_nodes_for (sym, dfs, update_flags); FOR_EACH_BB_FN (bb, cfun) bitmap_clear (&dfs[bb->index]); -- cgit v1.1 From 8354d0abeb7646e109b2fb982afbc253644b0925 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 28 Jun 2022 12:07:14 +0200 Subject: Speedup loop splitting SSA update Since we never process loops with inner loops that have been split we can delay SSA update until after the pass is done with the whole loop, avoiding the O(function-size) work associated with it. 2022-06-28 Richard Biener * tree-ssa-loop-split.cc (fix_loop_bb_probability): Do not call update_ssa. --- gcc/tree-ssa-loop-split.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-loop-split.cc b/gcc/tree-ssa-loop-split.cc index d61bad5..bccf621 100644 --- a/gcc/tree-ssa-loop-split.cc +++ b/gcc/tree-ssa-loop-split.cc @@ -491,8 +491,6 @@ static void fix_loop_bb_probability (class loop *loop1, class loop *loop2, edge true_edge, edge false_edge) { - update_ssa (TODO_update_ssa); - /* Proportion first loop's bb counts except those dominated by true branch to avoid drop 1s down. */ basic_block *bbs1, *bbs2; @@ -1668,7 +1666,8 @@ tree_ssa_split_loops (void) if (loop->aux) { /* If any of our inner loops was split, don't split us, - and mark our containing loop as having had splits as well. */ + and mark our containing loop as having had splits as well. + This allows for delaying SSA update. */ loop_outer (loop)->aux = loop; continue; } -- cgit v1.1 From 133d0d422ebd18dbd215cfa5394aff9f938e7060 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 28 Jun 2022 13:05:28 +0200 Subject: fortran, libgfortran: Avoid using libquadmath for glibc 2.26+ As mentioned by Joseph in PR105101, glibc 2.26 or later has on x86 (both -m32/-m64), powerpc64le, ia64 and mips support for *f128 math/complex APIs plus strtof128 and strfromf128, and these APIs allow us to avoid libquadmath for Fortran purposes on these architectures, replace *q math/complex APIs, strtof128 instead of strtoflt128 and, while strfromf128 unfortunately isn't a perfect replacement to quadmath_snprintf, it can be made to work. The advantage of this is that when configured against such glibcs (2.26 is now almost 5 years old), we can avoid linking against an extra shared library and the math support in glibc is maintained better than libquadmath. We need both a compiler change (so that for glibc 2.26+ it uses *f128 APIs instead of *q) and library change. The above mentioned problem with strfromf128 is that the strfrom* functions are severely restricted versions of snprintf. In libgfortran, we handle !isfinite differently and just use snprintf/quadmath_snprintf for %+-#.*{L,Q}{f,e} printing. strfrom* doesn't allow +, -, # modifiers and it only supports .34 or similar precision, not .* . The L/Q etc. letters are omitted. The + is there to force + sign at the start if it is positive. Workaround in the patch is to add the + at the start manually for !signbit (val). The - (left alignment instead of right) I don't understand why we need it, when minimum field width isn't specified (for strfrom* can't be specified), no padding is ever added anywhere I believe. The # is to force adding . - workaround is to search for first . or e or '\0' character, if it is '\0', just append ., if it is e, insert . before e and memmove the rest (which is just a few bytes, e, +/- and at most a few digits) one byte later. The .* case is handled by creating the format string for strfrom* by snprintf into a temporary buffer. As requested, this patch also switches from using __float128 type in libgfortran to _Float128 which is equivalent on all arches that support __float128. The change is done in a backwards compatible change, when GCC is configured against glibc 2.26 or newer, libgfortran.so.5 itself doesn't link against -lquadmath nor uses any libquadmath APIs, libgfortran.a doesn't use any libquadmath APIs either. User programs and libraries when being linked by gfortran driver are linked against -lgfortran and -lquadmath, but the latter only in the --as-needed linker mode, which means it needs to be around during linking and will be linked in if there are any calls to math/complex functions with real(kind=16) or complex(kind=16) in compilation units compiled by older versions of gcc, but if either user code doesn't call those math/complex functions for the largest supported kind, or the code is recompiled by gcc with this change in, libquadmath won't be linked in. 2022-06-28 Jakub Jelinek gcc/fortran/ * gfortran.h (gfc_real_info): Add use_iec_60559 bitfield. * trans-types.h (gfc_real16_use_iec_60559): Declare. * trans-types.cc (gfc_real16_use_iec_60559): Define. (gfc_init_kinds): When building powerpc64le-linux libgfortran on glibc 2.26 to 2.31, set gfc_real16_use_iec_60559 and use_iec_60559. (gfc_build_real_type): Set gfc_real16_use_iec_60559 and use_iec_60559 on glibc 2.26 or later. * trans-intrinsic.cc (gfc_build_intrinsic_lib_fndecls): Adjust comment. Handle gfc_real16_use_iec_60559. (gfc_get_intrinsic_lib_fndecl): Handle use_iec_60559. libgfortran/ * configure.ac: Check for strtof128 and strfromf128. Check for math and complex *f128 functions. Set have_iec_60559_libc_support to yes if *f128 support is around, for --enable-libquadmath-support default to "default" rather than yes if have_iec_60559_libc_support is yes. * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Test _Float128/_Complex _Float128 rather than __float128 and _Complex float __attribute__((mode(TC))). If libquadmath support is defaulted and have_iec_60559_libc_support is yes, define and subst USE_IEC_60559. Remove unused LIBGFOR_BUILD_QUAD conditional. * Makefile.am (kinds.h): Pass @USE_IEC_60559@ as an extra mk-kinds-h.sh argument. * mk-kinds-h.sh: Accept 4th use_iec_60559 argument. Use _Float128/_Complex _Float128 types instead of __float128 and _Complex float __attribute__((mode(TC))), and if use_iec_60559 is yes, use f128 suffix instead of q and define GFC_REAL_16_USE_IEC_60559. * kinds-override.h: Use _Float128/_Complex _Float128 types instead of __float128 and _Complex float __attribute__((mode(TC))), if USE_IEC_60559 is defined, use f128 suffixes instead of q and define GFC_REAL_17_USE_IEC_60559. * libgfortran.h: Don't include quadmath_weak.h if USE_IEC_60559 is defined. (GFC_REAL_16_INFINITY, GFC_REAL_16_QUIET_NAN): Define for GFC_REAL_16_USE_IEC_60559 differently. * caf/single.c (convert_type): Use _Float128/_Complex _Float128 instead of __float128 and _Complex float __attribute__((mode(TC))). For HAVE_GFC_REAL_10 when HAVE_GFC_REAL_16 isn't defined use _Complex long double instead of long double. * ieee/issignaling_fallback.h (ieee854_float128_shape_type): Use _Float128 instead of __float128. (__issignalingf128): Change argument type to _Float128. (issignaling): Use _Float128 instead of __float128 in _Generic. * intrinsics/cshift0.c (cshift0): Use _Float128 instead of __float128 in a comment. Fix a comment typo, logn double -> long double. * intrinsics/erfc_scaled.c (_THRESH, _M_2_SQRTPI, _INF, _ERFC, _EXP): Use different definitions if GFC_REAL_16_USE_IEC_60559. (_THRESH, _M_2_SQRTPI): Use GFC_REAL_17_LITERAL macro. (_ERFC, _EXP): Use different definitions if GFC_REAL_17_USE_IEC_60559. * intrinsics/spread_generic.c (spread, spread_scalar): Use _Float128 instead of __float128 in a comment. Fix a comment typo, logn double -> long double. * intrinsics/trigd.c (ENABLE_SIND, ENABLE_COSD, ENABLE_TAND): Handle GFC_REAL_16_USE_IEC_60559. * intrinsics/pack_generic.c (pack): Use _Float128 instead of __float128 in a comment. Fix a comment typo, logn double -> long double. * intrinsics/unpack_generic.c (unpack1, unpack0): Likewise. * runtime/in_pack_generic.c (internal_pack): Likewise. * runtime/in_unpack_generic.c (internal_unpack): Likewise. * io/read.c (convert_real, convert_infnan): Handle GFC_REAL_16_USE_IEC_60559 and GFC_REAL_17_USE_IEC_60559. * io/transfer128.c (tmp1, tmp2): Don't define if libquadmath isn't needed. * io/write_float.def (gfor_strfromf128): New function. (DTOA2Q, FDTOA2Q): Define differently if GFC_REAL_16_USE_IEC_60559 or GFC_REAL_17_USE_IEC_60559. * m4/mtype.m4: Use different suffix if GFC_REAL_16_USE_IEC_60559 or GFC_REAL_17_USE_IEC_60559. * config.h.in: Regenerated. * configure: Regenerated. * Makefile.in: Regenerated. * generated/bessel_r16.c: Regenerated. * generated/bessel_r17.c: Regenerated. * generated/norm2_r16.c: Regenerated. * generated/norm2_r17.c: Regenerated. --- gcc/fortran/gfortran.h | 3 +++ gcc/fortran/trans-intrinsic.cc | 15 ++++++++++----- gcc/fortran/trans-types.cc | 12 ++++++++++++ gcc/fortran/trans-types.h | 4 ++++ 4 files changed, 29 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 0bac865..463d969 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -2665,6 +2665,9 @@ typedef struct unsigned int c_double : 1; unsigned int c_long_double : 1; unsigned int c_float128 : 1; + /* True if for _Float128 C2X IEC 60559 *f128 APIs should be used + instead of libquadmath *q APIs. */ + unsigned int use_iec_60559 : 1; } gfc_real_info; diff --git a/gcc/fortran/trans-intrinsic.cc b/gcc/fortran/trans-intrinsic.cc index 6884060..9d91278 100644 --- a/gcc/fortran/trans-intrinsic.cc +++ b/gcc/fortran/trans-intrinsic.cc @@ -692,7 +692,7 @@ gfc_build_intrinsic_lib_fndecls (void) { /* If we have soft-float types, we create the decls for their C99-like library functions. For now, we only handle _Float128 - q-suffixed functions. */ + q-suffixed or IEC 60559 f128-suffixed functions. */ tree type, complex_type, func_1, func_2, func_cabs, func_frexp; tree func_iround, func_lround, func_llround, func_scalbn, func_cpow; @@ -739,7 +739,10 @@ gfc_build_intrinsic_lib_fndecls (void) builtin_decl_for_float_type(). The others are all constructed by gfc_get_intrinsic_lib_fndecl(). */ #define OTHER_BUILTIN(ID, NAME, TYPE, CONST) \ - quad_decls[BUILT_IN_ ## ID] = define_quad_builtin (NAME "q", func_ ## TYPE, CONST); + quad_decls[BUILT_IN_ ## ID] \ + = define_quad_builtin (gfc_real16_use_iec_60559 \ + ? NAME "f128" : NAME "q", func_ ## TYPE, \ + CONST); #include "mathbuiltins.def" @@ -751,8 +754,9 @@ gfc_build_intrinsic_lib_fndecls (void) /* There is one built-in we defined manually, because it gets called with builtin_decl_for_precision() or builtin_decl_for_float_type() even though it is not an OTHER_BUILTIN: it is SQRT. */ - quad_decls[BUILT_IN_SQRT] = define_quad_builtin ("sqrtq", func_1, true); - + quad_decls[BUILT_IN_SQRT] + = define_quad_builtin (gfc_real16_use_iec_60559 + ? "sqrtf128" : "sqrtq", func_1, true); } /* Add GCC builtin functions. */ @@ -875,7 +879,8 @@ gfc_get_intrinsic_lib_fndecl (gfc_intrinsic_map_t * m, gfc_expr * expr) ts->type == BT_COMPLEX ? "c" : "", m->name, "l"); else if (gfc_real_kinds[n].c_float128) snprintf (name, sizeof (name), "%s%s%s", - ts->type == BT_COMPLEX ? "c" : "", m->name, "q"); + ts->type == BT_COMPLEX ? "c" : "", m->name, + gfc_real_kinds[n].use_iec_60559 ? "f128" : "q"); else gcc_unreachable (); } diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc index 3742bf3..0ea7c74 100644 --- a/gcc/fortran/trans-types.cc +++ b/gcc/fortran/trans-types.cc @@ -72,6 +72,7 @@ tree gfc_float128_type_node = NULL_TREE; tree gfc_complex_float128_type_node = NULL_TREE; bool gfc_real16_is_float128 = false; +bool gfc_real16_use_iec_60559 = false; static GTY(()) tree gfc_desc_dim_type; static GTY(()) tree gfc_max_array_element_size; @@ -522,6 +523,11 @@ gfc_init_kinds (void) && (TARGET_GLIBC_MAJOR < 2 || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR < 32))) { + if (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 26) + { + gfc_real16_use_iec_60559 = true; + gfc_real_kinds[i].use_iec_60559 = 1; + } gfc_real16_is_float128 = true; gfc_real_kinds[i].c_float128 = 1; } @@ -878,6 +884,12 @@ gfc_build_real_type (gfc_real_info *info) /* TODO: see PR101835. */ info->c_float128 = 1; gfc_real16_is_float128 = true; + if (TARGET_GLIBC_MAJOR > 2 + || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 26)) + { + info->use_iec_60559 = 1; + gfc_real16_use_iec_60559 = true; + } } if (TYPE_PRECISION (float_type_node) == mode_precision) diff --git a/gcc/fortran/trans-types.h b/gcc/fortran/trans-types.h index 09a51e6..6a360de 100644 --- a/gcc/fortran/trans-types.h +++ b/gcc/fortran/trans-types.h @@ -58,6 +58,10 @@ extern GTY(()) tree gfc_charlen_type_node; and _Float128. */ extern bool gfc_real16_is_float128; +/* True if IEC 60559 *f128 APIs should be used for _Float128 rather than + libquadmath *q APIs. */ +extern bool gfc_real16_use_iec_60559; + enum gfc_packed { PACKED_NO = 0, PACKED_PARTIAL, -- cgit v1.1 From eabd44a02529f7921a4997240aaaefb15f1ef81f Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 28 Jun 2022 09:41:07 -0300 Subject: Add TFLAGS to gcc's GCC_FOR_TARGET When the GCC build runs GCC_FOR_TARGET, e.g. for selftests or for dumping specs, it doesn't use TFLAGS in non-bootstrap scenarios. This patch arranges for TFLAGS to be passed from the top level down to gcc in GCC_FOR_TARGET in this case. Another issue related with TFLAGS fixed herein is that there's no easy way to add a TFLAGS to GCC_FOR_TARGET when running "make gnatlib" within the gcc directory. Overriding all of GCC_FOR_TARGET is somewhat cumbersome, so I'm adding TFLAGS support to gcc/Makefile.in, getting it added to GCC_FOR_TARGET, as it would when passed down from the top level. for ChangeLog * Makefile.tpl (HOST_EXPORTS): Add TFLAGS to GCC_FOR_TARGET. (EXTRA_GCC_FLAGS): Likewise. * Makefile.in: Rebuilt. for gcc/ChangeLog * Makefile.in (TFLAGS): New. (GCC_FOR_TARGET): Add TFLAGS. (FLAGS_TO_PASS): Pass TFLAGS down. --- gcc/Makefile.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/Makefile.in b/gcc/Makefile.in index b6dcc45..57edc47 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -146,8 +146,11 @@ endif # CFLAGS is for the user to override to, e.g., do a cross build with -O2. # TCFLAGS is used for compilations with the GCC just built. # T_CFLAGS is used for all compilations and is overridden by t-* files. +# TFLAGS is also for the user to override, passed down from the top-level +# Makefile. It is used for all compilations. T_CFLAGS = TCFLAGS = +TFLAGS = CFLAGS = @CFLAGS@ CXXFLAGS = @CXXFLAGS@ LDFLAGS = @LDFLAGS@ @@ -457,7 +460,7 @@ T_STDINT_GCC_H = $(srcdir)/ginclude/stdint-gcc.h # The GCC to use for compiling crt*.o. # Usually the one we just built. # Don't use this as a dependency--use $(GCC_PASSES). -GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include -L$(objdir)/../ld +GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) ./xgcc -B./ -B$(build_tooldir)/bin/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include -L$(objdir)/../ld $(TFLAGS) # Set if the compiler was configured with --with-build-sysroot. SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ @@ -1193,6 +1196,7 @@ FLAGS_TO_PASS = \ "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ "MAKEOVERRIDES=" \ "SHELL=$(SHELL)" \ + "TFLAGS=$(TFLAGS)" \ "exeext=$(exeext)" \ "build_exeext=$(build_exeext)" \ "objext=$(objext)" \ -- cgit v1.1 From 243b5396106c4b1eb813fd06c2bc6f0a3009bae8 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 27 Jun 2022 18:40:23 +0200 Subject: Remove legacy EVRP code. With DOM converted to ranger, there are no longer any uses of the EVRP engine. For that matter, we haven't used the legacy mode in quite a while, so I think it's safe to remove any associated code. There are some methods in vr_values which should now be private, but I didn't bother changing them, as most of the vr_values class will be removed when VRP1 is converted to ranger. Tested on x86-64 Linux. gcc/ChangeLog: * Makefile.in: Remove gimple-ssa-evrp.o and gimple-ssa-evrp-analyze.o. * flag-types.h (enum evrp_mode): Remove. * params.opt: Remove --param=evrp-mode. * tree-vrp.cc (make_pass_early_vrp): New. (pass_vrp::execute): Call early VRP instance. * gimple-ssa-evrp-analyze.cc: Removed. * gimple-ssa-evrp-analyze.h: Removed. * gimple-ssa-evrp.cc: Removed. gcc/testsuite/ChangeLog: * g++.dg/pr100774.C: Remove --param=evrp-mode. * gcc.dg/pr100781.c: Same. --- gcc/Makefile.in | 2 - gcc/flag-types.h | 9 - gcc/gimple-ssa-evrp-analyze.cc | 456 ---------------------------------------- gcc/gimple-ssa-evrp-analyze.h | 58 ----- gcc/gimple-ssa-evrp.cc | 395 ---------------------------------- gcc/params.opt | 19 -- gcc/testsuite/g++.dg/pr100774.C | 2 +- gcc/testsuite/gcc.dg/pr100781.c | 2 +- gcc/tree-vrp.cc | 34 ++- 9 files changed, 31 insertions(+), 946 deletions(-) delete mode 100644 gcc/gimple-ssa-evrp-analyze.cc delete mode 100644 gcc/gimple-ssa-evrp-analyze.h delete mode 100644 gcc/gimple-ssa-evrp.cc (limited to 'gcc') diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 57edc47..a82909d 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1417,8 +1417,6 @@ OBJS = \ gimple-range-infer.o \ gimple-range-trace.o \ gimple-ssa-backprop.o \ - gimple-ssa-evrp.o \ - gimple-ssa-evrp-analyze.o \ gimple-ssa-isolate-paths.o \ gimple-ssa-nonnull-compare.o \ gimple-ssa-split-paths.o \ diff --git a/gcc/flag-types.h b/gcc/flag-types.h index 2c84981..a11f99a 100644 --- a/gcc/flag-types.h +++ b/gcc/flag-types.h @@ -479,15 +479,6 @@ enum threader_debug THREADER_DEBUG_ALL = 1 }; -/* EVRP mode. */ -enum evrp_mode -{ - EVRP_MODE_RVRP_ONLY, - EVRP_MODE_EVRP_ONLY, - EVRP_MODE_EVRP_FIRST, - EVRP_MODE_RVRP_FIRST -}; - /* VRP modes. */ enum vrp_mode { diff --git a/gcc/gimple-ssa-evrp-analyze.cc b/gcc/gimple-ssa-evrp-analyze.cc deleted file mode 100644 index 82142db..0000000 --- a/gcc/gimple-ssa-evrp-analyze.cc +++ /dev/null @@ -1,456 +0,0 @@ -/* Support routines for Value Range Propagation (VRP). - Copyright (C) 2005-2022 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "tree.h" -#include "gimple.h" -#include "tree-pass.h" -#include "ssa.h" -#include "gimple-pretty-print.h" -#include "cfganal.h" -#include "gimple-iterator.h" -#include "gimple-fold.h" -#include "tree-eh.h" -#include "tree-cfg.h" -#include "tree-ssa-loop-manip.h" -#include "tree-ssa-loop.h" -#include "cfgloop.h" -#include "tree-scalar-evolution.h" -#include "tree-ssa-propagate.h" -#include "alloc-pool.h" -#include "domwalk.h" -#include "tree-cfgcleanup.h" -#include "vr-values.h" -#include "gimple-ssa-evrp-analyze.h" - -evrp_range_analyzer::evrp_range_analyzer (bool update_global_ranges) - : stack (10), m_update_global_ranges (update_global_ranges) -{ - edge e; - edge_iterator ei; - basic_block bb; - FOR_EACH_BB_FN (bb, cfun) - { - bb->flags &= ~BB_VISITED; - FOR_EACH_EDGE (e, ei, bb->preds) - e->flags |= EDGE_EXECUTABLE; - } -} - -/* Push an unwinding marker onto the unwinding stack. */ - -void -evrp_range_analyzer::push_marker () -{ - stack.safe_push (std::make_pair (NULL_TREE, (value_range_equiv *)NULL)); -} - -/* Analyze ranges as we enter basic block BB. */ - -void -evrp_range_analyzer::enter (basic_block bb) -{ - if (!optimize) - return; - push_marker (); - record_ranges_from_incoming_edge (bb); - record_ranges_from_phis (bb); - bb->flags |= BB_VISITED; -} - -/* Find new range for NAME such that (OP CODE LIMIT) is true. */ -value_range_equiv * -evrp_range_analyzer::try_find_new_range (tree name, - tree op, tree_code code, tree limit) -{ - value_range_equiv vr; - const value_range_equiv *old_vr = get_value_range (name); - - /* Discover VR when condition is true. */ - extract_range_for_var_from_comparison_expr (name, code, op, limit, &vr); - /* If we found any usable VR, set the VR to ssa_name and create a - PUSH old value in the stack with the old VR. */ - if (!vr.undefined_p () && !vr.varying_p ()) - { - if (old_vr->equal_p (vr, /*ignore_equivs=*/true)) - return NULL; - value_range_equiv *new_vr = allocate_value_range_equiv (); - new_vr->move (&vr); - return new_vr; - } - return NULL; -} - -/* For LHS record VR in the SSA info. */ -void -evrp_range_analyzer::set_ssa_range_info (tree lhs, value_range_equiv *vr) -{ - gcc_assert (m_update_global_ranges); - - /* Set the SSA with the value range. */ - if (INTEGRAL_TYPE_P (TREE_TYPE (lhs))) - { - if (!vr->varying_p () && vr->constant_p ()) - set_range_info (lhs, *vr); - } - else if (POINTER_TYPE_P (TREE_TYPE (lhs)) - && range_includes_zero_p (vr) == 0) - set_ptr_nonnull (lhs); -} - -/* Return true if all uses of NAME are dominated by STMT or feed STMT - via a chain of single immediate uses. */ - -static bool -all_uses_feed_or_dominated_by_stmt (tree name, gimple *stmt) -{ - use_operand_p use_p, use2_p; - imm_use_iterator iter; - basic_block stmt_bb = gimple_bb (stmt); - - FOR_EACH_IMM_USE_FAST (use_p, iter, name) - { - gimple *use_stmt = USE_STMT (use_p), *use_stmt2; - if (use_stmt == stmt - || is_gimple_debug (use_stmt) - || (gimple_bb (use_stmt) != stmt_bb - && dominated_by_p (CDI_DOMINATORS, - gimple_bb (use_stmt), stmt_bb))) - continue; - while (use_stmt != stmt - && is_gimple_assign (use_stmt) - && TREE_CODE (gimple_assign_lhs (use_stmt)) == SSA_NAME - && single_imm_use (gimple_assign_lhs (use_stmt), - &use2_p, &use_stmt2)) - use_stmt = use_stmt2; - if (use_stmt != stmt) - return false; - } - return true; -} - -void -evrp_range_analyzer::record_ranges_from_incoming_edge (basic_block bb) -{ - edge pred_e = single_pred_edge_ignoring_loop_edges (bb, false); - if (pred_e) - { - gimple *stmt = last_stmt (pred_e->src); - tree op0 = NULL_TREE; - - if (stmt - && gimple_code (stmt) == GIMPLE_COND - && (op0 = gimple_cond_lhs (stmt)) - && TREE_CODE (op0) == SSA_NAME - && (INTEGRAL_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt))) - || POINTER_TYPE_P (TREE_TYPE (gimple_cond_lhs (stmt))))) - { - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "Visiting controlling predicate "); - print_gimple_stmt (dump_file, stmt, 0); - } - /* Entering a new scope. Try to see if we can find a VR - here. */ - tree op1 = gimple_cond_rhs (stmt); - if (TREE_OVERFLOW_P (op1)) - op1 = drop_tree_overflow (op1); - tree_code code = gimple_cond_code (stmt); - - auto_vec asserts; - register_edge_assert_for (op0, pred_e, code, op0, op1, asserts); - if (TREE_CODE (op1) == SSA_NAME) - register_edge_assert_for (op1, pred_e, code, op0, op1, asserts); - - auto_vec, 8> vrs; - for (unsigned i = 0; i < asserts.length (); ++i) - { - value_range_equiv *vr - = try_find_new_range (asserts[i].name, - asserts[i].expr, - asserts[i].comp_code, - asserts[i].val); - if (vr) - vrs.safe_push (std::make_pair (asserts[i].name, vr)); - } - - /* If pred_e is really a fallthru we can record value ranges - in SSA names as well. */ - bool is_fallthru = assert_unreachable_fallthru_edge_p (pred_e); - - /* Push updated ranges only after finding all of them to avoid - ordering issues that can lead to worse ranges. */ - for (unsigned i = 0; i < vrs.length (); ++i) - { - /* But make sure we do not weaken ranges like when - getting first [64, +INF] and then ~[0, 0] from - conditions like (s & 0x3cc0) == 0). */ - const value_range_equiv *old_vr - = get_value_range (vrs[i].first); - value_range tem (*old_vr); - tem.legacy_verbose_intersect (vrs[i].second); - if (tem.equal_p (*old_vr)) - { - free_value_range (vrs[i].second); - continue; - } - push_value_range (vrs[i].first, vrs[i].second); - if (is_fallthru - && m_update_global_ranges - && all_uses_feed_or_dominated_by_stmt (vrs[i].first, stmt) - /* The condition must post-dominate the definition point. */ - && (SSA_NAME_IS_DEFAULT_DEF (vrs[i].first) - || (gimple_bb (SSA_NAME_DEF_STMT (vrs[i].first)) - == pred_e->src))) - { - set_ssa_range_info (vrs[i].first, vrs[i].second); - maybe_set_nonzero_bits (pred_e, vrs[i].first); - } - } - } - } -} - -void -evrp_range_analyzer::record_ranges_from_phis (basic_block bb) -{ - /* Visit PHI stmts and discover any new VRs possible. */ - bool has_unvisited_preds = false; - edge_iterator ei; - edge e; - FOR_EACH_EDGE (e, ei, bb->preds) - if (e->flags & EDGE_EXECUTABLE - && !(e->src->flags & BB_VISITED)) - { - has_unvisited_preds = true; - break; - } - - for (gphi_iterator gpi = gsi_start_phis (bb); - !gsi_end_p (gpi); gsi_next (&gpi)) - { - gphi *phi = gpi.phi (); - tree lhs = PHI_RESULT (phi); - if (virtual_operand_p (lhs)) - continue; - - /* Skips floats and other things we can't represent in a - range. */ - if (!value_range_equiv::supports_p (TREE_TYPE (lhs))) - continue; - - value_range_equiv vr_result; - bool interesting = stmt_interesting_for_vrp (phi); - if (!has_unvisited_preds && interesting) - extract_range_from_phi_node (phi, &vr_result); - else - { - vr_result.set_varying (TREE_TYPE (lhs)); - /* When we have an unvisited executable predecessor we can't - use PHI arg ranges which may be still UNDEFINED but have - to use VARYING for them. But we can still resort to - SCEV for loop header PHIs. */ - class loop *l; - if (scev_initialized_p () - && interesting - && (l = loop_containing_stmt (phi)) - && l->header == gimple_bb (phi)) - adjust_range_with_scev (&vr_result, l, phi, lhs); - } - update_value_range (lhs, &vr_result); - - /* Set the SSA with the value range. */ - if (m_update_global_ranges) - set_ssa_range_info (lhs, &vr_result); - } -} - -/* Record ranges from STMT into our VR_VALUES class. If TEMPORARY is - true, then this is a temporary equivalence and should be recorded - into the unwind table. Othewise record the equivalence into the - global table. */ - -void -evrp_range_analyzer::record_ranges_from_stmt (gimple *stmt, bool temporary) -{ - tree output = NULL_TREE; - - if (!optimize) - return; - - if (dyn_cast (stmt)) - ; - else if (stmt_interesting_for_vrp (stmt)) - { - edge taken_edge; - value_range_equiv vr; - extract_range_from_stmt (stmt, &taken_edge, &output, &vr); - if (output) - { - /* Set the SSA with the value range. There are two cases to - consider. First (the the most common) is we are processing - STMT in a context where its resulting range globally holds - and thus it can be reflected into the global ranges and need - not be unwound as we leave scope. - - The second case occurs if we are processing a statement in - a context where the resulting range must not be reflected - into the global tables and must be unwound as we leave - the current context. This happens in jump threading for - example. */ - if (!temporary) - { - /* Case one. We can just update the underlying range - information as well as the global information. */ - update_value_range (output, &vr); - if (m_update_global_ranges) - set_ssa_range_info (output, &vr); - } - else - { - /* We're going to need to unwind this range. We cannot - use VR as that's a stack object. We have to allocate - a new range and push the old range onto the stack. We - also have to be very careful about sharing the underlying - bitmaps. Ugh. */ - value_range_equiv *new_vr = allocate_value_range_equiv (); - new_vr->set (vr.min (), vr.max (), NULL, vr.kind ()); - vr.equiv_clear (); - push_value_range (output, new_vr); - } - } - else - set_defs_to_varying (stmt); - } - else - set_defs_to_varying (stmt); - - /* See if we can derive a range for any of STMT's operands. */ - tree op; - ssa_op_iter i; - FOR_EACH_SSA_TREE_OPERAND (op, stmt, i, SSA_OP_USE) - { - tree value; - enum tree_code comp_code; - - /* If OP is used in such a way that we can infer a value - range for it, and we don't find a previous assertion for - it, create a new assertion location node for OP. */ - if (infer_value_range (stmt, op, &comp_code, &value)) - { - /* If we are able to infer a nonzero value range for OP, - then walk backwards through the use-def chain to see if OP - was set via a typecast. - If so, then we can also infer a nonzero value range - for the operand of the NOP_EXPR. */ - if (comp_code == NE_EXPR && integer_zerop (value)) - { - tree t = op; - gimple *def_stmt = SSA_NAME_DEF_STMT (t); - while (is_gimple_assign (def_stmt) - && CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt)) - && TREE_CODE - (gimple_assign_rhs1 (def_stmt)) == SSA_NAME - && POINTER_TYPE_P - (TREE_TYPE (gimple_assign_rhs1 (def_stmt)))) - { - t = gimple_assign_rhs1 (def_stmt); - def_stmt = SSA_NAME_DEF_STMT (t); - - /* Add VR when (T COMP_CODE value) condition is - true. */ - value_range_equiv *op_range - = try_find_new_range (t, t, comp_code, value); - if (op_range) - push_value_range (t, op_range); - } - } - /* Add VR when (OP COMP_CODE value) condition is true. */ - value_range_equiv *op_range = try_find_new_range (op, op, - comp_code, value); - if (op_range) - push_value_range (op, op_range); - } - } -} - -/* Unwind recorded ranges to their most recent state. */ - -void -evrp_range_analyzer::pop_to_marker (void) -{ - gcc_checking_assert (!stack.is_empty ()); - while (stack.last ().first != NULL_TREE) - pop_value_range (); - stack.pop (); -} - -/* Restore/pop VRs valid only for BB when we leave BB. */ - -void -evrp_range_analyzer::leave (basic_block bb ATTRIBUTE_UNUSED) -{ - if (!optimize) - return; - pop_to_marker (); -} - - -/* Push the Value Range of VAR to the stack and update it with new VR. */ - -void -evrp_range_analyzer::push_value_range (tree var, value_range_equiv *vr) -{ - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "pushing new range for "); - print_generic_expr (dump_file, var); - fprintf (dump_file, ": "); - dump_value_range (dump_file, vr); - fprintf (dump_file, "\n"); - } - value_range_equiv *old_vr = swap_vr_value (var, vr); - stack.safe_push (std::make_pair (var, old_vr)); -} - -/* Pop a Value Range from the vrp_stack. */ - -void -evrp_range_analyzer::pop_value_range () -{ - std::pair e = stack.pop (); - tree var = e.first; - value_range_equiv *vr = e.second; - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "popping range for "); - print_generic_expr (dump_file, var); - fprintf (dump_file, ", restoring "); - dump_value_range (dump_file, vr); - fprintf (dump_file, "\n"); - } - /* We saved off a lattice entry, now give it back and release - the one we popped. */ - value_range_equiv *popped_vr = swap_vr_value (var, vr); - if (popped_vr) - free_value_range (popped_vr); -} diff --git a/gcc/gimple-ssa-evrp-analyze.h b/gcc/gimple-ssa-evrp-analyze.h deleted file mode 100644 index 51c3209..0000000 --- a/gcc/gimple-ssa-evrp-analyze.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Support routines for Value Range Propagation (VRP). - Copyright (C) 2016-2022 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -#ifndef GCC_GIMPLE_SSA_EVRP_ANALYZE_H -#define GCC_GIMPLE_SSA_EVRP_ANALYZE_H - -class evrp_range_analyzer : public vr_values -{ - public: - evrp_range_analyzer (bool update_global_ranges); - ~evrp_range_analyzer (void) - { - stack.release (); - } - - void enter (basic_block); - void push_marker (void); - void pop_to_marker (void); - void leave (basic_block); - void record_ranges_from_stmt (gimple *, bool); - - /* Record a new unwindable range. */ - void push_value_range (tree var, value_range_equiv *vr); - - private: - DISABLE_COPY_AND_ASSIGN (evrp_range_analyzer); - - void pop_value_range (); - value_range_equiv *try_find_new_range (tree, tree op, tree_code code, - tree limit); - void record_ranges_from_incoming_edge (basic_block); - void record_ranges_from_phis (basic_block); - void set_ssa_range_info (tree, value_range_equiv *); - - /* STACK holds the old VR. */ - auto_vec > stack; - - /* True if we are updating global ranges, false otherwise. */ - bool m_update_global_ranges; -}; - -#endif /* GCC_GIMPLE_SSA_EVRP_ANALYZE_H */ diff --git a/gcc/gimple-ssa-evrp.cc b/gcc/gimple-ssa-evrp.cc deleted file mode 100644 index 793a3ea..0000000 --- a/gcc/gimple-ssa-evrp.cc +++ /dev/null @@ -1,395 +0,0 @@ -/* Support routines for Value Range Propagation (VRP). - Copyright (C) 2005-2022 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "backend.h" -#include "tree.h" -#include "gimple.h" -#include "tree-pass.h" -#include "ssa.h" -#include "gimple-pretty-print.h" -#include "cfganal.h" -#include "gimple-iterator.h" -#include "gimple-fold.h" -#include "tree-eh.h" -#include "tree-cfg.h" -#include "tree-ssa-loop-manip.h" -#include "tree-ssa-loop.h" -#include "cfgloop.h" -#include "tree-scalar-evolution.h" -#include "tree-ssa-propagate.h" -#include "alloc-pool.h" -#include "domwalk.h" -#include "tree-cfgcleanup.h" -#include "vr-values.h" -#include "gimple-ssa-evrp-analyze.h" -#include "gimple-range.h" -#include "fold-const.h" -#include "value-pointer-equiv.h" -#include "tree-vrp.h" - -// This is the classic EVRP folder which uses a dominator walk and pushes -// ranges into the next block if it is a single predecessor block. - -class evrp_folder : public substitute_and_fold_engine -{ -public: - evrp_folder () : - substitute_and_fold_engine (), - m_range_analyzer (/*update_global_ranges=*/true), - simplifier (&m_range_analyzer) - { } - - ~evrp_folder () - { - if (dump_file) - { - fprintf (dump_file, "\nValue ranges after Early VRP:\n\n"); - m_range_analyzer.dump (dump_file); - fprintf (dump_file, "\n"); - } - } - - tree value_of_expr (tree name, gimple *stmt) override - { - return m_range_analyzer.value_of_expr (name, stmt); - } - - void pre_fold_bb (basic_block bb) override - { - if (dump_file && (dump_flags & TDF_DETAILS)) - fprintf (dump_file, "evrp visiting BB%d\n", bb->index); - m_range_analyzer.enter (bb); - } - - void pre_fold_stmt (gimple *stmt) override - { - if (dump_file && (dump_flags & TDF_DETAILS)) - { - fprintf (dump_file, "evrp visiting stmt "); - print_gimple_stmt (dump_file, stmt, 0); - } - m_range_analyzer.record_ranges_from_stmt (stmt, false); - } - - bool fold_stmt (gimple_stmt_iterator *gsi) override - { - return simplifier.simplify (gsi); - } - - void post_fold_bb (basic_block bb) override - { - m_range_analyzer.leave (bb); - } - - void post_new_stmt (gimple *stmt) override - { - m_range_analyzer.set_defs_to_varying (stmt); - } - -protected: - DISABLE_COPY_AND_ASSIGN (evrp_folder); - evrp_range_analyzer m_range_analyzer; - simplify_using_ranges simplifier; -}; - -// In a hybrid folder, start with an EVRP folder, and add the required -// fold_stmt bits to either try the ranger first or second. -// -// The 3 value_* routines will always query both EVRP and the ranger for -// a result, and ensure they return the same value. If either returns a value -// when the other doesn't, it is flagged in the listing, and the discoverd -// value is returned. -// -// The simplifier is unable to process 2 different sources, thus we try to -// use one engine, and if it fails to simplify, try using the other engine. -// It is reported when the first attempt fails and the second succeeds. - -class hybrid_folder : public evrp_folder -{ -public: - hybrid_folder (bool evrp_first) - { - m_ranger = enable_ranger (cfun); - - if (evrp_first) - { - first = &m_range_analyzer; - first_exec_flag = 0; - second = m_ranger; - second_exec_flag = m_ranger->non_executable_edge_flag; - } - else - { - first = m_ranger; - first_exec_flag = m_ranger->non_executable_edge_flag; - second = &m_range_analyzer; - second_exec_flag = 0; - } - m_pta = new pointer_equiv_analyzer (m_ranger); - } - - ~hybrid_folder () - { - if (dump_file && (dump_flags & TDF_DETAILS)) - m_ranger->dump (dump_file); - - m_ranger->export_global_ranges (); - disable_ranger (cfun); - delete m_pta; - } - - bool fold_stmt (gimple_stmt_iterator *gsi) override - { - simplifier.set_range_query (first, first_exec_flag); - if (simplifier.simplify (gsi)) - return true; - - simplifier.set_range_query (second, second_exec_flag); - if (simplifier.simplify (gsi)) - { - if (dump_file) - fprintf (dump_file, "EVRP:hybrid: Second query simplifed stmt\n"); - return true; - } - return false; - } - - void pre_fold_stmt (gimple *stmt) override - { - evrp_folder::pre_fold_stmt (stmt); - m_pta->visit_stmt (stmt); - } - - void pre_fold_bb (basic_block bb) override - { - evrp_folder::pre_fold_bb (bb); - m_pta->enter (bb); - } - - void post_fold_bb (basic_block bb) override - { - evrp_folder::post_fold_bb (bb); - m_pta->leave (bb); - } - - tree value_of_expr (tree name, gimple *) override; - tree value_on_edge (edge, tree name) override; - tree value_of_stmt (gimple *, tree name) override; - -private: - DISABLE_COPY_AND_ASSIGN (hybrid_folder); - gimple_ranger *m_ranger; - range_query *first; - int first_exec_flag; - range_query *second; - int second_exec_flag; - pointer_equiv_analyzer *m_pta; - tree choose_value (tree evrp_val, tree ranger_val); -}; - - -tree -hybrid_folder::value_of_expr (tree op, gimple *stmt) -{ - tree evrp_ret = evrp_folder::value_of_expr (op, stmt); - tree ranger_ret; - if (TREE_CODE (op) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op)) - ranger_ret = NULL; - else - { - ranger_ret = m_ranger->value_of_expr (op, stmt); - if (!ranger_ret && supported_pointer_equiv_p (op)) - ranger_ret = m_pta->get_equiv (op); - } - return choose_value (evrp_ret, ranger_ret); -} - -tree -hybrid_folder::value_on_edge (edge e, tree op) -{ - // Call evrp::value_of_expr directly. Otherwise another dual call is made - // via hybrid_folder::value_of_expr, but without an edge. - tree evrp_ret = evrp_folder::value_of_expr (op, NULL); - tree ranger_ret; - if (TREE_CODE (op) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op)) - ranger_ret = NULL; - else - { - ranger_ret = m_ranger->value_on_edge (e, op); - if (!ranger_ret && supported_pointer_equiv_p (op)) - ranger_ret = m_pta->get_equiv (op); - } - return choose_value (evrp_ret, ranger_ret); -} - -tree -hybrid_folder::value_of_stmt (gimple *stmt, tree op) -{ - // Call evrp::value_of_expr directly. Otherwise another dual call is made - // via hybrid_folder::value_of_expr, but without a stmt. - tree evrp_ret; - if (op) - evrp_ret = evrp_folder::value_of_expr (op, NULL); - else - evrp_ret = NULL_TREE; - - tree ranger_ret; - if (op && TREE_CODE (op) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op)) - ranger_ret = NULL; - else - ranger_ret = m_ranger->value_of_stmt (stmt, op); - return choose_value (evrp_ret, ranger_ret); -} - -// Given trees returned by EVRP and Ranger, choose/report the value to use -// by the folder. - -tree -hybrid_folder::choose_value (tree evrp_val, tree ranger_val) -{ - // If both found the same value, just return it. - if (evrp_val && ranger_val && !compare_values (evrp_val, ranger_val)) - return evrp_val; - - // If neither returned a value, return NULL_TREE. - if (!ranger_val && !evrp_val) - return NULL_TREE; - - // Otherwise there is a discrepancy to flag. - if (dump_file) - { - if (evrp_val && ranger_val) - fprintf (dump_file, "EVRP:hybrid: Disagreement\n"); - if (evrp_val) - { - fprintf (dump_file, "EVRP:hybrid: EVRP found singleton "); - print_generic_expr (dump_file, evrp_val); - fprintf (dump_file, "\n"); - } - if (ranger_val) - { - fprintf (dump_file, "EVRP:hybrid: RVRP found singleton "); - print_generic_expr (dump_file, ranger_val); - fprintf (dump_file, "\n"); - } - } - - // If one value was found, return it. - if (!evrp_val) - return ranger_val; - if (!ranger_val) - return evrp_val; - - // If values are different, return the first calculated value. - if (param_evrp_mode == EVRP_MODE_RVRP_FIRST) - return ranger_val; - return evrp_val; -} - -/* Main entry point for the early vrp pass which is a simplified non-iterative - version of vrp where basic blocks are visited in dominance order. Value - ranges discovered in early vrp will also be used by ipa-vrp. */ - -static unsigned int -execute_early_vrp () -{ - if (param_evrp_mode == EVRP_MODE_RVRP_ONLY) - return execute_ranger_vrp (cfun, false); - - /* Ideally this setup code would move into the ctor for the folder - However, this setup can change the number of blocks which - invalidates the internal arrays that are set up by the dominator - walker in substitute_and_fold_engine. */ - loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS); - rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa); - scev_initialize (); - calculate_dominance_info (CDI_DOMINATORS); - - // Only the last 2 bits matter for choosing the folder. - switch (param_evrp_mode) - { - case EVRP_MODE_EVRP_ONLY: - { - evrp_folder folder; - folder.substitute_and_fold (); - break; - } - case EVRP_MODE_EVRP_FIRST: - { - hybrid_folder folder (true); - folder.substitute_and_fold (); - break; - } - case EVRP_MODE_RVRP_FIRST: - { - hybrid_folder folder (false); - folder.substitute_and_fold (); - break; - } - default: - gcc_unreachable (); - } - - scev_finalize (); - loop_optimizer_finalize (); - return 0; -} - -namespace { - -const pass_data pass_data_early_vrp = -{ - GIMPLE_PASS, /* type */ - "evrp", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - TV_TREE_EARLY_VRP, /* tv_id */ - PROP_ssa, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - ( TODO_cleanup_cfg | TODO_update_ssa | TODO_verify_all ), -}; - -class pass_early_vrp : public gimple_opt_pass -{ -public: - pass_early_vrp (gcc::context *ctxt) - : gimple_opt_pass (pass_data_early_vrp, ctxt) - {} - - /* opt_pass methods: */ - opt_pass * clone () final override { return new pass_early_vrp (m_ctxt); } - bool gate (function *) final override - { - return flag_tree_vrp != 0; - } - unsigned int execute (function *) final override - { return execute_early_vrp (); } - -}; // class pass_vrp -} // anon namespace - -gimple_opt_pass * -make_pass_early_vrp (gcc::context *ctxt) -{ - return new pass_early_vrp (ctxt); -} diff --git a/gcc/params.opt b/gcc/params.opt index bcf1423..2f9c9cf 100644 --- a/gcc/params.opt +++ b/gcc/params.opt @@ -134,25 +134,6 @@ Maximum number of basic blocks before EVRP uses a sparse cache. Common Joined UInteger Var(param_evrp_switch_limit) Init(50) Optimization Param Maximum number of outgoing edges in a switch before EVRP will not process it. --param=evrp-mode= -Common Joined Var(param_evrp_mode) Enum(evrp_mode) Init(EVRP_MODE_RVRP_ONLY) Param Optimization ---param=evrp-mode=[legacy|ranger|legacy-first|ranger-first] Specifies the mode Early VRP should operate in. - -Enum -Name(evrp_mode) Type(enum evrp_mode) UnknownError(unknown evrp mode %qs) - -EnumValue -Enum(evrp_mode) String(legacy) Value(EVRP_MODE_EVRP_ONLY) - -EnumValue -Enum(evrp_mode) String(ranger) Value(EVRP_MODE_RVRP_ONLY) - -EnumValue -Enum(evrp_mode) String(legacy-first) Value(EVRP_MODE_EVRP_FIRST) - -EnumValue -Enum(evrp_mode) String(ranger-first) Value(EVRP_MODE_RVRP_FIRST) - -param=fsm-scale-path-blocks= Common Joined UInteger Var(param_fsm_scale_path_blocks) Init(3) IntegerRange(1, 10) Param Optimization Scale factor to apply to the number of blocks in a threading path when comparing to the number of (scaled) statements. diff --git a/gcc/testsuite/g++.dg/pr100774.C b/gcc/testsuite/g++.dg/pr100774.C index 345fcfa..63320ef 100644 --- a/gcc/testsuite/g++.dg/pr100774.C +++ b/gcc/testsuite/g++.dg/pr100774.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fno-tree-forwprop --param=evrp-mode=ranger -fcompare-debug " } */ +/* { dg-options "-O2 -fno-tree-forwprop -fcompare-debug " } */ extern void __attribute__((noreturn)) error(); diff --git a/gcc/testsuite/gcc.dg/pr100781.c b/gcc/testsuite/gcc.dg/pr100781.c index c0e008a..96f0a7a 100644 --- a/gcc/testsuite/gcc.dg/pr100781.c +++ b/gcc/testsuite/gcc.dg/pr100781.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 --param=evrp-mode=ranger -fcompare-debug " } */ +/* { dg-options "-O2 -fcompare-debug " } */ struct a { int b; diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc index ef7978d..2d15bb5 100644 --- a/gcc/tree-vrp.cc +++ b/gcc/tree-vrp.cc @@ -4388,17 +4388,30 @@ const pass_data pass_data_vrp = ( TODO_cleanup_cfg | TODO_update_ssa ), /* todo_flags_finish */ }; +const pass_data pass_data_early_vrp = +{ + GIMPLE_PASS, /* type */ + "evrp", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ + TV_TREE_EARLY_VRP, /* tv_id */ + PROP_ssa, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + ( TODO_cleanup_cfg | TODO_update_ssa | TODO_verify_all ), +}; + static int vrp_pass_num = 0; class pass_vrp : public gimple_opt_pass { public: - pass_vrp (gcc::context *ctxt) - : gimple_opt_pass (pass_data_vrp, ctxt), warn_array_bounds_p (false), - my_pass (++vrp_pass_num) + pass_vrp (gcc::context *ctxt, const pass_data &data_) + : gimple_opt_pass (data_, ctxt), data (data_), warn_array_bounds_p (false), + my_pass (vrp_pass_num++) {} /* opt_pass methods: */ - opt_pass * clone () final override { return new pass_vrp (m_ctxt); } + opt_pass * clone () final override { return new pass_vrp (m_ctxt, data); } void set_pass_param (unsigned int n, bool param) final override { gcc_assert (n == 0); @@ -4407,6 +4420,10 @@ public: bool gate (function *) final override { return flag_tree_vrp != 0; } unsigned int execute (function *fun) final override { + // Early VRP pass. + if (my_pass == 0) + return execute_ranger_vrp (fun, /*warn_array_bounds_p=*/false); + if ((my_pass == 1 && param_vrp1_mode == VRP_MODE_RANGER) || (my_pass == 2 && param_vrp2_mode == VRP_MODE_RANGER)) return execute_ranger_vrp (fun, warn_array_bounds_p); @@ -4414,6 +4431,7 @@ public: } private: + const pass_data &data; bool warn_array_bounds_p; int my_pass; }; // class pass_vrp @@ -4423,5 +4441,11 @@ public: gimple_opt_pass * make_pass_vrp (gcc::context *ctxt) { - return new pass_vrp (ctxt); + return new pass_vrp (ctxt, pass_data_vrp); +} + +gimple_opt_pass * +make_pass_early_vrp (gcc::context *ctxt) +{ + return new pass_vrp (ctxt, pass_data_early_vrp); } -- cgit v1.1 From 5745301983191f5a6fea9d05e36643e339dd2b52 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Sun, 3 Apr 2022 22:27:12 +0300 Subject: testsuite: Add new target check for no_alignment_constraints A few testcases were marked for avr target, which has no alignment requirements. But those tests in fact should filter for any target having __BIGGEST_ALIGNMENT__=1. A new effective target check is introduced: no_alignment_constraints. It checks whether __BIGGEST_ALIGNMENT__ is declared as 1. This change fixes the testsuite cases for PRU target. It was regression-tested on x86_64-pc-linux-gnu. The following two existing macros were considered, but they check for subtly different target behaviour: 1. non_strict_align If true, non-aligned access is permitted. But it also allows variables to be naturally aligned, which is not true for no_alignment_constraints. 2. default_packed Whether structures are packed by default is not necessarily the same as lacking constraints for non-aggregate types. For example, BIGGEST_FIELD_ALIGNMENT or ADJUST_FIELD_ALIGN could be defined for a target as something other than BIGGEST_ALIGNMENT. gcc/ChangeLog: * doc/sourcebuild.texi: Document new no_alignment_constraints effective target check. gcc/testsuite/ChangeLog: * c-c++-common/Wcast-align.c: Silence warnings for targets with no_alignment_constraints. * gcc.dg/c11-align-4.c: Skip for no_alignment_constraints. * gcc.dg/strlenopt-10.c: Replace checks for avr with checks for any target with no_alignment_constraints. * gcc.dg/strlenopt-11.c: Ditto. * gcc.dg/strlenopt-13.c: Ditto. * lib/target-supports.exp (check_effective_target_no_alignment_constraints): New. Signed-off-by: Dimitar Dimitrov --- gcc/doc/sourcebuild.texi | 9 +++++++++ gcc/testsuite/c-c++-common/Wcast-align.c | 4 ++-- gcc/testsuite/gcc.dg/c11-align-4.c | 2 +- gcc/testsuite/gcc.dg/strlenopt-10.c | 6 +++--- gcc/testsuite/gcc.dg/strlenopt-11.c | 14 +++++++------- gcc/testsuite/gcc.dg/strlenopt-13.c | 16 ++++++++-------- gcc/testsuite/lib/target-supports.exp | 13 +++++++++++++ 7 files changed, 43 insertions(+), 21 deletions(-) (limited to 'gcc') diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 3696a58..760ff95 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2716,6 +2716,7 @@ Target supports @option{-branch-cost=N}. Target uses @code{__cxa_atexit}. @item default_packed +@anchor{default_packed} Target has packed layout of structure members by default. @item exceptions @@ -2786,6 +2787,14 @@ Target uses natural alignment (aligned to type size) for types of Target uses natural alignment (aligned to type size) for types of 64 bits or less. +@item no_alignment_constraints +Target defines __BIGGEST_ALIGNMENT__=1. Hence target imposes +no alignment constraints. This is similar, but not necessarily +the same as @ref{default_packed}. Although @code{BIGGEST_FIELD_ALIGNMENT} +defaults to @code{BIGGEST_ALIGNMENT} for most targets, it is possible +for a target to set those two with different values and have different +alignment constraints for aggregate and non-aggregate types. + @item noinit Target supports the @code{noinit} variable attribute. diff --git a/gcc/testsuite/c-c++-common/Wcast-align.c b/gcc/testsuite/c-c++-common/Wcast-align.c index c296c7f..1087b10 100644 --- a/gcc/testsuite/c-c++-common/Wcast-align.c +++ b/gcc/testsuite/c-c++-common/Wcast-align.c @@ -16,8 +16,8 @@ struct t { double x; } *q; void foo (void) { - y = (c *) x; /* { dg-warning "7:cast \[^\n\r]* required alignment of target type" } */ - z = (d *) x; /* { dg-warning "7:cast \[^\n\r]* required alignment of target type" } */ + y = (c *) x; /* { dg-warning "7:cast \[^\n\r]* required alignment of target type" "" { target { ! no_alignment_constraints } } } */ + z = (d *) x; /* { dg-warning "7:cast \[^\n\r]* required alignment of target type" "" { target { ! no_alignment_constraints } } } */ (long long *) p; /* { dg-bogus "alignment" } */ (double *) q; /* { dg-bogus "alignment" } */ } diff --git a/gcc/testsuite/gcc.dg/c11-align-4.c b/gcc/testsuite/gcc.dg/c11-align-4.c index 57f93ff..eb9071b 100644 --- a/gcc/testsuite/gcc.dg/c11-align-4.c +++ b/gcc/testsuite/gcc.dg/c11-align-4.c @@ -2,7 +2,7 @@ are at least some alignment constraints). */ /* { dg-do compile } */ /* { dg-options "-std=c11 -pedantic-errors" } */ -/* { dg-skip-if "no alignment constraints" { "avr-*-*" } } */ +/* { dg-skip-if "no alignment constraints" { no_alignment_constraints } } */ #include diff --git a/gcc/testsuite/gcc.dg/strlenopt-10.c b/gcc/testsuite/gcc.dg/strlenopt-10.c index ce959c3..6e2c259 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-10.c +++ b/gcc/testsuite/gcc.dg/strlenopt-10.c @@ -70,10 +70,10 @@ main () } /* { dg-final { scan-tree-dump-times "strlen \\(" 2 "strlen1" } } */ -/* avr has BIGGEST_ALIGNMENT 8, allowing fold_builtin_memory_op +/* Some targets have BIGGEST_ALIGNMENT 8-bits, allowing fold_builtin_memory_op to expand the memcpy call at the end of fn2. */ -/* { dg-final { scan-tree-dump-times "memcpy \\(" 8 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen1" { target { avr-*-* } } } } */ +/* { dg-final { scan-tree-dump-times "memcpy \\(" 8 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen1" { target { no_alignment_constraints} } } } */ /* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen1" } } */ /* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen1" } } */ /* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen1" } } */ diff --git a/gcc/testsuite/gcc.dg/strlenopt-11.c b/gcc/testsuite/gcc.dg/strlenopt-11.c index abd9fae..952de07 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-11.c +++ b/gcc/testsuite/gcc.dg/strlenopt-11.c @@ -59,17 +59,17 @@ main () } /* { dg-final { scan-tree-dump-times "strlen \\(" 3 "strlen1" } } */ -/* avr has BIGGEST_ALIGNMENT 8, allowing fold_builtin_memory_op +/* Some targets have BIGGEST_ALIGNMENT 8-bits, allowing fold_builtin_memory_op to expand the memcpy call at the end of fn1. */ -/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times "memcpy \\(" 6 "strlen1" { target { avr-*-* } } } } */ +/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times "memcpy \\(" 6 "strlen1" { target { no_alignment_constraints } } } } */ /* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen1" } } */ /* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen1" } } */ /* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen1" } } */ /* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen1" } } */ /* Where the memcpy is expanded, the assignemts to elements of l are propagated. */ -/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.0. = " 1 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.6. = " 1 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.9. = " 1 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;" 3 "strlen1" { target { avr-*-* } } } } */ +/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.0. = " 1 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.6. = " 1 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.9. = " 1 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;" 3 "strlen1" { target { no_alignment_constraints } } } } */ diff --git a/gcc/testsuite/gcc.dg/strlenopt-13.c b/gcc/testsuite/gcc.dg/strlenopt-13.c index 27ecc79..4c6d526 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-13.c +++ b/gcc/testsuite/gcc.dg/strlenopt-13.c @@ -56,18 +56,18 @@ main () } /* { dg-final { scan-tree-dump-times "strlen \\(" 4 "strlen1" } } */ -/* avr has BIGGEST_ALIGNMENT 8, allowing fold_builtin_memory_op +/* Some targets have BIGGEST_ALIGNMENT 8-bits, allowing fold_builtin_memory_op to expand the memcpy call at the end of fn1. */ -/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times "memcpy \\(" 6 "strlen1" { target { avr-*-* } } } } */ +/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times "memcpy \\(" 6 "strlen1" { target { no_alignment_constraints } } } } */ /* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen1" } } */ /* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen1" } } */ /* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen1" } } */ /* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen1" } } */ /* Where the memcpy is expanded, the assignemts to elements of l are propagated. */ -/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.0. = " 1 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.1. = " 1 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.5. = " 1 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.6. = " 1 "strlen1" { target { ! avr-*-* } } } } */ -/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;" 4 "strlen1" { target { avr-*-* } } } } */ +/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.0. = " 1 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.1. = " 1 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.5. = " 1 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.6. = " 1 "strlen1" { target { ! no_alignment_constraints } } } } */ +/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;" 4 "strlen1" { target { no_alignment_constraints } } } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index e481a2a..48c5dda 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -7549,6 +7549,19 @@ proc check_effective_target_vect_aligned_arrays { } { return $et_vect_aligned_arrays } +# Return 1 if the biggest alignment required by target is 1 * BITS_PER_UNIT. +# In such case the target does not impose any alignment constraints. + +proc check_effective_target_no_alignment_constraints { } { + return [check_runtime_nocache no_alignment_constraints { + int + main (void) + { + return __BIGGEST_ALIGNMENT__ == 1 ? 0 : 1; + } + }] +} + # Return 1 if types of size 32 bit or less are naturally aligned # (aligned to their type-size), 0 otherwise. # -- cgit v1.1 From ed06274eacc17a224b87f23111d7ca874ea53b7c Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 27 Jun 2022 22:17:51 -0700 Subject: compiler: permit expressions of abstract bool to remain abstract Test case is https://go.dev/cl/414755. Fixes golang/go#51475 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/414735 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 16d274c..a0e386a 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -927528cdc112fc51e0d07ee79e7a1254b586eabe +28fe9fad4acb4e02083faf5503b06e3e6e8eecaf The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index f59f61d..aadca97 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -6829,11 +6829,12 @@ Binary_expression::do_determine_type(const Type_context* context) { if ((tleft->integer_type() != NULL && tright->integer_type() != NULL) || (tleft->float_type() != NULL && tright->float_type() != NULL) - || (tleft->complex_type() != NULL && tright->complex_type() != NULL)) + || (tleft->complex_type() != NULL && tright->complex_type() != NULL) + || (tleft->is_boolean_type() && tright->is_boolean_type())) { - // Both sides have an abstract integer, abstract float, or - // abstract complex type. Just let CONTEXT determine - // whether they may remain abstract or not. + // Both sides have an abstract integer, abstract float, + // abstract complex, or abstract boolean type. Just let + // CONTEXT determine whether they may remain abstract or not. } else if (tleft->complex_type() != NULL) subcontext.type = tleft; -- cgit v1.1 From 6201277441db4023b833e6d643de8077fe38ed6e Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sat, 25 Jun 2022 15:06:43 +0200 Subject: d: Add `@simd` and `@simd_clones` attributes to compiler and library The `@simd` attribute is equivalent to `__attribute__((simd))`, and `@simd_clones` is a convenience alias to allow specifying whether the compiler should generated masked or non-masked simd clones. gcc/d/ChangeLog: * d-attribs.cc (handle_omp_declare_simd_attribute): New function. (d_handle_simd_attribute): New function. (d_langhook_common_attribute_table): Add 'omp declare simd' attribute. (d_langhook_attribute_table): Add simd attribute. libphobos/ChangeLog: * libdruntime/gcc/attributes.d (simd): Define. gcc/testsuite/ChangeLog: * gdc.dg/attr_simd1.d: New test. * gdc.dg/attr_simd2.d: New test. --- gcc/d/d-attribs.cc | 65 +++++++++++++++++++++++++++++++++++++++ gcc/testsuite/gdc.dg/attr_simd1.d | 40 ++++++++++++++++++++++++ gcc/testsuite/gdc.dg/attr_simd2.d | 16 ++++++++++ 3 files changed, 121 insertions(+) create mode 100644 gcc/testsuite/gdc.dg/attr_simd1.d create mode 100644 gcc/testsuite/gdc.dg/attr_simd2.d (limited to 'gcc') diff --git a/gcc/d/d-attribs.cc b/gcc/d/d-attribs.cc index 1dd806f..04f7f16 100644 --- a/gcc/d/d-attribs.cc +++ b/gcc/d/d-attribs.cc @@ -58,6 +58,7 @@ static tree handle_type_generic_attribute (tree *, tree, tree, int, bool *); static tree handle_transaction_pure_attribute (tree *, tree, tree, int, bool *); static tree handle_returns_twice_attribute (tree *, tree, tree, int, bool *); static tree handle_fnspec_attribute (tree *, tree, tree, int, bool *); +static tree handle_omp_declare_simd_attribute (tree *, tree, tree, int, bool *); /* D attribute handlers for user defined attributes. */ static tree d_handle_noinline_attribute (tree *, tree, tree, int, bool *); @@ -80,6 +81,7 @@ static tree d_handle_restrict_attribute (tree *, tree, tree, int, bool *); static tree d_handle_used_attribute (tree *, tree, tree, int, bool *); static tree d_handle_visibility_attribute (tree *, tree, tree, int, bool *); static tree d_handle_no_sanitize_attribute (tree *, tree, tree, int, bool *); +static tree d_handle_simd_attribute (tree *, tree, tree, int, bool *); /* Helper to define attribute exclusions. */ #define ATTR_EXCL(name, function, type, variable) \ @@ -186,6 +188,8 @@ const attribute_spec d_langhook_common_attribute_table[] = handle_type_generic_attribute, NULL), ATTR_SPEC ("fn spec", 1, 1, false, true, true, false, handle_fnspec_attribute, NULL), + ATTR_SPEC ("omp declare simd", 0, -1, true, false, false, false, + handle_omp_declare_simd_attribute, NULL), ATTR_SPEC (NULL, 0, 0, false, false, false, false, NULL, NULL), }; @@ -228,6 +232,8 @@ const attribute_spec d_langhook_attribute_table[] = d_handle_register_attribute, NULL), ATTR_SPEC ("restrict", 0, 0, true, false, false, false, d_handle_restrict_attribute, NULL), + ATTR_SPEC ("simd", 0, 1, true, false, false, false, + d_handle_simd_attribute, NULL), ATTR_SPEC ("used", 0, 0, true, false, false, false, d_handle_used_attribute, NULL), ATTR_SPEC ("visibility", 1, 1, false, false, false, false, @@ -664,6 +670,16 @@ handle_fnspec_attribute (tree *, tree, tree args, int, bool *) return NULL_TREE; } +/* Handle an "omp declare simd" attribute; arguments as in + struct attribute_spec.handler. */ + +tree +handle_omp_declare_simd_attribute (tree *node, tree, tree, int, bool *) +{ + gcc_assert (TREE_CODE (*node) == FUNCTION_DECL); + return NULL_TREE; +} + /* Language specific attribute handlers. These functions take the arguments: (tree *node, tree name, tree args, int flags, bool *no_add_attrs) */ @@ -1474,6 +1490,55 @@ d_handle_restrict_attribute (tree *node, tree name, tree, int, return NULL_TREE; } +/* Handle a "simd" attribute; arguments as in + struct attribute_spec.handler. */ + +static tree +d_handle_simd_attribute (tree *node, tree name, tree args, int, + bool *no_add_attrs) +{ + if (TREE_CODE (*node) != FUNCTION_DECL) + { + warning (OPT_Wattributes, "%qE attribute ignored", name); + *no_add_attrs = true; + return NULL_TREE; + } + + tree omp_attr = get_identifier ("omp declare simd"); + tree omp_flags = NULL_TREE; + if (args) + { + tree id = TREE_VALUE (args); + + if (TREE_CODE (id) != STRING_CST) + { + error ("%qE attribute argument not a string constant", name); + *no_add_attrs = true; + return NULL_TREE; + } + + if (strcmp (TREE_STRING_POINTER (id), "notinbranch") == 0) + omp_flags = build_omp_clause (DECL_SOURCE_LOCATION (*node), + OMP_CLAUSE_NOTINBRANCH); + else if (strcmp (TREE_STRING_POINTER (id), "inbranch") == 0) + omp_flags = build_omp_clause (DECL_SOURCE_LOCATION (*node), + OMP_CLAUSE_INBRANCH); + else + { + error ("only % and % flags are " + "allowed for % attribute"); + *no_add_attrs = true; + return NULL_TREE; + } + } + + DECL_ATTRIBUTES (*node) = + tree_cons (omp_attr, build_tree_list (NULL_TREE, omp_flags), + DECL_ATTRIBUTES (*node)); + + return NULL_TREE; +} + /* Handle a "used" attribute; arguments as in struct attribute_spec.handler. */ diff --git a/gcc/testsuite/gdc.dg/attr_simd1.d b/gcc/testsuite/gdc.dg/attr_simd1.d new file mode 100644 index 0000000..8e83d80 --- /dev/null +++ b/gcc/testsuite/gdc.dg/attr_simd1.d @@ -0,0 +1,40 @@ +// { dg-do compile } +// { dg-options "-fdump-tree-optimized" } + +import gcc.attributes; + +extern(C) @simd int simd_attr() { return 0; } + +// { dg-final { scan-tree-dump "simd_attr\[ \\t\]simdclone|vector" "optimized" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVbN4_simd_attr:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVbM4_simd_attr:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVcN4_simd_attr:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVcM4_simd_attr:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVdN8_simd_attr:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVdM8_simd_attr:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVeN16_simd_attr:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVeM16_simd_attr:" 1 { target { i?86-*-* x86_64-*-* } } } } + +extern(C) @simd_clones("notinbranch") int simd_notinbranch() { return 0; } + +// { dg-final { scan-tree-dump "simd_notinbranch\[ \\t\]simdclone|vector" "optimized" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVbN4_simd_notinbranch:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVcN4_simd_notinbranch:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVdN8_simd_notinbranch:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVeN16_simd_notinbranch:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-not "_ZGVbM4_simd_notinbranch:" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-not "_ZGVcM4_simd_notinbranch:" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-not "_ZGVdM8_simd_notinbranch:" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-not "_ZGVeM16_simd_notinbranch:" { target { i?86-*-* x86_64-*-* } } } } + +extern(C) @simd_clones("inbranch") int simd_inbranch() { return 0; } + +// { dg-final { scan-tree-dump "simd_inbranch\[ \\t\]simdclone|vector" "optimized" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-not "_ZGVbN4_simd_inbranch:" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-not "_ZGVcN4_simd_inbranch:" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-not "_ZGVdN8_simd_inbranch:" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-not "_ZGVeN16_simd_inbranch:" { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVbM4_simd_inbranch:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVcM4_simd_inbranch:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVdM8_simd_inbranch:" 1 { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler-times "_ZGVeM16_simd_inbranch:" 1 { target { i?86-*-* x86_64-*-* } } } } diff --git a/gcc/testsuite/gdc.dg/attr_simd2.d b/gcc/testsuite/gdc.dg/attr_simd2.d new file mode 100644 index 0000000..49cb642 --- /dev/null +++ b/gcc/testsuite/gdc.dg/attr_simd2.d @@ -0,0 +1,16 @@ +// { dg-do compile } +// { dg-options "-fdump-tree-optimized" } + +import gcc.attributes; + +@attribute("simd") +int simd_ignored; // { dg-warning ".simd. attribute ignored" } + +@attribute("simd", 123) +int simd_string() { return 0; } // { dg-error ".simd. attribute argument not a string constant" } + +@attribute("simd", "invalid") +int simd_invalid() { return 0; } // { dg-error "only .inbranch. and .notinbranch. flags are allowed for .simd. attribute" } + +@attribute("simd", "notinbranch", "inbranch") +int simd_wrong_args() { return 0; } // { dg-error "wrong number of arguments specified for .simd. attribute" } -- cgit v1.1 From ad4c44d20ece1fbfb9aced1fbcdab8928d702c73 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Tue, 28 Jun 2022 18:49:27 +0200 Subject: d: Use create_tmp_var_raw and get_callee_fndecl A couple of small patterns that repeat are generating a temporary, and getting a function out of a CALL_EXPR. There are convenience functions for these in the common parts of gcc, use them instead. gcc/d/ChangeLog: * d-codegen.cc: Include gimple-expr.h. (force_target_expr): Use create_tmp_var_raw. * decl.cc: Inlucde gimple-expr.h. (build_local_temp): Use create_tmp_var_raw. * intrinsics.cc (expand_intrinsic_rotate): Use get_callee_fndecl. (maybe_expand_intrinsic): Likewise. --- gcc/d/d-codegen.cc | 6 ++---- gcc/d/decl.cc | 7 ++----- gcc/d/intrinsics.cc | 13 +++---------- 3 files changed, 7 insertions(+), 19 deletions(-) (limited to 'gcc') diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index 8a8bf12..2d90899 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see #include "stor-layout.h" #include "attribs.h" #include "function.h" +#include "gimple-expr.h" #include "d-tree.h" @@ -623,11 +624,8 @@ build_target_expr (tree decl, tree exp) tree force_target_expr (tree exp) { - tree decl = build_decl (input_location, VAR_DECL, NULL_TREE, - TREE_TYPE (exp)); + tree decl = create_tmp_var_raw (TREE_TYPE (exp)); DECL_CONTEXT (decl) = current_function_decl; - DECL_ARTIFICIAL (decl) = 1; - DECL_IGNORED_P (decl) = 1; layout_decl (decl, 0); return build_target_expr (decl, exp); diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc index 5032ae0..3caa465 100644 --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see #include "alloc-pool.h" #include "symbol-summary.h" #include "symtab-thunks.h" +#include "gimple-expr.h" #include "d-tree.h" #include "d-target.h" @@ -1465,11 +1466,7 @@ declare_local_var (VarDeclaration *var) tree build_local_temp (tree type) { - tree decl = build_decl (input_location, VAR_DECL, NULL_TREE, type); - - DECL_CONTEXT (decl) = current_function_decl; - DECL_ARTIFICIAL (decl) = 1; - DECL_IGNORED_P (decl) = 1; + tree decl = create_tmp_var_raw (type); d_pushdecl (decl); return decl; diff --git a/gcc/d/intrinsics.cc b/gcc/d/intrinsics.cc index 0f96284..0dd5543 100644 --- a/gcc/d/intrinsics.cc +++ b/gcc/d/intrinsics.cc @@ -421,12 +421,8 @@ expand_intrinsic_rotate (intrinsic_code intrinsic, tree callexp) count = CALL_EXPR_ARG (callexp, 1); else { - tree callee = CALL_EXPR_FN (callexp); - - if (TREE_CODE (callee) == ADDR_EXPR) - callee = TREE_OPERAND (callee, 0); - /* Retrieve from the encoded template instantation. */ + tree callee = get_callee_fndecl (callexp); TemplateInstance *ti = DECL_LANG_FRONTEND (callee)->isInstantiated (); gcc_assert (ti && ti->tiargs && ti->tiargs->length == 2); @@ -761,12 +757,9 @@ expand_volatile_store (tree callexp) tree maybe_expand_intrinsic (tree callexp) { - tree callee = CALL_EXPR_FN (callexp); - - if (TREE_CODE (callee) == ADDR_EXPR) - callee = TREE_OPERAND (callee, 0); + tree callee = get_callee_fndecl (callexp); - if (TREE_CODE (callee) != FUNCTION_DECL) + if (callee == NULL_TREE || TREE_CODE (callee) != FUNCTION_DECL) return callexp; /* Don't expand CTFE-only intrinsics outside of semantic processing. */ -- cgit v1.1 From 53c4ef1e3cc103ce5bdf1d9923144e93b523102a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 27 Jun 2022 17:22:53 -0700 Subject: libgo: make runtime.Version return a meaningful string Fixes golang/go#51850 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/414734 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index a0e386a..551ea65 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -28fe9fad4acb4e02083faf5503b06e3e6e8eecaf +d5b4abed2f206e492890acc20738e89617ea542c The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1 From 74956337e8276e5bc9524104b01c147374dd94e7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 25 Jun 2022 22:09:16 -0700 Subject: compiler: use package path with embedded builtin type The test case is https://go.dev/cl/414235. Fixes golang/go#52856 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/414294 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/names.cc | 29 +++++++++++++++++++++-------- 2 files changed, 22 insertions(+), 9 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 551ea65..13cb6ea 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -d5b4abed2f206e492890acc20738e89617ea542c +c7238f58a26131b7611eff6f555cab02af8a623c The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/names.cc b/gcc/go/gofrontend/names.cc index f85d84c..dac7f20 100644 --- a/gcc/go/gofrontend/names.cc +++ b/gcc/go/gofrontend/names.cc @@ -831,15 +831,28 @@ Struct_type::do_mangled_name(Gogo* gogo, std::string* ret, ret->push_back(' '); } - // For an anonymous field with an alias type, the field name - // is the alias name. - if (p->is_anonymous() - && p->type()->named_type() != NULL - && p->type()->named_type()->is_alias()) - p->type()->named_type()->append_symbol_type_name(gogo, true, ret, - is_non_identifier); + const Type* ft = p->type(); + const Named_type* nt = ft->named_type(); + + if (p->is_anonymous() && nt != NULL && nt->is_builtin()) + { + // For an embedded field with a builtin type, we must + // include a package path. Otherwise embedding builtin + // types in different packages will produce identical + // types, which shouldn't happen because the builtin + // types are not exported. + ret->append(gogo->pkgpath()); + ret->push_back('.'); + nt->append_symbol_type_name(gogo, true, ret, is_non_identifier); + } + else if (p->is_anonymous() && nt != NULL && nt->is_alias()) + { + // For an anonymous field with an alias type, the field name + // is the alias name. + nt->append_symbol_type_name(gogo, true, ret, is_non_identifier); + } else - this->append_mangled_name(p->type(), gogo, ret, is_non_identifier); + this->append_mangled_name(ft, gogo, ret, is_non_identifier); if (p->has_tag()) { -- cgit v1.1 From fb29fdea9cc36f4abeb8566968b2c1bd9054c7af Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 29 Jun 2022 00:17:00 +0000 Subject: Daily bump. --- gcc/ChangeLog | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/d/ChangeLog | 16 ++++++++++++++ gcc/fortran/ChangeLog | 14 ++++++++++++ gcc/testsuite/ChangeLog | 33 +++++++++++++++++++++++++++ 5 files changed, 123 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d995063..36789da 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,62 @@ +2022-06-28 Dimitar Dimitrov + + * doc/sourcebuild.texi: Document new no_alignment_constraints + effective target check. + +2022-06-28 Aldy Hernandez + + * Makefile.in: Remove gimple-ssa-evrp.o and gimple-ssa-evrp-analyze.o. + * flag-types.h (enum evrp_mode): Remove. + * params.opt: Remove --param=evrp-mode. + * tree-vrp.cc (make_pass_early_vrp): New. + (pass_vrp::execute): Call early VRP instance. + * gimple-ssa-evrp-analyze.cc: Removed. + * gimple-ssa-evrp-analyze.h: Removed. + * gimple-ssa-evrp.cc: Removed. + +2022-06-28 Alexandre Oliva + + * Makefile.in (TFLAGS): New. + (GCC_FOR_TARGET): Add TFLAGS. + (FLAGS_TO_PASS): Pass TFLAGS down. + +2022-06-28 Richard Biener + + * tree-ssa-loop-split.cc (fix_loop_bb_probability): Do not + call update_ssa. + +2022-06-28 Richard Biener + + * tree-into-ssa.cc (insert_updated_phi_nodes_for): Use + mark_block_for_update. + (update_ssa): Adjust. + +2022-06-28 Xi Ruoyao + + PR target/106096 + * config/loongarch/loongarch.h (REG_CLASS_CONTENTS): Exclude + $r13 from SIBCALL_REGS. + * config/loongarch/loongarch.cc (loongarch_regno_to_class): + Change $r13 to JIRL_REGS. + +2022-06-28 Aldy Hernandez + + * tree-ssa-loop-ch.cc (entry_loop_condition_is_static): Remove + irange::supports_p. + +2022-06-28 Richard Biener + + PR middle-end/106053 + * match.pd ((T)a == (T)b): Avoid folding away sign + changes in a comparison if we'd truncate to a boolean. + +2022-06-28 Kewen Lin + + * config/rs6000/rs6000.md (*rotl3_insert_4): Replace mode + iterator GPR with SImode, adjust the condition and output template, + rename to ... + (*rotlsi3_insert_4): ... this. + 2022-06-27 David Malcolm * genmatch.cc: Add "final" and "override" to various vfunc diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 73287f2..f15a0aa 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220628 +20220629 diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index cea195e..796d71a 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,19 @@ +2022-06-28 Iain Buclaw + + * d-codegen.cc: Include gimple-expr.h. + (force_target_expr): Use create_tmp_var_raw. + * decl.cc: Inlucde gimple-expr.h. + (build_local_temp): Use create_tmp_var_raw. + * intrinsics.cc (expand_intrinsic_rotate): Use get_callee_fndecl. + (maybe_expand_intrinsic): Likewise. + +2022-06-28 Iain Buclaw + + * d-attribs.cc (handle_omp_declare_simd_attribute): New function. + (d_handle_simd_attribute): New function. + (d_langhook_common_attribute_table): Add 'omp declare simd' attribute. + (d_langhook_attribute_table): Add simd attribute. + 2022-06-24 Iain Buclaw * d-attribs.cc (d_handle_section_attribute): Update error message. diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b9ea237..79b3754d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,17 @@ +2022-06-28 Jakub Jelinek + + * gfortran.h (gfc_real_info): Add use_iec_60559 bitfield. + * trans-types.h (gfc_real16_use_iec_60559): Declare. + * trans-types.cc (gfc_real16_use_iec_60559): Define. + (gfc_init_kinds): When building powerpc64le-linux libgfortran + on glibc 2.26 to 2.31, set gfc_real16_use_iec_60559 and + use_iec_60559. + (gfc_build_real_type): Set gfc_real16_use_iec_60559 and use_iec_60559 + on glibc 2.26 or later. + * trans-intrinsic.cc (gfc_build_intrinsic_lib_fndecls): Adjust + comment. Handle gfc_real16_use_iec_60559. + (gfc_get_intrinsic_lib_fndecl): Handle use_iec_60559. + 2022-06-26 Harald Anlauf PR fortran/105691 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c88004e..e6d5741 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,36 @@ +2022-06-28 Iain Buclaw + + * gdc.dg/attr_simd1.d: New test. + * gdc.dg/attr_simd2.d: New test. + +2022-06-28 Dimitar Dimitrov + + * c-c++-common/Wcast-align.c: Silence warnings for targets with + no_alignment_constraints. + * gcc.dg/c11-align-4.c: Skip for no_alignment_constraints. + * gcc.dg/strlenopt-10.c: Replace checks for avr with checks for + any target with no_alignment_constraints. + * gcc.dg/strlenopt-11.c: Ditto. + * gcc.dg/strlenopt-13.c: Ditto. + * lib/target-supports.exp + (check_effective_target_no_alignment_constraints): New. + +2022-06-28 Aldy Hernandez + + * g++.dg/pr100774.C: Remove --param=evrp-mode. + * gcc.dg/pr100781.c: Same. + +2022-06-28 Xi Ruoyao + + PR target/106096 + * g++.target/loongarch/loongarch.exp: New test support file. + * g++.target/loongarch/pr106096.C: New test. + +2022-06-28 Richard Biener + + PR middle-end/106053 + * gcc.target/i386/pr106053.c: New testcase. + 2022-06-27 Marek Polacek PR c++/89197 -- cgit v1.1 From b93ae1a01bbad59ee77b7c84f4743a730138ba87 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Tue, 28 Jun 2022 19:22:34 +0200 Subject: d: Add SIMD intrinsics module and compiler built-ins. Vectors in D are exposed by the use of the `__vector(T[N])' type, and whilst most unary and binary operations work as you'd expect, there are some operations that are not possible without doing the operation unrolled, or calling some target-specific built-in, or with inline asm. This introduces a new `gcc.simd' module that introduces the following. - Prefetching has been exposed by a convenient `prefetch' function in the library. - Loading and storing from an unaligned address have been exposed by `loadUnaligned' and `storeUnaligned' intrinsics. - Vector permutations have been exposed by `shuffle`, and `shufflevector' intrinsics. - Converting between two vectors with a different element type has been exposed by a `convertvector' intrinsic. - The ternary operator has been exposed with a `blendvector' intrinsic. - Comparison operators have been exposed by `equalMask', `notEqualMask', `greaterMask', and `greaterEqualMask' intrinsics. - Logic operators have been exposed by convenient `notMask', `andAndMask', and `orOrMask' functions in the library. To be compatible with the LLVM D compiler's own SIMD intrinsic module, there is also the addition of an `extractelement' and `insertelement' convenience functions, and an alternative interface for calling the `shufflevector' function. The addition of these intrinsics lowers the boundary for users working in SIMD to get the desired codegen they want out of the compiler. Most of what is present here - apart from tests - is the adding of machinery in the intrinsics suite of functions to do validation on templated intrinsics. Whilst these are still matched from the library by their generic (untyped) signature, there is a still an assumption that what has been instantiated and handed down to the code generator is valid, because why would these definitions be found outside of the in-tree D runtime library? The majority of intrinsics are not templates, so the test on the mangled signature string still guarantees all types are as we expect them to be. However there are still a small handful of other templated intrinsics (core.bitop.{rol,ror}, core.math.toPrec, std.math.traits.isNaN, ...) that are currently unchecked, so would benefit from being included into this built-in checking function at some point in the future. gcc/d/ChangeLog: * intrinsics.cc: Include diagnostic.h, langhooks.h, vec-perm-indices.h. (maybe_set_intrinsic): Add cases for new simd intrinsics. (warn_mismatched_return_type): New function. (warn_mismatched_argument): New function. (build_shuffle_mask_type): New function. (maybe_warn_intrinsic_mismatch): New function. (expand_intrinsic_vec_cond): New function. (expand_intrinsic_vec_convert): New function. (expand_intrinsic_vec_blend): New function. (expand_intrinsic_vec_shuffle): New function. (expand_intrinsic_vec_shufflevector): New function. (expand_intrinsic_vec_load_unaligned): New function. (expand_intrinsic_vec_store_unaligned): New function. (maybe_expand_intrinsic): Check signature of intrinsic before handing off to front-end lowering. Add cases for new simd intrinsics. * intrinsics.def (INTRINSIC_LOADUNALIGNED): Define intrinsic. (INTRINSIC_STOREUNALIGNED): Define intrinsic. (INTRINSIC_SHUFFLE): Define intrinsic. (INTRINSIC_SHUFFLEVECTOR): Define intrinsic. (INTRINSIC_CONVERTVECTOR): Define intrinsic. (INTRINSIC_BLENDVECTOR): Define intrinsic. (INTRINSIC_EQUALMASK): Define intrinsic. (INTRINSIC_NOTEQUALMASK): Define intrinsic. (INTRINSIC_GREATERMASK): Define intrinsic. (INTRINSIC_GREATEREQUALMASK): Define intrinsic. libphobos/ChangeLog: * libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add gcc/simd.d. * libdruntime/Makefile.in: Regenerate. * libdruntime/gcc/simd.d: New file. gcc/testsuite/ChangeLog: * gdc.dg/Wbuiltin_declaration_mismatch.d: Rename to... * gdc.dg/Wbuiltin_declaration_mismatch1.d: ...this. * gdc.dg/Wbuiltin_declaration_mismatch2.d: New test. * gdc.dg/torture/simd_blendvector.d: New test. * gdc.dg/torture/simd_cond.d: New test. * gdc.dg/torture/simd_convertvector.d: New test. * gdc.dg/torture/simd_load.d: New test. * gdc.dg/torture/simd_logical.d: New test. * gdc.dg/torture/simd_shuffle.d: New test. * gdc.dg/torture/simd_shufflevector.d: New test. * gdc.dg/torture/simd_store.d: New test. --- gcc/d/intrinsics.cc | 587 +++++++++++++++++++++ gcc/d/intrinsics.def | 23 + .../gdc.dg/Wbuiltin_declaration_mismatch.d | 37 -- .../gdc.dg/Wbuiltin_declaration_mismatch1.d | 37 ++ .../gdc.dg/Wbuiltin_declaration_mismatch2.d | 250 +++++++++ gcc/testsuite/gdc.dg/torture/simd_blendvector.d | 345 ++++++++++++ gcc/testsuite/gdc.dg/torture/simd_cond.d | 17 + gcc/testsuite/gdc.dg/torture/simd_convertvector.d | 122 +++++ gcc/testsuite/gdc.dg/torture/simd_load.d | 52 ++ gcc/testsuite/gdc.dg/torture/simd_logical.d | 19 + gcc/testsuite/gdc.dg/torture/simd_shuffle.d | 454 ++++++++++++++++ gcc/testsuite/gdc.dg/torture/simd_shufflevector.d | 55 ++ gcc/testsuite/gdc.dg/torture/simd_store.d | 54 ++ 13 files changed, 2015 insertions(+), 37 deletions(-) delete mode 100644 gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch.d create mode 100644 gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch1.d create mode 100644 gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch2.d create mode 100644 gcc/testsuite/gdc.dg/torture/simd_blendvector.d create mode 100644 gcc/testsuite/gdc.dg/torture/simd_cond.d create mode 100644 gcc/testsuite/gdc.dg/torture/simd_convertvector.d create mode 100644 gcc/testsuite/gdc.dg/torture/simd_load.d create mode 100644 gcc/testsuite/gdc.dg/torture/simd_logical.d create mode 100644 gcc/testsuite/gdc.dg/torture/simd_shuffle.d create mode 100644 gcc/testsuite/gdc.dg/torture/simd_shufflevector.d create mode 100644 gcc/testsuite/gdc.dg/torture/simd_store.d (limited to 'gcc') diff --git a/gcc/d/intrinsics.cc b/gcc/d/intrinsics.cc index 0dd5543..454d940 100644 --- a/gcc/d/intrinsics.cc +++ b/gcc/d/intrinsics.cc @@ -29,9 +29,12 @@ along with GCC; see the file COPYING3. If not see #include "tm.h" #include "function.h" #include "tree.h" +#include "diagnostic.h" +#include "langhooks.h" #include "fold-const.h" #include "stringpool.h" #include "builtins.h" +#include "vec-perm-indices.h" #include "d-tree.h" @@ -161,6 +164,16 @@ maybe_set_intrinsic (FuncDeclaration *decl) case INTRINSIC_MULUL: case INTRINSIC_NEGS: case INTRINSIC_NEGSL: + case INTRINSIC_LOADUNALIGNED: + case INTRINSIC_STOREUNALIGNED: + case INTRINSIC_SHUFFLE: + case INTRINSIC_SHUFFLEVECTOR: + case INTRINSIC_CONVERTVECTOR: + case INTRINSIC_BLENDVECTOR: + case INTRINSIC_EQUALMASK: + case INTRINSIC_NOTEQUALMASK: + case INTRINSIC_GREATERMASK: + case INTRINSIC_GREATEREQUALMASK: case INTRINSIC_VLOAD8: case INTRINSIC_VLOAD16: case INTRINSIC_VLOAD32: @@ -169,6 +182,8 @@ maybe_set_intrinsic (FuncDeclaration *decl) case INTRINSIC_VSTORE16: case INTRINSIC_VSTORE32: case INTRINSIC_VSTORE64: + /* Cannot interpret function during CTFE. If the library + provides a definition, its body will be used instead. */ break; case INTRINSIC_POW: @@ -196,6 +211,314 @@ maybe_set_intrinsic (FuncDeclaration *decl) } } +/* Helper function for maybe_warn_intrinsic_mismatch. Issue warning about + mismatch in the EXPECTED return type in call to the intrinsic function in + CALLEXP, and return TRUE. */ + +static bool +warn_mismatched_return_type (tree callexp, const char *expected) +{ + warning_at (EXPR_LOCATION (callexp), OPT_Wbuiltin_declaration_mismatch, + "mismatch in return type of intrinsic function %qD " + "(%qT, should be %qs)", get_callee_fndecl (callexp), + TREE_TYPE (callexp), expected); + return true; +} + +/* Helper function for maybe_warn_intrinsic_mismatch. Issue warning or error + about mismatch in the EXPECTED argument type at ARGNO in call to the + intrinsic function in CALLEXP, and return TRUE. */ + +static bool +warn_mismatched_argument (tree callexp, unsigned argno, const char *expected) +{ + warning_at (EXPR_LOCATION (callexp), OPT_Wbuiltin_declaration_mismatch, + "mismatch in argument %u type of intrinsic function %qD " + "(%qT, should be %qs)", argno + 1, get_callee_fndecl (callexp), + TREE_TYPE (CALL_EXPR_ARG (callexp, argno)), expected); + return true; +} + +static bool +warn_mismatched_argument (tree callexp, unsigned argno, tree expected, + bool error_p = false) +{ + if (error_p) + error_at (EXPR_LOCATION (callexp), + "mismatch in argument %u type of intrinsic function %qD " + "(%qT, should be %qT)", argno + 1, get_callee_fndecl (callexp), + TREE_TYPE (CALL_EXPR_ARG (callexp, argno)), expected); + else + warning_at (EXPR_LOCATION (callexp), OPT_Wbuiltin_declaration_mismatch, + "mismatch in argument %u type of intrinsic function %qD " + "(%qT, should be %qT)", argno + 1, get_callee_fndecl (callexp), + TREE_TYPE (CALL_EXPR_ARG (callexp, argno)), expected); + + return true; +} + +/* Helper function for maybe_warn_intrinsic_mismatch. Builds a vector integer + type suitable for the mask argument of INTRINSIC_SHUFFLE from the given + input argument TYPE. */ + +static tree +build_shuffle_mask_type (tree type) +{ + const unsigned bits = GET_MODE_BITSIZE (SCALAR_TYPE_MODE (TREE_TYPE (type))); + const int unsignedp = TYPE_UNSIGNED (TREE_TYPE (type)); + tree inner = lang_hooks.types.type_for_size (bits, unsignedp); + gcc_assert (inner && TREE_CODE (inner) == INTEGER_TYPE); + + /* %% Get the front-end type for the vector so the D type will be + printed (this should really be handled by a D tree printer). */ + Type *t = build_frontend_type (inner); + gcc_assert (t != NULL); + unsigned HOST_WIDE_INT nunits; + TYPE_VECTOR_SUBPARTS (type).is_constant (&nunits); + + return build_ctype (TypeVector::create (t->sarrayOf (nunits))); +} + +/* Checks if call to intrinsic FUNCTION in CALLEXP matches the internal + type and value constraints that we expect from the library definitions. + Returns TRUE and issues a warning if there is a mismatch. + + Note: The return type and parameters are encoded into the signature `deco' + string that we match on in maybe_set_intrinsic(), so if the deco mangle + string has 'i' in the part that specifies the return type, then the matched + intrinsic will always have the return type `int'. + + For templated intrinsics however, we rely on template constraints to ensure + that the generic type matches what we expect it to be. There is still an + enforced relationship between a template argument and its instantiated type. + For example: `T func(T)(T*)' would have the generic return type `@1T' and + generic parameter type `@1PT', so it can be assumed that if the return type + matches what we expect then all parameters are fine as well. Otherwise it + can be assumed that some internal_error has occurred for this to be the case. + Where a templated intrinsic has multiple template arguments, each generic + type will need to be checked for its validity. */ + +static bool +maybe_warn_intrinsic_mismatch (tree function, tree callexp) +{ + switch (DECL_INTRINSIC_CODE (function)) + { + case INTRINSIC_NONE: + default: + return false; + + case INTRINSIC_LOADUNALIGNED: + { + /* Expects the signature: + vector(T) loadUnaligned (vector(T)*); */ + gcc_assert (call_expr_nargs (callexp) == 1); + + tree ptr = TREE_TYPE (CALL_EXPR_ARG (callexp, 0)); + if (!VECTOR_TYPE_P (TREE_TYPE (callexp)) + || !POINTER_TYPE_P (ptr) || !VECTOR_TYPE_P (TREE_TYPE (ptr))) + return warn_mismatched_return_type (callexp, "__vector(T)"); + + return false; + } + + case INTRINSIC_STOREUNALIGNED: + { + /* Expects the signature: + vector(T) storeUnaligned (vector(T)*, vector(T)); */ + gcc_assert (call_expr_nargs (callexp) == 2); + + tree ptr = TREE_TYPE (CALL_EXPR_ARG (callexp, 0)); + tree val = TREE_TYPE (CALL_EXPR_ARG (callexp, 1)); + if (!VECTOR_TYPE_P (TREE_TYPE (callexp)) + || !POINTER_TYPE_P (ptr) || !VECTOR_TYPE_P (TREE_TYPE (ptr)) + || !VECTOR_TYPE_P (val)) + return warn_mismatched_return_type (callexp, "__vector(T)"); + + return false; + } + + case INTRINSIC_SHUFFLE: + case INTRINSIC_BLENDVECTOR: + { + /* Expects the signature: + vector(T) shuffle (vector(T), vector(U), vector(V)); + vector(T) blendvector (vector(T), vector(U), vector(V)); */ + gcc_assert (call_expr_nargs (callexp) == 3); + + tree vec0 = TREE_TYPE (CALL_EXPR_ARG (callexp, 0)); + if (!VECTOR_TYPE_P (TREE_TYPE (callexp)) + || !VECTOR_TYPE_P (vec0)) + return warn_mismatched_return_type (callexp, "__vector(T)"); + + tree vec1 = TREE_TYPE (CALL_EXPR_ARG (callexp, 1)); + if (!VECTOR_TYPE_P (vec1)) + return warn_mismatched_argument (callexp, 1, vec0); + + tree mask = TREE_TYPE (CALL_EXPR_ARG (callexp, 2)); + if (!VECTOR_TYPE_P (mask) || !VECTOR_INTEGER_TYPE_P (mask)) + { + tree expected = build_shuffle_mask_type (vec0); + return warn_mismatched_argument (callexp, 2, expected, + VECTOR_TYPE_P (mask)); + } + + /* Types have been validated, now issue errors about violations on the + constraints of the intrinsic. */ + if (TYPE_MAIN_VARIANT (vec0) != TYPE_MAIN_VARIANT (vec1)) + return warn_mismatched_argument (callexp, 1, vec0, true); + + /* Vector element sizes should be equal between arguments and mask. */ + if (GET_MODE_BITSIZE (SCALAR_TYPE_MODE (TREE_TYPE (vec0))) + != GET_MODE_BITSIZE (SCALAR_TYPE_MODE (TREE_TYPE (mask))) + || maybe_ne (TYPE_VECTOR_SUBPARTS (vec0), + TYPE_VECTOR_SUBPARTS (mask)) + || maybe_ne (TYPE_VECTOR_SUBPARTS (vec1), + TYPE_VECTOR_SUBPARTS (mask))) + { + tree expected = build_shuffle_mask_type (vec0); + return warn_mismatched_argument (callexp, 2, expected, true); + } + + return false; + } + + case INTRINSIC_SHUFFLEVECTOR: + { + /* Expects the signature: + vector(T[N]) shufflevector (vector(T), vector(U), N...); */ + gcc_assert (call_expr_nargs (callexp) >= 3); + gcc_assert (VECTOR_TYPE_P (TREE_TYPE (callexp))); + + tree vec0 = TREE_TYPE (CALL_EXPR_ARG (callexp, 0)); + if (!VECTOR_TYPE_P (vec0)) + return warn_mismatched_argument (callexp, 0, "__vector(T)"); + + tree vec1 = TREE_TYPE (CALL_EXPR_ARG (callexp, 1)); + if (!VECTOR_TYPE_P (vec1)) + return warn_mismatched_argument (callexp, 1, vec0); + + for (int i = 2; i < call_expr_nargs (callexp); i++) + { + tree idx = TREE_TYPE (CALL_EXPR_ARG (callexp, i)); + if (TREE_CODE (idx) != INTEGER_TYPE) + return warn_mismatched_argument (callexp, i, d_int_type); + } + + /* Types have been validated, now issue errors about violations on the + constraints of the intrinsic. */ + if (TYPE_MAIN_VARIANT (TREE_TYPE (vec0)) + != TYPE_MAIN_VARIANT (TREE_TYPE (vec1))) + { + /* %% Get the front-end type for the vector so the D type will be + printed (this should really be handled by a D tree printer). */ + unsigned HOST_WIDE_INT nunits; + if (!TYPE_VECTOR_SUBPARTS (vec1).is_constant (&nunits)) + break; + + Type *inner = build_frontend_type (TREE_TYPE (vec0)); + Type *vector = TypeVector::create (inner->sarrayOf (nunits)); + return warn_mismatched_argument (callexp, 1, + build_ctype (vector), true); + } + + /* Vector sizes should be known, and number of indices a power of 2. */ + unsigned HOST_WIDE_INT vec0_length; + unsigned HOST_WIDE_INT vec1_length; + if (!TYPE_VECTOR_SUBPARTS (vec0).is_constant (&vec0_length) + || !TYPE_VECTOR_SUBPARTS (vec1).is_constant (&vec1_length) + || !pow2p_hwi (call_expr_nargs (callexp) - 2)) + break; + + /* All index arguments must be valid constants as well. */ + for (int i = 2; i < call_expr_nargs (callexp); i++) + { + tree idx = CALL_EXPR_ARG (callexp, i); + if (!tree_fits_shwi_p (idx)) + { + error_at (EXPR_LOCATION (callexp), + "argument %qE cannot be read at compile time", idx); + return true; + } + + HOST_WIDE_INT iidx = tree_to_shwi (idx); + if (iidx < 0 + || (unsigned HOST_WIDE_INT) iidx >= vec0_length + vec1_length) + { + error_at (EXPR_LOCATION (callexp), + "element index %qE is out of bounds %<[0 .. %E]%>", + idx, build_integer_cst (vec0_length + vec1_length)); + return true; + } + } + + return false; + } + + case INTRINSIC_CONVERTVECTOR: + { + /* Expects the signature: + vector(T) convertvector (vector(U)); */ + gcc_assert (call_expr_nargs (callexp) == 1); + + tree ret = TREE_TYPE (callexp); + if (!VECTOR_TYPE_P (ret) + || (!VECTOR_INTEGER_TYPE_P (ret) && !VECTOR_FLOAT_TYPE_P (ret))) + return warn_mismatched_return_type (callexp, "__vector(T)"); + + tree arg = TREE_TYPE (CALL_EXPR_ARG (callexp, 0)); + if (!VECTOR_TYPE_P (arg) + || (!VECTOR_INTEGER_TYPE_P (arg) && !VECTOR_FLOAT_TYPE_P (arg))) + return warn_mismatched_argument (callexp, 0, "__vector(T)"); + + /* Types have been validated, now issue errors about violations on the + constraints of the intrinsic. */ + if (maybe_ne (TYPE_VECTOR_SUBPARTS (ret), TYPE_VECTOR_SUBPARTS (arg))) + { + /* %% Get the front-end type for the vector so the D type will be + printed (this should really be handled by a D tree printer). */ + unsigned HOST_WIDE_INT nunits; + if (!TYPE_VECTOR_SUBPARTS (ret).is_constant (&nunits)) + break; + + Type *inner = build_frontend_type (TREE_TYPE (arg)); + Type *vector = TypeVector::create (inner->sarrayOf (nunits)); + return warn_mismatched_argument (callexp, 0, + build_ctype (vector), true); + } + + return false; + } + + case INTRINSIC_EQUALMASK: + case INTRINSIC_NOTEQUALMASK: + case INTRINSIC_GREATERMASK: + case INTRINSIC_GREATEREQUALMASK: + { + /* Expects the signature: + vector(T) equalMask(vector(T), vector(T)); + vector(T) notEqualMask(vector(T), vector(T)); + vector(T) greaterMask(vector(T), vector(T)); + vector(T) greateOrEqualMask(vector(T), vector(T)); */ + gcc_assert (call_expr_nargs (callexp) == 2); + + tree vec0 = TREE_TYPE (CALL_EXPR_ARG (callexp, 0)); + tree vec1 = TREE_TYPE (CALL_EXPR_ARG (callexp, 1)); + if (!VECTOR_TYPE_P (TREE_TYPE (callexp)) + || !VECTOR_TYPE_P (vec0) + || !VECTOR_TYPE_P (vec1) + || TYPE_MAIN_VARIANT (vec0) != TYPE_MAIN_VARIANT (vec1)) + return warn_mismatched_return_type (callexp, "__vector(T)"); + + return false; + } + } + + /* Generic mismatch warning if it hasn't already been handled. */ + warning_at (EXPR_LOCATION (callexp), OPT_Wbuiltin_declaration_mismatch, + "mismatch in call of intrinsic function %qD", function); + return true; +} + /* Construct a function call to the built-in function CODE, N is the number of arguments, and the `...' parameters are the argument expressions. The original call expression is held in CALLEXP. */ @@ -750,6 +1073,231 @@ expand_volatile_store (tree callexp) return modify_expr (result, value); } +/* Expand a front-end intrinsic call to a vector comparison intrinsic, which is + either a call to equalMask(), notEqualMask(), greaterMask(), or + greaterOrEqualMask(). These intrinsics take two arguments, the signature to + which can be either: + + vector(T) equalMask(vector(T) vec0, vector(T) vec1); + vector(T) notEqualMask(vector(T) vec0, vector(T) vec1); + vector(T) greaterMask(vector(T) vec0, vector(T) vec1); + vector(T) greaterOrEqualMask(vector(T) vec0, vector(T) vec1); + + This performs an element-wise comparison between two vectors VEC0 and VEC1, + returning a vector with signed integral elements. */ + +static tree +expand_intrinsic_vec_cond (tree_code code, tree callexp) +{ + tree vec0 = CALL_EXPR_ARG (callexp, 0); + tree vec1 = CALL_EXPR_ARG (callexp, 1); + tree type = TREE_TYPE (callexp); + + tree cmp = fold_build2_loc (EXPR_LOCATION (callexp), code, + truth_type_for (type), vec0, vec1); + return fold_build3_loc (EXPR_LOCATION (callexp), VEC_COND_EXPR, type, cmp, + build_minus_one_cst (type), build_zero_cst (type)); +} + +/* Expand a front-end instrinsic call to convertvector(). This takes one + argument, the signature to which is: + + vector(T) convertvector (vector(F) vec); + + This converts a vector VEC to TYPE by casting every element in VEC to the + element type of TYPE. The original call expression is held in CALLEXP. */ + +static tree +expand_intrinsic_vec_convert (tree callexp) +{ + tree vec = CALL_EXPR_ARG (callexp, 0); + tree type = TREE_TYPE (callexp); + + /* Use VIEW_CONVERT for simple vector conversions. */ + if ((TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (vec))) + == TYPE_MAIN_VARIANT (TREE_TYPE (type))) + || (VECTOR_INTEGER_TYPE_P (TREE_TYPE (vec)) + && VECTOR_INTEGER_TYPE_P (type) + && (TYPE_PRECISION (TREE_TYPE (TREE_TYPE (vec))) + == TYPE_PRECISION (TREE_TYPE (type))))) + return build1_loc (EXPR_LOCATION (callexp), VIEW_CONVERT_EXPR, type, vec); + + return build_call_expr_internal_loc (EXPR_LOCATION (callexp), IFN_VEC_CONVERT, + type, 1, vec); +} + +/* Expand a front-end instrinsic call to blendvector(). This expects to take + three arguments, the signature to which is: + + vector(T) blendvector (vector(T) vec0, vector(U) vec1, vector(M) mask); + + This builds a VEC_COND_EXPR if VEC0, VEC1, and MASK are vector types, VEC0 + has the same type as VEC1, and the number of elements of VEC0, VEC1, and MASK + are the same. The original call expression is held in CALLEXP. */ + +static tree +expand_intrinsic_vec_blend (tree callexp) +{ + tree vec0 = CALL_EXPR_ARG (callexp, 0); + tree vec1 = CALL_EXPR_ARG (callexp, 1); + tree mask = CALL_EXPR_ARG (callexp, 2); + + tree cmp = fold_build2_loc (EXPR_LOCATION (callexp), NE_EXPR, + truth_type_for (TREE_TYPE (mask)), + mask, build_zero_cst (TREE_TYPE (mask))); + + tree ret = fold_build3_loc (EXPR_LOCATION (callexp), VEC_COND_EXPR, + TREE_TYPE (callexp), cmp, vec0, vec1); + + if (!CONSTANT_CLASS_P (vec0) || !CONSTANT_CLASS_P (vec1)) + ret = force_target_expr (ret); + + return ret; +} + +/* Expand a front-end instrinsic call to shuffle(). This expects to take three + arguments, the signature to which is: + + vector(T) shuffle (vector(T) vec0, vector(T) vec1, vector(M) mask); + + This builds a VEC_PERM_EXPR if VEC0, VEC1, and MASK are vector types, VEC0 + has the same type as VEC1, and the number of elements of VEC0, VEC1, and MASK + are the same. The original call expression is held in CALLEXP. */ + +static tree +expand_intrinsic_vec_shuffle (tree callexp) +{ + tree vec0 = CALL_EXPR_ARG (callexp, 0); + tree vec1 = CALL_EXPR_ARG (callexp, 1); + tree mask = CALL_EXPR_ARG (callexp, 2); + + return build3_loc (EXPR_LOCATION (callexp), VEC_PERM_EXPR, + TREE_TYPE (callexp), vec0, vec1, mask); +} + +/* Expand a front-end instrinsic call to shufflevector(). This takes two + positional arguments and a variadic list, the signature to which is: + + vector(TM) shuffle (vector(T) vec1, vector(T) vec2, index...); + + This builds a VEC_PERM_EXPR if VEC0 and VEC1 are vector types, VEC0 has the + same element type as VEC1, and the number of elements in INDEX is a valid + power of two. The original call expression is held in CALLEXP. */ + +static tree +expand_intrinsic_vec_shufflevector (tree callexp) +{ + tree vec0 = CALL_EXPR_ARG (callexp, 0); + tree vec1 = CALL_EXPR_ARG (callexp, 1); + + unsigned HOST_WIDE_INT v0elems, v1elems; + TYPE_VECTOR_SUBPARTS (TREE_TYPE (vec0)).is_constant (&v0elems); + TYPE_VECTOR_SUBPARTS (TREE_TYPE (vec1)).is_constant (&v1elems); + + unsigned HOST_WIDE_INT num_indices = call_expr_nargs (callexp) - 2; + unsigned HOST_WIDE_INT masklen = MAX (num_indices, MAX (v0elems, v1elems)); + unsigned HOST_WIDE_INT pad_size = (v0elems < masklen ? masklen - v0elems : 0); + vec_perm_builder sel (masklen, masklen, 1); + + unsigned n = 0; + for (; n < num_indices; ++n) + { + tree idx = CALL_EXPR_ARG (callexp, n + 2); + HOST_WIDE_INT iidx = tree_to_shwi (idx); + /* VEC_PERM_EXPR does not allow different sized inputs. */ + if ((unsigned HOST_WIDE_INT) iidx >= v0elems) + iidx += pad_size; + + sel.quick_push (iidx); + } + + /* VEC_PERM_EXPR does not support a result that is smaller than the inputs. */ + for (; n < masklen; ++n) + sel.quick_push (n); + + vec_perm_indices indices (sel, 2, masklen); + + /* Pad out arguments to the common vector size. */ + tree ret_type = build_vector_type (TREE_TYPE (TREE_TYPE (vec0)), masklen); + if (v0elems < masklen) + { + constructor_elt elt = { NULL_TREE, build_zero_cst (TREE_TYPE (vec0)) }; + vec0 = build_constructor_single (ret_type, NULL_TREE, vec0); + for (unsigned i = 1; i < masklen / v0elems; ++i) + vec_safe_push (CONSTRUCTOR_ELTS (vec0), elt); + } + + if (v1elems < masklen) + { + constructor_elt elt = { NULL_TREE, build_zero_cst (TREE_TYPE (vec1)) }; + vec1 = build_constructor_single (ret_type, NULL_TREE, vec1); + for (unsigned i = 1; i < masklen / v1elems; ++i) + vec_safe_push (CONSTRUCTOR_ELTS (vec1), elt); + } + + tree mask_type = build_vector_type (build_nonstandard_integer_type + (TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (ret_type))), 1), + masklen); + tree ret = build3_loc (EXPR_LOCATION (callexp), VEC_PERM_EXPR, ret_type, vec0, + vec1, vec_perm_indices_to_tree (mask_type, indices)); + + /* Get the low part we are interested in. */ + if (num_indices < masklen) + { + ret = build3_loc (EXPR_LOCATION (callexp), BIT_FIELD_REF, + TREE_TYPE (callexp), ret, + TYPE_SIZE (TREE_TYPE (callexp)), bitsize_zero_node); + /* Wrap the low part operation in a TARGET_EXPR so it gets a separate + temporary during gimplification. */ + ret = force_target_expr (ret); + } + + return ret; +} + +/* Expand a front-end instrinsic call to loadUnaligned(). This takes one + argument, the signature to which is: + + vector(T) loadUnaligned (vector(T)* ptr) + + This generates a load of a vector from an unaligned address PTR. + The original call expression is held in CALLEXP. */ + +static tree +expand_intrinsic_vec_load_unaligned (tree callexp) +{ + tree ptr = CALL_EXPR_ARG (callexp, 0); + + tree unaligned_type = build_variant_type_copy (TREE_TYPE (TREE_TYPE (ptr))); + SET_TYPE_ALIGN (unaligned_type, 1 * BITS_PER_UNIT); + TYPE_USER_ALIGN (unaligned_type) = 1; + + tree load = indirect_ref (unaligned_type, ptr); + return convert (TREE_TYPE (callexp), load); +} + +/* Expand a front-end instrinsic call to storeUnaligned(). This takes two + arguments, the signature to which is: + + vector(T) storeUnaligned (vector(T)* ptr, vector(T) value) + + This generates an assignment of a vector VALUE to an unaligned address PTR. + The original call expression is held in CALLEXP. */ + +static tree +expand_intrinsic_vec_store_unaligned (tree callexp) +{ + tree ptr = CALL_EXPR_ARG (callexp, 0); + tree vec = CALL_EXPR_ARG (callexp, 1); + + tree unaligned_type = build_variant_type_copy (TREE_TYPE (TREE_TYPE (ptr))); + SET_TYPE_ALIGN (unaligned_type, 1 * BITS_PER_UNIT); + TYPE_USER_ALIGN (unaligned_type) = 1; + + tree load = indirect_ref (unaligned_type, ptr); + return build_assign (MODIFY_EXPR, load, vec); +} + /* If CALLEXP is for an intrinsic , expand and return inlined compiler generated instructions. Most map directly to GCC builtins, others require a little extra work around them. */ @@ -766,6 +1314,15 @@ maybe_expand_intrinsic (tree callexp) if (DECL_BUILT_IN_CTFE (callee) && !doing_semantic_analysis_p) return callexp; + /* Gate the expansion of the intrinsic with constraint checks, if any fail + then bail out without any lowering. */ + if (maybe_warn_intrinsic_mismatch (callee, callexp)) + { + /* Reset the built-in flag so that we don't trip fold_builtin. */ + set_decl_built_in_function (callee, NOT_BUILT_IN, 0); + return callexp; + } + intrinsic_code intrinsic = DECL_INTRINSIC_CODE (callee); built_in_function code; @@ -913,6 +1470,36 @@ maybe_expand_intrinsic (tree callexp) case INTRINSIC_VSTORE64: return expand_volatile_store (callexp); + case INTRINSIC_LOADUNALIGNED: + return expand_intrinsic_vec_load_unaligned (callexp); + + case INTRINSIC_STOREUNALIGNED: + return expand_intrinsic_vec_store_unaligned (callexp); + + case INTRINSIC_SHUFFLE: + return expand_intrinsic_vec_shuffle (callexp); + + case INTRINSIC_SHUFFLEVECTOR: + return expand_intrinsic_vec_shufflevector (callexp); + + case INTRINSIC_CONVERTVECTOR: + return expand_intrinsic_vec_convert (callexp); + + case INTRINSIC_BLENDVECTOR: + return expand_intrinsic_vec_blend (callexp); + + case INTRINSIC_EQUALMASK: + return expand_intrinsic_vec_cond (EQ_EXPR, callexp); + + case INTRINSIC_NOTEQUALMASK: + return expand_intrinsic_vec_cond (NE_EXPR, callexp); + + case INTRINSIC_GREATERMASK: + return expand_intrinsic_vec_cond (GT_EXPR, callexp); + + case INTRINSIC_GREATEREQUALMASK: + return expand_intrinsic_vec_cond (GE_EXPR, callexp); + default: gcc_unreachable (); } diff --git a/gcc/d/intrinsics.def b/gcc/d/intrinsics.def index 61c1737..b8d1ec5 100644 --- a/gcc/d/intrinsics.def +++ b/gcc/d/intrinsics.def @@ -252,5 +252,28 @@ DEF_D_BUILTIN (INTRINSIC_C_VA_ARG, BUILT_IN_NONE, "va_arg", "core.stdc.stdarg", DEF_D_BUILTIN (INTRINSIC_VASTART, BUILT_IN_NONE, "va_start", "core.stdc.stdarg", "FJ@7va_listK@1TZv") +/* gcc.simd intrinsics. */ + +DEF_D_BUILTIN (INTRINSIC_LOADUNALIGNED, BUILT_IN_NONE, "loadUnaligned", + "gcc.simd", "FP@1VZ@1V") +DEF_D_BUILTIN (INTRINSIC_STOREUNALIGNED, BUILT_IN_NONE, "storeUnaligned", + "gcc.simd", "FP@1V@1VZ@1V") +DEF_D_BUILTIN (INTRINSIC_SHUFFLE, BUILT_IN_NONE, "shuffle", "gcc.simd", + "F@2V0@2V1@1MZ@2V0") +DEF_D_BUILTIN (INTRINSIC_SHUFFLEVECTOR, BUILT_IN_NONE, "shufflevector", + "gcc.simd", "F@2V1@2V2@1MZNhH@1M@") +DEF_D_BUILTIN (INTRINSIC_CONVERTVECTOR, BUILT_IN_NONE, "convertvector", + "gcc.simd", "F@1TZ@1V") +DEF_D_BUILTIN (INTRINSIC_BLENDVECTOR, BUILT_IN_NONE, "blendvector", "gcc.simd", + "F@2V0@2V1@1MZ@2V0") +DEF_D_BUILTIN (INTRINSIC_EQUALMASK, BUILT_IN_NONE, "equalMask", "gcc.simd", + "F@1V@1VZ@1V") +DEF_D_BUILTIN (INTRINSIC_NOTEQUALMASK, BUILT_IN_NONE, "notEqualMask", + "gcc.simd", "F@1V@1VZ@1V") +DEF_D_BUILTIN (INTRINSIC_GREATERMASK, BUILT_IN_NONE, "greaterMask", "gcc.simd", + "F@1V@1VZ@1V") +DEF_D_BUILTIN (INTRINSIC_GREATEREQUALMASK, BUILT_IN_NONE, + "greaterOrEqualMask", "gcc.simd", "F@1V@1VZ@1V") + #undef DEF_D_BUILTIN #undef DEF_CTFE_BUILTIN diff --git a/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch.d b/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch.d deleted file mode 100644 index 5340647..0000000 --- a/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch.d +++ /dev/null @@ -1,37 +0,0 @@ -// { dg-do compile } -// { dg-options "-Wbuiltin-declaration-mismatch" } - -extern(C): - -// Mismatched parameter lengths -double tan(); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } - -// Mismatched variadic arguments -int printf(const(char)*); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } - -// Mismatched return type -void puts(char*); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } - -// Mismatched return storage class -ref int isalnum(int); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } - -// Mismatched parameter type -double sin(long); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } - -// Mismatched parameter storage class -double frexp(double, lazy int*); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } -double log(ref double); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } - -// Verify that storage classes don't affect covariance matching -@trusted nothrow @nogc pure double fabs(double); - -// Verify inout is allowed instead of const -inout(char)* strstr(return scope inout(char)*, scope const char*) pure; - -// Verify that FILE* is allowed as it is implicitly convertable to void* -struct _IO_FILE{} -alias FILE = shared(_IO_FILE); -int fprintf(FILE*, scope const char*, scope const ...); - -// Verify integral types with same size are treated as if equivalent -int putchar(dchar); diff --git a/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch1.d b/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch1.d new file mode 100644 index 0000000..5340647 --- /dev/null +++ b/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch1.d @@ -0,0 +1,37 @@ +// { dg-do compile } +// { dg-options "-Wbuiltin-declaration-mismatch" } + +extern(C): + +// Mismatched parameter lengths +double tan(); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } + +// Mismatched variadic arguments +int printf(const(char)*); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } + +// Mismatched return type +void puts(char*); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } + +// Mismatched return storage class +ref int isalnum(int); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } + +// Mismatched parameter type +double sin(long); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } + +// Mismatched parameter storage class +double frexp(double, lazy int*); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } +double log(ref double); // { dg-warning "\\\[-Wbuiltin-declaration-mismatch]" } + +// Verify that storage classes don't affect covariance matching +@trusted nothrow @nogc pure double fabs(double); + +// Verify inout is allowed instead of const +inout(char)* strstr(return scope inout(char)*, scope const char*) pure; + +// Verify that FILE* is allowed as it is implicitly convertable to void* +struct _IO_FILE{} +alias FILE = shared(_IO_FILE); +int fprintf(FILE*, scope const char*, scope const ...); + +// Verify integral types with same size are treated as if equivalent +int putchar(dchar); diff --git a/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch2.d b/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch2.d new file mode 100644 index 0000000..9e90c15 --- /dev/null +++ b/gcc/testsuite/gdc.dg/Wbuiltin_declaration_mismatch2.d @@ -0,0 +1,250 @@ +// { dg-additional-options "-mavx" { target avx_runtime } } +// { dg-do compile { target { avx_runtime || vect_sizes_16B_8B } } } +module gcc.simd; + +alias int4 = __vector(int[4]); +alias short8 = __vector(short[8]); +alias float4 = __vector(float[4]); +alias byte16 = __vector(byte[16]); +struct fake4 { int[4] v; } +enum f = fake4(); + +void test_load_store() +{ + loadUnaligned!int(null); // { dg-warning "mismatch in return type" } + loadUnaligned!double(null); // { dg-warning "mismatch in return type" } + loadUnaligned!int4(null); + loadUnaligned!short8(null); + loadUnaligned!float4(null); + loadUnaligned!byte16(null); + loadUnaligned!fake4(null); // { dg-warning "mismatch in return type" } + + storeUnaligned!int(null, 1); // { dg-warning "mismatch in return type" } + storeUnaligned!double(null, 1); // { dg-warning "mismatch in return type" } + storeUnaligned!int4(null, 1); + storeUnaligned!short8(null, 1); + storeUnaligned!float4(null, 1); + storeUnaligned!byte16(null, 1); + storeUnaligned!fake4(null, f); // { dg-warning "mismatch in return type" } +} + +void test_shuffle() +{ + shuffle!(int, int, int)(0, 0, 0); // { dg-warning "mismatch in return type" } + shuffle!(double, int, int)(0, 0, 0); // { dg-warning "mismatch in return type" } + shuffle!(fake4, int, int)(f, 0, 0); // { dg-warning "mismatch in return type" } + + shuffle!(int4, int, int)(0, 0, 0); // { dg-warning "mismatch in argument 2" } + shuffle!(int4, double, int)(0, 0, 0); // { dg-warning "mismatch in argument 2" } + shuffle!(int4, fake4, int)(0, f, 0); // { dg-warning "mismatch in argument 2" } + + shuffle!(int4, int4, int)(0, 0, 0); // { dg-warning "mismatch in argument 3" } + shuffle!(int4, int4, double)(0, 0, 0); // { dg-warning "mismatch in argument 3" } + shuffle!(int4, int4, fake4)(0, 0, f); // { dg-warning "mismatch in argument 3" } + + shuffle!(int4, int4, int4)(0, 0, 0); + shuffle!(int4, short8, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(int4, float4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(int4, byte16, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(int4, int4, short8)(0, 0, 0); // { dg-error "mismatch in argument 3" } + shuffle!(int4, int4, float4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + shuffle!(int4, int4, byte16)(0, 0, 0); // { dg-error "mismatch in argument 3" } + + shuffle!(float4, int4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(float4, short8, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(float4, float4, int4)(0, 0, 0); + shuffle!(float4, byte16, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(float4, float4, short8)(0, 0, 0); // { dg-error "mismatch in argument 3" } + shuffle!(float4, float4, float4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + shuffle!(float4, float4, byte16)(0, 0, 0); // { dg-error "mismatch in argument 3" } + + shuffle!(short8, int4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(short8, short8, int4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + shuffle!(short8, float4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(short8, byte16, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(short8, short8, short8)(0, 0, 0); + shuffle!(short8, short8, float4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + shuffle!(short8, short8, byte16)(0, 0, 0); // { dg-error "mismatch in argument 3" } + + shuffle!(byte16, int4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(byte16, short8, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(byte16, float4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shuffle!(byte16, byte16, int4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + shuffle!(byte16, byte16, short8)(0, 0, 0); // { dg-error "mismatch in argument 3" } + shuffle!(byte16, byte16, float4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + shuffle!(byte16, byte16, byte16)(0, 0, 0); +} + +void test_shufflevector() +{ + shufflevector!(int, int4, int)(0, 0, 0); // { dg-warning "mismatch in argument 1" } + shufflevector!(double, int4, int)(0, 0, 0); // { dg-warning "mismatch in argument 1" } + shufflevector!(fake4, int4, int)(f, 0, 0); // { dg-warning "mismatch in argument 1" } + + shufflevector!(int4, int, int)(0, 0, 0); // { dg-warning "mismatch in argument 2" } + shufflevector!(int4, double, int)(0, 0, 0); // { dg-warning "mismatch in argument 2" } + shufflevector!(int4, int4, int)(0, 0, 0); + shufflevector!(int4, short8, int)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shufflevector!(int4, float4, int)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shufflevector!(int4, byte16, int)(0, 0, 0); // { dg-error "mismatch in argument 2" } + shufflevector!(int4, fake4, int)(0, f, 0); // { dg-warning "mismatch in argument 2" } + + shufflevector!(int4, int4, double)(0, 0, 0); // { dg-warning "mismatch in argument 3" } + shufflevector!(int4, int4, int4)(0, 0, 0); // { dg-warning "mismatch in argument 3" } + shufflevector!(int4, int4, short8)(0, 0, 0); // { dg-warning "mismatch in argument 3" } + shufflevector!(int4, int4, float4)(0, 0, 0); // { dg-warning "mismatch in argument 3" } + shufflevector!(int4, int4, byte16)(0, 0, 0); // { dg-warning "mismatch in argument 3" } + + shufflevector!(int4, int4, int, double)(0, 0, 0, 0); // { dg-warning "mismatch in argument 4" } + shufflevector!(int4, int4, int, int, double, int)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 5" } + shufflevector!(int4, int4, int, int, int, double)(0, 0, 0, 0, 0, 0); // { dg-warning "mismatch in argument 6" } + + int i; + shufflevector!(int4, int4, int)(0, 0, i); // { dg-error "argument .i. cannot be read at compile time" } + shufflevector!(int4, int4, int)(0, 0, -1u); // { dg-error "element index .-1. is out of bounds" } + shufflevector!(int4, int4, int)(0, 0, 8); // { dg-error "element index .8. is out of bounds" } +} + +void test_convertvector() +{ + convertvector!(int, int)(0); // { dg-warning "mismatch in return type" } + convertvector!(double, int)(0); // { dg-warning "mismatch in return type" } + convertvector!(fake4, int)(0); // { dg-warning "mismatch in return type" } + + convertvector!(int4, int)(0); // { dg-warning "mismatch in argument 1" } + convertvector!(int4, double)(0); // { dg-warning "mismatch in argument 1" } + convertvector!(int4, int4)(0); + convertvector!(int4, short8)(0); // { dg-error "mismatch in argument 1" } + convertvector!(int4, float4)(0); + convertvector!(int4, byte16)(0); // { dg-error "mismatch in argument 1" } + convertvector!(int4, fake4)(f); // { dg-warning "mismatch in argument 1" } + + convertvector!(short8, int)(0); // { dg-warning "mismatch in argument 1" } + convertvector!(short8, double)(0); // { dg-warning "mismatch in argument 1" } + convertvector!(short8, int4)(0); // { dg-error "mismatch in argument 1" } + convertvector!(short8, short8)(0); + convertvector!(short8, float4)(0); // { dg-error "mismatch in argument 1" } + convertvector!(short8, byte16)(0); // { dg-error "mismatch in argument 1" } + convertvector!(short8, fake4)(f); // { dg-warning "mismatch in argument 1" } + + convertvector!(float4, int)(0); // { dg-warning "mismatch in argument 1" } + convertvector!(float4, double)(0); // { dg-warning "mismatch in argument 1" } + convertvector!(float4, int4)(0); + convertvector!(float4, short8)(0); // { dg-error "mismatch in argument 1" } + convertvector!(float4, float4)(0); + convertvector!(float4, byte16)(0); // { dg-error "mismatch in argument 1" } + convertvector!(float4, fake4)(f); // { dg-warning "mismatch in argument 1" } + + convertvector!(byte16, int)(0); // { dg-warning "mismatch in argument 1" } + convertvector!(byte16, double)(0); // { dg-warning "mismatch in argument 1" } + convertvector!(byte16, int4)(0); // { dg-error "mismatch in argument 1" } + convertvector!(byte16, short8)(0); // { dg-error "mismatch in argument 1" } + convertvector!(byte16, float4)(0); // { dg-error "mismatch in argument 1" } + convertvector!(byte16, byte16)(0); + convertvector!(byte16, fake4)(f); // { dg-warning "mismatch in argument 1" } +} + +void test_blendvector() +{ + blendvector!(int, int, int)(0, 0, 0); // { dg-warning "mismatch in return type" } + blendvector!(double, int, int)(0, 0, 0); // { dg-warning "mismatch in return type" } + blendvector!(fake4, int, int)(f, 0, 0); // { dg-warning "mismatch in return type" } + + blendvector!(int4, int, int)(0, 0, 0); // { dg-warning "mismatch in argument 2" } + blendvector!(int4, double, int)(0, 0, 0); // { dg-warning "mismatch in argument 2" } + blendvector!(int4, fake4, int)(0, f, 0); // { dg-warning "mismatch in argument 2" } + + blendvector!(int4, int4, int)(0, 0, 0); // { dg-warning "mismatch in argument 3" } + blendvector!(int4, int4, double)(0, 0, 0); // { dg-warning "mismatch in argument 3" } + blendvector!(int4, int4, fake4)(0, 0, f); // { dg-warning "mismatch in argument 3" } + + blendvector!(int4, int4, int4)(0, 0, 0); + blendvector!(int4, short8, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(int4, float4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(int4, byte16, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(int4, int4, short8)(0, 0, 0); // { dg-error "mismatch in argument 3" } + blendvector!(int4, int4, float4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + blendvector!(int4, int4, byte16)(0, 0, 0); // { dg-error "mismatch in argument 3" } + + blendvector!(float4, int4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(float4, short8, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(float4, float4, int4)(0, 0, 0); + blendvector!(float4, byte16, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(float4, float4, short8)(0, 0, 0); // { dg-error "mismatch in argument 3" } + blendvector!(float4, float4, float4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + blendvector!(float4, float4, byte16)(0, 0, 0); // { dg-error "mismatch in argument 3" } + + blendvector!(short8, int4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(short8, short8, int4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + blendvector!(short8, float4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(short8, byte16, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(short8, short8, short8)(0, 0, 0); + blendvector!(short8, short8, float4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + blendvector!(short8, short8, byte16)(0, 0, 0); // { dg-error "mismatch in argument 3" } + + blendvector!(byte16, int4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(byte16, short8, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(byte16, float4, int4)(0, 0, 0); // { dg-error "mismatch in argument 2" } + blendvector!(byte16, byte16, int4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + blendvector!(byte16, byte16, short8)(0, 0, 0); // { dg-error "mismatch in argument 3" } + blendvector!(byte16, byte16, float4)(0, 0, 0); // { dg-error "mismatch in argument 3" } + blendvector!(byte16, byte16, byte16)(0, 0, 0); +} + +void test_comparison() +{ + equalMask!int(0, 0); // { dg-warning "mismatch in return type" } + equalMask!double(0, 0); // { dg-warning "mismatch in return type" } + equalMask!int4(0, 0); + equalMask!short8(0, 0); + equalMask!float4(0, 0); + equalMask!byte16(0, 0); + equalMask!fake4(f, f); // { dg-warning "mismatch in return type" } + + notEqualMask!int(0, 0); // { dg-warning "mismatch in return type" } + notEqualMask!double(0, 0); // { dg-warning "mismatch in return type" } + notEqualMask!int4(0, 0); + notEqualMask!short8(0, 0); + notEqualMask!float4(0, 0); + notEqualMask!byte16(0, 0); + notEqualMask!fake4(f, f); // { dg-warning "mismatch in return type" } + + greaterMask!int(0, 0); // { dg-warning "mismatch in return type" } + greaterMask!double(0, 0); // { dg-warning "mismatch in return type" } + greaterMask!int4(0, 0); + greaterMask!short8(0, 0); + greaterMask!float4(0, 0); + greaterMask!byte16(0, 0); + greaterMask!fake4(f, f); // { dg-warning "mismatch in return type" } + + greaterOrEqualMask!int(0, 0); // { dg-warning "mismatch in return type" } + greaterOrEqualMask!double(0, 0); // { dg-warning "mismatch in return type" } + greaterOrEqualMask!int4(0, 0); + greaterOrEqualMask!short8(0, 0); + greaterOrEqualMask!float4(0, 0); + greaterOrEqualMask!byte16(0, 0); + greaterOrEqualMask!fake4(f, f); // { dg-warning "mismatch in return type" } +} + +// The following declarations of the simd intrinsics are without any guards +// to verify `d/intrinsics.cc` is doing checks to prevent invalid lowerings. +V loadUnaligned(V)(const V*); +V storeUnaligned(V)(V*, V); + +V0 shuffle(V0, V1, M)(V0, V1, M); + +// Use overloads to test different argument positions. +template E(V) { alias typeof(V.array[0]) E; } +enum isV(T) = is(T : __vector(V[N]), V, size_t N); + +__vector(E!V1[M.length]) shufflevector(V1, V2, M...)(V1, V2, M) if (isV!V1 && !isV!V2); +__vector(E!V2[M.length]) shufflevector(V1, V2, M...)(V1, V2, M) if (isV!V2 && !isV!V1); +__vector(E!V1[M.length]) shufflevector(V1, V2, M...)(V1, V2, M) if (isV!V1 && isV!V2); + +V convertvector(V, T)(T); +V0 blendvector(V0, V1, M)(V0, V1, M); + +V equalMask(V)(V, V); +V notEqualMask(V)(V, V); +V greaterMask(V)(V, V); +V greaterOrEqualMask(V)(V, V); diff --git a/gcc/testsuite/gdc.dg/torture/simd_blendvector.d b/gcc/testsuite/gdc.dg/torture/simd_blendvector.d new file mode 100644 index 0000000..42459bd --- /dev/null +++ b/gcc/testsuite/gdc.dg/torture/simd_blendvector.d @@ -0,0 +1,345 @@ +// { dg-additional-options "-mavx" { target avx_runtime } } +// { dg-skip-if "needs gcc/config.d" { ! d_runtime } } +import gcc.simd; + +void testblendvector(V, VI = V)() +{ + alias E = typeof(V.array[0]); + enum numElements = V.sizeof / E.sizeof; + + static if (numElements == 16) + { + // Test fragment for vectors with 16 elements + immutable V[5] in1 = + [[ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ]]; + + immutable V in2 = + [ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 ]; + + immutable VI[5] mask1 = + [[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ], + [ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], + [ 7, 6, 5, 4, 16, 17, 18, 19, 31, 30, 29, 28, 3, 2, 1, 0 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + [ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 ]]; + + immutable V[5] out1 = + [[30, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], + [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], + [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 45], + [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], + [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]]; + } + else static if (numElements == 8) + { + // Test fragment for vectors with 8 elements + static if (is(E == uint)) + { + enum E A1 = 0x11121314; + enum E B1 = 0x21222324; + enum E C1 = 0x31323334; + enum E D1 = 0x41424344; + enum E E1 = 0x51525354; + enum E F1 = 0x61626364; + enum E G1 = 0x71727374; + enum E H1 = 0x81828384; + + enum E A2 = 0x91929394; + enum E B2 = 0xa1a2a3a4; + enum E C2 = 0xb1b2b3b4; + enum E D2 = 0xc1c2c3c4; + enum E E2 = 0xd1d2d3d4; + enum E F2 = 0xe1e2e3e4; + enum E G2 = 0xf1f2f3f4; + enum E H2 = 0x01020304; + } + else static if (is(E == ushort)) + { + enum E A1 = 0x1112; + enum E B1 = 0x2122; + enum E C1 = 0x3132; + enum E D1 = 0x4142; + enum E E1 = 0x5152; + enum E F1 = 0x6162; + enum E G1 = 0x7172; + enum E H1 = 0x8182; + + enum E A2 = 0x9192; + enum E B2 = 0xa1a2; + enum E C2 = 0xb1b2; + enum E D2 = 0xc1c2; + enum E E2 = 0xd1d2; + enum E F2 = 0xe1e2; + enum E G2 = 0xf1f2; + enum E H2 = 0x0102; + } + else static if (is(E == ubyte)) + { + enum E A1 = 0x11; + enum E B1 = 0x12; + enum E C1 = 0x13; + enum E D1 = 0x14; + enum E E1 = 0x15; + enum E F1 = 0x16; + enum E G1 = 0x17; + enum E H1 = 0x18; + + enum E A2 = 0xf1; + enum E B2 = 0xf2; + enum E C2 = 0xf3; + enum E D2 = 0xf4; + enum E E2 = 0xf5; + enum E F2 = 0xf6; + enum E G2 = 0xf7; + enum E H2 = 0xf8; + } + else + enum unsupported = true; + + static if (!__traits(compiles, unsupported)) + { + immutable V[6] in1 = + [[ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ]]; + + + immutable V in2 = + [ A2, B2, C2, D2, E2, F2, G2, H2 ]; + + immutable VI[6] mask1 = + [[ 0, 1, 2 , 3 , 4 , 5 , 6 , 0 ], + [ 8, 9, 0, 11, 12, 13, 0, 15 ], + [ 0, 8, 1, 0, 2, 0, 3, 11 ], + [ 0, 15, 4, 11, 0, 3, 7, 8 ], + [ 0, 0, 0, 0, 0, 0, 0, 0 ], + [ 0x1e, 0x2e, 0x3e, 0x4e, 0x5e, 0x6e, 0x7e, 0x8e ]]; + + immutable V[6] out1 = + [[ A2, B1, C1, D1, E1, F1, G1, H2 ], + [ A1, B1, C2, D1, E1, F1, G2, H1 ], + [ A2, B1, C1, D2, E1, F2, G1, H1 ], + [ A2, B1, C1, D1, E2, F1, G1, H1 ], + [ A2, B2, C2, D2, E2, F2, G2, H2 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ]]; + } + } + else static if (numElements == 4) + { + // Test fragment for vectors with 4 elements + static if (is(E == double)) + { + enum E A = 0.69314718055994530942; + enum E B = 2.7182818284590452354; + enum E C = 2.30258509299404568402; + enum E D = 1.4426950408889634074; + + enum E W = 0.31830988618379067154; + enum E X = 3.14159265358979323846; + enum E Y = 1.41421356237309504880; + enum E Z = 0.70710678118654752440; + } + else static if (is(E == float)) + { + enum E A = 0.69314718055994530942f; + enum E B = 2.7182818284590452354f; + enum E C = 2.30258509299404568402f; + enum E D = 1.4426950408889634074f; + + enum E W = 0.31830988618379067154f; + enum E X = 3.14159265358979323846f; + enum E Y = 1.41421356237309504880f; + enum E Z = 0.70710678118654752440f; + } + else static if (is(E == ulong)) + { + enum E A = 0x1112131415161718; + enum E B = 0x2122232425262728; + enum E C = 0x3132333435363738; + enum E D = 0x4142434445464748; + + enum E W = 0xc1c2c3c4c5c6c7c8; + enum E X = 0xd1d2d3d4d5d6d7d8; + enum E Y = 0xe1e2e3e4e5e6e7e8; + enum E Z = 0xf1f2f3f4f5f6f7f8; + } + else static if (is(E == uint)) + { + enum E A = 0x11121314; + enum E B = 0x21222324; + enum E C = 0x31323334; + enum E D = 0x41424344; + + enum E W = 0xc1c2c3c4; + enum E X = 0xd1d2d3d4; + enum E Y = 0xe1e2e3e4; + enum E Z = 0xf1f2f3f4; + } + else + enum unsupported = true; + + static if (!__traits(compiles, unsupported)) + { + immutable V[6] in1 = + [[ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ]]; + + immutable V in2 = [ W, X, Y, Z ]; + + immutable VI[6] mask1 = + [[ 0, 1, 2, 3 ], + [ 4, 0, 6, 7 ], + [ 0, 4, 0, 5 ], + [ 0, 7, 4, 0 ], + [ 0, 0, 0, 0 ], + [ 7, 7, 7, 7 ]]; + + immutable V[6] out1 = + [[ W, B, C, D ], + [ A, X, C, D ], + [ W, B, Y, D ], + [ W, B, C, Z ], + [ W, X, Y, Z ], + [ A, B, C, D ]]; + } + } + else static if (numElements == 2) + { + // Test fragment for vectors with 2 elements + static if (is(E == double)) + { + enum E A = 0.69314718055994530942; + enum E B = 2.7182818284590452354; + + enum E X = 3.14159265358979323846; + enum E Y = 1.41421356237309504880; + } + else static if (is(E == float)) + { + enum E A = 0.69314718055994530942f; + enum E B = 2.7182818284590452354f; + + enum E X = 3.14159265358979323846f; + enum E Y = 1.41421356237309504880f; + } + else static if (is(E == ulong)) + { + enum E A = 0x1112131415161718; + enum E B = 0x2122232425262728; + + enum E X = 0xc1c2c3c4c5c6c7c8; + enum E Y = 0xd1d2d3d4d5d6d7d8; + } + else static if (is(E == uint)) + { + enum E A = 0x11121314; + enum E B = 0x21222324; + + enum E X = 0xd1d2d3d4; + enum E Y = 0xe1e2e3e4; + } + else + enum unsupported = true; + + static if (!__traits(compiles, unsupported)) + { + immutable V[7] in1 = + [[ A, B ], + [ A, B ], + [ A, B ], + [ A, B ], + [ A, B ], + [ A, B ], + [ A, B ]]; + + immutable V in2 = [ X, Y ]; + + immutable VI[7] mask1 = + [[ 0, 1 ], + [ 2, 3 ], + [ 0, 2 ], + [ 2, 1 ], + [ 3, 0 ], + [ 0, 0 ], + [ 3, 3 ]]; + + immutable V[7] out1 = + [[ X, B ], + [ A, B ], + [ X, B ], + [ A, B ], + [ A, Y ], + [ X, Y ], + [ A, B ]]; + } + } + else + enum unsupported = true; + + static if (!__traits(compiles, unsupported)) + { + static foreach (i; 0 .. in1.length) + assert(blendvector(in1[i], in2, mask1[i]).array == out1[i].array); + } +} + +void main() +{ + static if (__traits(compiles, __vector(ubyte[16]))) + testblendvector!(__vector(ubyte[16]))(); + + static if (__traits(compiles, __vector(ushort[16]))) + testblendvector!(__vector(ushort[16]))(); + + static if (__traits(compiles, __vector(ubyte[8]))) + testblendvector!(__vector(ubyte[8]))(); + + static if (__traits(compiles, __vector(ushort[8]))) + testblendvector!(__vector(ushort[8]))(); + + static if (__traits(compiles, __vector(uint[8]))) + testblendvector!(__vector(uint[8]))(); + + static if (__traits(compiles, __vector(ulong[4]))) + { + testblendvector!(__vector(ulong[4])); + + static if (__traits(compiles, __vector(double[4]))) + testblendvector!(__vector(double[4]), __vector(ulong[4])); + } + + static if (__traits(compiles, __vector(uint[4]))) + { + testblendvector!(__vector(uint[4])); + + static if (__traits(compiles, __vector(float[4]))) + testblendvector!(__vector(float[4]), __vector(uint[4])); + } + + static if (__traits(compiles, __vector(ulong[2]))) + { + testblendvector!(__vector(ulong[2])); + + static if (__traits(compiles, __vector(double[2]))) + testblendvector!(__vector(double[2]), __vector(ulong[2])); + } + + static if (__traits(compiles, __vector(uint[2]))) + { + testblendvector!(__vector(uint[2])); + + static if (__traits(compiles, __vector(float[2]))) + testblendvector!(__vector(float[2]), __vector(uint[2])); + } +} diff --git a/gcc/testsuite/gdc.dg/torture/simd_cond.d b/gcc/testsuite/gdc.dg/torture/simd_cond.d new file mode 100644 index 0000000..1548956 --- /dev/null +++ b/gcc/testsuite/gdc.dg/torture/simd_cond.d @@ -0,0 +1,17 @@ +// { dg-skip-if "needs gcc/config.d" { ! d_runtime } } + +import gcc.simd; + +void main() +{ + static if (__traits(compiles, __vector(int[4]))) + { + __gshared __vector(int[4]) a = [1,3,5,7]; + __gshared __vector(int[4]) b = [2,3,4,5]; + + assert(equalMask(a, b).array == [0,-1,0,0]); + assert(notEqualMask(a, b).array == [-1,0,-1,-1]); + assert(greaterMask(a, b).array == [0,0,-1,-1]); + assert(greaterOrEqualMask(a, b).array == [0,-1,-1,-1]); + } +} diff --git a/gcc/testsuite/gdc.dg/torture/simd_convertvector.d b/gcc/testsuite/gdc.dg/torture/simd_convertvector.d new file mode 100644 index 0000000..0d6b18e --- /dev/null +++ b/gcc/testsuite/gdc.dg/torture/simd_convertvector.d @@ -0,0 +1,122 @@ +// { dg-additional-options "-mavx" { target avx_runtime } } +// { dg-skip-if "needs gcc/config.d" { ! d_runtime } } +import gcc.simd; + +void main () +{ + static if (__traits(compiles, __vector(int[4]))) + alias int4 = __vector(int[4]); + static if (__traits(compiles, __vector(uint[4]))) + alias uint4 = __vector(uint[4]); + static if (__traits(compiles, __vector(float[4]))) + alias float4 = __vector(float[4]); + static if (__traits(compiles, __vector(double[4]))) + alias double4 = __vector(double[4]); + + static if (__traits(compiles, int4)) + { + union U1 { int4 v; int[4] a; } + U1 u1; + } + static if (__traits(compiles, uint4)) + { + union U2 { uint4 v; uint[4] a; } + U2 u2; + } + static if (__traits(compiles, float4)) + { + union U3 { float4 v; float[4] a; } + U3 u3; + } + static if (__traits(compiles, double4)) + { + union U4 { double4 v; double[4] a; } + U4 u4; + } + + static if (__traits(compiles, u1) && __traits(compiles, u2)) + { + static void f1(ref uint4 x, out int4 y) + { + y = convertvector!int4(x); + } + static foreach (i; 0 .. 4) + u2.a[i] = i * 2; + f1(u2.v, u1.v); + static foreach (i; 0 .. 4) + assert(u1.a[i] == i * 2); + } + + static if (__traits(compiles, u1) && __traits(compiles, u3)) + { + static void f2(ref float4 x, out int4 y) + { + y = convertvector!int4(x); + } + + static void f3(ref int4 x, out float4 y) + { + y = convertvector!float4(x); + } + + static foreach (i; 0 .. 4) + u3.a[i] = i - 2.25f; + f2(u3.v, u1.v); + static foreach (i; 0 .. 4) + assert(u1.a[i] == (i == 3 ? 0 : i - 2)); + + static foreach (i; 0 .. 4) + u3.a[i] = i + 0.75f; + f2(u3.v, u1.v); + static foreach (i; 0 .. 4) + assert(u1.a[i] == i); + + static foreach (i; 0 .. 4) + u1.a[i] = 7 * i - 5; + f3(u1.v, u3.v); + static foreach (i; 0 .. 4) + assert(u3.a[i] == 7 * i - 5); + } + static if (__traits(compiles, u1) && __traits(compiles, u4)) + { + static void f4(ref double4 x, out int4 y) + { + y = convertvector!int4(x); + } + + static void f5(ref int4 x, out double4 y) + { + y = convertvector!double4(x); + } + + static foreach (i; 0 .. 4) + u4.a[i] = i - 2.25; + f4(u4.v, u1.v); + static foreach (i; 0 .. 4) + assert(u1.a[i] == (i == 3 ? 0 : i - 2)); + + static foreach (i; 0 .. 4) + u4.a[i] = i + 0.75; + f4(u4.v, u1.v); + static foreach (i; 0 .. 4) + assert(u1.a[i] == i); + + static foreach (i; 0 .. 4) + u1.a[i] = 7 * i - 5; + f5(u1.v, u4.v); + static foreach (i; 0 .. 4) + assert(u4.a[i] == 7 * i - 5); + } + static if (__traits(compiles, u4)) + { + static void f6(out double4 x) + { + int4 a = [1, 2, -3, -4]; + x = convertvector!double4(a); + } + + f6(u4.v); + static foreach (i; 0 .. 4) + assert(u4.a[i] == (i >= 2 ? -1 - i : i + 1)); + } +} diff --git a/gcc/testsuite/gdc.dg/torture/simd_load.d b/gcc/testsuite/gdc.dg/torture/simd_load.d new file mode 100644 index 0000000..188ffda --- /dev/null +++ b/gcc/testsuite/gdc.dg/torture/simd_load.d @@ -0,0 +1,52 @@ +// { dg-additional-options "-mavx" { target avx_runtime } } +// { dg-skip-if "needs gcc/config.d" { ! d_runtime } } +import gcc.simd; + +void main() +{ + ubyte[32] data; + foreach (i; 0..data.length) + { + data[i] = cast(ubyte)i; + } + + // to test all alignments from 1 ~ 16 + foreach (i; 0..16) + { + ubyte* d = &data[i]; + + void test(T)() + { + // load the data + T v = loadUnaligned(cast(T*)d); + + // check that the data was loaded correctly + ubyte* ptrToV = cast(ubyte*)&v; + foreach (j; 0..T.sizeof) + assert(ptrToV[j] == d[j]); + } + + static if (__traits(compiles, __vector(void[16]))) + test!(__vector(void[16]))(); + static if (__traits(compiles, __vector(byte[16]))) + test!(__vector(byte[16]))(); + static if (__traits(compiles, __vector(ubyte[16]))) + test!(__vector(ubyte[16]))(); + static if (__traits(compiles, __vector(short[8]))) + test!(__vector(short[8]))(); + static if (__traits(compiles, __vector(ushort[8]))) + test!(__vector(ushort[8]))(); + static if (__traits(compiles, __vector(int[4]))) + test!(__vector(int[4]))(); + static if (__traits(compiles, __vector(uint[4]))) + test!(__vector(uint[4]))(); + static if (__traits(compiles, __vector(long[2]))) + test!(__vector(long[2]))(); + static if (__traits(compiles, __vector(ulong[2]))) + test!(__vector(ulong[2]))(); + static if (__traits(compiles, __vector(double[2]))) + test!(__vector(double[2]))(); + static if (__traits(compiles, __vector(float[4]))) + test!(__vector(float[4]))(); + } +} diff --git a/gcc/testsuite/gdc.dg/torture/simd_logical.d b/gcc/testsuite/gdc.dg/torture/simd_logical.d new file mode 100644 index 0000000..e9c23f5 --- /dev/null +++ b/gcc/testsuite/gdc.dg/torture/simd_logical.d @@ -0,0 +1,19 @@ +// { dg-skip-if "needs gcc/config.d" { ! d_runtime } } + +import gcc.simd; + +void main() +{ + static if (__traits(compiles, __vector(int[4]))) + { + __gshared __vector(int[4]) a = [1,0,-1,2]; + + assert(notMask(a).array == [0,-1,0,0]); + + assert(andAndMask(a, 1).array == [-1,0,-1,-1]); + assert(andAndMask(a, 0).array == [0,0,0,0]); + + assert(orOrMask(a, 1).array == [-1,-1,-1,-1]); + assert(orOrMask(a, 0).array == [-1,0,-1,-1]); + } +} diff --git a/gcc/testsuite/gdc.dg/torture/simd_shuffle.d b/gcc/testsuite/gdc.dg/torture/simd_shuffle.d new file mode 100644 index 0000000..3629cee --- /dev/null +++ b/gcc/testsuite/gdc.dg/torture/simd_shuffle.d @@ -0,0 +1,454 @@ +// { dg-additional-options "-mavx" { target avx_runtime } } +// { dg-skip-if "needs gcc/config.d" { ! d_runtime } } +import gcc.simd; + +void testshuffle(V, VI = V)() +{ + alias E = typeof(V.array[0]); + enum numElements = V.sizeof / E.sizeof; + + static if (numElements == 16) + { + // Test fragment for vectors with 16 elements + immutable V[5] in1 = + [[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ], + [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ], + [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ], + [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ], + [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]]; + + immutable VI[5] mask1 = + [[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ], + [ 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, 0x76, 0x87, + 0x98, 0xa9, 0xba, 0xcb, 0xdc, 0xed, 0xfe, 0xff ] , + [ 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 ], + [ 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15 ], + [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ]]; + + immutable V[5] out1 = + [[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ], + [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ], + [ 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ], + [ 1, 3, 5, 7, 9, 11, 13, 15, 2, 4, 6, 8, 10, 12, 14, 16 ], + [ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ]]; + + immutable V[5] in2 = + [[ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ]]; + + immutable V in3 = + [ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 ]; + + immutable VI[5] mask2 = + [[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ], + [ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], + [ 7, 6, 5, 4, 16, 17, 18, 19, 31, 30, 29, 28, 3, 2, 1, 0 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], + [ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 ]]; + + immutable V[5] out2 = + [[ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ], + [ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 ], + [ 17, 16, 15, 14, 30, 31, 32, 33, 45, 44, 43, 42, 13, 12, 11, 10 ], + [ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 ], + [ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45 ]]; + } + else static if (numElements == 8) + { + // Test fragment for vectors with 8 elements + static if (is(E == uint)) + { + enum E A1 = 0x11121314; + enum E B1 = 0x21222324; + enum E C1 = 0x31323334; + enum E D1 = 0x41424344; + enum E E1 = 0x51525354; + enum E F1 = 0x61626364; + enum E G1 = 0x71727374; + enum E H1 = 0x81828384; + + enum E A2 = 0x91929394; + enum E B2 = 0xa1a2a3a4; + enum E C2 = 0xb1b2b3b4; + enum E D2 = 0xc1c2c3c4; + enum E E2 = 0xd1d2d3d4; + enum E F2 = 0xe1e2e3e4; + enum E G2 = 0xf1f2f3f4; + enum E H2 = 0x01020304; + } + else static if (is(E == ushort)) + { + enum E A1 = 0x1112; + enum E B1 = 0x2122; + enum E C1 = 0x3132; + enum E D1 = 0x4142; + enum E E1 = 0x5152; + enum E F1 = 0x6162; + enum E G1 = 0x7172; + enum E H1 = 0x8182; + + enum E A2 = 0x9192; + enum E B2 = 0xa1a2; + enum E C2 = 0xb1b2; + enum E D2 = 0xc1c2; + enum E E2 = 0xd1d2; + enum E F2 = 0xe1e2; + enum E G2 = 0xf1f2; + enum E H2 = 0x0102; + } + else static if (is(E == ubyte)) + { + enum E A1 = 0x11; + enum E B1 = 0x12; + enum E C1 = 0x13; + enum E D1 = 0x14; + enum E E1 = 0x15; + enum E F1 = 0x16; + enum E G1 = 0x17; + enum E H1 = 0x18; + + enum E A2 = 0xf1; + enum E B2 = 0xf2; + enum E C2 = 0xf3; + enum E D2 = 0xf4; + enum E E2 = 0xf5; + enum E F2 = 0xf6; + enum E G2 = 0xf7; + enum E H2 = 0xf8; + } + else + enum unsupported = true; + + static if (!__traits(compiles, unsupported)) + { + immutable V[8] in1 = + [[ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A2, B2, C2, D2, E2, F2, G2, H2 ], + [ A2, B2, C2, D2, E2, F2, G2, H2 ], + [ A2, B2, C2, D2, E2, F2, G2, H2 ]]; + + immutable VI[8] mask1 = + [[ 0, 1, 2, 3, 4, 5, 6, 7 ], + [ 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, 0x76, 0x87 ], + [ 7, 6, 5, 4, 3, 2, 1, 0 ], + [ 7, 0, 5, 3, 2, 4, 1, 6 ], + [ 0, 2, 1, 3, 4, 6, 5, 7 ], + [ 3, 1, 2, 0, 7, 5, 6, 4 ], + [ 0, 0, 0, 0 ], + [ 1, 6, 1, 6, 1, 6, 1, 6 ]]; + + immutable V[8] out1 = + [[ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ H1, G1, F1, E1, D1, C1, B1, A1 ], + [ H1, A1, F1, D1, C1, E1, B1, G1 ], + [ A1, C1, B1, D1, E1, G1, F1, H1 ], + [ D2, B2, C2, A2, H2, F2, G2, E2 ], + [ A2, A2, A2, A2, A2, A2, A2, A2 ], + [ B2, G2, B2, G2, B2, G2, B2, G2 ]]; + + immutable V[6] in2 = + [[ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A1, B1, C1, D1, E1, F1, G1, H1 ]]; + + + immutable V in3 = + [ A2, B2, C2, D2, E2, F2, G2, H2 ]; + + immutable VI[6] mask2 = + [[ 0, 1, 2, 3, 4, 5, 6, 7 ], + [ 8, 9, 10, 11, 12, 13, 14, 15 ], + [ 0, 8, 1, 9, 2, 10, 3, 11 ], + [ 0, 15, 4, 11, 12, 3, 7, 8 ], + [ 0, 0, 0, 0, 0, 0, 0, 0 ], + [ 0x1e, 0x2e, 0x3e, 0x4e, 0x5e, 0x6e, 0x7e, 0x8e ]]; + + immutable V[6] out2 = + [[ A1, B1, C1, D1, E1, F1, G1, H1 ], + [ A2, B2, C2, D2, E2, F2, G2, H2 ], + [ A1, A2, B1, B2, C1, C2, D1, D2 ], + [ A1, H2, E1, D2, E2, D1, H1, A2 ], + [ A1, A1, A1, A1, A1, A1, A1, A1 ], + [ G2, G2, G2, G2, G2, G2, G2, G2 ]]; + } + } + else static if (numElements == 4) + { + // Test fragment for vectors with 4 elements + static if (is(E == double)) + { + enum E A = 0.69314718055994530942; + enum E B = 2.7182818284590452354; + enum E C = 2.30258509299404568402; + enum E D = 1.4426950408889634074; + + enum E W = 0.31830988618379067154; + enum E X = 3.14159265358979323846; + enum E Y = 1.41421356237309504880; + enum E Z = 0.70710678118654752440; + } + else static if (is(E == float)) + { + enum E A = 0.69314718055994530942f; + enum E B = 2.7182818284590452354f; + enum E C = 2.30258509299404568402f; + enum E D = 1.4426950408889634074f; + + enum E W = 0.31830988618379067154f; + enum E X = 3.14159265358979323846f; + enum E Y = 1.41421356237309504880f; + enum E Z = 0.70710678118654752440f; + } + else static if (is(E == ulong)) + { + enum E A = 0x1112131415161718; + enum E B = 0x2122232425262728; + enum E C = 0x3132333435363738; + enum E D = 0x4142434445464748; + + enum E W = 0xc1c2c3c4c5c6c7c8; + enum E X = 0xd1d2d3d4d5d6d7d8; + enum E Y = 0xe1e2e3e4e5e6e7e8; + enum E Z = 0xf1f2f3f4f5f6f7f8; + } + else static if (is(E == uint)) + { + enum E A = 0x11121314; + enum E B = 0x21222324; + enum E C = 0x31323334; + enum E D = 0x41424344; + + enum E W = 0xc1c2c3c4; + enum E X = 0xd1d2d3d4; + enum E Y = 0xe1e2e3e4; + enum E Z = 0xf1f2f3f4; + } + else + enum unsupported = true; + + static if (!__traits(compiles, unsupported)) + { + immutable V[8] in1 = + [[ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ], + [ W, X, Y, Z ], + [ W, X, Y, Z ], + [ W, X, Y, Z ]]; + + immutable VI[8] mask1 = + [[ 0, 1, 2, 3 ], + [ 0+1*4, 1+2*4, 2+3*4, 3+4*4 ], + [ 3, 2, 1, 0 ], + [ 0, 3, 2, 1 ], + [ 0, 2, 1, 3 ], + [ 3, 1, 2, 0 ], + [ 0, 0, 0, 0 ], + [ 1, 2, 1, 2 ]]; + + immutable V[8] out1 = + [[ A, B, C, D ], + [ A, B, C, D ], + [ D, C, B, A ], + [ A, D, C, B ], + [ A, C, B, D ], + [ Z, X, Y, W ], + [ W, W, W, W ], + [ X, Y, X, Y ]]; + + + immutable V[6] in2 = + [[ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ], + [ A, B, C, D ]]; + + immutable V in3 = [ W, X, Y, Z ]; + + immutable VI[6] mask2 = + [[ 0, 1, 2, 3 ], + [ 4, 5, 6, 7 ], + [ 0, 4, 1, 5 ], + [ 0, 7, 4, 3 ], + [ 0, 0, 0, 0 ], + [ 7, 7, 7, 7 ]]; + + immutable V[6] out2 = + [[ A, B, C, D ], + [ W, X, Y, Z ], + [ A, W, B, X ], + [ A, Z, W, D ], + [ A, A, A, A ], + [ Z, Z, Z, Z ]]; + } + } + else static if (numElements == 2) + { + // Test fragment for vectors with 2 elements + static if (is(E == double)) + { + enum E A = 0.69314718055994530942; + enum E B = 2.7182818284590452354; + + enum E X = 3.14159265358979323846; + enum E Y = 1.41421356237309504880; + } + else static if (is(E == float)) + { + enum E A = 0.69314718055994530942f; + enum E B = 2.7182818284590452354f; + + enum E X = 3.14159265358979323846f; + enum E Y = 1.41421356237309504880f; + } + else static if (is(E == ulong)) + { + enum E A = 0x1112131415161718; + enum E B = 0x2122232425262728; + + enum E X = 0xc1c2c3c4c5c6c7c8; + enum E Y = 0xd1d2d3d4d5d6d7d8; + } + else static if (is(E == uint)) + { + enum E A = 0x11121314; + enum E B = 0x21222324; + + enum E X = 0xd1d2d3d4; + enum E Y = 0xe1e2e3e4; + } + else + enum unsupported = true; + + static if (!__traits(compiles, unsupported)) + { + immutable V[6] in1 = + [[ A, B ], + [ A, B ], + [ A, B ], + [ A, B ], + [ X, Y ], + [ X, Y ]]; + + immutable VI[6] mask1 = + [[ 0, 1 ], + [ -16, 1 ], + [ 1, 0 ], + [ 0, 0 ], + [ 1, 1 ], + [ 1, 0 ]]; + + immutable V[6] out1 = + [[ A, B ], + [ A, B ], + [ B, A ], + [ A, A ], + [ Y, Y ], + [ Y, X ]]; + + immutable V[7] in2 = + [[ A, B ], + [ A, B ], + [ A, B ], + [ A, B ], + [ A, B ], + [ A, B ], + [ A, B ]]; + + immutable V in3 = [ X, Y ]; + + immutable VI[7] mask2 = + [[ 0, 1 ], + [ 2, 3 ], + [ 0, 2 ], + [ 2, 1 ], + [ 3, 0 ], + [ 0, 0 ], + [ 3, 3 ]]; + + immutable V[7] out2 = + [[ A, B ], + [ X, Y ], + [ A, X ], + [ X, B ], + [ Y, A ], + [ A, A ], + [ Y, Y ]]; + } + } + else + enum unsupported = true; + + static if (!__traits(compiles, unsupported)) + { + static foreach (i; 0 .. in1.length) + assert(shuffle(in1[i], mask1[i]).array == out1[i].array); + static foreach (i; 0 .. in2.length) + assert(shuffle(in2[i], in3, mask2[i]).array == out2[i].array); + } +} + +void main() +{ + static if (__traits(compiles, __vector(ubyte[16]))) + testshuffle!(__vector(ubyte[16]))(); + + static if (__traits(compiles, __vector(ushort[16]))) + testshuffle!(__vector(ushort[16]))(); + + static if (__traits(compiles, __vector(ubyte[8]))) + testshuffle!(__vector(ubyte[8]))(); + + static if (__traits(compiles, __vector(ushort[8]))) + testshuffle!(__vector(ushort[8]))(); + + static if (__traits(compiles, __vector(uint[8]))) + testshuffle!(__vector(uint[8]))(); + + static if (__traits(compiles, __vector(ulong[4]))) + { + testshuffle!(__vector(ulong[4])); + + static if (__traits(compiles, __vector(double[4]))) + testshuffle!(__vector(double[4]), __vector(ulong[4])); + } + + static if (__traits(compiles, __vector(uint[4]))) + { + testshuffle!(__vector(uint[4])); + + static if (__traits(compiles, __vector(float[4]))) + testshuffle!(__vector(float[4]), __vector(uint[4])); + } + + static if (__traits(compiles, __vector(ulong[2]))) + { + testshuffle!(__vector(ulong[2])); + + static if (__traits(compiles, __vector(double[2]))) + testshuffle!(__vector(double[2]), __vector(ulong[2])); + } + + static if (__traits(compiles, __vector(uint[2]))) + { + testshuffle!(__vector(uint[2])); + + static if (__traits(compiles, __vector(float[2]))) + testshuffle!(__vector(float[2]), __vector(uint[2])); + } +} diff --git a/gcc/testsuite/gdc.dg/torture/simd_shufflevector.d b/gcc/testsuite/gdc.dg/torture/simd_shufflevector.d new file mode 100644 index 0000000..cc55999 --- /dev/null +++ b/gcc/testsuite/gdc.dg/torture/simd_shufflevector.d @@ -0,0 +1,55 @@ +// { dg-additional-options "-mavx" { target avx_runtime } } +// { dg-skip-if "needs gcc/config.d" { ! d_runtime } } +import gcc.simd; +import gcc.attributes; + +void main() +{ + static if (__traits(compiles, __vector(int[4]))) + alias int4 = __vector(int[4]); + static if (__traits(compiles, __vector(int[8]))) + alias int8 = __vector(int[8]); + + static if (__traits(compiles, int4) && __traits(compiles, int8)) + { + __gshared int4[5] res; + __gshared int4 a; + __gshared int4 b; + __gshared int8[3] res8; + __gshared int8 a8; + __gshared int8 b8; + + @noipa static void foo() + { + res[0] = shufflevector(a, b, 0, 1, 4, 5); + res[1] = shufflevector(a, b, 0, 1, 2, 5); + res8[0] = shufflevector(a, b, 0, 1, 2, 2 + 1, 4, 5, 6, 7); + res[2] = shufflevector(a8, b8, 0, 8, 1, 9); + res[3] = shufflevector(a8, b, 0, 8, 1, 9); + res[4] = shufflevector(a, b8, 0, 4, 1, 5); + res8[1] = shufflevector(a8, b, 0, 8, 1, 9, 10, 11, 2, 3); + res8[2] = shufflevector(a, b8, 0, 4, 1, 5, 4, 5, 6, 7); + } + + a = [0, 1, 2, 3]; + b = [4, 5, 6, 7]; + a8 = [0, 1, 2, 3, 4, 5, 6, 7]; + b8 = [8, 9, 10, 11, 12, 13, 14, 15]; + foo(); + assert(res[0].array == [0, 1, 4, 5]); + + res[1][2] = 9; + assert(res[1].array == [0, 1, 9, 5]); + assert(res8[0].array == [0, 1, 2, 3, 4, 5, 6, 7]); + assert(res[2].array == [0, 8, 1, 9]); + assert(res[3].array == [0, 4, 1, 5]); + assert(res[4].array == [0, 8, 1, 9]); + assert(res8[1].array == [0, 4, 1, 5, 6, 7, 2, 3]); + + res8[2][4] = 42; + res8[2][5] = 42; + res8[2][6] = 42; + res8[2][7] = 42; + assert(res8[2].array == [0, 8, 1, 9, 42, 42, 42, 42]); + } +} diff --git a/gcc/testsuite/gdc.dg/torture/simd_store.d b/gcc/testsuite/gdc.dg/torture/simd_store.d new file mode 100644 index 0000000..b96ed42 --- /dev/null +++ b/gcc/testsuite/gdc.dg/torture/simd_store.d @@ -0,0 +1,54 @@ +// { dg-additional-options "-mavx" { target avx_runtime } } +// { dg-skip-if "needs gcc/config.d" { ! d_runtime } } +import gcc.simd; + +void main() +{ + ubyte[32] data; + + // to test all alignments from 1 ~ 16 + foreach (i; 0..16) + { + ubyte* d = &data[i]; + + void test(T)() + { + T v; + + // populate v` with data + ubyte* ptrToV = cast(ubyte*)&v; + foreach (j; 0..T.sizeof) + ptrToV[j] = cast(ubyte)j; + + // store `v` to location pointed to by `d` + storeUnaligned(cast(T*)d, v); + + // check that the the data was stored correctly + foreach (j; 0..T.sizeof) + assert(ptrToV[j] == d[j]); + } + + static if (__traits(compiles, __vector(void[16]))) + test!(__vector(void[16]))(); + static if (__traits(compiles, __vector(byte[16]))) + test!(__vector(byte[16]))(); + static if (__traits(compiles, __vector(ubyte[16]))) + test!(__vector(ubyte[16]))(); + static if (__traits(compiles, __vector(short[8]))) + test!(__vector(short[8]))(); + static if (__traits(compiles, __vector(ushort[8]))) + test!(__vector(ushort[8]))(); + static if (__traits(compiles, __vector(int[4]))) + test!(__vector(int[4]))(); + static if (__traits(compiles, __vector(uint[4]))) + test!(__vector(uint[4]))(); + static if (__traits(compiles, __vector(long[2]))) + test!(__vector(long[2]))(); + static if (__traits(compiles, __vector(ulong[2]))) + test!(__vector(ulong[2]))(); + static if (__traits(compiles, __vector(double[2]))) + test!(__vector(double[2]))(); + static if (__traits(compiles, __vector(float[4]))) + test!(__vector(float[4]))(); + } +} -- cgit v1.1 From 43653547e7c8da2cd861bceb4a3e4bd338787ced Mon Sep 17 00:00:00 2001 From: Lulu Cheng Date: Mon, 27 Jun 2022 16:26:25 +0800 Subject: LoongArch: Remove undefined behavior from code [PR 106097] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C++2017 and previous standard description: The value of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits are zero-filled. If E1 has an unsigned type, the value of the result is E1×2E2, reduced modulo one more than the maximum value representable inthe result type. Otherwise, if E1 has a signed type and non-negative value, and E1×2E2 is representablein the corresponding unsigned type of the result type, then that value, converted to the result type, is the resulting value; otherwise, the behavior is undefined. The value of E1 >> E2 is E1 right-shifted E2 bit positions. If E1 has an unsigned type or if E1 has a signed type and a non-negative value, the value of the result is the integral part of the quotient of E1/2E2. If E1 has a signed type and a negative value, the resulting value is implementation-defined. gcc/ChangeLog: PR target/106097 * config/loongarch/loongarch.cc (loongarch_build_integer): Remove undefined behavior from code. --- gcc/config/loongarch/loongarch.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index c8502b0..48d9ccd 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -160,7 +160,7 @@ enum loongarch_load_imm_method struct loongarch_integer_op { enum rtx_code code; - unsigned HOST_WIDE_INT value; + HOST_WIDE_INT value; enum loongarch_load_imm_method method; }; @@ -1468,7 +1468,7 @@ loongarch_build_integer (struct loongarch_integer_op *codes, unsigned int cost = 0; /* Get the lower 32 bits of the value. */ - HOST_WIDE_INT low_part = TARGET_64BIT ? value << 32 >> 32 : value; + HOST_WIDE_INT low_part = (int32_t)value; if (IMM12_OPERAND (low_part) || IMM12_OPERAND_UNSIGNED (low_part)) { @@ -1502,6 +1502,7 @@ loongarch_build_integer (struct loongarch_integer_op *codes, bool lu52i[2] = {(value & LU52I_B) == 0, (value & LU52I_B) == LU52I_B}; int sign31 = (value & (1UL << 31)) >> 31; + int sign51 = (value & (1UL << 51)) >> 51; /* Determine whether the upper 32 bits are sign-extended from the lower 32 bits. If it is, the instructions to load the high order can be ommitted. */ @@ -1512,12 +1513,12 @@ loongarch_build_integer (struct loongarch_integer_op *codes, else if (lu32i[sign31]) { codes[cost].method = METHOD_LU52I; - codes[cost].value = (value >> 52) << 52; + codes[cost].value = value & LU52I_B; return cost + 1; } codes[cost].method = METHOD_LU32I; - codes[cost].value = ((value << 12) >> 44) << 32; + codes[cost].value = (value & LU32I_B) | (sign51 ? LU52I_B : 0); cost++; /* Determine whether the 52-61 bits are sign-extended from the low order, @@ -1525,7 +1526,7 @@ loongarch_build_integer (struct loongarch_integer_op *codes, if (!lu52i[(value & (1ULL << 51)) >> 51]) { codes[cost].method = METHOD_LU52I; - codes[cost].value = (value >> 52) << 52; + codes[cost].value = value & LU52I_B; cost++; } } -- cgit v1.1 From 4ef0f271d94dfbe87a00f937e0f4dfd381298523 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 29 Jun 2022 10:08:05 +0200 Subject: docs: remove removed param from documentation gcc/ChangeLog: * doc/invoke.texi: Remove removed evrp-mode. --- gcc/doc/invoke.texi | 3 --- 1 file changed, 3 deletions(-) (limited to 'gcc') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index bde59ff..757775e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -15124,9 +15124,6 @@ statement during VRP. @item evrp-sparse-threshold Maximum number of basic blocks before EVRP uses a sparse cache. -@item evrp-mode -Specifies the mode Early VRP should operate in. - @item vrp1-mode Specifies the mode VRP pass 1 should operate in. -- cgit v1.1 From 904ff2b3aa10fb47c55ffc48ce622fe7feb5cc51 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 29 Jun 2022 10:26:26 +0200 Subject: testsuite/ix86: prune MMX ABI warning So far on 32-bit hosts this test failed (for both C and C++) because of the ABI change warning occurring without (explictly) enabling MMX. gcc/testsuite/ * c-c++-common/torture/builtin-shufflevector-2.c: Prune ix86 MMX ABI warning. --- gcc/testsuite/c-c++-common/torture/builtin-shufflevector-2.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-2.c b/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-2.c index 7c4999e..b1ffc95 100644 --- a/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-2.c +++ b/gcc/testsuite/c-c++-common/torture/builtin-shufflevector-2.c @@ -24,3 +24,6 @@ main (void) __builtin_abort (); return 0; } + +// On i?86-*-* an ABI warning would actually surface. +// { dg-prune-output "MMX vector (argument|return) without MMX enabled changes the ABI" } -- cgit v1.1 From d42c1598e52ec0a33fbcc4efa39f4c299d09a3fc Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 29 Jun 2022 10:27:22 +0200 Subject: testsuite/ix86: SSE2 is a prereq to _Float16 use When enabling AVX512FP via attribute or pragma, the _Float16 type would remain unavailable when at initialization time SSE2 wouldn't be seen as available for use. While this may hint at a wider underlying issue (like the feature, the type may want providing dynamically, albeit this may be challenging in particular for functions returning _Float16 yet having the attribute specified after their return type), for now simply make SSE2 available when targeting ix86. gcc/testsuite/ * gcc.target/i386/avx512fp16-reduce-op-2.c: Force SSE2 for i?86. * gcc.target/i386/pr99464.c: Likewise. --- gcc/testsuite/gcc.target/i386/avx512fp16-reduce-op-2.c | 1 + gcc/testsuite/gcc.target/i386/pr99464.c | 1 + 2 files changed, 2 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-reduce-op-2.c b/gcc/testsuite/gcc.target/i386/avx512fp16-reduce-op-2.c index 593340e..72e4a81 100644 --- a/gcc/testsuite/gcc.target/i386/avx512fp16-reduce-op-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512fp16-reduce-op-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mprefer-vector-width=512 -fdump-tree-optimized" } */ +/* { dg-additional-options "-msse2" { target i?86-*-* } } */ /* { dg-final { scan-tree-dump-times "\.REDUC_PLUS" 3 "optimized" } } */ /* { dg-final { scan-tree-dump-times "\.REDUC_MIN" 3 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr99464.c b/gcc/testsuite/gcc.target/i386/pr99464.c index 98dd938..3c1ac6f 100644 --- a/gcc/testsuite/gcc.target/i386/pr99464.c +++ b/gcc/testsuite/gcc.target/i386/pr99464.c @@ -1,6 +1,7 @@ /* PR target/99464 */ /* { dg-do compile } */ /* { dg-options "-O2" } */ +/* { dg-additional-options "-msse2" { target i?86-*-* } } */ #pragma GCC target("arch=cannonlake") -- cgit v1.1 From 2dbb45d6dc0d20dc159b3d8e27ebb6825074827a Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 28 Jun 2022 13:57:29 +0200 Subject: tree-optimization/106112 - fix CSE from wider operation The following fixes a mistake in looking up an extended operand in the CSE of a truncated operation. 2022-06-28 Richard Biener PR tree-optimization/106112 * tree-ssa-sccvn.cc (valueized_wider_op): Properly extend a constant operand according to its type. * gcc.dg/torture/pr106112.c: New testcase. --- gcc/testsuite/gcc.dg/torture/pr106112.c | 16 ++++++++++++++++ gcc/tree-ssa-sccvn.cc | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr106112.c (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/torture/pr106112.c b/gcc/testsuite/gcc.dg/torture/pr106112.c new file mode 100644 index 0000000..bd7f63c --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr106112.c @@ -0,0 +1,16 @@ +/* { dg-do run } */ + +__INT32_TYPE__ a = 5, b, c, d; +__UINT64_TYPE__ e = 20862985922; +int main() +{ + __UINT32_TYPE__ f = 4294967292; + e = e | f; + c = -1 % ((~f ^ 4294967292) - (e - d)); + b = ~-~e % ~-d; + if (b) + a = 0; + if (a < 1) + __builtin_abort(); + return 0; +} diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index 5214f14..9deedea 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -4983,7 +4983,7 @@ valueized_wider_op (tree wide_type, tree op, bool allow_truncate) /* For constants simply extend it. */ if (TREE_CODE (op) == INTEGER_CST) - return wide_int_to_tree (wide_type, wi::to_wide (op)); + return wide_int_to_tree (wide_type, wi::to_widest (op)); return NULL_TREE; } -- cgit v1.1 From 0282c4acf720e4cc073cf95594aa890444c5ca82 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 28 Jun 2022 13:08:33 +0200 Subject: rtl-optimization/106082 - preserve EH note for no non-local goto The following makes sure we preserve EH notes on call insns that indicate the call doesn't perform a non-local goto when distributing notes after combining insns. 2022-06-28 Richard Biener PR rtl-optimization/106082 * combine.cc (distribute_notes): Preserve notes when they indicate a call doesn't perform a non-local goto. --- gcc/combine.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/combine.cc b/gcc/combine.cc index a830527..a5fabf3 100644 --- a/gcc/combine.cc +++ b/gcc/combine.cc @@ -14218,8 +14218,10 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2, gcc_assert (from_insn == i3); /* We are making sure there is a single effective REG_EH_REGION note and it's valid to put it on i3. */ - if (!insn_could_throw_p (from_insn)) - /* Throw away stra notes on insns that can never throw. */ + if (!insn_could_throw_p (from_insn) + && !(lp_nr == INT_MIN && can_nonlocal_goto (from_insn))) + /* Throw away stray notes on insns that can never throw or + make a nonlocal goto. */ ; else { -- cgit v1.1 From b01c075e7e6d84da846c2ff9087433a30ebeb0d2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 29 Jun 2022 15:55:41 +0000 Subject: nios2: Fix PIC function call slowness On Nios II, PIC function calls use R_NIOS2_CALL* relocations, which may refer to a GOT entry that initially points to a PLT entry to resolve the function on first call and that is then changed by the dynamic linker to point directly to the function to be called so subsequent calls do not go through the dynamic linker. To quote the ABI, "A global offset table (GOT) entry referenced using R_NIOS2_GOT16, R_NIOS2_GOT_LO as well as R_NIOS2_GOT_HA must be resolved at load time. A GOT entry referenced only using R_NIOS2_CALL16, R_NIOS2_CALL_LO as well as R_NIOS2_CALL_HA can initially refer to a procedure linkage table (PLT) entry and then be resolved lazily.". However, GCC wrongly treats function addresses loaded from the GOT with such relocations as constant. If the address load is pulled out of a loop, then every call in the loop looks up the function by name. This shows up as very slow execution of many glibc testcases in glibc 2.35 and later (tests that call functions from shared libc many times in a loop), where tests are now built as PIE by default. Fix this problem by using gen_rtx_MEM instead of gen_const_mem when loading addresses for PIC function calls. Tested with no regressions for cross to nios2-linux-gnu, where many glibc tests pass that previously timed out. * config/nios2/nios2.cc (nios2_load_pic_address): Use gen_rtx_MEM not gen_const_mem for UNSPEC_PIC_CALL_SYM. --- gcc/config/nios2/nios2.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/nios2/nios2.cc b/gcc/config/nios2/nios2.cc index f193cde..1a33c88 100644 --- a/gcc/config/nios2/nios2.cc +++ b/gcc/config/nios2/nios2.cc @@ -2552,7 +2552,10 @@ nios2_load_pic_address (rtx sym, int unspec, rtx tmp) return nios2_large_got_address (offset, tmp); } - return gen_const_mem (Pmode, nios2_got_address (sym, unspec)); + if (unspec == UNSPEC_PIC_CALL_SYM) + return gen_rtx_MEM (Pmode, nios2_got_address (sym, unspec)); + else + return gen_const_mem (Pmode, nios2_got_address (sym, unspec)); } /* Nonzero if the constant value X is a legitimate general operand -- cgit v1.1 From 98c18e040e2c65db93f1498bb421e83165da3738 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 29 Jun 2022 18:27:08 +0200 Subject: d: Fix build on aarch64-suse-linux The variables being used to get the result out of TYPE_VECTOR_SUBPARTS were being flagged by -Werror=maybe-uninitialized. As they have already been checked for being constant earlier, use `to_constant' instead. gcc/d/ChangeLog: * intrinsics.cc (build_shuffle_mask_type): Use to_constant when getting the number of subparts from a vector type. (expand_intrinsic_vec_shufflevector): Likewise. --- gcc/d/intrinsics.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/d/intrinsics.cc b/gcc/d/intrinsics.cc index 454d940..75d4318 100644 --- a/gcc/d/intrinsics.cc +++ b/gcc/d/intrinsics.cc @@ -273,8 +273,7 @@ build_shuffle_mask_type (tree type) printed (this should really be handled by a D tree printer). */ Type *t = build_frontend_type (inner); gcc_assert (t != NULL); - unsigned HOST_WIDE_INT nunits; - TYPE_VECTOR_SUBPARTS (type).is_constant (&nunits); + unsigned HOST_WIDE_INT nunits = TYPE_VECTOR_SUBPARTS (type).to_constant (); return build_ctype (TypeVector::create (t->sarrayOf (nunits))); } @@ -1190,9 +1189,10 @@ expand_intrinsic_vec_shufflevector (tree callexp) tree vec0 = CALL_EXPR_ARG (callexp, 0); tree vec1 = CALL_EXPR_ARG (callexp, 1); - unsigned HOST_WIDE_INT v0elems, v1elems; - TYPE_VECTOR_SUBPARTS (TREE_TYPE (vec0)).is_constant (&v0elems); - TYPE_VECTOR_SUBPARTS (TREE_TYPE (vec1)).is_constant (&v1elems); + unsigned HOST_WIDE_INT v0elems = + TYPE_VECTOR_SUBPARTS (TREE_TYPE (vec0)).to_constant (); + unsigned HOST_WIDE_INT v1elems = + TYPE_VECTOR_SUBPARTS (TREE_TYPE (vec1)).to_constant (); unsigned HOST_WIDE_INT num_indices = call_expr_nargs (callexp) - 2; unsigned HOST_WIDE_INT masklen = MAX (num_indices, MAX (v0elems, v1elems)); -- cgit v1.1 From 01779f4f3d0ce7913da10649cda9ea69b0e5dd1b Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 24 Jun 2022 05:17:24 -0700 Subject: c++: Rename macro location structs The macro location tables should really mention they are about locations. So rename them. Also, add a missing free of the remapping table, and remove some now-unneeded macro checking. gcc/cp/ * module.cc (macro_info, macro_traits, macro_table, macro_remap): Rename to ... (macro_loc_info, macro_loc_traits, macro_loc_table, macro_loc_remap): ... these. Update all uses. (module_state::write_prepare_maps): Remove unneeded macro checking. (module_state::write_begin): Free macro_loc_remap. --- gcc/cp/module.cc | 73 +++++++++++++++++++------------------------------------- 1 file changed, 25 insertions(+), 48 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 8bb22c2..68a7ce5 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -3241,15 +3241,15 @@ public: static loc_spans spans; /* Information about macro locations we stream out. */ -struct macro_info +struct macro_loc_info { const line_map_macro *src; // original expansion unsigned remap; // serialization static int compare (const void *a_, const void *b_) { - auto *a = static_cast (a_); - auto *b = static_cast (b_); + auto *a = static_cast (a_); + auto *b = static_cast (b_); gcc_checking_assert (MAP_START_LOCATION (a->src) != MAP_START_LOCATION (b->src)); @@ -3259,9 +3259,9 @@ struct macro_info return +1; } }; -struct macro_traits +struct macro_loc_traits { - typedef macro_info value_type; + typedef macro_loc_info value_type; typedef const line_map_macro *compare_type; static const bool empty_zero_p = false; @@ -3294,9 +3294,9 @@ struct macro_traits static void remove (value_type &) {} }; /* Table keyed by line_map_macro, used for noting. */ -static hash_table *macro_table; +static hash_table *macro_loc_table; /* Sorted vector, used for writing. */ -static vec *macro_remap; +static vec *macro_loc_remap; /* Indirection to allow bsearching imports by ordinary location. */ static vec *ool; @@ -15616,7 +15616,7 @@ module_state::imported_from () const void module_state::note_location (location_t loc) { - if (!macro_table) + if (!macro_loc_table) ; else if (loc < RESERVED_LOCATION_COUNT) ; @@ -15635,9 +15635,9 @@ module_state::note_location (location_t loc) { const line_map *map = linemap_lookup (line_table, loc); const line_map_macro *mac_map = linemap_check_macro (map); - hashval_t hv = macro_traits::hash (mac_map); - macro_info *slot - = macro_table->find_slot_with_hash (mac_map, hv, INSERT); + hashval_t hv = macro_loc_traits::hash (mac_map); + macro_loc_info *slot + = macro_loc_table->find_slot_with_hash (mac_map, hv, INSERT); if (!slot->src) { slot->src = mac_map; @@ -15698,11 +15698,11 @@ module_state::write_location (bytes_out &sec, location_t loc) } else if (loc >= LINEMAPS_MACRO_LOWEST_LOCATION (line_table)) { - const macro_info *info = nullptr; + const macro_loc_info *info = nullptr; unsigned offset = 0; - if (unsigned hwm = macro_remap->length ()) + if (unsigned hwm = macro_loc_remap->length ()) { - info = macro_remap->begin (); + info = macro_loc_remap->begin (); while (hwm != 1) { unsigned mid = hwm / 2; @@ -15909,7 +15909,7 @@ module_state::read_location (bytes_in &sec) const void module_state::write_init_maps () { - macro_table = new hash_table (EXPERIMENT (1, 400)); + macro_loc_table = new hash_table (EXPERIMENT (1, 400)); } location_map_info @@ -15955,30 +15955,6 @@ module_state::write_prepare_maps (module_state_config *cfg) info.num_maps.first += omap - fmap; } - - if (span.macro.first != span.macro.second) - { - /* Iterate over the span's macros, to elide the empty - expansions. */ - unsigned count = 0; - for (unsigned macro - = linemap_lookup_macro_index (line_table, - span.macro.second - 1); - macro < LINEMAPS_MACRO_USED (line_table); - macro++) - { - line_map_macro const *mmap - = LINEMAPS_MACRO_MAP_AT (line_table, macro); - if (MAP_START_LOCATION (mmap) < span.macro.first) - /* Fallen out of the span. */ - break; - - if (mmap->n_tokens) - count++; - } - dump (dumper::LOCATION) && dump ("Span:%u %u macro maps", ix, count); - info.num_maps.second += count; - } } /* Adjust the maps. Ordinary ones ascend, and we must maintain @@ -16024,23 +16000,23 @@ module_state::write_prepare_maps (module_state_config *cfg) ord_off = span.ordinary.second + span.ordinary_delta; } - vec_alloc (macro_remap, macro_table->size ()); - for (auto iter = macro_table->begin (), end = macro_table->end (); + vec_alloc (macro_loc_remap, macro_loc_table->size ()); + for (auto iter = macro_loc_table->begin (), end = macro_loc_table->end (); iter != end; ++iter) - macro_remap->quick_push (*iter); - delete macro_table; - macro_table = nullptr; + macro_loc_remap->quick_push (*iter); + delete macro_loc_table; + macro_loc_table = nullptr; - macro_remap->qsort (¯o_info::compare); + macro_loc_remap->qsort (¯o_loc_info::compare); unsigned offset = 0; - for (auto iter = macro_remap->begin (), end = macro_remap->end (); + for (auto iter = macro_loc_remap->begin (), end = macro_loc_remap->end (); iter != end; ++iter) { auto mac = iter->src; iter->remap = offset; offset += mac->n_tokens; } - info.num_maps.second = macro_remap->length (); + info.num_maps.second = macro_loc_remap->length (); cfg->macro_locs = offset; dump () && dump ("Ordinary:%u maps hwm:%u macro:%u maps %u locs", @@ -16244,7 +16220,7 @@ module_state::write_macro_maps (elf_out *to, location_map_info &info, sec.u (info.num_maps.second); unsigned macro_num = 0; - for (auto iter = macro_remap->end (), begin = macro_remap->begin (); + for (auto iter = macro_loc_remap->end (), begin = macro_loc_remap->begin (); iter-- != begin;) { auto mac = iter->src; @@ -17936,6 +17912,7 @@ module_state::write_begin (elf_out *to, cpp_reader *reader, spaces.release (); sccs.release (); + vec_free (macro_loc_remap); vec_free (ool); // FIXME:QOI: Have a command line switch to control more detailed -- cgit v1.1 From b8f284d3673004dffae714b56ed663467c2a52a7 Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Tue, 28 Jun 2022 22:29:28 +0200 Subject: Fortran: improve error recovery for EXTENDS_TYPE_OF() [PR106121] gcc/fortran/ChangeLog: PR fortran/106121 * simplify.cc (gfc_simplify_extends_type_of): Do not attempt to simplify when one of the arguments is a CLASS variable that was not properly declared. gcc/testsuite/ChangeLog: PR fortran/106121 * gfortran.dg/extends_type_of_4.f90: New test. Co-authored-by: Steven G. Kargl --- gcc/fortran/simplify.cc | 4 ++++ gcc/testsuite/gfortran.dg/extends_type_of_4.f90 | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/extends_type_of_4.f90 (limited to 'gcc') diff --git a/gcc/fortran/simplify.cc b/gcc/fortran/simplify.cc index e8e3ec6..ab59fbc 100644 --- a/gcc/fortran/simplify.cc +++ b/gcc/fortran/simplify.cc @@ -3096,6 +3096,10 @@ gfc_simplify_extends_type_of (gfc_expr *a, gfc_expr *mold) if (UNLIMITED_POLY (a) || UNLIMITED_POLY (mold)) return NULL; + if ((a->ts.type == BT_CLASS && !gfc_expr_attr (a).class_ok) + || (mold->ts.type == BT_CLASS && !gfc_expr_attr (mold).class_ok)) + return NULL; + /* Return .false. if the dynamic type can never be an extension. */ if ((a->ts.type == BT_CLASS && mold->ts.type == BT_CLASS && !gfc_type_is_extension_of diff --git a/gcc/testsuite/gfortran.dg/extends_type_of_4.f90 b/gcc/testsuite/gfortran.dg/extends_type_of_4.f90 new file mode 100644 index 0000000..6437332 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/extends_type_of_4.f90 @@ -0,0 +1,20 @@ +! { dg-do compile } +! PR fortran/106121 - ICE in gfc_simplify_extends_type_of +! Contributed by G.Steinmetz + +program p + type t + end type + type(t) :: x + class(t) :: y ! { dg-error "dummy, allocatable or pointer" } + print *, extends_type_of (x, y) +end + +subroutine s + type t + integer :: i + end type + type(t) :: x + class(t) :: y ! { dg-error "dummy, allocatable or pointer" } + stop extends_type_of (x, y) ! { dg-error "STOP code" } +end -- cgit v1.1 From 49d508065bdd36fb1a9b6aad9666b1edb5e06474 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 27 Jun 2022 23:42:44 +0100 Subject: jit: avoid calloc() poisoning on musl [PR106102] On musl uses calloc() (via ). jit/ includes it directly and exposes use of poisoned calloc(): /build/build/./prev-gcc/xg++ ... ../../gcc-13-20220626/gcc/jit/jit-playback.cc make[3]: *** [Makefile:1143: jit/libgccjit.o] Error 1 make[3]: *** Waiting for unfinished jobs.... In file included from /<>/musl-1.2.3-dev/include/pthread.h:30, from ../../gcc-13-20220626/gcc/jit/jit-playback.cc:44: /<>/musl-1.2.3-dev/include/sched.h:84:7: error: attempt to use poisoned "calloc" 84 | void *calloc(size_t, size_t); | ^ /<>/musl-1.2.3-dev/include/sched.h:124:36: error: attempt to use poisoned "calloc" 124 | #define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n))) | ^ The change moves inclusion to "system.h" under new INCLUDE_PTHREAD_H guard and uses this mechanism in libgccjit. gcc/ PR c++/106102 * system.h: Introduce INCLUDE_PTHREAD_H macros to include . gcc/jit/ PR c++/106102 * jit-playback.cc: Include via "system.h" to avoid calloc() poisoning. * jit-recording.cc: Ditto. * libgccjit.cc: Ditto. --- gcc/jit/jit-playback.cc | 3 +-- gcc/jit/jit-recording.cc | 2 +- gcc/jit/libgccjit.cc | 2 +- gcc/system.h | 4 ++++ 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc index 6be6bdf..7971413 100644 --- a/gcc/jit/jit-playback.cc +++ b/gcc/jit/jit-playback.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_PTHREAD_H #include "system.h" #include "coretypes.h" #include "target.h" @@ -41,8 +42,6 @@ along with GCC; see the file COPYING3. If not see #include "diagnostic.h" #include "stmt.h" -#include - #include "jit-playback.h" #include "jit-result.h" #include "jit-builtins.h" diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc index 697dee6..f78daed 100644 --- a/gcc/jit/jit-recording.cc +++ b/gcc/jit/jit-recording.cc @@ -19,13 +19,13 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_PTHREAD_H #include "system.h" #include "coretypes.h" #include "tm.h" #include "pretty-print.h" #include "toplev.h" -#include #include "jit-builtins.h" #include "jit-recording.h" diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc index 0e76097..ca86266 100644 --- a/gcc/jit/libgccjit.cc +++ b/gcc/jit/libgccjit.cc @@ -19,12 +19,12 @@ along with GCC; see the file COPYING3. If not see . */ #include "config.h" +#define INCLUDE_PTHREAD_H #include "system.h" #include "coretypes.h" #include "timevar.h" #include "typed-splay-tree.h" #include "cppbuiltin.h" -#include #include "libgccjit.h" #include "jit-recording.h" diff --git a/gcc/system.h b/gcc/system.h index 67158b7..f8d42ff 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -753,6 +753,10 @@ extern int vsnprintf (char *, size_t, const char *, va_list); #endif #endif +#ifdef INCLUDE_PTHREAD_H +#include +#endif + #ifdef INCLUDE_ISL #ifdef HAVE_isl #include -- cgit v1.1 From 329bef49da30158d30fed1106002bb71674776bd Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 29 Jun 2022 21:52:39 +0200 Subject: d: Fix error: aggregate value used where floating point was expected Casting from vector to static array is permitted, and the frontend generates a reinterpret cast, but casting back the other way resulted in an error. This has been fixed to be properly handled in the code generation pass of VectorExp, and the conversion for lvalue and rvalue handling done in convert_expr and convert_for_rvalue respectively. PR d/106139 gcc/d/ChangeLog: * d-convert.cc (convert_expr): Handle casting from array to vector. (convert_for_rvalue): Rewrite vector to array casts of the same element type into a constructor. (convert_for_assignment): Return calling convert_for_rvalue. * expr.cc (ExprVisitor::visit (VectorExp *)): Handle generating a vector expression from a static array. * toir.cc (IRVisitor::visit (ReturnStatement *)): Call convert_for_rvalue on return value. gcc/testsuite/ChangeLog: * gdc.dg/pr106139a.d: New test. * gdc.dg/pr106139b.d: New test. * gdc.dg/pr106139c.d: New test. * gdc.dg/pr106139d.d: New test. --- gcc/d/d-convert.cc | 44 +++++++++++++++++++++++++++++++++++++++- gcc/d/expr.cc | 10 +++++++-- gcc/d/toir.cc | 1 + gcc/testsuite/gdc.dg/pr106139a.d | 36 ++++++++++++++++++++++++++++++++ gcc/testsuite/gdc.dg/pr106139b.d | 36 ++++++++++++++++++++++++++++++++ gcc/testsuite/gdc.dg/pr106139c.d | 27 ++++++++++++++++++++++++ gcc/testsuite/gdc.dg/pr106139d.d | 27 ++++++++++++++++++++++++ 7 files changed, 178 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gdc.dg/pr106139a.d create mode 100644 gcc/testsuite/gdc.dg/pr106139b.d create mode 100644 gcc/testsuite/gdc.dg/pr106139c.d create mode 100644 gcc/testsuite/gdc.dg/pr106139d.d (limited to 'gcc') diff --git a/gcc/d/d-convert.cc b/gcc/d/d-convert.cc index 3a6a32a..ec5da6c 100644 --- a/gcc/d/d-convert.cc +++ b/gcc/d/d-convert.cc @@ -502,6 +502,15 @@ convert_expr (tree exp, Type *etype, Type *totype) gcc_assert (totype->size () == etype->size ()); result = build_vconvert (build_ctype (totype), exp); } + else if (tbtype->ty == TY::Tvector && tbtype->size () == ebtype->size ()) + { + /* Allow casting from array to vector as if its an unaligned load. */ + tree type = build_ctype (totype); + tree unaligned_type = build_variant_type_copy (type); + SET_TYPE_ALIGN (unaligned_type, 1 * BITS_PER_UNIT); + TYPE_USER_ALIGN (unaligned_type) = 1; + result = convert (type, build_vconvert (unaligned_type, exp)); + } else { error ("cannot cast expression of type %qs to type %qs", @@ -643,6 +652,39 @@ convert_for_rvalue (tree expr, Type *etype, Type *totype) result = convert (build_ctype (tbtype), result); } + if (tbtype->ty == TY::Tsarray + && ebtype->ty == TY::Tsarray + && tbtype->nextOf ()->ty == ebtype->nextOf ()->ty + && INDIRECT_REF_P (expr) + && CONVERT_EXPR_CODE_P (TREE_CODE (TREE_OPERAND (expr, 0))) + && TREE_CODE (TREE_OPERAND (TREE_OPERAND (expr, 0), 0)) == ADDR_EXPR) + { + /* If expression is a vector that was casted to an array either by + explicit type cast or by taking the vector's `.array' value, strip the + reinterpret cast and build a constructor instead. */ + tree ptr = TREE_OPERAND (TREE_OPERAND (expr, 0), 0); + + if (VECTOR_TYPE_P (TREE_TYPE (TREE_TYPE (ptr)))) + { + /* Rewrite: `*(Array *)&vector' + into: `{ vector[0], vector[1], ... }' */ + tree array = d_save_expr (TREE_OPERAND (ptr, 0)); + array = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (expr), array); + + uinteger_t dim = tbtype->isTypeSArray ()->dim->toUInteger (); + vec *elms = NULL; + for (uinteger_t i = 0; i < dim; i++) + { + tree index = size_int (i); + tree value = build4 (ARRAY_REF, TREE_TYPE (TREE_TYPE (array)), + array, index, NULL_TREE, NULL_TREE); + CONSTRUCTOR_APPEND_ELT (elms, index, value); + } + + return build_constructor (build_ctype (totype), elms); + } + } + return result ? result : convert_expr (expr, etype, totype); } @@ -703,7 +745,7 @@ convert_for_assignment (tree expr, Type *etype, Type *totype) return expr; } - return convert_expr (expr, etype, totype); + return convert_for_rvalue (expr, etype, totype); } /* Return a TREE representation of EXPR converted to represent diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index 34b3ddd..1bb10a8 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -2917,14 +2917,13 @@ public: void visit (VectorExp *e) final override { - tree type = build_ctype (e->type); - /* First handle array literal expressions. */ if (e->e1->op == EXP::arrayLiteral) { ArrayLiteralExp *ale = e->e1->isArrayLiteralExp (); vec *elms = NULL; bool constant_p = true; + tree type = build_ctype (e->type); vec_safe_reserve (elms, ale->elements->length); for (size_t i = 0; i < ale->elements->length; i++) @@ -2944,9 +2943,16 @@ public: else this->result_ = build_constructor (type, elms); } + else if (e->e1->type->toBasetype ()->ty == TY::Tsarray) + { + /* Build a vector representation from a static array. */ + this->result_ = convert_expr (build_expr (e->e1, this->constp_), + e->e1->type, e->type); + } else { /* Build constructor from single value. */ + tree type = build_ctype (e->type); tree value = d_convert (TREE_TYPE (type), build_expr (e->e1, this->constp_, true)); this->result_ = build_vector_from_val (type, value); diff --git a/gcc/d/toir.cc b/gcc/d/toir.cc index 50d4415..e5f5751 100644 --- a/gcc/d/toir.cc +++ b/gcc/d/toir.cc @@ -1022,6 +1022,7 @@ public: /* Generate: ( = expr, return ); */ tree expr = build_expr_dtor (s->exp); tree init = stabilize_expr (&expr); + expr = convert_for_rvalue (expr, s->exp->type, type); expr = build_assign (INIT_EXPR, this->func_->shidden, expr); add_stmt (compound_expr (init, expr)); } diff --git a/gcc/testsuite/gdc.dg/pr106139a.d b/gcc/testsuite/gdc.dg/pr106139a.d new file mode 100644 index 0000000..f635eab --- /dev/null +++ b/gcc/testsuite/gdc.dg/pr106139a.d @@ -0,0 +1,36 @@ +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106139 +// { dg-do compile } + +alias A = int[4]; + +static if (__traits(compiles, __vector(A))): + +A vector2array(__vector(A) v) +{ + return cast(A)v; +} + +void vector2array(ref A a, __vector(A) v) +{ + a = cast(A)v; +} + +__vector(A) array2vector(A a) +{ + return cast(__vector(A)) a; +} + +void array2vector(ref __vector(A) v, A a) +{ + v = cast(__vector(A))a; +} + +A vector2array_array(__vector(A) v) +{ + return v.array; +} + +void vector2array_array(ref A a, __vector(A) v) +{ + a = v.array; +} diff --git a/gcc/testsuite/gdc.dg/pr106139b.d b/gcc/testsuite/gdc.dg/pr106139b.d new file mode 100644 index 0000000..f9caf02 --- /dev/null +++ b/gcc/testsuite/gdc.dg/pr106139b.d @@ -0,0 +1,36 @@ +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106139 +// { dg-do compile } + +alias A = float[4]; + +static if (__traits(compiles, __vector(A))): + +A vector2array(__vector(A) v) +{ + return cast(A)v; +} + +void vector2array(ref A a, __vector(A) v) +{ + a = cast(A)v; +} + +__vector(A) array2vector(A a) +{ + return cast(__vector(A)) a; +} + +void array2vector(ref __vector(A) v, A a) +{ + v = cast(__vector(A))a; +} + +A vector2array_array(__vector(A) v) +{ + return v.array; +} + +void vector2array_array(ref A a, __vector(A) v) +{ + a = v.array; +} diff --git a/gcc/testsuite/gdc.dg/pr106139c.d b/gcc/testsuite/gdc.dg/pr106139c.d new file mode 100644 index 0000000..3b6b7a8 --- /dev/null +++ b/gcc/testsuite/gdc.dg/pr106139c.d @@ -0,0 +1,27 @@ +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106139 +// { dg-do compile } + +alias V = int[4]; +alias A = float[4]; + +static if (__traits(compiles, __vector(V))): + +A vector2array(__vector(V) v) +{ + return cast(A)v; +} + +void vector2array(ref A a, __vector(V) v) +{ + a = cast(A)v; +} + +__vector(V) array2vector(A a) +{ + return cast(__vector(V)) a; +} + +void array2vector(ref __vector(V) v, A a) +{ + v = cast(__vector(V))a; +} diff --git a/gcc/testsuite/gdc.dg/pr106139d.d b/gcc/testsuite/gdc.dg/pr106139d.d new file mode 100644 index 0000000..4c6f0ef --- /dev/null +++ b/gcc/testsuite/gdc.dg/pr106139d.d @@ -0,0 +1,27 @@ +// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106139 +// { dg-do compile } + +alias V = float[4]; +alias A = int[4]; + +static if (__traits(compiles, __vector(V))): + +A vector2array(__vector(V) v) +{ + return cast(A)v; +} + +void vector2array(ref A a, __vector(V) v) +{ + a = cast(A)v; +} + +__vector(V) array2vector(A a) +{ + return cast(__vector(V)) a; +} + +void array2vector(ref __vector(V) v, A a) +{ + v = cast(__vector(V))a; +} -- cgit v1.1 From 3183acc8e0452fbc0ad429a909811ca0308c86c9 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 28 Jun 2022 17:03:28 -0700 Subject: compiler: check repeated const expressions in new scope Test case is const8.go in https://go.dev/cl/414795. Fixes golang/go#53585 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/414914 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 110 +++++++-------------------------------- gcc/go/gofrontend/expressions.h | 105 +++++++++++++++++++++++++++++++++++++ gcc/go/gofrontend/parse.cc | 89 +++++++++++++++++++++++++++++++ gcc/go/gofrontend/parse.h | 1 + 5 files changed, 215 insertions(+), 92 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 13cb6ea..4fde25a 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -c7238f58a26131b7611eff6f555cab02af8a623c +63782f8a318e9eebfdc983f171a920c7a937c759 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index aadca97..00d35a9 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -3352,97 +3352,7 @@ class Find_named_object : public Traverse bool found_; }; -// A reference to a const in an expression. - -class Const_expression : public Expression -{ - public: - Const_expression(Named_object* constant, Location location) - : Expression(EXPRESSION_CONST_REFERENCE, location), - constant_(constant), type_(NULL), seen_(false) - { } - - Named_object* - named_object() - { return this->constant_; } - - const Named_object* - named_object() const - { return this->constant_; } - - // Check that the initializer does not refer to the constant itself. - void - check_for_init_loop(); - - protected: - int - do_traverse(Traverse*); - - Expression* - do_lower(Gogo*, Named_object*, Statement_inserter*, int); - - bool - do_is_constant() const - { return true; } - - bool - do_is_zero_value() const - { return this->constant_->const_value()->expr()->is_zero_value(); } - - bool - do_is_static_initializer() const - { return true; } - - bool - do_numeric_constant_value(Numeric_constant* nc) const; - - bool - do_string_constant_value(std::string* val) const; - - bool - do_boolean_constant_value(bool* val) const; - - Type* - do_type(); - - // The type of a const is set by the declaration, not the use. - void - do_determine_type(const Type_context*); - - void - do_check_types(Gogo*); - - Expression* - do_copy() - { return this; } - - Bexpression* - do_get_backend(Translate_context* context); - - int - do_inlining_cost() const - { return 1; } - - // When exporting a reference to a const as part of a const - // expression, we export the value. We ignore the fact that it has - // a name. - void - do_export(Export_function_body* efb) const - { this->constant_->const_value()->expr()->export_expression(efb); } - - void - do_dump_expression(Ast_dump_context*) const; - - private: - // The constant. - Named_object* constant_; - // The type of this reference. This is used if the constant has an - // abstract type. - Type* type_; - // Used to prevent infinite recursion when a constant incorrectly - // refers to itself. - mutable bool seen_; -}; +// Class Const_expression. // Traversal. @@ -3454,6 +3364,14 @@ Const_expression::do_traverse(Traverse* traverse) return TRAVERSE_CONTINUE; } +// Whether this is the zero value. + +bool +Const_expression::do_is_zero_value() const +{ + return this->constant_->const_value()->expr()->is_zero_value(); +} + // Lower a constant expression. This is where we convert the // predeclared constant iota into an integer value. @@ -3708,6 +3626,16 @@ Const_expression::do_get_backend(Translate_context* context) return expr->get_backend(context); } +// When exporting a reference to a const as part of a const +// expression, we export the value. We ignore the fact that it has +// a name. + +void +Const_expression::do_export(Export_function_body* efb) const +{ + this->constant_->const_value()->expr()->export_expression(efb); +} + // Dump ast representation for constant expression. void diff --git a/gcc/go/gofrontend/expressions.h b/gcc/go/gofrontend/expressions.h index 707c193..a1e3733 100644 --- a/gcc/go/gofrontend/expressions.h +++ b/gcc/go/gofrontend/expressions.h @@ -28,6 +28,7 @@ class Map_type; class Struct_type; class Struct_field; class Expression_list; +class Const_expression; class Var_expression; class Enclosed_var_expression; class Temporary_reference_expression; @@ -626,6 +627,20 @@ class Expression is_type_expression() const { return this->classification_ == EXPRESSION_TYPE; } + // If this is a const reference, return the Const_expression + // structure. Otherwise, return NULL. This is a controlled dynamic + // cast. + Const_expression* + const_expression() + { return this->convert(); } + + const Const_expression* + const_expression() const + { + return this->convert(); + } + // If this is a variable reference, return the Var_expression // structure. Otherwise, return NULL. This is a controlled dynamic // cast. @@ -1453,6 +1468,96 @@ class Parser_expression : public Expression { go_unreachable(); } }; +// A reference to a const in an expression. + +class Const_expression : public Expression +{ + public: + Const_expression(Named_object* constant, Location location) + : Expression(EXPRESSION_CONST_REFERENCE, location), + constant_(constant), type_(NULL), seen_(false) + { } + + Named_object* + named_object() + { return this->constant_; } + + const Named_object* + named_object() const + { return this->constant_; } + + // Check that the initializer does not refer to the constant itself. + void + check_for_init_loop(); + + protected: + int + do_traverse(Traverse*); + + Expression* + do_lower(Gogo*, Named_object*, Statement_inserter*, int); + + bool + do_is_constant() const + { return true; } + + bool + do_is_zero_value() const; + + bool + do_is_static_initializer() const + { return true; } + + bool + do_numeric_constant_value(Numeric_constant* nc) const; + + bool + do_string_constant_value(std::string* val) const; + + bool + do_boolean_constant_value(bool* val) const; + + Type* + do_type(); + + // The type of a const is set by the declaration, not the use. + void + do_determine_type(const Type_context*); + + void + do_check_types(Gogo*); + + Expression* + do_copy() + { return this; } + + Bexpression* + do_get_backend(Translate_context* context); + + int + do_inlining_cost() const + { return 1; } + + // When exporting a reference to a const as part of a const + // expression, we export the value. We ignore the fact that it has + // a name. + void + do_export(Export_function_body* efb) const; + + void + do_dump_expression(Ast_dump_context*) const; + + private: + // The constant. + Named_object* constant_; + // The type of this reference. This is used if the constant has an + // abstract type. + Type* type_; + // Used to prevent infinite recursion when a constant incorrectly + // refers to itself. + mutable bool seen_; +}; + // An expression which is simply a variable. class Var_expression : public Expression diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index cc197e5..e388261 100644 --- a/gcc/go/gofrontend/parse.cc +++ b/gcc/go/gofrontend/parse.cc @@ -1468,6 +1468,7 @@ Parse::const_spec(int iota, Type** last_type, Expression_list** last_expr_list) { Expression* copy = (*p)->copy(); copy->set_location(loc); + this->update_references(©); expr_list->push_back(copy); } } @@ -1513,6 +1514,94 @@ Parse::const_spec(int iota, Type** last_type, Expression_list** last_expr_list) return; } +// Update any references to names to refer to the current names, +// for weird cases like +// +// const X = 1 +// func F() { +// const ( +// X = X + X +// Y +// ) +// } +// +// where the X + X for the first X is the outer X, but the X + X +// copied for Y is the inner X. + +class Update_references : public Traverse +{ + public: + Update_references(Gogo* gogo) + : Traverse(traverse_expressions), + gogo_(gogo) + { } + + int + expression(Expression**); + + private: + Gogo* gogo_; +}; + +int +Update_references::expression(Expression** pexpr) +{ + Named_object* old_no; + switch ((*pexpr)->classification()) + { + case Expression::EXPRESSION_CONST_REFERENCE: + old_no = (*pexpr)->const_expression()->named_object(); + break; + case Expression::EXPRESSION_VAR_REFERENCE: + old_no = (*pexpr)->var_expression()->named_object(); + break; + case Expression::EXPRESSION_ENCLOSED_VAR_REFERENCE: + old_no = (*pexpr)->enclosed_var_expression()->variable(); + break; + case Expression::EXPRESSION_FUNC_REFERENCE: + old_no = (*pexpr)->func_expression()->named_object(); + break; + case Expression::EXPRESSION_UNKNOWN_REFERENCE: + old_no = (*pexpr)->unknown_expression()->named_object(); + break; + default: + return TRAVERSE_CONTINUE; + } + + if (old_no->package() != NULL) + { + // This is a qualified reference, so it can't have changed in + // scope. FIXME: This probably doesn't handle dot imports + // correctly. + return TRAVERSE_CONTINUE; + } + + Named_object* in_function; + Named_object* new_no = this->gogo_->lookup(old_no->name(), &in_function); + if (new_no == old_no) + return TRAVERSE_CONTINUE; + + // The new name must be a constant, since that is all we have + // introduced into scope. + if (!new_no->is_const()) + { + go_assert(saw_errors()); + return TRAVERSE_CONTINUE; + } + + *pexpr = Expression::make_const_reference(new_no, (*pexpr)->location()); + + return TRAVERSE_CONTINUE; +} + +void +Parse::update_references(Expression** pexpr) +{ + Update_references ur(this->gogo_); + ur.expression(pexpr); + (*pexpr)->traverse_subexpressions(&ur); +} + // TypeDecl = "type" Decl . void diff --git a/gcc/go/gofrontend/parse.h b/gcc/go/gofrontend/parse.h index 6e300ef..cda0bee 100644 --- a/gcc/go/gofrontend/parse.h +++ b/gcc/go/gofrontend/parse.h @@ -185,6 +185,7 @@ class Parse void list(void (Parse::*)(), bool); void const_decl(); void const_spec(int, Type**, Expression_list**); + void update_references(Expression**); void type_decl(); void type_spec(); void var_decl(); -- cgit v1.1 From e3a5c77388ae3791afed4f4286ec7e41e5b9f7c3 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 29 Jun 2022 19:56:56 -0400 Subject: libgccjit: Fix bug where unary_op will return an integer type instead of the correct type 2022-06-29 Antoni Boucher gcc/jit/ PR jit/105812 * jit-playback.cc: Use the correct return type when folding in as_truth_value. gcc/testsuite/ PR jit/105812 * jit.dg/test-asm.cc: Add include missing to make the test pass. * jit.dg/test-pr105812-bool-operations.c: New test. --- gcc/jit/jit-playback.cc | 3 +- gcc/testsuite/jit.dg/test-asm.cc | 1 + .../jit.dg/test-pr105812-bool-operations.c | 89 ++++++++++++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/jit.dg/test-pr105812-bool-operations.c (limited to 'gcc') diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc index 7971413..d227d36 100644 --- a/gcc/jit/jit-playback.cc +++ b/gcc/jit/jit-playback.cc @@ -1024,8 +1024,9 @@ as_truth_value (tree expr, location *loc) if (loc) set_tree_location (typed_zero, loc); + tree type = TREE_TYPE (expr); expr = fold_build2_loc (UNKNOWN_LOCATION, - NE_EXPR, integer_type_node, expr, typed_zero); + NE_EXPR, type, expr, typed_zero); if (loc) set_tree_location (expr, loc); diff --git a/gcc/testsuite/jit.dg/test-asm.cc b/gcc/testsuite/jit.dg/test-asm.cc index a3b45da..d436f58 100644 --- a/gcc/testsuite/jit.dg/test-asm.cc +++ b/gcc/testsuite/jit.dg/test-asm.cc @@ -1,5 +1,6 @@ /* { dg-do compile { target x86_64-*-* } } */ +#include #include "libgccjit++.h" #include "harness.h" diff --git a/gcc/testsuite/jit.dg/test-pr105812-bool-operations.c b/gcc/testsuite/jit.dg/test-pr105812-bool-operations.c new file mode 100644 index 0000000..1daa1c3 --- /dev/null +++ b/gcc/testsuite/jit.dg/test-pr105812-bool-operations.c @@ -0,0 +1,89 @@ +#include "libgccjit.h" + +#include "harness.h" + +void +create_code (gcc_jit_context *ctxt, void *user_data) +{ + gcc_jit_type* bool_type = + gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_BOOL); + gcc_jit_type* bool_ptr_type = + gcc_jit_type_get_pointer (gcc_jit_type_get_aligned (bool_type, 1)); + + /* Function 1 */ + + gcc_jit_param* param1 = gcc_jit_context_new_param (ctxt, NULL, bool_type, + "param1"); + gcc_jit_function* function1 = + gcc_jit_context_new_function (ctxt, NULL, + GCC_JIT_FUNCTION_EXPORTED, bool_type, + "function1", 1, ¶m1, 0); + gcc_jit_block* block1 = gcc_jit_function_new_block (function1, "start1"); + + gcc_jit_lvalue* var1 = + gcc_jit_function_new_local (function1, NULL, bool_type, "var1"); + gcc_jit_rvalue* addr1 = + gcc_jit_lvalue_get_address (var1, NULL); + gcc_jit_rvalue* ptr1 = + gcc_jit_context_new_cast (ctxt, NULL, addr1, bool_ptr_type); + gcc_jit_lvalue* deref1 = + gcc_jit_rvalue_dereference (ptr1, NULL); + gcc_jit_rvalue* param1_rvalue = + gcc_jit_param_as_rvalue (param1); + gcc_jit_block_add_assignment (block1, NULL, deref1, param1_rvalue); + + gcc_jit_rvalue* one = gcc_jit_context_one (ctxt, bool_type); + gcc_jit_block_end_with_return (block1, NULL, one); + + /* Function 2 */ + + gcc_jit_param* param2 = gcc_jit_context_new_param (ctxt, NULL, bool_type, + "param2"); + gcc_jit_function* function2 = + gcc_jit_context_new_function (ctxt, NULL, + GCC_JIT_FUNCTION_EXPORTED, bool_type, + "function2", 1, ¶m2, 0); + gcc_jit_block* block2 = gcc_jit_function_new_block (function2, "start2"); + + gcc_jit_lvalue* var2 = + gcc_jit_function_new_local (function2, NULL, bool_type, "var2"); + gcc_jit_rvalue* addr2 = + gcc_jit_lvalue_get_address (var2, NULL); + gcc_jit_rvalue* ptr2 = + gcc_jit_context_new_cast (ctxt, NULL, addr2, bool_ptr_type); + gcc_jit_lvalue* deref2 = + gcc_jit_rvalue_dereference (ptr2, NULL); + gcc_jit_rvalue* param2_rvalue = + gcc_jit_param_as_rvalue (param2); + gcc_jit_block_add_assignment (block2, NULL, deref2, param2_rvalue); + + gcc_jit_lvalue* return_value = + gcc_jit_function_new_local (function2, NULL, bool_type, "return_value"); + gcc_jit_rvalue* call = + gcc_jit_context_new_call (ctxt, NULL, function1, 1, ¶m2_rvalue); + gcc_jit_block_add_assignment (block2, NULL, return_value, call); + + gcc_jit_block* block2_1 = + gcc_jit_function_new_block (function2, "end2"); + gcc_jit_block_end_with_jump (block2, NULL, block2_1); + + gcc_jit_rvalue* value = + gcc_jit_context_new_unary_op (ctxt, NULL, + GCC_JIT_UNARY_OP_LOGICAL_NEGATE, bool_type, + param2_rvalue); + gcc_jit_rvalue* return_rvalue = + gcc_jit_lvalue_as_rvalue (return_value); + gcc_jit_rvalue* and = + gcc_jit_context_new_binary_op (ctxt, NULL, + GCC_JIT_BINARY_OP_BITWISE_AND, bool_type, + return_rvalue, value); + + gcc_jit_block_end_with_return (block2_1, NULL, and); +} + +extern void +verify_code (gcc_jit_context *ctxt, gcc_jit_result *result) +{ + /* Verify that no errors were emitted. */ + CHECK_NON_NULL (result); +} -- cgit v1.1 From ce600bc4643fd046301bd0b6f959546ae459875b Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 30 Jun 2022 00:16:46 +0000 Subject: Daily bump. --- gcc/ChangeLog | 32 ++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/cp/ChangeLog | 9 +++++++++ gcc/d/ChangeLog | 47 +++++++++++++++++++++++++++++++++++++++++++++++ gcc/fortran/ChangeLog | 8 ++++++++ gcc/jit/ChangeLog | 14 ++++++++++++++ gcc/testsuite/ChangeLog | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 160 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36789da..cff9189 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,35 @@ +2022-06-29 Sergei Trofimovich + + PR c++/106102 + * system.h: Introduce INCLUDE_PTHREAD_H macros to include . + +2022-06-29 Joseph Myers + + * config/nios2/nios2.cc (nios2_load_pic_address): Use gen_rtx_MEM + not gen_const_mem for UNSPEC_PIC_CALL_SYM. + +2022-06-29 Richard Biener + + PR rtl-optimization/106082 + * combine.cc (distribute_notes): Preserve notes when + they indicate a call doesn't perform a non-local goto. + +2022-06-29 Richard Biener + + PR tree-optimization/106112 + * tree-ssa-sccvn.cc (valueized_wider_op): Properly extend + a constant operand according to its type. + +2022-06-29 Martin Liska + + * doc/invoke.texi: Remove removed evrp-mode. + +2022-06-29 Lulu Cheng + + PR target/106097 + * config/loongarch/loongarch.cc (loongarch_build_integer): + Remove undefined behavior from code. + 2022-06-28 Dimitar Dimitrov * doc/sourcebuild.texi: Document new no_alignment_constraints diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index f15a0aa..b03df3b 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220629 +20220630 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d7bdd16..5d68cc6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2022-06-29 Nathan Sidwell + + * module.cc (macro_info, macro_traits, macro_table, + macro_remap): Rename to ... + (macro_loc_info, macro_loc_traits, macro_loc_table, + macro_loc_remap): ... these. Update all uses. + (module_state::write_prepare_maps): Remove unneeded macro checking. + (module_state::write_begin): Free macro_loc_remap. + 2022-06-27 Sergei Trofimovich PR c++/106102 diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 796d71a..81531a4 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,50 @@ +2022-06-29 Iain Buclaw + + PR d/106139 + * d-convert.cc (convert_expr): Handle casting from array to vector. + (convert_for_rvalue): Rewrite vector to array casts of the same + element type into a constructor. + (convert_for_assignment): Return calling convert_for_rvalue. + * expr.cc (ExprVisitor::visit (VectorExp *)): Handle generating a + vector expression from a static array. + * toir.cc (IRVisitor::visit (ReturnStatement *)): Call + convert_for_rvalue on return value. + +2022-06-29 Iain Buclaw + + * intrinsics.cc (build_shuffle_mask_type): Use to_constant when + getting the number of subparts from a vector type. + (expand_intrinsic_vec_shufflevector): Likewise. + +2022-06-29 Iain Buclaw + + * intrinsics.cc: Include diagnostic.h, langhooks.h, + vec-perm-indices.h. + (maybe_set_intrinsic): Add cases for new simd intrinsics. + (warn_mismatched_return_type): New function. + (warn_mismatched_argument): New function. + (build_shuffle_mask_type): New function. + (maybe_warn_intrinsic_mismatch): New function. + (expand_intrinsic_vec_cond): New function. + (expand_intrinsic_vec_convert): New function. + (expand_intrinsic_vec_blend): New function. + (expand_intrinsic_vec_shuffle): New function. + (expand_intrinsic_vec_shufflevector): New function. + (expand_intrinsic_vec_load_unaligned): New function. + (expand_intrinsic_vec_store_unaligned): New function. + (maybe_expand_intrinsic): Check signature of intrinsic before handing + off to front-end lowering. Add cases for new simd intrinsics. + * intrinsics.def (INTRINSIC_LOADUNALIGNED): Define intrinsic. + (INTRINSIC_STOREUNALIGNED): Define intrinsic. + (INTRINSIC_SHUFFLE): Define intrinsic. + (INTRINSIC_SHUFFLEVECTOR): Define intrinsic. + (INTRINSIC_CONVERTVECTOR): Define intrinsic. + (INTRINSIC_BLENDVECTOR): Define intrinsic. + (INTRINSIC_EQUALMASK): Define intrinsic. + (INTRINSIC_NOTEQUALMASK): Define intrinsic. + (INTRINSIC_GREATERMASK): Define intrinsic. + (INTRINSIC_GREATEREQUALMASK): Define intrinsic. + 2022-06-28 Iain Buclaw * d-codegen.cc: Include gimple-expr.h. diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 79b3754d..f349c85 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2022-06-29 Harald Anlauf + Steven G. Kargl + + PR fortran/106121 + * simplify.cc (gfc_simplify_extends_type_of): Do not attempt to + simplify when one of the arguments is a CLASS variable that was + not properly declared. + 2022-06-28 Jakub Jelinek * gfortran.h (gfc_real_info): Add use_iec_60559 bitfield. diff --git a/gcc/jit/ChangeLog b/gcc/jit/ChangeLog index 4cb2d01..d16b573 100644 --- a/gcc/jit/ChangeLog +++ b/gcc/jit/ChangeLog @@ -1,3 +1,17 @@ +2022-06-29 Antoni Boucher + + PR jit/105812 + * jit-playback.cc: Use the correct return type when folding in + as_truth_value. + +2022-06-29 Sergei Trofimovich + + PR c++/106102 + * jit-playback.cc: Include via "system.h" to avoid calloc() + poisoning. + * jit-recording.cc: Ditto. + * libgccjit.cc: Ditto. + 2022-06-10 Antoni Boucher PR jit/105829 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e6d5741..f7aa13b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,52 @@ +2022-06-29 Antoni Boucher + + PR jit/105812 + * jit.dg/test-asm.cc: Add include missing to make the test pass. + * jit.dg/test-pr105812-bool-operations.c: New test. + +2022-06-29 Iain Buclaw + + PR d/106139 + * gdc.dg/pr106139a.d: New test. + * gdc.dg/pr106139b.d: New test. + * gdc.dg/pr106139c.d: New test. + * gdc.dg/pr106139d.d: New test. + +2022-06-29 Harald Anlauf + Steven G. Kargl + + PR fortran/106121 + * gfortran.dg/extends_type_of_4.f90: New test. + +2022-06-29 Richard Biener + + PR tree-optimization/106112 + * gcc.dg/torture/pr106112.c: New testcase. + +2022-06-29 Jan Beulich + + * gcc.target/i386/avx512fp16-reduce-op-2.c: Force SSE2 for i?86. + * gcc.target/i386/pr99464.c: Likewise. + +2022-06-29 Jan Beulich + + * c-c++-common/torture/builtin-shufflevector-2.c: Prune ix86 MMX + ABI warning. + +2022-06-29 Iain Buclaw + + * gdc.dg/Wbuiltin_declaration_mismatch.d: Rename to... + * gdc.dg/Wbuiltin_declaration_mismatch1.d: ...this. + * gdc.dg/Wbuiltin_declaration_mismatch2.d: New test. + * gdc.dg/torture/simd_blendvector.d: New test. + * gdc.dg/torture/simd_cond.d: New test. + * gdc.dg/torture/simd_convertvector.d: New test. + * gdc.dg/torture/simd_load.d: New test. + * gdc.dg/torture/simd_logical.d: New test. + * gdc.dg/torture/simd_shuffle.d: New test. + * gdc.dg/torture/simd_shufflevector.d: New test. + * gdc.dg/torture/simd_store.d: New test. + 2022-06-28 Iain Buclaw * gdc.dg/attr_simd1.d: New test. -- cgit v1.1 From e484755aecd543b4c9e2adb4f348118c1e43cfd0 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sun, 26 Jun 2022 18:49:15 -0400 Subject: target: Fix asm generation for AVX builtins when using -masm=intel [PR106095] gcc/ChangeLog: PR target/106095 * config/i386/sse.md: Fix asm generation. gcc/testsuite/ChangeLog: PR target/106095 * gcc.target/i386/pr106095.c: Add test using those AVX builtins. --- gcc/config/i386/sse.md | 10 +++---- gcc/testsuite/gcc.target/i386/pr106095.c | 47 ++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr106095.c (limited to 'gcc') diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 8cd0f61..f2f72e8 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -8859,7 +8859,7 @@ "@ cvtsd2ss\t{%2, %0|%0, %2} cvtsd2ss\t{%2, %0|%0, %q2} - vcvtsd2ss\t{%2, %1, %0|%0, %1, %q2}" + vcvtsd2ss\t{%2, %1, %0|%0, %1, %q2}" [(set_attr "isa" "noavx,noavx,avx") (set_attr "type" "ssecvt") (set_attr "athlon_decode" "vector,double,*") @@ -8903,7 +8903,7 @@ "@ cvtss2sd\t{%2, %0|%0, %2} cvtss2sd\t{%2, %0|%0, %k2} - vcvtss2sd\t{%2, %1, %0|%0, %1, %k2}" + vcvtss2sd\t{%2, %1, %0|%0, %1, %k2}" [(set_attr "isa" "noavx,noavx,avx") (set_attr "type" "ssecvt") (set_attr "amdfam10_decode" "vector,double,*") @@ -14406,8 +14406,8 @@ "TARGET_AVX512VL" { if (GET_MODE_SIZE (GET_MODE_INNER (mode)) == 4) - return "vpmov\t{%1, %0%{%2%}|%0%{%2%}, %t1}"; - return "vpmov\t{%1, %0%{%2%}|%0%{%2%}, %g1}"; + return "vpmov\t{%1, %0%{%2%}|%0%{%2%}, %1}"; + return "vpmov\t{%1, %0%{%2%}|%0%{%2%}, %1}"; } [(set_attr "type" "ssemov") (set_attr "memory" "store") @@ -14506,7 +14506,7 @@ (match_dup 0) (match_operand:QI 2 "register_operand" "Yk")))] "TARGET_AVX512VL" - "vpmovqw\t{%1, %0%{%2%}|%0%{%2%}, %g1}" + "vpmovqw\t{%1, %0%{%2%}|%0%{%2%}, %1}" [(set_attr "type" "ssemov") (set_attr "memory" "store") (set_attr "prefix" "evex") diff --git a/gcc/testsuite/gcc.target/i386/pr106095.c b/gcc/testsuite/gcc.target/i386/pr106095.c new file mode 100644 index 0000000..dfa6136 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr106095.c @@ -0,0 +1,47 @@ +/* PR gcc/106095 */ +/* { dg-do assemble } */ +/* { dg-options "-mavx512vl -masm=intel" } */ +/* { dg-require-effective-target masm_intel } */ + +#include +#include + +typedef int v4si __attribute__ ((vector_size (16))); +typedef long long v2di __attribute__ ((vector_size (16))); +typedef long long v4di __attribute__ ((vector_size (32))); +typedef double v2df __attribute__ ((vector_size (16))); +typedef float v4sf __attribute__ ((vector_size (16))); + +void bug1(void) { + v4si ints4 = {0, 1, 2, 3}; + unsigned long long *addr = malloc(sizeof(*addr)); + __builtin_ia32_pmovdw128mem_mask(addr, ints4, 0); +} + +int bug2(void) { + v2df a = {0.0, 0.0}; + v4sf b = {0.0, 0.0, 0.0, 0.0}; + v2df src = {0.0, 0.0}; + v2df res = __builtin_ia32_cvtss2sd_mask_round(a, b, src, 0, _MM_FROUND_NO_EXC); + return (int)res[0]; +} + +int bug3(void) { + v4sf a = {0.0, 0.0, 0.0, 0.0}; + v2df b = {0.0, 0.0}; + v4sf src = {0.0, 0.0, 0.0, 0.0}; + v4sf res = __builtin_ia32_cvtsd2ss_mask_round(a, b, src, 0, _MM_FROUND_NO_EXC); + return (int)res[0]; +} + +int bug4(void) { + v4di ints4 = {0, 1, 2, 3}; + unsigned long long *addr = malloc(sizeof(*addr)); + __builtin_ia32_pmovqw256mem_mask(addr, ints4, 0); +} + +int bug5(void) { + v2di ints4 = {0, 1}; + unsigned int *addr = malloc(sizeof(*addr)); + __builtin_ia32_pmovqw128mem_mask(addr, ints4, 0); +} -- cgit v1.1 From 918ccccbb0e78ae42bfcf808a1e93a8f6b9d02ea Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Wed, 29 Jun 2022 13:34:05 -0400 Subject: Don't use gori dependencies to optimize. The routine fold_using_range::relation_fold_and_or needs to veriyf that both operands of 2 stmts are the same, and uses GORIs dependency cache for this. This cache cannot be counted on to reflect the current contents of a stmt, expecially in the presence of an IL changing pass. Instead, look at the statement operands. PR tree-optimization/106114 gcc/ * gimple-range-fold.cc (fold_using_range::relation_fold_and_or): Check statement operands instead of GORI cache. gcc/testsuite/ * gcc.dg/pr106114.c: New. --- gcc/gimple-range-fold.cc | 30 +++++++++++++++++------------- gcc/testsuite/gcc.dg/pr106114.c | 14 ++++++++++++++ 2 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr106114.c (limited to 'gcc') diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc index 2a8c66e..0f815b5 100644 --- a/gcc/gimple-range-fold.cc +++ b/gcc/gimple-range-fold.cc @@ -1397,14 +1397,25 @@ fold_using_range::relation_fold_and_or (irange& lhs_range, gimple *s, // Ideally we search dependencies for common names, and see what pops out. // until then, simply try to resolve direct dependencies. - // Both names will need to have 2 direct dependencies. - tree ssa1_dep2 = src.gori ()->depend2 (ssa1); - tree ssa2_dep2 = src.gori ()->depend2 (ssa2); - if (!ssa1_dep2 || !ssa2_dep2) + gimple *ssa1_stmt = SSA_NAME_DEF_STMT (ssa1); + gimple *ssa2_stmt = SSA_NAME_DEF_STMT (ssa2); + + range_op_handler handler1 (SSA_NAME_DEF_STMT (ssa1)); + range_op_handler handler2 (SSA_NAME_DEF_STMT (ssa2)); + + // If either handler is not present, no relation can be found. + if (!handler1 || !handler2) + return; + + // Both stmts will need to have 2 ssa names in the stmt. + tree ssa1_dep1 = gimple_range_ssa_p (gimple_range_operand1 (ssa1_stmt)); + tree ssa1_dep2 = gimple_range_ssa_p (gimple_range_operand2 (ssa1_stmt)); + tree ssa2_dep1 = gimple_range_ssa_p (gimple_range_operand1 (ssa2_stmt)); + tree ssa2_dep2 = gimple_range_ssa_p (gimple_range_operand2 (ssa2_stmt)); + + if (!ssa1_dep1 || !ssa1_dep2 || !ssa2_dep1 || !ssa2_dep2) return; - tree ssa1_dep1 = src.gori ()->depend1 (ssa1); - tree ssa2_dep1 = src.gori ()->depend1 (ssa2); // Make sure they are the same dependencies, and detect the order of the // relationship. bool reverse_op2 = true; @@ -1413,13 +1424,6 @@ fold_using_range::relation_fold_and_or (irange& lhs_range, gimple *s, else if (ssa1_dep1 != ssa2_dep2 || ssa1_dep2 != ssa2_dep1) return; - range_op_handler handler1 (SSA_NAME_DEF_STMT (ssa1)); - range_op_handler handler2 (SSA_NAME_DEF_STMT (ssa2)); - - // If either handler is not present, no relation is found. - if (!handler1 || !handler2) - return; - int_range<2> bool_one (boolean_true_node, boolean_true_node); relation_kind relation1 = handler1.op1_op2_relation (bool_one); diff --git a/gcc/testsuite/gcc.dg/pr106114.c b/gcc/testsuite/gcc.dg/pr106114.c new file mode 100644 index 0000000..64c8b8d --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr106114.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-dom2" } */ + +int printf(const char *, ...); +char a = 139, b; +int main() { + char c = 173; + b = a; + while (c <= a || a < -117) + c = printf("0\n"); + return 0; +} + +/* { dg-final { scan-tree-dump-times "if" 2 "dom2" } } */ -- cgit v1.1 From 0f6eef398045deb2a62d18b526831719c7c20c8a Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Tue, 28 Jun 2022 18:43:42 +0800 Subject: testsuite/102690: Only check warning for lp64 in Warray-bounds-16.C That warning won't happen on ilp32 targets, seems like Andrew Pinski already mention that[1] before. Verified on riscv32-unknown-elf and riscv64-unknown-elf. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92879#c1 gcc/testsuite/ChangeLog: PR testsuite/102690 * g++.dg/warn/Warray-bounds-16.C: XFAIL only on lp64 for the warning. --- gcc/testsuite/g++.dg/warn/Warray-bounds-16.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C index 89cbadb..45a14b1 100644 --- a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C +++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C @@ -19,7 +19,7 @@ struct S p = (int*) new unsigned char [sizeof (int) * m]; for (int i = 0; i < m; i++) - new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail *-*-* } } */ + new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail lp64 } } */ } }; -- cgit v1.1 From 721aa2cc44d143e49a704bc8238b3d0d5f750a49 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 30 Jun 2022 10:23:28 +0200 Subject: remove dead member variable in dom_jt_state gcc/ChangeLog: * tree-ssa-dom.cc (pass_dominator::execute): Remove m_ranger as it is unused. --- gcc/tree-ssa-dom.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-dom.cc b/gcc/tree-ssa-dom.cc index dcaf467..9b6520f 100644 --- a/gcc/tree-ssa-dom.cc +++ b/gcc/tree-ssa-dom.cc @@ -588,9 +588,8 @@ record_edge_info (basic_block bb) class dom_jt_state : public jt_state { public: - dom_jt_state (const_and_copies *copies, avail_exprs_stack *avails, - gimple_ranger *ranger) - : m_copies (copies), m_avails (avails), m_ranger (ranger) + dom_jt_state (const_and_copies *copies, avail_exprs_stack *avails) + : m_copies (copies), m_avails (avails) { } void push (edge e) override @@ -613,7 +612,6 @@ public: private: const_and_copies *m_copies; avail_exprs_stack *m_avails; - gimple_ranger *m_ranger; }; void @@ -794,7 +792,7 @@ pass_dominator::execute (function *fun) gimple_ranger *ranger = enable_ranger (fun); path_range_query path_query (/*resolve=*/true, ranger); dom_jt_simplifier simplifier (avail_exprs_stack, ranger, &path_query); - dom_jt_state state (const_and_copies, avail_exprs_stack, ranger); + dom_jt_state state (const_and_copies, avail_exprs_stack); jump_threader threader (&simplifier, &state); dom_opt_dom_walker walker (CDI_DOMINATORS, &threader, -- cgit v1.1 From aea329432b8e405668861bbe0cd2662a80508c45 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 29 Jun 2022 14:55:43 +0200 Subject: Avoid computing RPO for update_ssa At some point when domwalk got the ability to use RPO for ordering dominator children we carefully avoided update_ssa eating the cost of RPO compute. Unfortunately some later consolidation of CTORs lost this again so the following makes this explicit via a special value to the bb_index_to_rpo argument of domwalk, speeding up update_ssa again. * domwalk.h (dom_walker::dom_walker): Update comment to reflect reality and new special argument value for bb_index_to_rpo. * domwalk.cc (dom_walker::dom_walker): Recognize -1 bb_index_to_rpo. * tree-into-ssa.cc (rewrite_update_dom_walker::rewrite_update_dom_walker): Tell dom_walker to not use RPO. --- gcc/domwalk.cc | 6 ++++-- gcc/domwalk.h | 5 +++-- gcc/tree-into-ssa.cc | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/domwalk.cc b/gcc/domwalk.cc index d633088..e36e9eb 100644 --- a/gcc/domwalk.cc +++ b/gcc/domwalk.cc @@ -191,7 +191,8 @@ dom_walker::dom_walker (cdi_direction direction, m_reachability (reachability), m_user_bb_to_rpo (bb_index_to_rpo != NULL), m_unreachable_dom (NULL), - m_bb_to_rpo (bb_index_to_rpo) + m_bb_to_rpo (bb_index_to_rpo == (int *)(uintptr_t)-1 + ? NULL : bb_index_to_rpo) { } @@ -272,7 +273,8 @@ void dom_walker::walk (basic_block bb) { /* Compute the basic-block index to RPO mapping lazily. */ - if (!m_bb_to_rpo + if (!m_user_bb_to_rpo + && !m_bb_to_rpo && m_dom_direction == CDI_DOMINATORS) { int *postorder = XNEWVEC (int, n_basic_blocks_for_fn (cfun)); diff --git a/gcc/domwalk.h b/gcc/domwalk.h index 17ddc1b..b71d294 100644 --- a/gcc/domwalk.h +++ b/gcc/domwalk.h @@ -62,8 +62,9 @@ public: /* You can provide a mapping of basic-block index to RPO if you have that readily available or you do multiple walks. If you - specify NULL as BB_INDEX_TO_RPO dominator children will not be - walked in RPO order. */ + specify NULL as BB_INDEX_TO_RPO this mapping will be computed + lazily at walk time. If you specify -1 dominator children will + not be walked in RPO order. */ dom_walker (cdi_direction direction, enum reachability = ALL_BLOCKS, int *bb_index_to_rpo = NULL); diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc index f9655ce..c4e40e8 100644 --- a/gcc/tree-into-ssa.cc +++ b/gcc/tree-into-ssa.cc @@ -2146,7 +2146,7 @@ class rewrite_update_dom_walker : public dom_walker { public: rewrite_update_dom_walker (cdi_direction direction) - : dom_walker (direction, ALL_BLOCKS, NULL) {} + : dom_walker (direction, ALL_BLOCKS, (int *)(uintptr_t)-1) {} edge before_dom_children (basic_block) final override; void after_dom_children (basic_block) final override; -- cgit v1.1 From 00193676a5a3e7e50e1fa6646bb5abb5a7b2acbb Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Thu, 30 Jun 2022 11:00:03 +0100 Subject: Use xchg for DImode double word rotate by 32 bits with -m32 on x86. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch was motivated by the investigation of Linus Torvalds' spill heavy cryptography kernels in PR 105930. The di3 expander handles all rotations by an immediate constant for 1..63 bits with the exception of 32 bits, which FAILs and is then split by the middle-end. This patch makes these 32-bit doubleword rotations consistent with the other DImode rotations during reload, which results in reduced register pressure, fewer instructions and the use of x86's xchg instruction when appropriate. In theory, xchg can be handled by register renaming, but even on micro-architectures where it's implemented by 3 uops (no worse than a three instruction shuffle), avoiding nominating a "temporary" register, reduces user-visible register pressure (and has obvious code size benefits). The effects are best shown with the new testcase: unsigned long long bar(); unsigned long long foo() { unsigned long long x = bar(); return (x>>32) | (x<<32); } for which GCC with -m32 -O2 currently generates: subl $12, %esp call bar addl $12, %esp movl %eax, %ecx movl %edx, %eax movl %ecx, %edx ret but with this patch now generates: subl $12, %esp call bar addl $12, %esp xchgl %edx, %eax ret With this patch, the number of lines of assembly language generated for the blake2b kernel (from the attachment to PR105930) decreases from 5626 to 5404. Although there's an impressive reduction in instruction count, there's no change/reduction in stack frame size. 2022-06-30 Roger Sayle Uroš Bizjak gcc/ChangeLog * config/i386/i386.md (swap_mode): Rename from *swap to provide gen_swapsi. (di3): Handle !TARGET_64BIT rotations by 32 bits via new gen_32di2_doubleword below. (32di2_doubleword): New define_insn_and_split that splits after reload as either a pair of move instructions or an xchgl (using gen_swapsi). gcc/testsuite/ChangeLog * gcc.target/i386/xchg-3.c: New test case. --- gcc/config/i386/i386.md | 22 +++++++++++++++++++++- gcc/testsuite/gcc.target/i386/xchg-3.c | 12 ++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/xchg-3.c (limited to 'gcc') diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 125a3b4..04cd2bc 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2966,7 +2966,7 @@ (set_attr "memory" "load") (set_attr "mode" "")]) -(define_insn "*swap" +(define_insn "swap" [(set (match_operand:SWI48 0 "register_operand" "+r") (match_operand:SWI48 1 "register_operand" "+r")) (set (match_dup 1) @@ -13673,6 +13673,8 @@ else if (const_1_to_31_operand (operands[2], VOIDmode)) emit_insn (gen_ix86_di3_doubleword (operands[0], operands[1], operands[2])); + else if (CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 32) + emit_insn (gen_32di2_doubleword (operands[0], operands[1])); else FAIL; @@ -13845,6 +13847,24 @@ split_double_mode (mode, &operands[0], 1, &operands[4], &operands[5]); }) +(define_insn_and_split "32di2_doubleword" + [(set (match_operand:DI 0 "register_operand" "=r,r,r") + (any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o") + (const_int 32)))] + "!TARGET_64BIT" + "#" + "&& reload_completed" + [(set (match_dup 0) (match_dup 3)) + (set (match_dup 2) (match_dup 1))] +{ + split_double_mode (DImode, &operands[0], 2, &operands[0], &operands[2]); + if (rtx_equal_p (operands[0], operands[1])) + { + emit_insn (gen_swapsi (operands[0], operands[2])); + DONE; + } +}) + (define_mode_attr rorx_immediate_operand [(SI "const_0_to_31_operand") (DI "const_0_to_63_operand")]) diff --git a/gcc/testsuite/gcc.target/i386/xchg-3.c b/gcc/testsuite/gcc.target/i386/xchg-3.c new file mode 100644 index 0000000..eec05f0 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/xchg-3.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O2" } */ + +unsigned long long bar(); + +unsigned long long foo() +{ + unsigned long long x = bar(); + return (x>>32) | (x<<32); +} + +/*{ dg-final { scan-assembler "xchgl" } } */ -- cgit v1.1 From 47e36785cd2ba35a577b0678a2ac185288eb9e52 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 27 Jun 2022 07:51:12 -0700 Subject: c++: Note macro locations In order to prune ordinary locations, we need to note the locations of macros we'll be writing out. This rearanges the macro processing to achieve that. Also drop an unneeded parameter from macro reading & writing. Fix some it's/its errors. gcc/cp/ * module.cc (module_state::write_define): Drop located param. (module_state::read_define): Likewise. (module_state::prepare_macros): New, broken out of ... (module_state::write_macros): ... here. Adjust. (module_state::write_begin): Adjust. gcc/testsuite/ * g++.dg/modules/inext-1.H: Check include-next happened. --- gcc/cp/module.cc | 98 +++++++++++++++++++++++----------- gcc/testsuite/g++.dg/modules/inext-1.H | 1 + 2 files changed, 67 insertions(+), 32 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 68a7ce5..238a5eb 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -2281,7 +2281,7 @@ public: EK_EXPLICIT_HWM, EK_BINDING = EK_EXPLICIT_HWM, /* Implicitly encoded. */ EK_FOR_BINDING, /* A decl being inserted for a binding. */ - EK_INNER_DECL, /* A decl defined outside of it's imported + EK_INNER_DECL, /* A decl defined outside of its imported context. */ EK_DIRECT_HWM = EK_PARTIAL + 1, @@ -3663,9 +3663,10 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state { bool read_macro_maps (unsigned); private: - void write_define (bytes_out &, const cpp_macro *, bool located = true); - cpp_macro *read_define (bytes_in &, cpp_reader *, bool located = true) const; - unsigned write_macros (elf_out *to, cpp_reader *, unsigned *crc_ptr); + void write_define (bytes_out &, const cpp_macro *); + cpp_macro *read_define (bytes_in &, cpp_reader *) const; + vec *prepare_macros (cpp_reader *); + unsigned write_macros (elf_out *to, vec *, unsigned *crc_ptr); bool read_macros (); void install_macros (); @@ -7136,7 +7137,7 @@ trees_in::tree_node_vals (tree t) } -/* If T is a back reference, fixed reference or NULL, write out it's +/* If T is a back reference, fixed reference or NULL, write out its code and return WK_none. Otherwise return WK_value if we must write by value, or WK_normal otherwise. */ @@ -10605,7 +10606,7 @@ trees_out::key_mergeable (int tag, merge_kind mk, tree decl, tree inner, /* DECL is a new declaration that may be duplicated in OVL. Use RET & ARGS to find its clone, or NULL. If DECL's DECL_NAME is NULL, this - has been found by a proxy. It will be an enum type located by it's + has been found by a proxy. It will be an enum type located by its first member. We're conservative with matches, so ambiguous decls will be @@ -11615,7 +11616,7 @@ trees_in::read_var_def (tree decl, tree maybe_template) } /* If MEMBER doesn't have an independent life outside the class, - return it (or it's TEMPLATE_DECL). Otherwise NULL. */ + return it (or its TEMPLATE_DECL). Otherwise NULL. */ static tree member_owned_by_class (tree member) @@ -15405,7 +15406,7 @@ module_state::read_entities (unsigned count, unsigned lwm, unsigned hwm) sure the specified entities are loaded. An optimization might be to have a flag in each key-entity saying - that it's top key might be in the entity table. It's not clear to + that its top key might be in the entity table. It's not clear to me how to set that flag cheaply -- cheaper than just looking. FIXME: It'd be nice to have a bit in decls to tell us whether to @@ -16444,7 +16445,7 @@ module_state::read_macro_maps (unsigned num_macro_locs) /* Serialize the definition of MACRO. */ void -module_state::write_define (bytes_out &sec, const cpp_macro *macro, bool located) +module_state::write_define (bytes_out &sec, const cpp_macro *macro) { sec.u (macro->count); @@ -16453,8 +16454,7 @@ module_state::write_define (bytes_out &sec, const cpp_macro *macro, bool located sec.b (macro->syshdr); sec.bflush (); - if (located) - write_location (sec, macro->line); + write_location (sec, macro->line); if (macro->fun_like) { sec.u (macro->paramc); @@ -16467,8 +16467,7 @@ module_state::write_define (bytes_out &sec, const cpp_macro *macro, bool located for (unsigned ix = 0; ix != macro->count; ix++) { const cpp_token *token = ¯o->exp.tokens[ix]; - if (located) - write_location (sec, token->src_loc); + write_location (sec, token->src_loc); sec.u (token->type); sec.u (token->flags); switch (cpp_token_val_index (token)) @@ -16533,11 +16532,11 @@ module_state::write_define (bytes_out &sec, const cpp_macro *macro, bool located /* Read a macro definition. */ cpp_macro * -module_state::read_define (bytes_in &sec, cpp_reader *reader, bool located) const +module_state::read_define (bytes_in &sec, cpp_reader *reader) const { unsigned count = sec.u (); /* We rely on knowing cpp_reader's hash table is ident_hash, and - it's subobject allocator is stringpool_ggc_alloc and that is just + its subobject allocator is stringpool_ggc_alloc and that is just a wrapper for ggc_alloc_atomic. */ cpp_macro *macro = (cpp_macro *)ggc_alloc_atomic (sizeof (cpp_macro) @@ -16553,7 +16552,7 @@ module_state::read_define (bytes_in &sec, cpp_reader *reader, bool located) cons macro->syshdr = sec.b (); sec.bflush (); - macro->line = located ? read_location (sec) : loc; + macro->line = read_location (sec); if (macro->fun_like) { @@ -16570,7 +16569,7 @@ module_state::read_define (bytes_in &sec, cpp_reader *reader, bool located) cons for (unsigned ix = 0; ix != count && !sec.get_overrun (); ix++) { cpp_token *token = ¯o->exp.tokens[ix]; - token->src_loc = located ? read_location (sec) : loc; + token->src_loc = read_location (sec); token->type = cpp_ttype (sec.u ()); token->flags = sec.u (); switch (cpp_token_val_index (token)) @@ -16899,31 +16898,62 @@ macro_loc_cmp (const void *a_, const void *b_) return 0; } +/* Gather the macro definitions and undefinitions that we will need to + write out. */ + +vec * +module_state::prepare_macros (cpp_reader *reader) +{ + vec *macros; + vec_alloc (macros, 100); + + cpp_forall_identifiers (reader, maybe_add_macro, macros); + + dump (dumper::MACRO) && dump ("No more than %u macros", macros->length ()); + + macros->qsort (macro_loc_cmp); + + // Note the locations. + for (unsigned ix = macros->length (); ix--;) + { + cpp_hashnode *node = (*macros)[ix]; + macro_import::slot &slot = (*macro_imports)[node->deferred - 1][0]; + macro_export &mac = (*macro_exports)[slot.offset]; + + if (IDENTIFIER_KEYWORD_P (identifier (node))) + continue; + + if (mac.undef_loc != UNKNOWN_LOCATION) + note_location (mac.undef_loc); + if (mac.def) + { + note_location (mac.def->line); + for (unsigned ix = 0; ix != mac.def->count; ix++) + note_location (mac.def->exp.tokens[ix].src_loc); + } + } + + return macros; +} + /* Write out the exported defines. This is two sections, one containing the definitions, the other a table of node names. */ unsigned -module_state::write_macros (elf_out *to, cpp_reader *reader, unsigned *crc_p) +module_state::write_macros (elf_out *to, vec *macros, + unsigned *crc_p) { dump () && dump ("Writing macros"); dump.indent (); - vec macros; - macros.create (100); - cpp_forall_identifiers (reader, maybe_add_macro, ¯os); - - dump (dumper::MACRO) && dump ("No more than %u macros", macros.length ()); - - macros.qsort (macro_loc_cmp); - /* Write the defs */ bytes_out sec (to); sec.begin (); unsigned count = 0; - for (unsigned ix = macros.length (); ix--;) + for (unsigned ix = macros->length (); ix--;) { - cpp_hashnode *node = macros[ix]; + cpp_hashnode *node = (*macros)[ix]; macro_import::slot &slot = (*macro_imports)[node->deferred - 1][0]; gcc_assert (!slot.get_module () && slot.get_defness ()); @@ -16967,9 +16997,9 @@ module_state::write_macros (elf_out *to, cpp_reader *reader, unsigned *crc_p) sec.begin (); sec.u (count); - for (unsigned ix = macros.length (); ix--;) + for (unsigned ix = macros->length (); ix--;) { - const cpp_hashnode *node = macros[ix]; + const cpp_hashnode *node = (*macros)[ix]; macro_import::slot &slot = (*macro_imports)[node->deferred - 1][0]; if (slot.offset) @@ -16982,7 +17012,6 @@ module_state::write_macros (elf_out *to, cpp_reader *reader, unsigned *crc_p) sec.end (to, to->name (MOD_SNAME_PFX ".mac"), crc_p); } - macros.release (); dump.outdent (); return count; } @@ -17752,6 +17781,10 @@ module_state::write_begin (elf_out *to, cpp_reader *reader, } ool->qsort (ool_cmp); + vec *macros = nullptr; + if (is_header ()) + macros = prepare_macros (reader); + location_map_info map_info = write_prepare_maps (&config); unsigned counts[MSC_HWM]; @@ -17898,8 +17931,9 @@ module_state::write_begin (elf_out *to, cpp_reader *reader, if (is_header ()) { - counts[MSC_macros] = write_macros (to, reader, &crc); + counts[MSC_macros] = write_macros (to, macros, &crc); counts[MSC_inits] = write_inits (to, table, &crc); + vec_free (macros); } unsigned clusters = counts[MSC_sec_hwm] - counts[MSC_sec_lwm]; diff --git a/gcc/testsuite/g++.dg/modules/inext-1.H b/gcc/testsuite/g++.dg/modules/inext-1.H index 7708c39..25a9b26 100644 --- a/gcc/testsuite/g++.dg/modules/inext-1.H +++ b/gcc/testsuite/g++.dg/modules/inext-1.H @@ -9,3 +9,4 @@ #endif +// { dg-final { scan-lang-dump {Wrote section:1 named-by:'::foo'} module } } -- cgit v1.1 From fa22c9c7a979655efaff888138107324afc510c5 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Fri, 10 Jun 2022 15:02:51 +0200 Subject: Implement ggc_vrange_allocator. This patch makes the vrange_allocator an abstract class, and uses it to implement the obstack allocator as well as a new GC allocator. The GC bits will be used to implement the vrange storage class for global ranges, which will be contributed in the next week or so. Tested and benchmarked on x86-64 Linux. gcc/ChangeLog: * gimple-range-cache.cc (block_range_cache::block_range_cache): Rename vrange_allocator to obstack_vrange_allocator. (ssa_global_cache::ssa_global_cache): Same. * gimple-range-edge.h (class gimple_outgoing_range): Same. * gimple-range-infer.h (class infer_range_manager): Same. * value-range.h (class vrange_allocator): Make abstract. (class obstack_vrange_allocator): Inherit from vrange_allocator. (class ggc_vrange_allocator): New. --- gcc/gimple-range-cache.cc | 4 ++-- gcc/gimple-range-edge.h | 2 +- gcc/gimple-range-infer.h | 2 +- gcc/value-range.h | 57 ++++++++++++++++++++++++++++++----------------- 4 files changed, 40 insertions(+), 25 deletions(-) (limited to 'gcc') diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index 5df7441..5bb52d5 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -320,7 +320,7 @@ block_range_cache::block_range_cache () bitmap_obstack_initialize (&m_bitmaps); m_ssa_ranges.create (0); m_ssa_ranges.safe_grow_cleared (num_ssa_names); - m_range_allocator = new vrange_allocator; + m_range_allocator = new obstack_vrange_allocator; } // Remove any m_block_caches which have been created. @@ -478,7 +478,7 @@ block_range_cache::dump (FILE *f, basic_block bb, bool print_varying) ssa_global_cache::ssa_global_cache () { m_tab.create (0); - m_range_allocator = new vrange_allocator; + m_range_allocator = new obstack_vrange_allocator; } // Deconstruct a global cache. diff --git a/gcc/gimple-range-edge.h b/gcc/gimple-range-edge.h index a9c4af8..c81b943 100644 --- a/gcc/gimple-range-edge.h +++ b/gcc/gimple-range-edge.h @@ -47,7 +47,7 @@ private: int m_max_edges; hash_map *m_edge_table; - vrange_allocator m_range_allocator; + obstack_vrange_allocator m_range_allocator; }; // If there is a range control statement at the end of block BB, return it. diff --git a/gcc/gimple-range-infer.h b/gcc/gimple-range-infer.h index aafa8bb..bf27d0d 100644 --- a/gcc/gimple-range-infer.h +++ b/gcc/gimple-range-infer.h @@ -78,7 +78,7 @@ private: bitmap m_seen; bitmap_obstack m_bitmaps; struct obstack m_list_obstack; - vrange_allocator m_range_allocator; + obstack_vrange_allocator m_range_allocator; }; #endif // GCC_GIMPLE_RANGE_SIDE_H diff --git a/gcc/value-range.h b/gcc/value-range.h index dc6f6b0..627d221 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -903,39 +903,54 @@ vrp_val_min (const_tree type) class vrange_allocator { public: - vrange_allocator (); - ~vrange_allocator (); + vrange_allocator () { } + virtual ~vrange_allocator () { } // Allocate a range of TYPE. vrange *alloc_vrange (tree type); // Allocate a memory block of BYTES. - void *alloc (unsigned bytes); + virtual void *alloc (unsigned bytes) = 0; + virtual void free (void *p) = 0; // Return a clone of SRC. template T *clone (const T &src); private: irange *alloc_irange (unsigned pairs); - DISABLE_COPY_AND_ASSIGN (vrange_allocator); - struct obstack m_obstack; + void operator= (const vrange_allocator &) = delete; }; -inline -vrange_allocator::vrange_allocator () +class obstack_vrange_allocator : public vrange_allocator { - obstack_init (&m_obstack); -} - -inline -vrange_allocator::~vrange_allocator () -{ - obstack_free (&m_obstack, NULL); -} - -// Provide a hunk of memory from the obstack. +public: + obstack_vrange_allocator () + { + obstack_init (&m_obstack); + } + virtual ~obstack_vrange_allocator () final override + { + obstack_free (&m_obstack, NULL); + } + virtual void *alloc (unsigned bytes) final override + { + return obstack_alloc (&m_obstack, bytes); + } + virtual void free (void *) final override { } +private: + obstack m_obstack; +}; -inline void * -vrange_allocator::alloc (unsigned bytes) +class ggc_vrange_allocator : public vrange_allocator { - return obstack_alloc (&m_obstack, bytes); -} +public: + ggc_vrange_allocator () { } + virtual ~ggc_vrange_allocator () final override { } + virtual void *alloc (unsigned bytes) final override + { + return ggc_internal_alloc (bytes); + } + virtual void free (void *p) final override + { + return ggc_free (p); + } +}; // Return a new range to hold ranges of TYPE. The newly allocated // range is initialized to VR_UNDEFINED. -- cgit v1.1 From 8a8ee37a3325f1009034245676ef4e482c0444a2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 30 Jun 2022 16:41:40 +0000 Subject: lto: Fix option merging [PR106129] The LTO merging of options from different input files was broken by: commit 227a2ecf663d69972b851f51f1934d18927b62cd Author: Martin Liska Date: Fri Mar 12 11:53:47 2021 +0100 lto-wrapper: Use vec data type. Previously, find_and_merge_options would merge options it read into those in *opts. After this commit, options in *opts on entry to find_and_merge_options are ignored; the only merging that takes place is between multiple sets of options in the same input file that are read in the same call to this function (not sure how that case can occur at all). The effects include, for example, that if some objects are built with PIC enabled and others with it disabled, and the last LTO object processed has PIC enabled, the choice of PIC for the last object will result in the whole program being built as PIC, when the merging logic is intended to ensure that a mixture of PIC and non-PIC objects results in the whole program being built as non-PIC. Fix this with an extra argument to find_and_merge_options to determine whether merging should take place. This shows up a second issue with that commit (which I think wasn't actually intended to change code semantics at all): once merging is enabled again, the check for -Xassembler options became an infinite loop in the case where both inputs had -Xassembler options, with the same first option, so fix that loop to restore the previous semantics. Note that I'm not sure how LTO option merging might be tested in the testsuite (clearly there wasn't sufficient, if any, coverage to detect these bugs). Bootstrapped with no regressions for x86_64-pc-linux-gnu. PR lto/106129 * lto-wrapper.cc (find_option): Add argument start. (merge_and_complain): Loop over existing_opt_index and existing_opt2_index for Xassembler check. Update calls to find_option. (find_and_merge_options): Add argument first to determine whether to merge options with those passed in *opts. (run_gcc): Update calls to find_and_merge_options. --- gcc/lto-wrapper.cc | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) (limited to 'gcc') diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc index 26e06e7..795ab74 100644 --- a/gcc/lto-wrapper.cc +++ b/gcc/lto-wrapper.cc @@ -170,13 +170,14 @@ get_options_from_collect_gcc_options (const char *collect_gcc, return decoded; } -/* Find option in OPTIONS based on OPT_INDEX. -1 value is returned - if the option is not present. */ +/* Find option in OPTIONS based on OPT_INDEX, starting at START. -1 + value is returned if the option is not present. */ static int -find_option (vec &options, size_t opt_index) +find_option (vec &options, size_t opt_index, + unsigned start = 0) { - for (unsigned i = 0; i < options.length (); ++i) + for (unsigned i = start; i < options.length (); ++i) if (options[i].opt_index == opt_index) return i; @@ -575,13 +576,16 @@ merge_and_complain (vec &decoded_options, else j++; + int existing_opt_index, existing_opt2_index; if (!xassembler_options_error) - for (i = j = 0; ; i++, j++) + for (existing_opt_index = existing_opt2_index = 0; ; + existing_opt_index++, existing_opt2_index++) { - int existing_opt_index - = find_option (decoded_options, OPT_Xassembler); - int existing_opt2_index - = find_option (fdecoded_options, OPT_Xassembler); + existing_opt_index + = find_option (decoded_options, OPT_Xassembler, existing_opt_index); + existing_opt2_index + = find_option (fdecoded_options, OPT_Xassembler, + existing_opt2_index); cl_decoded_option *existing_opt = NULL; cl_decoded_option *existing_opt2 = NULL; @@ -1100,7 +1104,7 @@ find_crtoffloadtable (int save_temps, const char *dumppfx) static bool find_and_merge_options (int fd, off_t file_offset, const char *prefix, - vec decoded_cl_options, + vec decoded_cl_options, bool first, vec *opts, const char *collect_gcc) { off_t offset, length; @@ -1110,6 +1114,9 @@ find_and_merge_options (int fd, off_t file_offset, const char *prefix, int err; vec fdecoded_options; + if (!first) + fdecoded_options = *opts; + simple_object_read *sobj; sobj = simple_object_start_read (fd, file_offset, "__GNU_LTO", &errmsg, &err); @@ -1130,7 +1137,6 @@ find_and_merge_options (int fd, off_t file_offset, const char *prefix, data = (char *)xmalloc (length); read (fd, data, length); fopts = data; - bool first = true; do { vec f2decoded_options @@ -1417,8 +1423,10 @@ run_gcc (unsigned argc, char *argv[]) int auto_parallel = 0; bool no_partition = false; const char *jobserver_error = NULL; + bool fdecoded_options_first = true; vec fdecoded_options; fdecoded_options.create (16); + bool offload_fdecoded_options_first = true; vec offload_fdecoded_options = vNULL; struct obstack argv_obstack; int new_head_argc; @@ -1510,11 +1518,13 @@ run_gcc (unsigned argc, char *argv[]) } if (find_and_merge_options (fd, file_offset, LTO_SECTION_NAME_PREFIX, - decoded_options, &fdecoded_options, + decoded_options, fdecoded_options_first, + &fdecoded_options, collect_gcc)) { have_lto = true; ltoobj_argv[ltoobj_argc++] = argv[i]; + fdecoded_options_first = false; } close (fd); } @@ -1773,9 +1783,12 @@ cont1: fatal_error (input_location, "cannot open %s: %m", filename); if (!find_and_merge_options (fd, file_offset, OFFLOAD_SECTION_NAME_PREFIX, - decoded_options, &offload_fdecoded_options, + decoded_options, + offload_fdecoded_options_first, + &offload_fdecoded_options, collect_gcc)) fatal_error (input_location, "cannot read %s: %m", filename); + offload_fdecoded_options_first = false; close (fd); if (filename != offload_argv[i]) XDELETEVEC (filename); -- cgit v1.1 From d489ec082ea214109ff54071410f8cd00344e654 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 29 Jun 2022 23:41:46 +0100 Subject: c-family: Add names to diagnostics for known headers gcc/c-family/ChangeLog: * known-headers.cc (get_stdlib_header_for_name): Add names. gcc/testsuite/ChangeLog: * g++.dg/spellcheck-stdlib.C: Check types and functions. --- gcc/c-family/known-headers.cc | 14 ++++++++++++++ gcc/testsuite/g++.dg/spellcheck-stdlib.C | 29 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) (limited to 'gcc') diff --git a/gcc/c-family/known-headers.cc b/gcc/c-family/known-headers.cc index 01c86b2..9c25617 100644 --- a/gcc/c-family/known-headers.cc +++ b/gcc/c-family/known-headers.cc @@ -199,6 +199,20 @@ get_stdlib_header_for_name (const char *name, enum stdlib lib) {"WINT_MAX", {"", ""} }, {"WINT_MIN", {"", ""} }, + /* . */ + {"asctime", {"", ""} }, + {"clock", {"", ""} }, + {"clock_t", {"", ""} }, + {"ctime", {"", ""} }, + {"difftime", {"", ""} }, + {"gmtime", {"", ""} }, + {"localtime", {"", ""} }, + {"mktime", {"", ""} }, + {"strftime", {"", ""} }, + {"time", {"", ""} }, + {"time_t", {"", ""} }, + {"tm", {"", ""} }, + /* . */ {"WCHAR_MAX", {"", ""} }, {"WCHAR_MIN", {"", ""} } diff --git a/gcc/testsuite/g++.dg/spellcheck-stdlib.C b/gcc/testsuite/g++.dg/spellcheck-stdlib.C index 87736b2..7a70641 100644 --- a/gcc/testsuite/g++.dg/spellcheck-stdlib.C +++ b/gcc/testsuite/g++.dg/spellcheck-stdlib.C @@ -158,6 +158,35 @@ void test_cstdlib (void *q) // { dg-message "'#include '" "" { target *-*-* } .-1 } } +/* Missing . */ + +void test_ctime (void *q, long s, double d) +{ + clock_t c; // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + time_t t; // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + tm t2; // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + d = difftime (0, 0); // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + s = mktime (q); // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + s = time (0); // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + q = asctime (0); // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + q = ctime (0); // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + q = gmtime (0); // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + q = localtime (0); // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } + char c[2]; + strftime (c, 2, "", 0); // { dg-error "was not declared" } + // { dg-message "'#include '" "" { target *-*-* } .-1 } +} + /* Verify that we don't offer suggestions to stdlib globals names when there's an explicit namespace. */ -- cgit v1.1 From 4c233cabbe388a6b8957c1507e129090e9267ceb Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Wed, 29 Jun 2022 21:36:17 +0200 Subject: Fortran: error recovery on invalid CLASS(), PARAMETER declarations [PR105243] gcc/fortran/ChangeLog: PR fortran/103137 PR fortran/103138 PR fortran/103693 PR fortran/105243 * decl.cc (gfc_match_data_decl): Reject CLASS entity declaration when it is given the PARAMETER attribute. gcc/testsuite/ChangeLog: PR fortran/103137 PR fortran/103138 PR fortran/103693 PR fortran/105243 * gfortran.dg/class_58.f90: Fix test. * gfortran.dg/class_73.f90: New test. Co-authored-by: Steven G. Kargl --- gcc/fortran/decl.cc | 8 ++++++++ gcc/testsuite/gfortran.dg/class_58.f90 | 2 +- gcc/testsuite/gfortran.dg/class_73.f90 | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/class_73.f90 (limited to 'gcc') diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc index 26ff54d..339f8b1 100644 --- a/gcc/fortran/decl.cc +++ b/gcc/fortran/decl.cc @@ -6262,6 +6262,14 @@ gfc_match_data_decl (void) goto cleanup; } + /* F2018:C708. */ + if (current_ts.type == BT_CLASS && current_attr.flavor == FL_PARAMETER) + { + gfc_error ("CLASS entity at %C cannot have the PARAMETER attribute"); + m = MATCH_ERROR; + goto cleanup; + } + if (current_ts.type == BT_CLASS && current_ts.u.derived->attr.unlimited_polymorphic) goto ok; diff --git a/gcc/testsuite/gfortran.dg/class_58.f90 b/gcc/testsuite/gfortran.dg/class_58.f90 index 20b601a..fceb575 100644 --- a/gcc/testsuite/gfortran.dg/class_58.f90 +++ b/gcc/testsuite/gfortran.dg/class_58.f90 @@ -9,5 +9,5 @@ subroutine s end type class(t), parameter :: x = t() ! { dg-error "cannot have the PARAMETER attribute" } class(t), parameter :: y = x ! { dg-error "cannot have the PARAMETER attribute" } - class(t) :: z = x ! { dg-error "must be dummy, allocatable or pointer" } + class(t) :: z = t() ! { dg-error "must be dummy, allocatable or pointer" } end diff --git a/gcc/testsuite/gfortran.dg/class_73.f90 b/gcc/testsuite/gfortran.dg/class_73.f90 new file mode 100644 index 0000000..c11ee38 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_73.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! Error recovery on invalid CLASS(), PARAMETER declarations +! PR fortran/103137 +! PR fortran/103138 +! PR fortran/103693 +! PR fortran/105243 +! Contributed by G.Steinmetz + +program p + type t + character(3) :: c = '(a)' + end type + class(t), parameter :: x = 1. ! { dg-error "PARAMETER attribute" } + class(*), parameter :: y = t() ! { dg-error "PARAMETER attribute" } + class(*), parameter :: z = 1 ! { dg-error "PARAMETER attribute" } + print x%c ! { dg-error "Syntax error" } +end -- cgit v1.1 From 762fd5e5547e464e25b4bee435db6df4eda0de90 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 29 Jun 2022 15:32:04 -0700 Subject: libgo: handle stat st_atim32 field and SYS_SECCOMP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patches for musl support, from Sören Tempel. Fixes PR go/105225 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415294 --- gcc/go/gofrontend/MERGE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 4fde25a..0d49e9e 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -63782f8a318e9eebfdc983f171a920c7a937c759 +548720bca6bff21ebc9aba22249d9ce45bbd90c7 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. -- cgit v1.1 From 976196b3332d4f56248e7a1401e5e373501598e4 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 1 Jul 2022 00:16:27 +0000 Subject: Daily bump. --- gcc/ChangeLog | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/c-family/ChangeLog | 5 +++++ gcc/cp/ChangeLog | 8 +++++++ gcc/fortran/ChangeLog | 10 +++++++++ gcc/testsuite/ChangeLog | 39 ++++++++++++++++++++++++++++++++ 6 files changed, 123 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cff9189..463a301 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,63 @@ +2022-06-30 Joseph Myers + + PR lto/106129 + * lto-wrapper.cc (find_option): Add argument start. + (merge_and_complain): Loop over existing_opt_index and + existing_opt2_index for Xassembler check. Update calls to + find_option. + (find_and_merge_options): Add argument first to determine whether + to merge options with those passed in *opts. + (run_gcc): Update calls to find_and_merge_options. + +2022-06-30 Aldy Hernandez + + * gimple-range-cache.cc (block_range_cache::block_range_cache): + Rename vrange_allocator to obstack_vrange_allocator. + (ssa_global_cache::ssa_global_cache): Same. + * gimple-range-edge.h (class gimple_outgoing_range): Same. + * gimple-range-infer.h (class infer_range_manager): Same. + * value-range.h (class vrange_allocator): Make abstract. + (class obstack_vrange_allocator): Inherit from vrange_allocator. + (class ggc_vrange_allocator): New. + +2022-06-30 Roger Sayle + Uroš Bizjak + + * config/i386/i386.md (swap_mode): Rename from *swap to + provide gen_swapsi. + (di3): Handle !TARGET_64BIT rotations by 32 bits + via new gen_32di2_doubleword below. + (32di2_doubleword): New define_insn_and_split + that splits after reload as either a pair of move instructions + or an xchgl (using gen_swapsi). + +2022-06-30 Richard Biener + + * domwalk.h (dom_walker::dom_walker): Update comment to + reflect reality and new special argument value for + bb_index_to_rpo. + * domwalk.cc (dom_walker::dom_walker): Recognize -1 + bb_index_to_rpo. + * tree-into-ssa.cc + (rewrite_update_dom_walker::rewrite_update_dom_walker): Tell + dom_walker to not use RPO. + +2022-06-30 Martin Liska + + * tree-ssa-dom.cc (pass_dominator::execute): Remove m_ranger as + it is unused. + +2022-06-30 Andrew MacLeod + + PR tree-optimization/106114 + * gimple-range-fold.cc (fold_using_range::relation_fold_and_or): Check + statement operands instead of GORI cache. + +2022-06-30 Antoni Boucher + + PR target/106095 + * config/i386/sse.md: Fix asm generation. + 2022-06-29 Sergei Trofimovich PR c++/106102 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index b03df3b..6b7f92b 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220630 +20220701 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 8a22e7e..829ed46 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2022-06-30 Jonathan Wakely + + * known-headers.cc (get_stdlib_header_for_name): Add + names. + 2022-06-24 Jason Merrill PR c++/87729 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5d68cc6..075cec4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,11 @@ +2022-06-30 Nathan Sidwell + + * module.cc (module_state::write_define): Drop located param. + (module_state::read_define): Likewise. + (module_state::prepare_macros): New, broken out of ... + (module_state::write_macros): ... here. Adjust. + (module_state::write_begin): Adjust. + 2022-06-29 Nathan Sidwell * module.cc (macro_info, macro_traits, macro_table, diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index f349c85..7eac936 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,13 @@ +2022-06-30 Harald Anlauf + Steven G. Kargl + + PR fortran/103137 + PR fortran/103138 + PR fortran/103693 + PR fortran/105243 + * decl.cc (gfc_match_data_decl): Reject CLASS entity declaration + when it is given the PARAMETER attribute. + 2022-06-29 Harald Anlauf Steven G. Kargl diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f7aa13b..45b69bd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,42 @@ +2022-06-30 Harald Anlauf + Steven G. Kargl + + PR fortran/103137 + PR fortran/103138 + PR fortran/103693 + PR fortran/105243 + * gfortran.dg/class_58.f90: Fix test. + * gfortran.dg/class_73.f90: New test. + +2022-06-30 Jonathan Wakely + + * g++.dg/spellcheck-stdlib.C: Check types and functions. + +2022-06-30 Nathan Sidwell + + * g++.dg/modules/inext-1.H: Check include-next happened. + +2022-06-30 Roger Sayle + Uroš Bizjak + + * gcc.target/i386/xchg-3.c: New test case. + +2022-06-30 Kito Cheng + + PR testsuite/102690 + * g++.dg/warn/Warray-bounds-16.C: XFAIL only on lp64 for the + warning. + +2022-06-30 Andrew MacLeod + + PR tree-optimization/106114 + * gcc.dg/pr106114.c: New. + +2022-06-30 Antoni Boucher + + PR target/106095 + * gcc.target/i386/pr106095.c: Add test using those AVX builtins. + 2022-06-29 Antoni Boucher PR jit/105812 -- cgit v1.1 From 33981253cdf4505af30d3467ba5baa142cc62772 Mon Sep 17 00:00:00 2001 From: Haochen Jiang Date: Wed, 29 Jun 2022 10:38:34 +0800 Subject: i386: Add AVX512BW to AVX512F in MASK_ISA2 gcc/ChangeLog: * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVX512F_UNSET): Add OPTION_MASK_ISA2_AVX512BW_UNSET, remove OPTION_MASK_ISA2_AVX512BF16_UNSET and OPTION_MASK_ISA2_AVX512FP16_UNSET. --- gcc/common/config/i386/i386-common.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/common/config/i386/i386-common.cc b/gcc/common/config/i386/i386-common.cc index cb878163..c0c2ad7 100644 --- a/gcc/common/config/i386/i386-common.cc +++ b/gcc/common/config/i386/i386-common.cc @@ -315,11 +315,10 @@ along with GCC; see the file COPYING3. If not see | OPTION_MASK_ISA_SSE_UNSET) #define OPTION_MASK_ISA2_AVX512F_UNSET \ - (OPTION_MASK_ISA2_AVX512BF16_UNSET \ + (OPTION_MASK_ISA2_AVX512BW_UNSET \ | OPTION_MASK_ISA2_AVX5124FMAPS_UNSET \ | OPTION_MASK_ISA2_AVX5124VNNIW_UNSET \ - | OPTION_MASK_ISA2_AVX512VP2INTERSECT_UNSET \ - | OPTION_MASK_ISA2_AVX512FP16_UNSET) + | OPTION_MASK_ISA2_AVX512VP2INTERSECT_UNSET) #define OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET \ OPTION_MASK_ISA2_SSE_UNSET #define OPTION_MASK_ISA2_AVX_UNSET OPTION_MASK_ISA2_AVX2_UNSET -- cgit v1.1 From 618bac5b486832edd3f8eb3ada74740e389dfcb8 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 30 Jun 2022 15:00:17 +0200 Subject: if-to-switch: properly allow side effects only for first condition Properly allow side effects only for a first BB in a condition chain. PR tree-optimization/106126 gcc/ChangeLog: * gimple-if-to-switch.cc (struct condition_info): Save has_side_effect. (find_conditions): Parse all BBs. (pass_if_to_switch::execute): Allow only side effects for first BB. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr106126.c: New test. --- gcc/gimple-if-to-switch.cc | 20 +++++++++++--------- gcc/testsuite/gcc.dg/tree-ssa/pr106126.c | 12 ++++++++++++ 2 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr106126.c (limited to 'gcc') diff --git a/gcc/gimple-if-to-switch.cc b/gcc/gimple-if-to-switch.cc index 70daae2..4441206 100644 --- a/gcc/gimple-if-to-switch.cc +++ b/gcc/gimple-if-to-switch.cc @@ -61,9 +61,11 @@ struct condition_info { typedef auto_vec> mapping_vec; - condition_info (gcond *cond): m_cond (cond), m_bb (gimple_bb (cond)), - m_forwarder_bb (NULL), m_ranges (), m_true_edge (NULL), m_false_edge (NULL), - m_true_edge_phi_mapping (), m_false_edge_phi_mapping () + condition_info (gcond *cond, bool has_side_effect): m_cond (cond), + m_bb (gimple_bb (cond)), m_forwarder_bb (NULL), m_ranges (), + m_true_edge (NULL), m_false_edge (NULL), + m_true_edge_phi_mapping (), m_false_edge_phi_mapping (), + m_has_side_effect (has_side_effect) { m_ranges.create (0); } @@ -80,6 +82,7 @@ struct condition_info edge m_false_edge; mapping_vec m_true_edge_phi_mapping; mapping_vec m_false_edge_phi_mapping; + bool m_has_side_effect; }; /* Recond PHI mapping for an original edge E and save these into vector VEC. */ @@ -389,16 +392,11 @@ find_conditions (basic_block bb, if (cond == NULL) return; - /* An empty conditions_in_bbs indicates we are processing the first - basic-block then no need check side effect. */ - if (!conditions_in_bbs->is_empty () && !no_side_effect_bb (bb)) - return; - tree lhs = gimple_cond_lhs (cond); tree rhs = gimple_cond_rhs (cond); tree_code code = gimple_cond_code (cond); - condition_info *info = new condition_info (cond); + condition_info *info = new condition_info (cond, !no_side_effect_bb (bb)); gassign *def; if (code == NE_EXPR @@ -536,6 +534,10 @@ pass_if_to_switch::execute (function *fun) if ((*info2)->m_false_edge != e) break; + /* Only the first BB in a chain can have a side effect. */ + if (info->m_has_side_effect) + break; + chain->m_entries.safe_push (*info2); bitmap_set_bit (seen_bbs, e->src->index); info = *info2; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr106126.c b/gcc/testsuite/gcc.dg/tree-ssa/pr106126.c new file mode 100644 index 0000000..2f0fd44 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr106126.c @@ -0,0 +1,12 @@ +/* PR tree-optimization/106126 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +char *var_1; +void pool_conda_matchspec() { + for (; var_1 && *var_1 && + *var_1 != '<' && *var_1 != '>' && + *var_1 != '!' && *var_1 != '~';) + if (*var_1 >= 'A' && *var_1 <= 'Z') + *var_1 += 'A'; +} -- cgit v1.1 From 9701432ff79926a5dd3303be3417e0bd0c24140b Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 30 Jun 2022 10:33:40 +0200 Subject: tree-optimization/106131 - wrong code with FRE rewriting The following makes sure to not use the original TBAA type for looking up a value across an aggregate copy when we had to offset the read. 2022-06-30 Richard Biener PR tree-optimization/106131 * tree-ssa-sccvn.cc (vn_reference_lookup_3): Force alias-set zero when offsetting the read looking through an aggregate copy. * g++.dg/torture/pr106131.C: New testcase. --- gcc/testsuite/g++.dg/torture/pr106131.C | 34 +++++++++++++++++++++++++++++++++ gcc/tree-ssa-sccvn.cc | 16 ++++++++++++---- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/g++.dg/torture/pr106131.C (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/torture/pr106131.C b/gcc/testsuite/g++.dg/torture/pr106131.C new file mode 100644 index 0000000..e110f4a --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr106131.C @@ -0,0 +1,34 @@ +// { dg-do run { target c++11 } } + +struct Pair { + int a, b; + Pair(const Pair &) = default; + Pair(int _a, int _b) : a(_a), b(_b) {} + Pair &operator=(const Pair &z) { + a = z.a; + b = z.b; + return *this; + } +}; + +const int &max(const int &a, const int &b) +{ + return a < b ? b : a; +} + +int foo(Pair x, Pair y) +{ + return max(x.b, y.b); +} + +int main() +{ + auto f = new Pair[3] {{0, -11}, {0, -8}, {0, 2}}; + for (int i = 0; i < 1; i++) { + f[i] = f[0]; + if(i == 0) + f[i] = f[2]; + if (foo(f[i], f[1]) != 2) + __builtin_abort(); + } +} diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index 9deedea..76d9289 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -3243,12 +3243,12 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, poly_int64 extra_off = 0; if (j == 0 && i >= 0 && lhs_ops[0].opcode == MEM_REF - && maybe_ne (lhs_ops[0].off, -1)) + && known_ne (lhs_ops[0].off, -1)) { if (known_eq (lhs_ops[0].off, vr->operands[i].off)) i--, j--; else if (vr->operands[i].opcode == MEM_REF - && maybe_ne (vr->operands[i].off, -1)) + && known_ne (vr->operands[i].off, -1)) { extra_off = vr->operands[i].off - lhs_ops[0].off; i--, j--; @@ -3275,6 +3275,7 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, copy_reference_ops_from_ref (rhs1, &rhs); /* Apply an extra offset to the inner MEM_REF of the RHS. */ + bool force_no_tbaa = false; if (maybe_ne (extra_off, 0)) { if (rhs.length () < 2) @@ -3287,6 +3288,10 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, rhs[ix].op0 = int_const_binop (PLUS_EXPR, rhs[ix].op0, build_int_cst (TREE_TYPE (rhs[ix].op0), extra_off)); + /* When we have offsetted the RHS, reading only parts of it, + we can no longer use the original TBAA type, force alias-set + zero. */ + force_no_tbaa = true; } /* Save the operands since we need to use the original ones for @@ -3339,8 +3344,11 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, /* Adjust *ref from the new operands. */ ao_ref rhs1_ref; ao_ref_init (&rhs1_ref, rhs1); - if (!ao_ref_init_from_vn_reference (&r, ao_ref_alias_set (&rhs1_ref), - ao_ref_base_alias_set (&rhs1_ref), + if (!ao_ref_init_from_vn_reference (&r, + force_no_tbaa ? 0 + : ao_ref_alias_set (&rhs1_ref), + force_no_tbaa ? 0 + : ao_ref_base_alias_set (&rhs1_ref), vr->type, vr->operands)) return (void *)-1; /* This can happen with bitfields. */ -- cgit v1.1 From 90129d39ca0fc1d2ac9cf960379feccea878bd90 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 1 Jul 2022 09:59:05 +0200 Subject: Amend fix for PR middle-end/105874 The original fix is very likely too big a hammer. gcc/ PR middle-end/105874 * expr.cc (expand_expr_real_1) : Force EXPAND_MEMORY for the expansion of the inner reference only in the usual cases where a memory reference is required. --- gcc/expr.cc | 77 ++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 37 deletions(-) (limited to 'gcc') diff --git a/gcc/expr.cc b/gcc/expr.cc index 5d66c9f..53af027 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -11186,37 +11186,58 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, machine_mode mode1, mode2; poly_int64 bitsize, bitpos, bytepos; tree offset; - int reversep, volatilep = 0, must_force_mem; + int reversep, volatilep = 0; tree tem = get_inner_reference (exp, &bitsize, &bitpos, &offset, &mode1, &unsignedp, &reversep, &volatilep); rtx orig_op0, memloc; bool clear_mem_expr = false; + bool must_force_mem; /* If we got back the original object, something is wrong. Perhaps we are evaluating an expression too early. In any event, don't infinitely recurse. */ gcc_assert (tem != exp); - /* If tem is a VAR_DECL, we need a memory reference. */ - enum expand_modifier tem_modifier = modifier; - if (tem_modifier == EXPAND_SUM) - tem_modifier = EXPAND_NORMAL; - if (TREE_CODE (tem) == VAR_DECL) - tem_modifier = EXPAND_MEMORY; + /* Make sure bitpos is not negative, this can wreak havoc later. */ + if (maybe_lt (bitpos, 0)) + { + gcc_checking_assert (offset == NULL_TREE); + offset = size_int (bits_to_bytes_round_down (bitpos)); + bitpos = num_trailing_bits (bitpos); + } + + /* If we have either an offset, a BLKmode result, or a reference + outside the underlying object, we must force it to memory. + Such a case can occur in Ada if we have unchecked conversion + of an expression from a scalar type to an aggregate type or + for an ARRAY_RANGE_REF whose type is BLKmode, or if we were + passed a partially uninitialized object or a view-conversion + to a larger size. */ + must_force_mem = offset != NULL_TREE + || mode1 == BLKmode + || (mode == BLKmode + && !int_mode_for_size (bitsize, 1).exists ()); + + const enum expand_modifier tem_modifier + = must_force_mem + ? EXPAND_MEMORY + : modifier == EXPAND_SUM ? EXPAND_NORMAL : modifier; /* If TEM's type is a union of variable size, pass TARGET to the inner computation, since it will need a temporary and TARGET is known to have to do. This occurs in unchecked conversion in Ada. */ + const rtx tem_target + = TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE + && COMPLETE_TYPE_P (TREE_TYPE (tem)) + && TREE_CODE (TYPE_SIZE (TREE_TYPE (tem))) != INTEGER_CST + && modifier != EXPAND_STACK_PARM + ? target + : NULL_RTX; + orig_op0 = op0 - = expand_expr_real (tem, - (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE - && COMPLETE_TYPE_P (TREE_TYPE (tem)) - && (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem))) - != INTEGER_CST) - && modifier != EXPAND_STACK_PARM - ? target : NULL_RTX), - VOIDmode, tem_modifier, NULL, true); + = expand_expr_real (tem, tem_target, VOIDmode, tem_modifier, NULL, + true); /* If the field has a mode, we want to access it in the field's mode, not the computed mode. @@ -11233,27 +11254,9 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, mode2 = CONSTANT_P (op0) ? TYPE_MODE (TREE_TYPE (tem)) : GET_MODE (op0); - /* Make sure bitpos is not negative, it can wreak havoc later. */ - if (maybe_lt (bitpos, 0)) - { - gcc_checking_assert (offset == NULL_TREE); - offset = size_int (bits_to_bytes_round_down (bitpos)); - bitpos = num_trailing_bits (bitpos); - } - - /* If we have either an offset, a BLKmode result, or a reference - outside the underlying object, we must force it to memory. - Such a case can occur in Ada if we have unchecked conversion - of an expression from a scalar type to an aggregate type or - for an ARRAY_RANGE_REF whose type is BLKmode, or if we were - passed a partially uninitialized object or a view-conversion - to a larger size. */ - must_force_mem = (offset - || mode1 == BLKmode - || (mode == BLKmode - && !int_mode_for_size (bitsize, 1).exists ()) - || maybe_gt (bitpos + bitsize, - GET_MODE_BITSIZE (mode2))); + /* See above for the rationale. */ + if (maybe_gt (bitpos + bitsize, GET_MODE_BITSIZE (mode2))) + must_force_mem = true; /* Handle CONCAT first. */ if (GET_CODE (op0) == CONCAT && !must_force_mem) @@ -11311,7 +11314,7 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, } else /* Otherwise force into memory. */ - must_force_mem = 1; + must_force_mem = true; } /* If this is a constant, put it in a register if it is a legitimate -- cgit v1.1 From e8a46e5cdab500eadffc0a11850d074498b3c2b2 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Fri, 1 Jul 2022 09:13:17 +0100 Subject: Double word logical operation clean-ups in i386.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch tidies up and unifies doubleword handling in i386.md; converting all doubleword splitters for logic operations to post-reload form, generalizing their define_insn_and_split templates to form (supporting TARGET_64BIT ? TImode : DImode), and where required tweaking the corresponding expanders to use SDWIM to support TImode doubleword operations. 2022-07-01 Roger Sayle Uroš Bizjak gcc/ChangeLog * config/i386/i386.md (general_szext_operand): Add TImode support using x86_64_hilo_general_operand predicate. (*cmp_doubleword): Use x86_64_hilo_general_operand predicate. (*add3_doubleword): Improved optimization of zero addition. (and3): Use SDWIM mode iterator to add support for double word bit-wise AND in TImode. Use force_reg when double word immediate operand isn't x86_64_hilo_general_operand. (and3_doubleword): Generalized from anddi3_doubleword and converted into a post-reload splitter. (*andndi3_doubleword): Previous define_insn deleted. (*andn3_doubleword_bmi): New define_insn_and_split for TARGET_BMI that splits post-reload. (*andn3_doubleword): New define_insn_and_split for !TARGET_BMI, that lowers/splits before reload. (3): Use SDWIM mode iterator to add suppport for double word bit-wise XOR and bit-wise IOR in TImode. Use force_reg when double word immediate operand isn't x86_64_hilo_general_operand. (*di3_doubleword): Generalized from di3_doubleword. (one_cmpl2): Use SDWIM mode iterator to add support for double word bit-wise NOT in TImode. (one_cmpl2_doubleword): Generalize from one_cmpldi2_doubleword and converted into a post-reload splitter. --- gcc/config/i386/i386.md | 201 +++++++++++++++++++++++------------------------- 1 file changed, 97 insertions(+), 104 deletions(-) (limited to 'gcc') diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 04cd2bc..646a556 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1192,7 +1192,8 @@ [(QI "general_operand") (HI "general_operand") (SI "x86_64_szext_general_operand") - (DI "x86_64_szext_general_operand")]) + (DI "x86_64_szext_general_operand") + (TI "x86_64_hilo_general_operand")]) (define_mode_attr nonmemory_szext_operand [(QI "nonmemory_operand") @@ -1509,7 +1510,7 @@ (define_insn_and_split "*cmp_doubleword" [(set (reg:CCZ FLAGS_REG) (compare:CCZ (match_operand: 0 "nonimmediate_operand") - (match_operand: 1 "x86_64_general_operand")))] + (match_operand: 1 "x86_64_hilo_general_operand")))] "ix86_pre_reload_split ()" "#" "&& 1" @@ -5802,7 +5803,12 @@ split_double_mode (mode, &operands[0], 3, &operands[0], &operands[3]); if (operands[2] == const0_rtx) { - ix86_expand_binary_operator (PLUS, mode, &operands[3]); + if (operands[5] != const0_rtx) + ix86_expand_binary_operator (PLUS, mode, &operands[3]); + else if (!rtx_equal_p (operands[3], operands[4])) + emit_move_insn (operands[3], operands[4]); + else + emit_note (NOTE_INSN_DELETED); DONE; } }) @@ -9846,19 +9852,22 @@ ;; it should be done with splitters. (define_expand "and3" - [(set (match_operand:SWIM1248x 0 "nonimmediate_operand") - (and:SWIM1248x (match_operand:SWIM1248x 1 "nonimmediate_operand") - (match_operand:SWIM1248x 2 "")))] + [(set (match_operand:SDWIM 0 "nonimmediate_operand") + (and:SDWIM (match_operand:SDWIM 1 "nonimmediate_operand") + (match_operand:SDWIM 2 "")))] "" { machine_mode mode = mode; - if (mode == DImode && !TARGET_64BIT) - ; - else if (const_int_operand (operands[2], mode) - && register_operand (operands[0], mode) - && !(TARGET_ZERO_EXTEND_WITH_AND - && optimize_function_for_speed_p (cfun))) + if (GET_MODE_SIZE (mode) > UNITS_PER_WORD + && !x86_64_hilo_general_operand (operands[2], mode)) + operands[2] = force_reg (mode, operands[2]); + + if (GET_MODE_SIZE (mode) <= UNITS_PER_WORD + && const_int_operand (operands[2], mode) + && register_operand (operands[0], mode) + && !(TARGET_ZERO_EXTEND_WITH_AND + && optimize_function_for_speed_p (cfun))) { unsigned HOST_WIDE_INT ival = UINTVAL (operands[2]); @@ -9880,34 +9889,37 @@ DONE; }) -(define_insn_and_split "*anddi3_doubleword" - [(set (match_operand:DI 0 "nonimmediate_operand") - (and:DI - (match_operand:DI 1 "nonimmediate_operand") - (match_operand:DI 2 "x86_64_szext_general_operand"))) +(define_insn_and_split "*and3_doubleword" + [(set (match_operand: 0 "nonimmediate_operand" "=ro,r") + (and: + (match_operand: 1 "nonimmediate_operand" "%0,0") + (match_operand: 2 "x86_64_hilo_general_operand" "r,o"))) (clobber (reg:CC FLAGS_REG))] - "!TARGET_64BIT - && ix86_binary_operator_ok (AND, DImode, operands) - && ix86_pre_reload_split ()" + "ix86_binary_operator_ok (AND, mode, operands)" "#" - "&& 1" - [(const_int 0)] + "&& reload_completed" + [(const_int:DWIH 0)] { - split_double_mode (DImode, &operands[0], 3, &operands[0], &operands[3]); + bool emit_insn_deleted_note_p = false; + + split_double_mode (mode, &operands[0], 3, &operands[0], &operands[3]); if (operands[2] == const0_rtx) emit_move_insn (operands[0], const0_rtx); else if (operands[2] == constm1_rtx) - emit_move_insn (operands[0], operands[1]); + emit_insn_deleted_note_p = true; else - emit_insn (gen_andsi3 (operands[0], operands[1], operands[2])); + ix86_expand_binary_operator (AND, mode, &operands[0]); if (operands[5] == const0_rtx) emit_move_insn (operands[3], const0_rtx); else if (operands[5] == constm1_rtx) - emit_move_insn (operands[3], operands[4]); + { + if (emit_insn_deleted_note_p) + emit_note (NOTE_INSN_DELETED); + } else - emit_insn (gen_andsi3 (operands[3], operands[4], operands[5])); + ix86_expand_binary_operator (AND, mode, &operands[3]); DONE; }) @@ -10391,54 +10403,38 @@ operands[2] = gen_int_mode (INTVAL (operands[2]), QImode); }) -(define_insn "*andndi3_doubleword" - [(set (match_operand:DI 0 "register_operand") - (and:DI - (not:DI (match_operand:DI 1 "register_operand")) - (match_operand:DI 2 "nonimmediate_operand"))) - (clobber (reg:CC FLAGS_REG))] - "!TARGET_64BIT && TARGET_STV && TARGET_SSE2 - && ix86_pre_reload_split ()" - "#") - -(define_split - [(set (match_operand:DI 0 "register_operand") - (and:DI - (not:DI (match_operand:DI 1 "register_operand")) - (match_operand:DI 2 "nonimmediate_operand"))) +(define_insn_and_split "*andn3_doubleword_bmi" + [(set (match_operand: 0 "register_operand") + (and: + (not: (match_operand: 1 "register_operand")) + (match_operand: 2 "nonimmediate_operand"))) (clobber (reg:CC FLAGS_REG))] - "!TARGET_64BIT && TARGET_BMI && TARGET_STV && TARGET_SSE2 - && can_create_pseudo_p ()" + "TARGET_BMI" + "#" + "&& reload_completed" [(parallel [(set (match_dup 0) - (and:SI (not:SI (match_dup 1)) (match_dup 2))) + (and:DWIH (not:DWIH (match_dup 1)) (match_dup 2))) (clobber (reg:CC FLAGS_REG))]) (parallel [(set (match_dup 3) - (and:SI (not:SI (match_dup 4)) (match_dup 5))) + (and:DWIH (not:DWIH (match_dup 4)) (match_dup 5))) (clobber (reg:CC FLAGS_REG))])] - "split_double_mode (DImode, &operands[0], 3, &operands[0], &operands[3]);") + "split_double_mode (mode, &operands[0], 3, &operands[0], &operands[3]);") -(define_split - [(set (match_operand:DI 0 "register_operand") - (and:DI - (not:DI (match_operand:DI 1 "register_operand")) - (match_operand:DI 2 "nonimmediate_operand"))) +(define_insn_and_split "*andn3_doubleword" + [(set (match_operand:DWI 0 "register_operand") + (and:DWI + (not:DWI (match_operand:DWI 1 "register_operand")) + (match_operand:DWI 2 "nonimmediate_operand"))) (clobber (reg:CC FLAGS_REG))] - "!TARGET_64BIT && !TARGET_BMI && TARGET_STV && TARGET_SSE2 - && can_create_pseudo_p ()" - [(set (match_dup 6) (not:SI (match_dup 1))) + "!TARGET_BMI + && ix86_pre_reload_split ()" + "#" + "&& 1" + [(set (match_dup 3) (not:DWI (match_dup 1))) (parallel [(set (match_dup 0) - (and:SI (match_dup 6) (match_dup 2))) - (clobber (reg:CC FLAGS_REG))]) - (set (match_dup 7) (not:SI (match_dup 4))) - (parallel [(set (match_dup 3) - (and:SI (match_dup 7) (match_dup 5))) + (and:DWI (match_dup 3) (match_dup 2))) (clobber (reg:CC FLAGS_REG))])] -{ - operands[6] = gen_reg_rtx (SImode); - operands[7] = gen_reg_rtx (SImode); - - split_double_mode (DImode, &operands[0], 3, &operands[0], &operands[3]); -}) + "operands[3] = gen_reg_rtx (mode);") (define_insn "*andn_1" [(set (match_operand:SWI48 0 "register_operand" "=r,r,?k") @@ -10532,52 +10528,51 @@ ;; If this is considered useful, it should be done with splitters. (define_expand "3" - [(set (match_operand:SWIM1248x 0 "nonimmediate_operand") - (any_or:SWIM1248x (match_operand:SWIM1248x 1 "nonimmediate_operand") - (match_operand:SWIM1248x 2 "")))] + [(set (match_operand:SDWIM 0 "nonimmediate_operand") + (any_or:SDWIM (match_operand:SDWIM 1 "nonimmediate_operand") + (match_operand:SDWIM 2 "")))] "" - "ix86_expand_binary_operator (, mode, operands); DONE;") +{ + if (GET_MODE_SIZE (mode) > UNITS_PER_WORD + && !x86_64_hilo_general_operand (operands[2], mode)) + operands[2] = force_reg (mode, operands[2]); -(define_insn_and_split "*di3_doubleword" - [(set (match_operand:DI 0 "nonimmediate_operand" "=ro,r") - (any_or:DI - (match_operand:DI 1 "nonimmediate_operand" "0,0") - (match_operand:DI 2 "x86_64_szext_general_operand" "re,o"))) + ix86_expand_binary_operator (, mode, operands); + DONE; +}) + +(define_insn_and_split "*3_doubleword" + [(set (match_operand: 0 "nonimmediate_operand" "=ro,r") + (any_or: + (match_operand: 1 "nonimmediate_operand" "%0,0") + (match_operand: 2 "x86_64_hilo_general_operand" "r,o"))) (clobber (reg:CC FLAGS_REG))] - "!TARGET_64BIT - && ix86_binary_operator_ok (, DImode, operands)" + "ix86_binary_operator_ok (, mode, operands)" "#" "&& reload_completed" - [(const_int 0)] + [(const_int:DWIH 0)] { /* This insn may disappear completely when operands[2] == const0_rtx and operands[0] == operands[1], which requires a NOTE_INSN_DELETED. */ bool emit_insn_deleted_note_p = false; - split_double_mode (DImode, &operands[0], 3, &operands[0], &operands[3]); + split_double_mode (mode, &operands[0], 3, &operands[0], &operands[3]); if (operands[2] == const0_rtx) - { - if (!rtx_equal_p (operands[0], operands[1])) - emit_move_insn (operands[0], operands[1]); - else - emit_insn_deleted_note_p = true; - } + emit_insn_deleted_note_p = true; else if (operands[2] == constm1_rtx) { if ( == IOR) emit_move_insn (operands[0], constm1_rtx); else - ix86_expand_unary_operator (NOT, SImode, &operands[0]); + ix86_expand_unary_operator (NOT, mode, &operands[0]); } else - ix86_expand_binary_operator (, SImode, &operands[0]); + ix86_expand_binary_operator (, mode, &operands[0]); if (operands[5] == const0_rtx) { - if (!rtx_equal_p (operands[3], operands[4])) - emit_move_insn (operands[3], operands[4]); - else if (emit_insn_deleted_note_p) + if (emit_insn_deleted_note_p) emit_note (NOTE_INSN_DELETED); } else if (operands[5] == constm1_rtx) @@ -10585,10 +10580,10 @@ if ( == IOR) emit_move_insn (operands[3], constm1_rtx); else - ix86_expand_unary_operator (NOT, SImode, &operands[3]); + ix86_expand_unary_operator (NOT, mode, &operands[3]); } else - ix86_expand_binary_operator (, SImode, &operands[3]); + ix86_expand_binary_operator (, mode, &operands[3]); DONE; }) @@ -11727,24 +11722,22 @@ ;; One complement instructions (define_expand "one_cmpl2" - [(set (match_operand:SWIM1248x 0 "nonimmediate_operand") - (not:SWIM1248x (match_operand:SWIM1248x 1 "nonimmediate_operand")))] + [(set (match_operand:SDWIM 0 "nonimmediate_operand") + (not:SDWIM (match_operand:SDWIM 1 "nonimmediate_operand")))] "" "ix86_expand_unary_operator (NOT, mode, operands); DONE;") -(define_insn_and_split "*one_cmpldi2_doubleword" - [(set (match_operand:DI 0 "nonimmediate_operand") - (not:DI (match_operand:DI 1 "nonimmediate_operand")))] - "!TARGET_64BIT - && ix86_unary_operator_ok (NOT, DImode, operands) - && ix86_pre_reload_split ()" +(define_insn_and_split "*one_cmpl2_doubleword" + [(set (match_operand: 0 "nonimmediate_operand" "=ro") + (not: (match_operand: 1 "nonimmediate_operand" "0")))] + "ix86_unary_operator_ok (NOT, mode, operands)" "#" - "&& 1" + "&& reload_completed" [(set (match_dup 0) - (not:SI (match_dup 1))) + (not:DWIH (match_dup 1))) (set (match_dup 2) - (not:SI (match_dup 3)))] - "split_double_mode (DImode, &operands[0], 2, &operands[0], &operands[2]);") + (not:DWIH (match_dup 3)))] + "split_double_mode (mode, &operands[0], 2, &operands[0], &operands[2]);") (define_insn "*one_cmpl2_1" [(set (match_operand:SWI248 0 "nonimmediate_operand" "=rm,?k") -- cgit v1.1 From 17419b61edd350147b0cc10c3da0b8461e51a42c Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Fri, 1 Jul 2022 09:18:07 +0100 Subject: PR target/106122: Don't update %esp via the stack with -Oz on x86. When optimizing for size with -Oz, setting a register can be minimized by pushing an immediate value to the stack and popping it to the destination. Alas the one general register that shouldn't be updated via the stack is the stack pointer itself, where "pop %esp" can't be represented in GCC's RTL ("use of a register mentioned in pre_inc, pre_dec, post_inc or post_dec is not permitted within the same instruction"). This patch fixes PR target/106122 by explicitly checking for SP_REG in the problematic peephole2. 2022-07-01 Roger Sayle gcc/ChangeLog PR target/106122 * config/i386/i386.md (peephole2): Avoid generating pop %esp when optimizing for size. gcc/testsuite/ChangeLog PR target/106122 * gcc.target/i386/pr106122.c: New test case. --- gcc/config/i386/i386.md | 3 ++- gcc/testsuite/gcc.target/i386/pr106122.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr106122.c (limited to 'gcc') diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 646a556..3401814 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2589,7 +2589,8 @@ "optimize_insn_for_size_p () && optimize_size > 1 && operands[1] != const0_rtx && IN_RANGE (INTVAL (operands[1]), -128, 127) - && !ix86_red_zone_used" + && !ix86_red_zone_used + && REGNO (operands[0]) != SP_REG" [(set (match_dup 2) (match_dup 1)) (set (match_dup 0) (match_dup 3))] { diff --git a/gcc/testsuite/gcc.target/i386/pr106122.c b/gcc/testsuite/gcc.target/i386/pr106122.c new file mode 100644 index 0000000..7d24ed3 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr106122.c @@ -0,0 +1,15 @@ +/* PR middle-end/106122 */ +/* { dg-do compile } */ +/* { dg-options "-Oz" } */ + +register volatile int a __asm__("%esp"); +void foo (void *); +void bar (void *); + +void +baz (void) +{ + foo (__builtin_return_address (0)); + a = 0; + bar (__builtin_return_address (0)); +} -- cgit v1.1 From e52592073f6df3d7a3acd9f0436dcc32a8b7493d Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 1 Jul 2022 11:17:41 +0200 Subject: wide-int: Fix up wi::shifted_mask [PR106144] As the following self-test testcase shows, wi::shifted_mask sometimes doesn't create canonicalized wide_ints, which then fail to compare equal to canonicalized wide_ints with the same value. In particular, wi::mask (128, false, 128) gives { -1 } with len 1 and prec 128, while wi::shifted_mask (0, 128, false, 128) gives { -1, -1 } with len 2 and prec 128. The problem is that the code is written with the assumption that there are 3 bit blocks (or 2 if start is 0), but doesn't consider the possibility where there are 2 bit blocks (or 1 if start is 0) where the highest block isn't present. In that case, there is the optional block of negate ? 0 : -1 elts, followed by just one elt (either one from the if (shift) or just negate ? -1 : 0) and the rest is implicit sign-extension. Only if end < prec there is 1 or more bits above it that have different bit value and so we need to emit all the elts till end and then one more elt. if (end == prec) would work too, because we have: if (width > prec - start) width = prec - start; unsigned int end = start + width; so end is guaranteed to be end <= prec, dunno what is preferred. 2022-07-01 Jakub Jelinek PR middle-end/106144 * wide-int.cc (wi::shifted_mask): If end >= prec, return right after emitting element for shift or if shift is 0 first element after start. (wide_int_cc_tests): Add tests for equivalency of wi::mask and wi::shifted_mask with 0 start. --- gcc/wide-int.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/wide-int.cc b/gcc/wide-int.cc index f61b9fe..1fee078 100644 --- a/gcc/wide-int.cc +++ b/gcc/wide-int.cc @@ -842,6 +842,13 @@ wi::shifted_mask (HOST_WIDE_INT *val, unsigned int start, unsigned int width, val[i++] = negate ? block : ~block; } + if (end >= prec) + { + if (!shift) + val[i++] = negate ? 0 : -1; + return i; + } + while (i < end / HOST_BITS_PER_WIDE_INT) /* 1111111 */ val[i++] = negate ? 0 : -1; @@ -853,7 +860,7 @@ wi::shifted_mask (HOST_WIDE_INT *val, unsigned int start, unsigned int width, HOST_WIDE_INT block = (HOST_WIDE_INT_1U << shift) - 1; val[i++] = negate ? ~block : block; } - else if (end < prec) + else val[i++] = negate ? -1 : 0; return i; @@ -2583,6 +2590,10 @@ wide_int_cc_tests () run_all_wide_int_tests (); test_overflow (); test_round_for_mask (); + ASSERT_EQ (wi::mask (128, false, 128), + wi::shifted_mask (0, 128, false, 128)); + ASSERT_EQ (wi::mask (128, true, 128), + wi::shifted_mask (0, 128, true, 128)); } } // namespace selftest -- cgit v1.1 From 9a33a3e2f7517a994410ca33d00052c6d3f86aff Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Fri, 1 Jul 2022 17:55:55 +0800 Subject: Revert "testsuite/102690: Only check warning for lp64 in Warray-bounds-16.C" This reverts commit 0f6eef398045deb2a62d18b526831719c7c20c8a. --- gcc/testsuite/g++.dg/warn/Warray-bounds-16.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C index 45a14b1..89cbadb 100644 --- a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C +++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C @@ -19,7 +19,7 @@ struct S p = (int*) new unsigned char [sizeof (int) * m]; for (int i = 0; i < m; i++) - new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail lp64 } } */ + new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail *-*-* } } */ } }; -- cgit v1.1 From e2d2a8ff4f0dd37336714a25623cc877cf5812b0 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Fri, 1 Jul 2022 11:14:12 +0100 Subject: [Committed] Add constraints to new andn_doubleword_bmi pattern in i386.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Many thanks to Uros for spotting that I'd forgotten to add constraints to the new define_insn_and_split *andn_doubleword_bmi when moving it from pre-reload to post-reload. I've pushed this obvious fix after a make bootstrap on x86_64-pc-linux-gnu. Sorry for the inconvenience to anyone building the tree with a non-default architecture that enables BMI. 2022-07-01 Roger Sayle Uroš Bizjak gcc/ChangeLog * config/i386/i386.md (*andn3_doubleword_bmi): Add constraints to post-reload define_insn_and_split. --- gcc/config/i386/i386.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 3401814..352a21c 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -10405,10 +10405,10 @@ }) (define_insn_and_split "*andn3_doubleword_bmi" - [(set (match_operand: 0 "register_operand") + [(set (match_operand: 0 "register_operand" "=r") (and: - (not: (match_operand: 1 "register_operand")) - (match_operand: 2 "nonimmediate_operand"))) + (not: (match_operand: 1 "register_operand" "0")) + (match_operand: 2 "nonimmediate_operand" "ro"))) (clobber (reg:CC FLAGS_REG))] "TARGET_BMI" "#" -- cgit v1.1 From 7780dc5b2d02785186583fc8eced3c9e3aec4552 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Fri, 1 Jul 2022 12:21:24 +0200 Subject: gcn: Remove useless register keyword gcc/ChangeLog: * config/gcn/gcn-protos.h (print_operand_address): Remove register keyword on 'rtx addr' argument. --- gcc/config/gcn/gcn-protos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/gcn/gcn-protos.h b/gcc/config/gcn/gcn-protos.h index 61791c9..38197b9 100644 --- a/gcc/config/gcn/gcn-protos.h +++ b/gcc/config/gcn/gcn-protos.h @@ -75,7 +75,7 @@ extern bool gcn_valid_move_p (machine_mode, rtx, rtx); extern rtx gcn_vec_constant (machine_mode, int); extern rtx gcn_vec_constant (machine_mode, rtx); extern bool gcn_vgpr_move_p (rtx, rtx); -extern void print_operand_address (FILE *file, register rtx addr); +extern void print_operand_address (FILE *file, rtx addr); extern void print_operand (FILE *file, rtx x, int code); extern bool regno_ok_for_index_p (int); -- cgit v1.1 From 08ed796ed08996545c574b846f3ca04f2cbe70dc Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 1 Jul 2022 12:35:58 +0200 Subject: Make sure checking code is conditional in VN VN has checking code with gcc_unreachable (), the following makes it cheaper by instead guarding the side-effect with flag_checking. 2022-07-01 Richard Biener * tree-ssa-sccvn.cc (vn_nary_op_insert_into): Make checking dominance check conditional on flag_checking. --- gcc/tree-ssa-sccvn.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index 76d9289..c40c45e 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -4243,9 +4243,10 @@ vn_nary_op_insert_into (vn_nary_op_t vno, vn_nary_op_table_type *table) if (dominated_by_p (CDI_DOMINATORS, vno_bb, val_bb)) /* Value registered with more generic predicate. */ return *slot; - else if (dominated_by_p (CDI_DOMINATORS, val_bb, vno_bb)) + else if (flag_checking) /* Shouldn't happen, we insert in RPO order. */ - gcc_unreachable (); + gcc_assert (!dominated_by_p (CDI_DOMINATORS, + val_bb, vno_bb)); } /* Append value. */ *next = (vn_pval *) obstack_alloc (&vn_tables_obstack, -- cgit v1.1 From 2b0937946b19f0f4d91e6248a2806b1f98f5244b Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 1 Jul 2022 13:16:33 +0200 Subject: Revert maybe_ne -> known_ne change in vn_reference_lookup_3 This reverts the change as discussed. 2022-07-01 Richard Biener * tree-ssa-sccvn.cc (vn_reference_lookup_3): Revert back to using maybe_ne (off, -1). --- gcc/tree-ssa-sccvn.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index c40c45e..f41d503 100644 --- a/gcc/tree-ssa-sccvn.cc +++ b/gcc/tree-ssa-sccvn.cc @@ -3243,12 +3243,12 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, poly_int64 extra_off = 0; if (j == 0 && i >= 0 && lhs_ops[0].opcode == MEM_REF - && known_ne (lhs_ops[0].off, -1)) + && maybe_ne (lhs_ops[0].off, -1)) { if (known_eq (lhs_ops[0].off, vr->operands[i].off)) i--, j--; else if (vr->operands[i].opcode == MEM_REF - && known_ne (vr->operands[i].off, -1)) + && maybe_ne (vr->operands[i].off, -1)) { extra_off = vr->operands[i].off - lhs_ops[0].off; i--, j--; -- cgit v1.1 From 63abe04999283582b258adf60da6c19d541ebc68 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 1 Jul 2022 13:59:32 +0200 Subject: Avoid unused sbitmap in update_ssa The following avoids copying and using blocks_to_update to the interesting_blocks sbitmap when doing update_ssa as it is unused besides the redundant query in the domwalk. * tree-into-ssa.cc (rewrite_update_dom_walker::before_dom_children): Do not look at interesting_blocks which is a copy of blocks_to_update. (update_ssa): Do not initialize it. (pass_build_ssa::execute): Set interesting_blocks to NULL after releasing it. --- gcc/tree-into-ssa.cc | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc index c4e40e8..c90651c 100644 --- a/gcc/tree-into-ssa.cc +++ b/gcc/tree-into-ssa.cc @@ -2214,15 +2214,11 @@ rewrite_update_dom_walker::before_dom_children (basic_block bb) } /* Step 2. Rewrite every variable used in each statement in the block. */ - if (bitmap_bit_p (interesting_blocks, bb->index)) - { - gcc_checking_assert (bitmap_bit_p (blocks_to_update, bb->index)); - for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi); ) - if (rewrite_update_stmt (gsi_stmt (gsi), gsi)) - gsi_remove (&gsi, true); - else - gsi_next (&gsi); - } + for (gimple_stmt_iterator gsi = gsi_start_bb (bb); !gsi_end_p (gsi); ) + if (rewrite_update_stmt (gsi_stmt (gsi), gsi)) + gsi_remove (&gsi, true); + else + gsi_next (&gsi); /* Step 3. Update PHI nodes. */ rewrite_update_phi_arguments (bb); @@ -2460,6 +2456,7 @@ pass_build_ssa::execute (function *fun) free (dfs); sbitmap_free (interesting_blocks); + interesting_blocks = NULL; fini_ssa_renamer (); @@ -3503,15 +3500,8 @@ update_ssa (unsigned update_flags) get_var_info (sym)->info.current_def = NULL_TREE; /* Now start the renaming process at START_BB. */ - interesting_blocks = sbitmap_alloc (last_basic_block_for_fn (cfun)); - bitmap_clear (interesting_blocks); - EXECUTE_IF_SET_IN_BITMAP (blocks_to_update, 0, i, bi) - bitmap_set_bit (interesting_blocks, i); - rewrite_blocks (start_bb, REWRITE_UPDATE); - sbitmap_free (interesting_blocks); - /* Debugging dumps. */ if (dump_file) { -- cgit v1.1 From 07ac550393d00fcadcee21b44abee6bb30c93949 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 23 Jun 2022 23:14:35 -0400 Subject: c++: dependent generic lambda template-id [PR106024] We were wrongly looking up the generic lambda op() in a dependent scope, and then trying to look up its instantiation at substitution time, but lambdas aren't instantiated, so we crashed. The fix is to not look into dependent class scopes. But this created trouble with wrongly trying to use a template from the enclosing scope when we aren't actually looking at a template-argument-list, in template/lookup18.C, so let's avoid that. PR c++/106024 gcc/cp/ChangeLog: * parser.cc (missing_template_diag): Factor out... (cp_parser_id_expression): ...from here. (cp_parser_lookup_name): Don't look in dependent object_type. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-generic10.C: New test. --- gcc/cp/parser.cc | 23 ++++++++++++++++++++++- gcc/testsuite/g++.dg/cpp2a/lambda-generic10.C | 14 ++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/cpp2a/lambda-generic10.C (limited to 'gcc') diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index da2f370..357fde5 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -30676,9 +30676,11 @@ cp_parser_lookup_name (cp_parser *parser, tree name, } else if (object_type) { + bool dep = dependent_scope_p (object_type); + /* Look up the name in the scope of the OBJECT_TYPE, unless the OBJECT_TYPE is not a class. */ - if (CLASS_TYPE_P (object_type)) + if (!dep && CLASS_TYPE_P (object_type)) /* If the OBJECT_TYPE is a template specialization, it may be instantiated during name lookup. In that case, errors may be issued. Even if we rollback the current tentative @@ -30702,6 +30704,25 @@ cp_parser_lookup_name (cp_parser *parser, tree name, : is_template ? LOOK_want::TYPE : prefer_type_arg (tag_type)); + /* If we did unqualified lookup of a dependent member-qualified name and + found something, do we want to use it? P1787 clarified that we need + to look in the object scope first even if it's dependent, but for now + let's still use it in some cases. + FIXME remember unqualified lookup result to use if member lookup fails + at instantiation time. */ + if (decl && dep && is_template) + { + saved_token_sentinel toks (parser->lexer, STS_ROLLBACK); + /* Only use the unqualified class template lookup if we're actually + looking at a template arg list. */ + if (!cp_parser_skip_entire_template_parameter_list (parser)) + decl = NULL_TREE; + /* And only use the unqualified lookup if we're looking at ::. */ + if (decl + && !cp_lexer_next_token_is (parser->lexer, CPP_SCOPE)) + decl = NULL_TREE; + } + /* If we know we're looking for a type (e.g. A in p->A::x), mock up a typename. */ if (!decl && object_type && tag_type != none_type diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-generic10.C b/gcc/testsuite/g++.dg/cpp2a/lambda-generic10.C new file mode 100644 index 0000000..47a87bb --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-generic10.C @@ -0,0 +1,14 @@ +// PR c++/106024 +// { dg-do compile { target c++20 } } + +void sink(...); +template void f() +{ + sink ([] (int...) { return 1; } + .operator()(args...)...); // { dg-warning "-Wmissing-template-keyword" } +} // { dg-prune-output {expected '\)'} } + +int main() +{ + f<1,2,3>(); +} -- cgit v1.1 From 288c6cce0277e03e08b324283b6a015a70066bb7 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 29 Jun 2022 17:12:09 -0400 Subject: c++: add fixup to missing .template warning I experimented with giving this diagnostic in another place, which didn't work out, but we can still benefit from adding the fixup. gcc/cp/ChangeLog: * parser.cc (missing_template_diag): Split out... (cp_parser_id_expression): ...from here. --- gcc/cp/parser.cc | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index 357fde5..f6bc8db 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -6093,6 +6093,23 @@ cp_parser_primary_expression (cp_parser *parser, /*decltype*/false, idk); } +/* Complain about missing template keyword when naming a dependent + member template. */ + +static void +missing_template_diag (location_t loc, diagnostic_t diag_kind = DK_WARNING) +{ + if (warning_suppressed_at (loc, OPT_Wmissing_template_keyword)) + return; + + gcc_rich_location richloc (loc); + richloc.add_fixit_insert_before ("template"); + emit_diagnostic (diag_kind, &richloc, OPT_Wmissing_template_keyword, + "expected %qs keyword before dependent " + "template name", "template"); + suppress_warning_at (loc, OPT_Wmissing_template_keyword); +} + /* Parse an id-expression. id-expression: @@ -6268,9 +6285,7 @@ cp_parser_id_expression (cp_parser *parser, operator. */ && (cp_lexer_peek_token (parser->lexer)->type <= CPP_LAST_PUNCTUATOR)) - warning_at (token->location, OPT_Wmissing_template_keyword, - "expected %qs keyword before dependent " - "template name", "template"); + missing_template_diag (token->location); } return id; -- cgit v1.1 From aefe23f720a542e90ecc6629885b01d44139b043 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 1 Jul 2022 00:37:10 -0400 Subject: c++: tweak resolve_args change I don't know why I used tf_error instead of complain here. PR c++/105779 gcc/cp/ChangeLog: * call.cc (resolve_args): Use complain. --- gcc/cp/call.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/cp/call.cc b/gcc/cp/call.cc index f1dd837..fc98552 100644 --- a/gcc/cp/call.cc +++ b/gcc/cp/call.cc @@ -4675,7 +4675,7 @@ resolve_args (vec *args, tsubst_flags_t complain) /* Force auto deduction now. Omit tf_warning to avoid redundant deprecated warning on deprecated-14.C. */ - if (!mark_single_function (arg, tf_error)) + if (!mark_single_function (arg, complain & ~tf_warning)) return NULL; } return args; -- cgit v1.1 From 2ea6c59349793761b9c00f75ef281ac413566b2f Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 28 Jun 2022 18:59:19 -0400 Subject: c++: warn about using keywords as identifiers [PR106111] In C++03, -Wc++11-compat should warn about int constexpr; since 'constexpr' is a keyword in C++11. Jonathan reports that we don't emit a similar warning for 'alignas' or 'alignof', and, as I found out, 'thread_local'. Similarly, we don't warn for most C++20 keywords. That happens because RID_LAST_CXX20 hasn't been updated in a while. PR c++/106111 gcc/c-family/ChangeLog: * c-common.h (enum rid): Update RID_LAST_CXX20. gcc/cp/ChangeLog: * parser.cc (cp_lexer_get_preprocessor_token): Also warn about RID_ALIGNOF, RID_ALIGNAS, RID_THREAD. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/keywords1.C: New test. * g++.dg/cpp2a/keywords1.C: New test. --- gcc/c-family/c-common.h | 2 +- gcc/cp/parser.cc | 10 +++++++--- gcc/testsuite/g++.dg/cpp0x/keywords1.C | 15 +++++++++++++++ gcc/testsuite/g++.dg/cpp2a/keywords1.C | 12 ++++++++++++ 4 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/keywords1.C create mode 100644 gcc/testsuite/g++.dg/cpp2a/keywords1.C (limited to 'gcc') diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 47442c9..a1e6a55 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -271,7 +271,7 @@ enum rid RID_FIRST_CXX11 = RID_CONSTEXPR, RID_LAST_CXX11 = RID_STATIC_ASSERT, RID_FIRST_CXX20 = RID_CONSTINIT, - RID_LAST_CXX20 = RID_CONSTINIT, + RID_LAST_CXX20 = RID_CO_RETURN, RID_FIRST_AT = RID_AT_ENCODE, RID_LAST_AT = RID_AT_IMPLEMENTATION, RID_FIRST_PQ = RID_IN, diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index f6bc8db..c5d1f9d 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -890,10 +890,14 @@ cp_lexer_get_preprocessor_token (unsigned flags, cp_token *token) else { if (warn_cxx11_compat - && C_RID_CODE (token->u.value) >= RID_FIRST_CXX11 - && C_RID_CODE (token->u.value) <= RID_LAST_CXX11) + && ((C_RID_CODE (token->u.value) >= RID_FIRST_CXX11 + && C_RID_CODE (token->u.value) <= RID_LAST_CXX11) + /* These are outside the CXX11 range. */ + || C_RID_CODE (token->u.value) == RID_ALIGNOF + || C_RID_CODE (token->u.value) == RID_ALIGNAS + || C_RID_CODE (token->u.value)== RID_THREAD)) { - /* Warn about the C++0x keyword (but still treat it as + /* Warn about the C++11 keyword (but still treat it as an identifier). */ warning_at (token->location, OPT_Wc__11_compat, "identifier %qE is a keyword in C++11", diff --git a/gcc/testsuite/g++.dg/cpp0x/keywords1.C b/gcc/testsuite/g++.dg/cpp0x/keywords1.C new file mode 100644 index 0000000..2b2ab64 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/keywords1.C @@ -0,0 +1,15 @@ +// PR c++/106111 +// { dg-do compile { target c++98_only } } +// { dg-options "-Wc++11-compat" } + +int alignof; // { dg-warning "is a keyword in C\\\+\\\+11" } +int alignas; // { dg-warning "is a keyword in C\\\+\\\+11" } +int constexpr; // { dg-warning "is a keyword in C\\\+\\\+11" } +int decltype; // { dg-warning "is a keyword in C\\\+\\\+11" } +int noexcept; // { dg-warning "is a keyword in C\\\+\\\+11" } +int nullptr; // { dg-warning "is a keyword in C\\\+\\\+11" } +int static_assert; // { dg-warning "is a keyword in C\\\+\\\+11" } +int thread_local; // { dg-warning "is a keyword in C\\\+\\\+11" } +int _Alignas; +int _Alignof; +int _Thread_local; diff --git a/gcc/testsuite/g++.dg/cpp2a/keywords1.C b/gcc/testsuite/g++.dg/cpp2a/keywords1.C new file mode 100644 index 0000000..7f4dba2 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/keywords1.C @@ -0,0 +1,12 @@ +// PR c++/106111 +// { dg-do compile { target c++17_down } } +// { dg-options "-Wc++20-compat -Wc++11-compat -Wc++14-compat -Wc++17-compat" } + +int constinit; // { dg-warning "is a keyword in C\\\+\\\+20" } +int consteval; // { dg-warning "is a keyword in C\\\+\\\+20" } +int requires; // { dg-warning "is a keyword in C\\\+\\\+20" } +int concept; // { dg-warning "is a keyword in C\\\+\\\+20" } +int co_await; // { dg-warning "is a keyword in C\\\+\\\+20" } +int co_yield; // { dg-warning "is a keyword in C\\\+\\\+20" } +int co_return; // { dg-warning "is a keyword in C\\\+\\\+20" } +int char8_t; // { dg-warning "is a keyword in C\\\+\\\+20" } -- cgit v1.1 From f843bea4ca5613cb713f8b9313daa3938f254a05 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 1 Jul 2022 17:25:03 +0200 Subject: i386: Use "r" constraint in *andn3_doubleword_bmi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ANDN is non-destructive, so use "r" instead of "0" for its operand 1 constraint. 2022-07-01 Uroš Bizjak gcc/ChangeLog: * config/i386/i386.md (*andn3_doubleword_bmi): Use "r" constraint for operand 1. --- gcc/config/i386/i386.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 352a21c..20c3b9a 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -10407,7 +10407,7 @@ (define_insn_and_split "*andn3_doubleword_bmi" [(set (match_operand: 0 "register_operand" "=r") (and: - (not: (match_operand: 1 "register_operand" "0")) + (not: (match_operand: 1 "register_operand" "r")) (match_operand: 2 "nonimmediate_operand" "ro"))) (clobber (reg:CC FLAGS_REG))] "TARGET_BMI" -- cgit v1.1 From 9a668532fb19e7c57aa595a26ce3f0d95f9cbb1b Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Fri, 1 Jul 2022 17:52:03 +0200 Subject: OpenMP: Handle tofrom with target enter/exit data In 5.2, a map clause can be map-entering or map-exiting, either containing 'tofrom'. The main reason for this is permit 'map(x)' with 'omp target enter/exit data', avoiding to specify 'to:/from:' explicitly. (OpenMP defaults to 'tofrom'.) gcc/c/ChangeLog: * c-parser.cc (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Accept tofrom map-type modifier but use 'to' / 'from' internally. gcc/cp/ChangeLog: * parser.cc (cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data): Accept tofrom map-type modifier but use 'to' / 'from' internally. gcc/fortran/ChangeLog: * dump-parse-tree.cc (show_omp_namelist): For the map-type, also handle the always modifer and release/delete. * openmp.cc (resolve_omp_clauses): Accept tofrom map-type modifier for target enter/exit data, but use 'to' / 'from' internally. libgomp/ChangeLog: * libgomp.texi (OpenMP 5.2): Mark target enter/exit data with fromto as implemented. gcc/testsuite/ChangeLog: * c-c++-common/gomp/target-data-2.c: New test. * c-c++-common/gomp/target-data-3.c: New test. * gfortran.dg/gomp/target-data-1.f90: New test. * gfortran.dg/gomp/target-data-2.f90: New test. --- gcc/c/c-parser.cc | 22 +++++++++++++++++++--- gcc/cp/parser.cc | 22 +++++++++++++++++++--- gcc/fortran/dump-parse-tree.cc | 5 +++++ gcc/fortran/openmp.cc | 20 ++++++++++++++++---- gcc/testsuite/c-c++-common/gomp/target-data-2.c | 20 ++++++++++++++++++++ gcc/testsuite/c-c++-common/gomp/target-data-3.c | 17 +++++++++++++++++ gcc/testsuite/gfortran.dg/gomp/target-data-1.f90 | 17 +++++++++++++++++ gcc/testsuite/gfortran.dg/gomp/target-data-2.f90 | 14 ++++++++++++++ 8 files changed, 127 insertions(+), 10 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/gomp/target-data-2.c create mode 100644 gcc/testsuite/c-c++-common/gomp/target-data-3.c create mode 100644 gcc/testsuite/gfortran.dg/gomp/target-data-1.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/target-data-2.f90 (limited to 'gcc') diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc index 1704a52..97e3b23 100644 --- a/gcc/c/c-parser.cc +++ b/gcc/c/c-parser.cc @@ -21072,6 +21072,14 @@ c_parser_omp_target_enter_data (location_t loc, c_parser *parser, case GOMP_MAP_ALLOC: map_seen = 3; break; + case GOMP_MAP_TOFROM: + OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_TO); + map_seen = 3; + break; + case GOMP_MAP_ALWAYS_TOFROM: + OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_ALWAYS_TO); + map_seen = 3; + break; case GOMP_MAP_FIRSTPRIVATE_POINTER: case GOMP_MAP_ALWAYS_POINTER: case GOMP_MAP_ATTACH_DETACH: @@ -21080,7 +21088,7 @@ c_parser_omp_target_enter_data (location_t loc, c_parser *parser, map_seen |= 1; error_at (OMP_CLAUSE_LOCATION (*pc), "%<#pragma omp target enter data%> with map-type other " - "than % or % on % clause"); + "than %, % or % on % clause"); *pc = OMP_CLAUSE_CHAIN (*pc); continue; } @@ -21159,6 +21167,14 @@ c_parser_omp_target_exit_data (location_t loc, c_parser *parser, case GOMP_MAP_DELETE: map_seen = 3; break; + case GOMP_MAP_TOFROM: + OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_FROM); + map_seen = 3; + break; + case GOMP_MAP_ALWAYS_TOFROM: + OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_ALWAYS_FROM); + map_seen = 3; + break; case GOMP_MAP_FIRSTPRIVATE_POINTER: case GOMP_MAP_ALWAYS_POINTER: case GOMP_MAP_ATTACH_DETACH: @@ -21167,8 +21183,8 @@ c_parser_omp_target_exit_data (location_t loc, c_parser *parser, map_seen |= 1; error_at (OMP_CLAUSE_LOCATION (*pc), "%<#pragma omp target exit data%> with map-type other " - "than %, % or % on %" - " clause"); + "than %, %, % or % " + "on % clause"); *pc = OMP_CLAUSE_CHAIN (*pc); continue; } diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index c5d1f9d..212ed14 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -44445,6 +44445,14 @@ cp_parser_omp_target_enter_data (cp_parser *parser, cp_token *pragma_tok, case GOMP_MAP_ALLOC: map_seen = 3; break; + case GOMP_MAP_TOFROM: + OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_TO); + map_seen = 3; + break; + case GOMP_MAP_ALWAYS_TOFROM: + OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_ALWAYS_TO); + map_seen = 3; + break; case GOMP_MAP_FIRSTPRIVATE_POINTER: case GOMP_MAP_FIRSTPRIVATE_REFERENCE: case GOMP_MAP_ALWAYS_POINTER: @@ -44454,7 +44462,7 @@ cp_parser_omp_target_enter_data (cp_parser *parser, cp_token *pragma_tok, map_seen |= 1; error_at (OMP_CLAUSE_LOCATION (*pc), "%<#pragma omp target enter data%> with map-type other " - "than % or % on % clause"); + "than %, % or % on % clause"); *pc = OMP_CLAUSE_CHAIN (*pc); continue; } @@ -44537,6 +44545,14 @@ cp_parser_omp_target_exit_data (cp_parser *parser, cp_token *pragma_tok, case GOMP_MAP_DELETE: map_seen = 3; break; + case GOMP_MAP_TOFROM: + OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_FROM); + map_seen = 3; + break; + case GOMP_MAP_ALWAYS_TOFROM: + OMP_CLAUSE_SET_MAP_KIND (*pc, GOMP_MAP_ALWAYS_FROM); + map_seen = 3; + break; case GOMP_MAP_FIRSTPRIVATE_POINTER: case GOMP_MAP_FIRSTPRIVATE_REFERENCE: case GOMP_MAP_ALWAYS_POINTER: @@ -44546,8 +44562,8 @@ cp_parser_omp_target_exit_data (cp_parser *parser, cp_token *pragma_tok, map_seen |= 1; error_at (OMP_CLAUSE_LOCATION (*pc), "%<#pragma omp target exit data%> with map-type other " - "than %, % or % on %" - " clause"); + "than %, %, % or % " + "on % clause"); *pc = OMP_CLAUSE_CHAIN (*pc); continue; } diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc index e3affb8..85c0b98 100644 --- a/gcc/fortran/dump-parse-tree.cc +++ b/gcc/fortran/dump-parse-tree.cc @@ -1414,6 +1414,11 @@ show_omp_namelist (int list_type, gfc_omp_namelist *n) case OMP_MAP_TO: fputs ("to:", dumpfile); break; case OMP_MAP_FROM: fputs ("from:", dumpfile); break; case OMP_MAP_TOFROM: fputs ("tofrom:", dumpfile); break; + case OMP_MAP_ALWAYS_TO: fputs ("always,to:", dumpfile); break; + case OMP_MAP_ALWAYS_FROM: fputs ("always,from:", dumpfile); break; + case OMP_MAP_ALWAYS_TOFROM: fputs ("always,tofrom:", dumpfile); break; + case OMP_MAP_DELETE: fputs ("delete:", dumpfile); break; + case OMP_MAP_RELEASE: fputs ("release:", dumpfile); break; default: break; } else if (list_type == OMP_LIST_LINEAR) diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index aeb8a43..93e40f2 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -7153,10 +7153,16 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses, case OMP_MAP_ALWAYS_TO: case OMP_MAP_ALLOC: break; + case OMP_MAP_TOFROM: + n->u.map_op = OMP_MAP_TO; + break; + case OMP_MAP_ALWAYS_TOFROM: + n->u.map_op = OMP_MAP_ALWAYS_TO; + break; default: gfc_error ("TARGET ENTER DATA with map-type other " - "than TO, or ALLOC on MAP clause at %L", - &n->where); + "than TO, TOFROM or ALLOC on MAP clause " + "at %L", &n->where); break; } break; @@ -7168,10 +7174,16 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses, case OMP_MAP_RELEASE: case OMP_MAP_DELETE: break; + case OMP_MAP_TOFROM: + n->u.map_op = OMP_MAP_FROM; + break; + case OMP_MAP_ALWAYS_TOFROM: + n->u.map_op = OMP_MAP_ALWAYS_FROM; + break; default: gfc_error ("TARGET EXIT DATA with map-type other " - "than FROM, RELEASE, or DELETE on MAP " - "clause at %L", &n->where); + "than FROM, TOFROM, RELEASE, or DELETE on " + "MAP clause at %L", &n->where); break; } break; diff --git a/gcc/testsuite/c-c++-common/gomp/target-data-2.c b/gcc/testsuite/c-c++-common/gomp/target-data-2.c new file mode 100644 index 0000000..e324870 --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/target-data-2.c @@ -0,0 +1,20 @@ +/* { dg-additional-options "-fdump-tree-original" } */ + +/* In OpenMP 5.2 permits tofrom for enter/exit data + in the FE, it is already converted to 'to' and 'from', respectively. */ +int x, y, z; + +void +copyin () +{ + #pragma omp target enter data map(x) map(tofrom: y) map(always, tofrom: z) +} + +void +copyout () +{ + #pragma omp target exit data map(x) map(tofrom: y) map(always, tofrom: z) +} + +/* { dg-final { scan-tree-dump-times "#pragma omp target enter data map\\(always,to:z\\) map\\(to:y\\) map\\(to:x\\)" 1 "original" } } */ +/* { dg-final { scan-tree-dump-times "#pragma omp target exit data map\\(always,from:z\\) map\\(from:y\\) map\\(from:x\\)" 1 "original" } } */ diff --git a/gcc/testsuite/c-c++-common/gomp/target-data-3.c b/gcc/testsuite/c-c++-common/gomp/target-data-3.c new file mode 100644 index 0000000..8c6d5cb --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/target-data-3.c @@ -0,0 +1,17 @@ +/* In OpenMP 5.2 permits tofrom for enter/exit data + in the FE, it is already converted to 'to' and 'from', respectively. */ +int y, z; + +void +copyin () +{ + #pragma omp target enter data map(from: y) /* { dg-error "'#pragma omp target enter data' with map-type other than 'to', 'tofrom' or 'alloc' on 'map' clause" } */ + #pragma omp target enter data map(always, from: z) /* { dg-error "'#pragma omp target enter data' with map-type other than 'to', 'tofrom' or 'alloc' on 'map' clause" } */ +} + +void +copyout () +{ + #pragma omp target exit data map(to: y) /* { dg-error "'#pragma omp target exit data' with map-type other than 'from', 'tofrom', 'release' or 'delete' on 'map' clause" } */ + #pragma omp target exit data map(always, to: z) /* { dg-error "'#pragma omp target exit data' with map-type other than 'from', 'tofrom', 'release' or 'delete' on 'map' clause" } */ +} diff --git a/gcc/testsuite/gfortran.dg/gomp/target-data-1.f90 b/gcc/testsuite/gfortran.dg/gomp/target-data-1.f90 new file mode 100644 index 0000000..0f086f5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/target-data-1.f90 @@ -0,0 +1,17 @@ +! { dg-additional-options "-fdump-tree-original" } +! +! In OpenMP 5.2 permits tofrom for enter/exit data +! in the FE, it is already converted to 'to' and 'from', respectively. +module m + integer :: x, y, z +contains +subroutine copyin + !$omp target enter data map(x) map(tofrom: y) map(always, tofrom: z) +end +subroutine copyout + !$omp target exit data map(x) map(tofrom: y) map(always, tofrom: z) +end +end + +! { dg-final { scan-tree-dump-times "#pragma omp target enter data map\\(to:x\\) map\\(to:y\\) map\\(always,to:z\\)" 1 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp target exit data map\\(from:x\\) map\\(from:y\\) map\\(always,from:z\\)" 1 "original" } } diff --git a/gcc/testsuite/gfortran.dg/gomp/target-data-2.f90 b/gcc/testsuite/gfortran.dg/gomp/target-data-2.f90 new file mode 100644 index 0000000..71ee1eb --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/target-data-2.f90 @@ -0,0 +1,14 @@ +! In OpenMP 5.2 permits tofrom for enter/exit data +! in the FE, it is already converted to 'to' and 'from', respectively. +module m + integer :: y, z +contains +subroutine copyin + !$omp target enter data map(from: y) ! { dg-error "TARGET ENTER DATA with map-type other than TO, TOFROM or ALLOC on MAP clause" } + !$omp target enter data map(always, from: z) ! { dg-error "TARGET ENTER DATA with map-type other than TO, TOFROM or ALLOC on MAP clause" } +end +subroutine copyout + !$omp target exit data map(to: y) ! { dg-error "TARGET EXIT DATA with map-type other than FROM, TOFROM, RELEASE, or DELETE on MAP clause" } + !$omp target exit data map(always, to: z) ! { dg-error "TARGET EXIT DATA with map-type other than FROM, TOFROM, RELEASE, or DELETE on MAP clause" } +end +end -- cgit v1.1 From ecd11acacd6be57af930fa617d7c31ecb40e7f74 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 25 May 2022 18:11:31 -0400 Subject: c++: fix broken copy elision with nested TARGET_EXPRs [PR105550] In this problem, we are failing to properly perform copy elision with a conditional operator, so this: constexpr A a = true ? A{} : A{}; fails with: error: 'A{((const A*)(&))}' is not a constant expression The whole initializer is TARGET_EXPR }> : TARGET_EXPR }>> where the outermost TARGET_EXPR is elided, but not the nested ones. Then we end up replacing the PLACEHOLDER_EXPRs with the temporaries the TARGET_EXPRs represent, which is precisely what should *not* happen with copy elision. I've tried the approach of tweaking ctx->object, but I ran into gazillion problems with that. I thought that I would let cxx_eval_constant_expression /TARGET_EXPR create a new object only when ctx->object was null, then adjust setting of ctx->object in places like cxx_bind_parameters_in_call and cxx_eval_component_reference but that failed completely. Sometimes ctx->object has to be reset, sometimes it cannot be reset, 'this' needed special handling, etc. I gave up. Instead, this patch strips TARGET_EXPRs from the operands of ?: like we do in various other places in constexpr.c. PR c++/105550 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_conditional_expression): Strip TARGET_EXPRs. gcc/testsuite/ChangeLog: * g++.dg/cpp1y/nsdmi-aggr16.C: Remove FIXME. * g++.dg/cpp1y/nsdmi-aggr17.C: Remove FIXME. * g++.dg/cpp0x/constexpr-elision1.C: New test. * g++.dg/cpp1y/constexpr-elision1.C: New test. --- gcc/cp/constexpr.cc | 7 ++++ gcc/testsuite/g++.dg/cpp0x/constexpr-elision1.C | 16 ++++++++ gcc/testsuite/g++.dg/cpp1y/constexpr-elision1.C | 53 +++++++++++++++++++++++++ gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr16.C | 5 +-- gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr17.C | 5 +-- 5 files changed, 80 insertions(+), 6 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-elision1.C create mode 100644 gcc/testsuite/g++.dg/cpp1y/constexpr-elision1.C (limited to 'gcc') diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc index 0dc94d9..5f7fc6f 100644 --- a/gcc/cp/constexpr.cc +++ b/gcc/cp/constexpr.cc @@ -3507,6 +3507,13 @@ cxx_eval_conditional_expression (const constexpr_ctx *ctx, tree t, val = TREE_OPERAND (t, 1); if (TREE_CODE (t) == IF_STMT && !val) val = void_node; + /* A TARGET_EXPR may be nested inside another TARGET_EXPR, but still + serve as the initializer for the same object as the outer TARGET_EXPR, + as in + A a = true ? A{} : A{}; + so strip the inner TARGET_EXPR so we don't materialize a temporary. */ + if (TREE_CODE (val) == TARGET_EXPR) + val = TARGET_EXPR_INITIAL (val); return cxx_eval_constant_expression (ctx, val, lval, non_constant_p, overflow_p, jump_target); } diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-elision1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-elision1.C new file mode 100644 index 0000000..9e7b9ec --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-elision1.C @@ -0,0 +1,16 @@ +// PR c++/105550 +// { dg-do compile { target c++11 } } + +template struct pair { + constexpr pair(int, int) {} +}; +template +pair minmax(const _Tp &__a, const _Tp &__b, + _Compare) { + return 0 ? pair(__b, __a) + : pair(__a, __b); +} +typedef int value_type; +typedef int compare_type; +template pair +minmax(const value_type &, const value_type &, compare_type); diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-elision1.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-elision1.C new file mode 100644 index 0000000..b225ae2 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-elision1.C @@ -0,0 +1,53 @@ +// PR c++/105550 +// { dg-do compile { target c++14 } } + +struct A { + const A *p = this; +}; + +struct B { + const B *p = this; + constexpr operator A() const { return {}; } +}; + +constexpr A +bar (A) +{ + return {}; +} + +constexpr A baz() { return {}; } + +struct E { + A a1 = true ? A{} : A{}; + A a2 = true ? A{} : B{}; + A a3 = false ? A{} : B{}; + A a4 = false ? B{} : B{}; + A a5 = A{}; + A a6 = B{}; + A a7 = false ? B{} : (true ? A{} : A{}); + A a8 = false ? (true ? A{} : B{}) : (true ? A{} : A{}); + A a9 = (A{}); + A a10 = (true, A{}); + A a11 = bar (A{}); + A a12 = baz (); + A a13 = (A{}, A{}); +}; + +constexpr E e{}; + +constexpr A a1 = true ? A{} : A{}; +constexpr A a2 = true ? A{} : B{}; +constexpr A a3 = false ? A{} : B{}; +constexpr A a4 = false ? B{} : B{}; +constexpr A a5 = A{}; +constexpr A a6 = B{}; +constexpr A a7 = false ? B{} : (true ? A{} : A{}); +constexpr A a8 = false ? (true ? A{} : B{}) : (true ? A{} : A{}); +constexpr A a9 = (A{}); +constexpr A a10 = (true, A{}); +constexpr A a11 = bar (A{}); +//static_assert(a10.p == &a10, ""); // bug, 105619 +constexpr A a12 = baz (); +//static_assert(a11.p == &a11, ""); // bug, 105619 +constexpr A a13 = (A{}, A{}); diff --git a/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr16.C b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr16.C index dc6492c..5e66bdd 100644 --- a/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr16.C +++ b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr16.C @@ -40,9 +40,8 @@ struct E { A d = true ? (false ? A{} : A{}) : (false ? A{} : A{}); }; -// FIXME: When fixing this, also fix nsdmi-aggr17.C. -constexpr E e; // { dg-bogus "" "PR105550" { xfail *-*-* } } -SA (e.a.p == &e.a); // { dg-bogus "" "PR105550" { xfail *-*-* } } +constexpr E e; +SA (e.a.p == &e.a); E e1 = { }; diff --git a/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr17.C b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr17.C index fc27a2c..ca9637b 100644 --- a/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr17.C +++ b/gcc/testsuite/g++.dg/cpp1y/nsdmi-aggr17.C @@ -56,9 +56,8 @@ struct F { A a = true ? A{x} : A{x}; }; -// FIXME: Doesn't work due to PR105550. -//constexpr F f; -//SA (f.a.p == &f.a); +constexpr F f; +SA (f.a.p == &f.a); SA (e.x == 42); F f2 = { }; F f3 = { 42 }; -- cgit v1.1 From 1f76941c09f6f62f4cbf7a9f531ec95268dd2c0a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 1 Jul 2022 10:56:37 -0700 Subject: compiler: rename "requires" to "needs" As of C++20 "requires" is a C++ keyword. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415754 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/gogo.cc | 12 ++++++------ gcc/go/gofrontend/types.cc | 20 ++++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 0d49e9e..65f64e0f 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -548720bca6bff21ebc9aba22249d9ce45bbd90c7 +ac438edc5335f69c95df9342f43712ad2f61ad66 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index e13df0d..67b91fa 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -5302,16 +5302,16 @@ Gogo::write_c_header() Named_object* no = types.front(); types.pop_front(); - std::vector requires; + std::vector needs; std::vector declare; - if (!no->type_value()->struct_type()->can_write_to_c_header(&requires, + if (!no->type_value()->struct_type()->can_write_to_c_header(&needs, &declare)) continue; bool ok = true; for (std::vector::const_iterator pr - = requires.begin(); - pr != requires.end() && ok; + = needs.begin(); + pr != needs.end() && ok; ++pr) { for (std::list::const_iterator pt = types.begin(); @@ -5342,10 +5342,10 @@ Gogo::write_c_header() if (*pd == no) continue; - std::vector drequires; + std::vector dneeds; std::vector ddeclare; if (!(*pd)->type_value()->struct_type()-> - can_write_to_c_header(&drequires, &ddeclare)) + can_write_to_c_header(&dneeds, &ddeclare)) continue; bool done = false; diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index e82be68..4995283 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -6967,7 +6967,7 @@ Struct_type::do_import(Import* imp) bool Struct_type::can_write_to_c_header( - std::vector* requires, + std::vector* needs, std::vector* declare) const { const Struct_field_list* fields = this->fields_; @@ -6978,7 +6978,7 @@ Struct_type::can_write_to_c_header( p != fields->end(); ++p) { - if (!this->can_write_type_to_c_header(p->type(), requires, declare)) + if (!this->can_write_type_to_c_header(p->type(), needs, declare)) return false; if (Gogo::message_name(p->field_name()) == "_") sinks++; @@ -6993,7 +6993,7 @@ Struct_type::can_write_to_c_header( bool Struct_type::can_write_type_to_c_header( const Type* t, - std::vector* requires, + std::vector* needs, std::vector* declare) const { t = t->forwarded(); @@ -7027,13 +7027,13 @@ Struct_type::can_write_type_to_c_header( return true; case TYPE_STRUCT: - return t->struct_type()->can_write_to_c_header(requires, declare); + return t->struct_type()->can_write_to_c_header(needs, declare); case TYPE_ARRAY: if (t->is_slice_type()) return true; return this->can_write_type_to_c_header(t->array_type()->element_type(), - requires, declare); + needs, declare); case TYPE_NAMED: { @@ -7049,10 +7049,10 @@ Struct_type::can_write_type_to_c_header( // We will accept empty struct fields, but not print them. if (t->struct_type()->total_field_count() == 0) return true; - requires->push_back(no); - return t->struct_type()->can_write_to_c_header(requires, declare); + needs->push_back(no); + return t->struct_type()->can_write_to_c_header(needs, declare); } - return this->can_write_type_to_c_header(t->base(), requires, declare); + return this->can_write_type_to_c_header(t->base(), needs, declare); } case TYPE_CALL_MULTIPLE_RESULT: @@ -7150,9 +7150,9 @@ Struct_type::write_field_to_c_header(std::ostream& os, const std::string& name, case TYPE_POINTER: { - std::vector requires; + std::vector needs; std::vector declare; - if (!this->can_write_type_to_c_header(t->points_to(), &requires, + if (!this->can_write_type_to_c_header(t->points_to(), &needs, &declare)) os << "void*"; else -- cgit v1.1 From ff64a8c951995cb1214b4d2864a4bd553b60f249 Mon Sep 17 00:00:00 2001 From: Lewis Hyatt Date: Fri, 1 Jul 2022 13:53:34 -0400 Subject: c++: Minor cleanup in parser.cc The code to determine whether a given token starts a module directive is currently repeated in 4 places in parser.cc. I am about to submit a patch that needs to add it in a 5th place, so since the code is not completely trivial (needing to check for 3 different token types), it seems worthwhile to factor this logic into its own function. gcc/cp/ChangeLog: * parser.cc (cp_token_is_module_directive): New function refactoring common code. (cp_parser_skip_to_closing_parenthesis_1): Use the new function. (cp_parser_skip_to_end_of_statement): Likewise. (cp_parser_skip_to_end_of_block_or_statement): Likewise. (cp_parser_declaration): Likewise. --- gcc/cp/parser.cc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index 212ed14..6b3763b 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -629,6 +629,16 @@ cp_lexer_alloc (void) return lexer; } +/* Return TRUE if token is the start of a module declaration that will be + terminated by a CPP_PRAGMA_EOL token. */ +static inline bool +cp_token_is_module_directive (cp_token *token) +{ + return token->keyword == RID__EXPORT + || token->keyword == RID__MODULE + || token->keyword == RID__IMPORT; +} + /* Create a new main C++ lexer, the lexer that gets tokens from the preprocessor. */ @@ -3833,9 +3843,7 @@ cp_parser_skip_to_closing_parenthesis_1 (cp_parser *parser, break; case CPP_KEYWORD: - if (token->keyword != RID__EXPORT - && token->keyword != RID__MODULE - && token->keyword != RID__IMPORT) + if (!cp_token_is_module_directive (token)) break; /* FALLTHROUGH */ @@ -3936,9 +3944,7 @@ cp_parser_skip_to_end_of_statement (cp_parser* parser) break; case CPP_KEYWORD: - if (token->keyword != RID__EXPORT - && token->keyword != RID__MODULE - && token->keyword != RID__IMPORT) + if (!cp_token_is_module_directive (token)) break; /* FALLTHROUGH */ @@ -4025,9 +4031,7 @@ cp_parser_skip_to_end_of_block_or_statement (cp_parser* parser) break; case CPP_KEYWORD: - if (token->keyword != RID__EXPORT - && token->keyword != RID__MODULE - && token->keyword != RID__IMPORT) + if (!cp_token_is_module_directive (token)) break; /* FALLTHROUGH */ @@ -14958,9 +14962,7 @@ cp_parser_declaration (cp_parser* parser, tree prefix_attrs) else cp_parser_module_export (parser); } - else if (token1->keyword == RID__EXPORT - || token1->keyword == RID__IMPORT - || token1->keyword == RID__MODULE) + else if (cp_token_is_module_directive (token1)) { bool exporting = token1->keyword == RID__EXPORT; cp_token *next = exporting ? token2 : token1; -- cgit v1.1 From 1697806fdf25285b924251b0d785324775e9b905 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Fri, 10 Jun 2022 15:00:44 +0200 Subject: trailing_wide_ints with runtime variable lengths Currently global ranges are stored in SSA_NAME_RANGE_INFO as a pair of wide_int-like objects along with the nonzero bits. We frequently lose precision when streaming out our higher resolution iranges. The plan was always to store the full irange between passes. However, as was originally discussed eons ago: https://gcc.gnu.org/pipermail/gcc-patches/2017-May/475139.html ...we need a memory efficient way of saving iranges, preferably using the trailing_wide_ints idiom. The problem with doing so is that trailing_wide_ints assume a compile-time specified number of elements. For irange, we need to determine the size at run-time. One solution is to adapt trailing_wide_ints such that N is the maximum number of elements allowed, and allow setting the actual number at run-time (defaulting to N). The attached patch does this, while requiring no changes to existing users. It uses a byte to store the number of elements in the trailing_wide_ints control word. The control word is currently a 16-bit precision, an 8-bit max-length, and the rest is used for m_len[N]. On a 64-bit architecture, this allows for 5 elements in m_len without having to use an extra word. With this patch, m_len[] would be smaller by one byte (4) before consuming the padding. This shouldn't be a problem as the only users of trailing_wide_ints use N=2 for NUM_POLY_INT_COEFFS in aarch64, and N=3 for range_info_def. For irange, my plan is to use one more word to fit a maximum of 12 elements (the above 4 plus 8 more). This would allow for 6 pairs of sub-ranges which would be more than adequate for our needs. In previous tests we found that 99% of ranges fit within 3-4 pairs. More precisely, this would allow for 5 pairs, plus the nonzero bits, plus a spare wide-int for future development. Ultimately this means that streaming an irange would consume one more word than what we currently do for range_info_def. IMO this is a nice trade-off considering we started storing a slew of wide-ints directly ;-). Tested and benchmarked on x86-64 Linux. There was no discernible performance change in our benchmark suite. gcc/ChangeLog: * wide-int.h (struct trailing_wide_ints): Add m_num_elements. (trailing_wide_ints::set_precision): Add num_elements argument. (trailing_wide_ints::extra_size): Same. --- gcc/wide-int.h | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) (limited to 'gcc') diff --git a/gcc/wide-int.h b/gcc/wide-int.h index 8041b61..d6807e3 100644 --- a/gcc/wide-int.h +++ b/gcc/wide-int.h @@ -1373,10 +1373,13 @@ namespace wi : public int_traits {}; } -/* An array of N wide_int-like objects that can be put at the end of - a variable-sized structure. Use extra_size to calculate how many - bytes beyond the sizeof need to be allocated. Use set_precision - to initialize the structure. */ +/* A variable-length array of wide_int-like objects that can be put + at the end of a variable-sized structure. The number of objects is + at most N and can be set at runtime by using set_precision(). + + Use extra_size to calculate how many bytes beyond the + sizeof need to be allocated. Use set_precision to initialize the + structure. */ template struct GTY((user)) trailing_wide_ints { @@ -1387,6 +1390,9 @@ private: /* The shared maximum length of each number. */ unsigned char m_max_len; + /* The number of elements. */ + unsigned char m_num_elements; + /* The current length of each number. Avoid char array so the whole structure is not a typeless storage that will, in turn, turn off TBAA on gimple, trees and RTL. */ @@ -1399,12 +1405,15 @@ private: public: typedef WIDE_INT_REF_FOR (trailing_wide_int_storage) const_reference; - void set_precision (unsigned int); + void set_precision (unsigned int precision, unsigned int num_elements = N); unsigned int get_precision () const { return m_precision; } + unsigned int num_elements () const { return m_num_elements; } trailing_wide_int operator [] (unsigned int); const_reference operator [] (unsigned int) const; - static size_t extra_size (unsigned int); - size_t extra_size () const { return extra_size (m_precision); } + static size_t extra_size (unsigned int precision, + unsigned int num_elements = N); + size_t extra_size () const { return extra_size (m_precision, + m_num_elements); } }; inline trailing_wide_int_storage:: @@ -1457,11 +1466,14 @@ trailing_wide_int_storage::operator = (const T &x) } /* Initialize the structure and record that all elements have precision - PRECISION. */ + PRECISION. NUM_ELEMENTS can be no more than N. */ template inline void -trailing_wide_ints ::set_precision (unsigned int precision) +trailing_wide_ints ::set_precision (unsigned int precision, + unsigned int num_elements) { + gcc_checking_assert (num_elements <= N); + m_num_elements = num_elements; m_precision = precision; m_max_len = ((precision + HOST_BITS_PER_WIDE_INT - 1) / HOST_BITS_PER_WIDE_INT); @@ -1484,15 +1496,19 @@ trailing_wide_ints ::operator [] (unsigned int index) const m_len[index].len, m_precision); } -/* Return how many extra bytes need to be added to the end of the structure - in order to handle N wide_ints of precision PRECISION. */ +/* Return how many extra bytes need to be added to the end of the + structure in order to handle NUM_ELEMENTS wide_ints of precision + PRECISION. NUM_ELEMENTS is the number of elements, and defaults + to N. */ template inline size_t -trailing_wide_ints ::extra_size (unsigned int precision) +trailing_wide_ints ::extra_size (unsigned int precision, + unsigned int num_elements) { unsigned int max_len = ((precision + HOST_BITS_PER_WIDE_INT - 1) / HOST_BITS_PER_WIDE_INT); - return (N * max_len - 1) * sizeof (HOST_WIDE_INT); + gcc_checking_assert (num_elements <= N); + return (num_elements * max_len - 1) * sizeof (HOST_WIDE_INT); } /* This macro is used in structures that end with a trailing_wide_ints field -- cgit v1.1 From fbd7665360d259434f378f68cb2680b17d6cab57 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 30 Jun 2022 17:40:00 -0700 Subject: compiler: use correct init order for multi-value initialization Use the correct initialization order for var a = c var b, c = x.(bool) The global c is initialized by the preinit of b, but were missing a dependency of c on b, so a would be initialized to the zero value of c rather than the correct value. Simply adding the dependency of c on b didn't work because the preinit of b refers to c, so that appeared circular. So this patch changes the init order to skip dependencies that only appear on the left hand side of assignments in preinit blocks. Doing that didn't work because the write barrier pass can transform "a = b" into code like "gcWriteBarrier(&a, b)" that is not obviously a simple assigment. So this patch moves the collection of dependencies to just after lowering, before the write barriers are inserted. Making those changes permit relaxing the requirement that we don't warn about self-dependency in preinit blocks, so now we correctly warn for var a, b any = b.(bool) The test case is https://go.dev/cl/415238. Fixes golang/go#53619 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415594 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/go.cc | 3 + gcc/go/gofrontend/gogo.cc | 202 +++++++++++++++++++++++++-------------------- gcc/go/gofrontend/gogo.h | 23 +++++- gcc/go/gofrontend/parse.cc | 18 +++- 5 files changed, 150 insertions(+), 98 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 65f64e0f..7b1d301 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -ac438edc5335f69c95df9342f43712ad2f61ad66 +6479d5976c5d848ec6f5843041275723a00006b0 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/go.cc b/gcc/go/gofrontend/go.cc index 404cb12..1512770 100644 --- a/gcc/go/gofrontend/go.cc +++ b/gcc/go/gofrontend/go.cc @@ -146,6 +146,9 @@ go_parse_input_files(const char** filenames, unsigned int filename_count, if (only_check_syntax) return; + // Record global variable initializer dependencies. + ::gogo->record_global_init_refs(); + // Do simple deadcode elimination. ::gogo->remove_deadcode(); diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index 67b91fa..9197eef 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -1086,8 +1086,8 @@ class Find_vars : public Traverse public: Find_vars() - : Traverse(traverse_expressions), - vars_(), seen_objects_() + : Traverse(traverse_expressions | traverse_statements), + vars_(), seen_objects_(), lhs_is_ref_(false) { } // An iterator through the variables found, after the traversal. @@ -1104,11 +1104,16 @@ class Find_vars : public Traverse int expression(Expression**); + int + statement(Block*, size_t* index, Statement*); + private: // Accumulated variables. Vars vars_; // Objects we have already seen. Seen_objects seen_objects_; + // Whether an assignment to a variable counts as a reference. + bool lhs_is_ref_; }; // Collect global variables referenced by EXPR. Look through function @@ -1164,7 +1169,11 @@ Find_vars::expression(Expression** pexpr) if (ins.second) { // This is the first time we have seen this name. - if (f->func_value()->block()->traverse(this) == TRAVERSE_EXIT) + bool hold = this->lhs_is_ref_; + this->lhs_is_ref_ = true; + int r = f->func_value()->block()->traverse(this); + this->lhs_is_ref_ = hold; + if (r == TRAVERSE_EXIT) return TRAVERSE_EXIT; } } @@ -1192,6 +1201,29 @@ Find_vars::expression(Expression** pexpr) return TRAVERSE_CONTINUE; } +// Check a statement while searching for variables. This is where we +// skip variables on the left hand side of assigments if appropriate. + +int +Find_vars::statement(Block*, size_t*, Statement* s) +{ + if (this->lhs_is_ref_) + return TRAVERSE_CONTINUE; + Assignment_statement* as = s->assignment_statement(); + if (as == NULL) + return TRAVERSE_CONTINUE; + + // Only traverse subexpressions of the LHS. + if (as->lhs()->traverse_subexpressions(this) == TRAVERSE_EXIT) + return TRAVERSE_EXIT; + + Expression* rhs = as->rhs(); + if (Expression::traverse(&rhs, this) == TRAVERSE_EXIT) + return TRAVERSE_EXIT; + + return TRAVERSE_SKIP_COMPONENTS; +} + // Return true if EXPR, PREINIT, or DEP refers to VAR. static bool @@ -1230,11 +1262,11 @@ class Var_init { public: Var_init() - : var_(NULL), init_(NULL), refs_(NULL), dep_count_(0) + : var_(NULL), init_(NULL), dep_count_(0) { } Var_init(Named_object* var, Bstatement* init) - : var_(var), init_(init), refs_(NULL), dep_count_(0) + : var_(var), init_(init), dep_count_(0) { } // Return the variable. @@ -1247,19 +1279,6 @@ class Var_init init() const { return this->init_; } - // Add a reference. - void - add_ref(Named_object* var); - - // The variables which this variable's initializers refer to. - const std::vector* - refs() - { return this->refs_; } - - // Clear the references, if any. - void - clear_refs(); - // Return the number of remaining dependencies. size_t dep_count() const @@ -1280,36 +1299,12 @@ class Var_init Named_object* var_; // The backend initialization statement. Bstatement* init_; - // Variables this refers to. - std::vector* refs_; // The number of initializations this is dependent on. A variable // initialization should not be emitted if any of its dependencies // have not yet been resolved. size_t dep_count_; }; -// Add a reference. - -void -Var_init::add_ref(Named_object* var) -{ - if (this->refs_ == NULL) - this->refs_ = new std::vector; - this->refs_->push_back(var); -} - -// Clear the references, if any. - -void -Var_init::clear_refs() -{ - if (this->refs_ != NULL) - { - delete this->refs_; - this->refs_ = NULL; - } -} - // For comparing Var_init keys in a map. inline bool @@ -1324,7 +1319,7 @@ typedef std::list Var_inits; // variable V2 then we initialize V1 after V2. static void -sort_var_inits(Gogo* gogo, Var_inits* var_inits) +sort_var_inits(Var_inits* var_inits) { if (var_inits->empty()) return; @@ -1337,33 +1332,13 @@ sort_var_inits(Gogo* gogo, Var_inits* var_inits) Init_deps init_deps; bool init_loop = false; - // Compute all variable references. + // Map from variable to Var_init. for (Var_inits::iterator pvar = var_inits->begin(); pvar != var_inits->end(); ++pvar) { Named_object* var = pvar->var(); var_to_init[var] = &*pvar; - - Find_vars find_vars; - Expression* init = var->var_value()->init(); - if (init != NULL) - Expression::traverse(&init, &find_vars); - if (var->var_value()->has_pre_init()) - var->var_value()->preinit()->traverse(&find_vars); - Named_object* dep = gogo->var_depends_on(var->var_value()); - if (dep != NULL) - { - Expression* dinit = dep->var_value()->init(); - if (dinit != NULL) - Expression::traverse(&dinit, &find_vars); - if (dep->var_value()->has_pre_init()) - dep->var_value()->preinit()->traverse(&find_vars); - } - for (Find_vars::const_iterator p = find_vars.begin(); - p != find_vars.end(); - ++p) - pvar->add_ref(*p); } // Add dependencies to init_deps, and check for cycles. @@ -1373,7 +1348,8 @@ sort_var_inits(Gogo* gogo, Var_inits* var_inits) { Named_object* var = pvar->var(); - const std::vector* refs = pvar->refs(); + const std::vector* refs = + pvar->var()->var_value()->init_refs(); if (refs == NULL) continue; for (std::vector::const_iterator pdep = refs->begin(); @@ -1383,19 +1359,11 @@ sort_var_inits(Gogo* gogo, Var_inits* var_inits) Named_object* dep = *pdep; if (var == dep) { - // This is a reference from a variable to itself, which - // may indicate a loop. We only report an error if - // there is an initializer and there is no dependency. - // When there is no initializer, it means that the - // preinitializer sets the variable, which will appear - // to be a loop here. - if (var->var_value()->init() != NULL - && gogo->var_depends_on(var->var_value()) == NULL) - go_error_at(var->location(), - ("initialization expression for %qs " - "depends upon itself"), - var->message_name().c_str()); - + // This is a reference from a variable to itself. + go_error_at(var->location(), + ("initialization expression for %qs " + "depends upon itself"), + var->message_name().c_str()); continue; } @@ -1412,7 +1380,8 @@ sort_var_inits(Gogo* gogo, Var_inits* var_inits) pvar->add_dependency(); // Check for cycles. - const std::vector* deprefs = dep_init->refs(); + const std::vector* deprefs = + dep_init->var()->var_value()->init_refs(); if (deprefs == NULL) continue; for (std::vector::const_iterator pdepdep = @@ -1437,10 +1406,6 @@ sort_var_inits(Gogo* gogo, Var_inits* var_inits) } var_to_init.clear(); - for (Var_inits::iterator pvar = var_inits->begin(); - pvar != var_inits->end(); - ++pvar) - pvar->clear_refs(); // If there are no dependencies then the declaration order is sorted. if (!init_deps.empty() && !init_loop) @@ -1748,7 +1713,7 @@ Gogo::write_globals() // workable order. if (!var_inits.empty()) { - sort_var_inits(this, &var_inits); + sort_var_inits(&var_inits); for (Var_inits::const_iterator p = var_inits.begin(); p != var_inits.end(); ++p) @@ -3840,6 +3805,51 @@ Gogo::check_types_in_block(Block* block) block->traverse(&traverse); } +// For each global variable defined in the current package, record the +// set of variables that its initializer depends on. We do this after +// lowering so that all unknown names are resolved to their final +// locations. We do this before write barrier insertion because that +// makes it harder to distinguish references from assignments in +// preinit blocks. + +void +Gogo::record_global_init_refs() +{ + Bindings* bindings = this->package_->bindings(); + for (Bindings::const_definitions_iterator pb = bindings->begin_definitions(); + pb != bindings->end_definitions(); + pb++) + { + Named_object* no = *pb; + if (!no->is_variable()) + continue; + + Variable* var = no->var_value(); + go_assert(var->is_global()); + + Find_vars find_vars; + Expression* init = var->init(); + if (init != NULL) + Expression::traverse(&init, &find_vars); + if (var->has_pre_init()) + var->preinit()->traverse(&find_vars); + Named_object* dep = this->var_depends_on(var); + if (dep != NULL) + { + Expression* dinit = dep->var_value()->init(); + if (dinit != NULL) + Expression::traverse(&dinit, &find_vars); + if (dep->var_value()->has_pre_init()) + dep->var_value()->preinit()->traverse(&find_vars); + } + + for (Find_vars::const_iterator pv = find_vars.begin(); + pv != find_vars.end(); + ++pv) + var->add_init_ref(*pv); + } +} + // A traversal class which finds all the expressions which must be // evaluated in order within a statement or larger expression. This // is used to implement the rules about order of evaluation. @@ -7422,16 +7432,16 @@ Variable::Variable(Type* type, Expression* init, bool is_global, bool is_parameter, bool is_receiver, Location location) : type_(type), init_(init), preinit_(NULL), location_(location), - embeds_(NULL), backend_(NULL), is_global_(is_global), - is_parameter_(is_parameter), is_closure_(false), is_receiver_(is_receiver), - is_varargs_parameter_(false), is_global_sink_(false), is_used_(false), - is_address_taken_(false), is_non_escaping_address_taken_(false), - seen_(false), init_is_lowered_(false), init_is_flattened_(false), + toplevel_decl_(NULL), init_refs_(NULL), embeds_(NULL), backend_(NULL), + is_global_(is_global), is_parameter_(is_parameter), is_closure_(false), + is_receiver_(is_receiver), is_varargs_parameter_(false), + is_global_sink_(false), is_used_(false), is_address_taken_(false), + is_non_escaping_address_taken_(false), seen_(false), + init_is_lowered_(false), init_is_flattened_(false), type_from_init_tuple_(false), type_from_range_index_(false), type_from_range_value_(false), type_from_chan_element_(false), is_type_switch_var_(false), determined_type_(false), - in_unique_section_(false), is_referenced_by_inline_(false), - toplevel_decl_(NULL) + in_unique_section_(false), is_referenced_by_inline_(false) { go_assert(type != NULL || init != NULL); go_assert(!is_parameter || init == NULL); @@ -7921,6 +7931,16 @@ Variable::get_init_block(Gogo* gogo, Named_object* function, return block_stmt; } +// Add an initializer reference. + +void +Variable::add_init_ref(Named_object* var) +{ + if (this->init_refs_ == NULL) + this->init_refs_ = new std::vector; + this->init_refs_->push_back(var); +} + // Export the variable void diff --git a/gcc/go/gofrontend/gogo.h b/gcc/go/gofrontend/gogo.h index 2ee0fda..433fdae 100644 --- a/gcc/go/gofrontend/gogo.h +++ b/gcc/go/gofrontend/gogo.h @@ -842,6 +842,11 @@ class Gogo void check_return_statements(); + // Gather references from global variables initializers to other + // variables. + void + record_global_init_refs(); + // Remove deadcode. void remove_deadcode(); @@ -2333,6 +2338,15 @@ class Variable this->toplevel_decl_ = s; } + // Note that the initializer of this global variable refers to VAR. + void + add_init_ref(Named_object* var); + + // The variables that this variable's initializers refer to. + const std::vector* + init_refs() const + { return this->init_refs_; } + // Traverse the initializer expression. int traverse_expression(Traverse*, unsigned int traverse_mask); @@ -2389,6 +2403,12 @@ class Variable Block* preinit_; // Location of variable definition. Location location_; + // The top-level declaration for this variable. Only used for local + // variables. Must be a Temporary_statement if not NULL. + Statement* toplevel_decl_; + // Variables that the initializer of a global variable refers to. + // Used for initializer ordering. + std::vector* init_refs_; // Any associated go:embed comments. std::vector* embeds_; // Backend representation. @@ -2439,9 +2459,6 @@ class Variable // True if this variable is referenced from an inlined body that // will be put into the export data. bool is_referenced_by_inline_ : 1; - // The top-level declaration for this variable. Only used for local - // variables. Must be a Temporary_statement if not NULL. - Statement* toplevel_decl_; }; // A variable which is really the name for a function return value, or diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index e388261..a3c6f63 100644 --- a/gcc/go/gofrontend/parse.cc +++ b/gcc/go/gofrontend/parse.cc @@ -1977,7 +1977,11 @@ Parse::init_vars_from_map(const Typed_identifier_list* vars, Type* type, else if (!val_no->is_sink()) { if (val_no->is_variable()) - val_no->var_value()->add_preinit_statement(this->gogo_, s); + { + val_no->var_value()->add_preinit_statement(this->gogo_, s); + if (no->is_variable()) + this->gogo_->record_var_depends_on(no->var_value(), val_no); + } } else if (!no->is_sink()) { @@ -2044,7 +2048,11 @@ Parse::init_vars_from_receive(const Typed_identifier_list* vars, Type* type, else if (!val_no->is_sink()) { if (val_no->is_variable()) - val_no->var_value()->add_preinit_statement(this->gogo_, s); + { + val_no->var_value()->add_preinit_statement(this->gogo_, s); + if (no->is_variable()) + this->gogo_->record_var_depends_on(no->var_value(), val_no); + } } else if (!no->is_sink()) { @@ -2110,7 +2118,11 @@ Parse::init_vars_from_type_guard(const Typed_identifier_list* vars, else if (!val_no->is_sink()) { if (val_no->is_variable()) - val_no->var_value()->add_preinit_statement(this->gogo_, s); + { + val_no->var_value()->add_preinit_statement(this->gogo_, s); + if (no->is_variable()) + this->gogo_->record_var_depends_on(no->var_value(), val_no); + } } else if (!no->is_sink()) { -- cgit v1.1 From ed974488991256c50f151ccfb271e198072dfc4d Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 2 Jul 2022 00:16:26 +0000 Subject: Daily bump. --- gcc/ChangeLog | 112 ++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/c-family/ChangeLog | 5 +++ gcc/c/ChangeLog | 6 +++ gcc/cp/ChangeLog | 43 +++++++++++++++++++ gcc/fortran/ChangeLog | 8 ++++ gcc/testsuite/ChangeLog | 50 +++++++++++++++++++++ 7 files changed, 225 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 463a301..33642b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,115 @@ +2022-07-01 Aldy Hernandez + + * wide-int.h (struct trailing_wide_ints): Add m_num_elements. + (trailing_wide_ints::set_precision): Add num_elements argument. + (trailing_wide_ints::extra_size): Same. + +2022-07-01 Uroš Bizjak + + * config/i386/i386.md (*andn3_doubleword_bmi): + Use "r" constraint for operand 1. + +2022-07-01 Richard Biener + + * tree-into-ssa.cc (rewrite_update_dom_walker::before_dom_children): + Do not look at interesting_blocks which is a copy of + blocks_to_update. + (update_ssa): Do not initialize it. + (pass_build_ssa::execute): Set interesting_blocks to NULL + after releasing it. + +2022-07-01 Richard Biener + + * tree-ssa-sccvn.cc (vn_reference_lookup_3): Revert + back to using maybe_ne (off, -1). + +2022-07-01 Richard Biener + + * tree-ssa-sccvn.cc (vn_nary_op_insert_into): Make + checking dominance check conditional on flag_checking. + +2022-07-01 Tobias Burnus + + * config/gcn/gcn-protos.h (print_operand_address): Remove register + keyword on 'rtx addr' argument. + +2022-07-01 Roger Sayle + Uroš Bizjak + + * config/i386/i386.md (*andn3_doubleword_bmi): Add constraints + to post-reload define_insn_and_split. + +2022-07-01 Jakub Jelinek + + PR middle-end/106144 + * wide-int.cc (wi::shifted_mask): If end >= prec, return right after + emitting element for shift or if shift is 0 first element after start. + (wide_int_cc_tests): Add tests for equivalency of wi::mask and + wi::shifted_mask with 0 start. + +2022-07-01 Roger Sayle + + PR target/106122 + * config/i386/i386.md (peephole2): Avoid generating pop %esp + when optimizing for size. + +2022-07-01 Roger Sayle + Uroš Bizjak + + * config/i386/i386.md (general_szext_operand): Add TImode + support using x86_64_hilo_general_operand predicate. + (*cmp_doubleword): Use x86_64_hilo_general_operand predicate. + (*add3_doubleword): Improved optimization of zero addition. + (and3): Use SDWIM mode iterator to add support for double + word bit-wise AND in TImode. Use force_reg when double word + immediate operand isn't x86_64_hilo_general_operand. + (and3_doubleword): Generalized from anddi3_doubleword and + converted into a post-reload splitter. + (*andndi3_doubleword): Previous define_insn deleted. + (*andn3_doubleword_bmi): New define_insn_and_split for + TARGET_BMI that splits post-reload. + (*andn3_doubleword): New define_insn_and_split for + !TARGET_BMI, that lowers/splits before reload. + (3): Use SDWIM mode iterator to add suppport for + double word bit-wise XOR and bit-wise IOR in TImode. Use + force_reg when double word immediate operand isn't + x86_64_hilo_general_operand. + (*di3_doubleword): Generalized from di3_doubleword. + (one_cmpl2): Use SDWIM mode iterator to add support for + double word bit-wise NOT in TImode. + (one_cmpl2_doubleword): Generalize from one_cmpldi2_doubleword + and converted into a post-reload splitter. + +2022-07-01 Eric Botcazou + + PR middle-end/105874 + * expr.cc (expand_expr_real_1) : Force + EXPAND_MEMORY for the expansion of the inner reference only + in the usual cases where a memory reference is required. + +2022-07-01 Richard Biener + + PR tree-optimization/106131 + * tree-ssa-sccvn.cc (vn_reference_lookup_3): Force alias-set + zero when offsetting the read looking through an aggregate + copy. + +2022-07-01 Martin Liska + + PR tree-optimization/106126 + * gimple-if-to-switch.cc (struct condition_info): Save + has_side_effect. + (find_conditions): Parse all BBs. + (pass_if_to_switch::execute): Allow only side effects for first + BB. + +2022-07-01 Haochen Jiang + + * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVX512F_UNSET): + Add OPTION_MASK_ISA2_AVX512BW_UNSET, remove + OPTION_MASK_ISA2_AVX512BF16_UNSET and + OPTION_MASK_ISA2_AVX512FP16_UNSET. + 2022-06-30 Joseph Myers PR lto/106129 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 6b7f92b..eb05de3 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220701 +20220702 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 829ed46..5beb46e 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2022-07-01 Marek Polacek + + PR c++/106111 + * c-common.h (enum rid): Update RID_LAST_CXX20. + 2022-06-30 Jonathan Wakely * known-headers.cc (get_stdlib_header_for_name): Add diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 077b726..8a0b71a 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2022-07-01 Tobias Burnus + + * c-parser.cc (c_parser_omp_target_enter_data, + c_parser_omp_target_exit_data): Accept tofrom + map-type modifier but use 'to' / 'from' internally. + 2022-06-16 David Malcolm * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 075cec4..28e030f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,46 @@ +2022-07-01 Lewis Hyatt + + * parser.cc (cp_token_is_module_directive): New function + refactoring common code. + (cp_parser_skip_to_closing_parenthesis_1): Use the new function. + (cp_parser_skip_to_end_of_statement): Likewise. + (cp_parser_skip_to_end_of_block_or_statement): Likewise. + (cp_parser_declaration): Likewise. + +2022-07-01 Marek Polacek + + PR c++/105550 + * constexpr.cc (cxx_eval_conditional_expression): Strip TARGET_EXPRs. + +2022-07-01 Tobias Burnus + + * parser.cc (cp_parser_omp_target_enter_data, + cp_parser_omp_target_exit_data): Accept tofrom + map-type modifier but use 'to' / 'from' internally. + +2022-07-01 Marek Polacek + + PR c++/106111 + * parser.cc (cp_lexer_get_preprocessor_token): Also warn about + RID_ALIGNOF, RID_ALIGNAS, RID_THREAD. + +2022-07-01 Jason Merrill + + PR c++/105779 + * call.cc (resolve_args): Use complain. + +2022-07-01 Jason Merrill + + * parser.cc (missing_template_diag): Split out... + (cp_parser_id_expression): ...from here. + +2022-07-01 Jason Merrill + + PR c++/106024 + * parser.cc (missing_template_diag): Factor out... + (cp_parser_id_expression): ...from here. + (cp_parser_lookup_name): Don't look in dependent object_type. + 2022-06-30 Nathan Sidwell * module.cc (module_state::write_define): Drop located param. diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 7eac936..ea9354c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2022-07-01 Tobias Burnus + + * dump-parse-tree.cc (show_omp_namelist): For the map-type, + also handle the always modifer and release/delete. + * openmp.cc (resolve_omp_clauses): Accept tofrom + map-type modifier for target enter/exit data, + but use 'to' / 'from' internally. + 2022-06-30 Harald Anlauf Steven G. Kargl diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 45b69bd..04a986e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,53 @@ +2022-07-01 Marek Polacek + + PR c++/105550 + * g++.dg/cpp1y/nsdmi-aggr16.C: Remove FIXME. + * g++.dg/cpp1y/nsdmi-aggr17.C: Remove FIXME. + * g++.dg/cpp0x/constexpr-elision1.C: New test. + * g++.dg/cpp1y/constexpr-elision1.C: New test. + +2022-07-01 Tobias Burnus + + * c-c++-common/gomp/target-data-2.c: New test. + * c-c++-common/gomp/target-data-3.c: New test. + * gfortran.dg/gomp/target-data-1.f90: New test. + * gfortran.dg/gomp/target-data-2.f90: New test. + +2022-07-01 Marek Polacek + + PR c++/106111 + * g++.dg/cpp0x/keywords1.C: New test. + * g++.dg/cpp2a/keywords1.C: New test. + +2022-07-01 Jason Merrill + + PR c++/106024 + * g++.dg/cpp2a/lambda-generic10.C: New test. + +2022-07-01 Kito Cheng + + Revert: + 2022-06-30 Kito Cheng + + PR testsuite/102690 + * g++.dg/warn/Warray-bounds-16.C: XFAIL only on lp64 for the + warning. + +2022-07-01 Roger Sayle + + PR target/106122 + * gcc.target/i386/pr106122.c: New test case. + +2022-07-01 Richard Biener + + PR tree-optimization/106131 + * g++.dg/torture/pr106131.C: New testcase. + +2022-07-01 Martin Liska + + PR tree-optimization/106126 + * gcc.dg/tree-ssa/pr106126.c: New test. + 2022-06-30 Harald Anlauf Steven G. Kargl -- cgit v1.1 From 97baacba963c06e3d0e33cde04e7e687671e60e7 Mon Sep 17 00:00:00 2001 From: Immad Mir Date: Sat, 2 Jul 2022 22:09:37 +0530 Subject: analyzer: implement five new warnings for misuse of POSIX file descriptor APIs [PR106003]. This patch adds a new state machine to the analyzer for checking usage of POSIX file descriptor APIs with five new warnings. It adds: - check for FD leaks (CWE 775). - check for double "close" of a FD (CWE-1341). - check for read/write of a closed file descriptor. - check whether a file descriptor was used without being checked for validity. - check for read/write of a descriptor opened for just writing/reading. gcc/ChangeLog: PR analyzer/106003 * Makefile.in (ANALYZER_OBJS): Add sm-fd.o. * doc/invoke.texi: Add -Wanalyzer-fd-double-close, -Wanalyzer-fd-leak, -Wanalyzer-fd-access-mode-mismatch, -Wanalyzer-fd-use-without-check, -Wanalyzer-fd-use-after-close. gcc/analyzer/ChangeLog: PR analyzer/106003 * analyzer.opt (Wanalyzer-fd-leak): New option. (Wanalyzer-fd-access-mode-mismatch): New option. (Wanalyzer-fd-use-without-check): New option. (Wanalyzer-fd-double-close): New option. (Wanalyzer-fd-use-after-close): New option. * sm.h (make_fd_state_machine): New decl. * sm.cc (make_checkers): Call make_fd_state_machine. * sm-fd.cc: New file. gcc/testsuite/ChangeLog: PR analyzer/106003 * gcc.dg/analyzer/fd-1.c: New test. * gcc.dg/analyzer/fd-2.c: New test. * gcc.dg/analyzer/fd-3.c: New test. * gcc.dg/analyzer/fd-4.c: New test. --- gcc/Makefile.in | 1 + gcc/analyzer/analyzer.opt | 20 + gcc/analyzer/sm-fd.cc | 847 +++++++++++++++++++++++++++++++++++ gcc/analyzer/sm.cc | 1 + gcc/analyzer/sm.h | 1 + gcc/doc/invoke.texi | 55 +++ gcc/testsuite/gcc.dg/analyzer/fd-1.c | 39 ++ gcc/testsuite/gcc.dg/analyzer/fd-2.c | 49 ++ gcc/testsuite/gcc.dg/analyzer/fd-3.c | 85 ++++ gcc/testsuite/gcc.dg/analyzer/fd-4.c | 62 +++ 10 files changed, 1160 insertions(+) create mode 100644 gcc/analyzer/sm-fd.cc create mode 100644 gcc/testsuite/gcc.dg/analyzer/fd-1.c create mode 100644 gcc/testsuite/gcc.dg/analyzer/fd-2.c create mode 100644 gcc/testsuite/gcc.dg/analyzer/fd-3.c create mode 100644 gcc/testsuite/gcc.dg/analyzer/fd-4.c (limited to 'gcc') diff --git a/gcc/Makefile.in b/gcc/Makefile.in index a82909d..69ac81a 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1273,6 +1273,7 @@ ANALYZER_OBJS = \ analyzer/region-model-reachability.o \ analyzer/sm.o \ analyzer/sm-file.o \ + analyzer/sm-fd.o \ analyzer/sm-malloc.o \ analyzer/sm-pattern-test.o \ analyzer/sm-sensitive.o \ diff --git a/gcc/analyzer/analyzer.opt b/gcc/analyzer/analyzer.opt index 4aea52d..8ef6a6f 100644 --- a/gcc/analyzer/analyzer.opt +++ b/gcc/analyzer/analyzer.opt @@ -66,6 +66,26 @@ Wanalyzer-exposure-through-output-file Common Var(warn_analyzer_exposure_through_output_file) Init(1) Warning Warn about code paths in which sensitive data is written to a file. +Wanalyzer-fd-access-mode-mismatch +Common Var(warn_analyzer_fd_mode_mismatch) Init(1) Warning +Warn about code paths in which read on a write-only file descriptor is attempted, or vice versa. + +Wanalyzer-fd-double-close +Common Var(warn_analyzer_fd_double_close) Init(1) Warning +Warn about code paths in which a file descriptor can be closed more than once. + +Wanalyzer-fd-leak +Common Var(warn_analyzer_fd_leak) Init(1) Warning +Warn about code paths in which a file descriptor is not closed. + +Wanalyzer-fd-use-after-close +Common Var(warn_analyzer_fd_use_after_close) Init(1) Warning +Warn about code paths in which a read or write is performed on a closed file descriptor. + +Wanalyzer-fd-use-without-check +Common Var(warn_analyzer_fd_use_without_check) Init(1) Warning +Warn about code paths in which a file descriptor is used without being checked for validity. + Wanalyzer-file-leak Common Var(warn_analyzer_file_leak) Init(1) Warning Warn about code paths in which a stdio FILE is not closed. diff --git a/gcc/analyzer/sm-fd.cc b/gcc/analyzer/sm-fd.cc new file mode 100644 index 0000000..4058ac5 --- /dev/null +++ b/gcc/analyzer/sm-fd.cc @@ -0,0 +1,847 @@ +/* A state machine for detecting misuses of POSIX file descriptor APIs. + Copyright (C) 2019-2022 Free Software Foundation, Inc. + Contributed by Immad Mir . + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tree.h" +#include "function.h" +#include "basic-block.h" +#include "gimple.h" +#include "options.h" +#include "diagnostic-path.h" +#include "diagnostic-metadata.h" +#include "function.h" +#include "json.h" +#include "analyzer/analyzer.h" +#include "diagnostic-event-id.h" +#include "analyzer/analyzer-logging.h" +#include "analyzer/sm.h" +#include "analyzer/pending-diagnostic.h" +#include "analyzer/function-set.h" +#include "analyzer/analyzer-selftests.h" +#include "tristate.h" +#include "selftest.h" +#include "analyzer/call-string.h" +#include "analyzer/program-point.h" +#include "analyzer/store.h" +#include "analyzer/region-model.h" + +#if ENABLE_ANALYZER + +namespace ana { + +namespace { + +/* An enum for distinguishing between three different access modes. */ + +enum access_mode +{ + READ_WRITE, + READ_ONLY, + WRITE_ONLY +}; + +class fd_state_machine : public state_machine +{ +public: + fd_state_machine (logger *logger); + + bool + inherited_state_p () const final override + { + return false; + } + + state_machine::state_t + get_default_state (const svalue *sval) const final override + { + if (tree cst = sval->maybe_get_constant ()) + { + if (TREE_CODE (cst) == INTEGER_CST) + { + int val = TREE_INT_CST_LOW (cst); + if (val >= 0) + return m_constant_fd; + else + return m_invalid; + } + } + return m_start; + } + + bool on_stmt (sm_context *sm_ctxt, const supernode *node, + const gimple *stmt) const final override; + + void on_condition (sm_context *sm_ctxt, const supernode *node, + const gimple *stmt, const svalue *lhs, const tree_code op, + const svalue *rhs) const final override; + + bool can_purge_p (state_t s) const final override; + pending_diagnostic *on_leak (tree var) const final override; + + bool is_unchecked_fd_p (state_t s) const; + bool is_valid_fd_p (state_t s) const; + bool is_closed_fd_p (state_t s) const; + bool is_constant_fd_p (state_t s) const; + bool is_readonly_fd_p (state_t s) const; + bool is_writeonly_fd_p (state_t s) const; + enum access_mode get_access_mode_from_flag (int flag) const; + + /* State for a constant file descriptor (>= 0) */ + state_t m_constant_fd; + + /* States representing a file descriptor that hasn't yet been + checked for validity after opening, for three different + access modes. */ + state_t m_unchecked_read_write; + + state_t m_unchecked_read_only; + + state_t m_unchecked_write_only; + + /* States for representing a file descriptor that is known to be valid (>= + 0), for three different access modes.*/ + state_t m_valid_read_write; + + state_t m_valid_read_only; + + state_t m_valid_write_only; + + /* State for a file descriptor that is known to be invalid (< 0). */ + state_t m_invalid; + + /* State for a file descriptor that has been closed.*/ + state_t m_closed; + + /* State for a file descriptor that we do not want to track anymore . */ + state_t m_stop; + +private: + void on_open (sm_context *sm_ctxt, const supernode *node, const gimple *stmt, + const gcall *call) const; + void on_close (sm_context *sm_ctxt, const supernode *node, const gimple *stmt, + const gcall *call) const; + void on_read (sm_context *sm_ctxt, const supernode *node, const gimple *stmt, + const gcall *call, const tree callee_fndecl) const; + void on_write (sm_context *sm_ctxt, const supernode *node, const gimple *stmt, + const gcall *call, const tree callee_fndecl) const; + void check_for_open_fd (sm_context *sm_ctxt, const supernode *node, + const gimple *stmt, const gcall *call, + const tree callee_fndecl, + enum access_direction access_fn) const; + + void make_valid_transitions_on_condition (sm_context *sm_ctxt, + const supernode *node, + const gimple *stmt, + const svalue *lhs) const; + void make_invalid_transitions_on_condition (sm_context *sm_ctxt, + const supernode *node, + const gimple *stmt, + const svalue *lhs) const; +}; + +/* Base diagnostic class relative to fd_state_machine. */ +class fd_diagnostic : public pending_diagnostic +{ +public: + fd_diagnostic (const fd_state_machine &sm, tree arg) : m_sm (sm), m_arg (arg) + { + } + + bool + subclass_equal_p (const pending_diagnostic &base_other) const override + { + return same_tree_p (m_arg, ((const fd_diagnostic &)base_other).m_arg); + } + + label_text + describe_state_change (const evdesc::state_change &change) override + { + if (change.m_old_state == m_sm.get_start_state () + && m_sm.is_unchecked_fd_p (change.m_new_state)) + { + if (change.m_new_state == m_sm.m_unchecked_read_write) + return change.formatted_print ("opened here as read-write"); + + if (change.m_new_state == m_sm.m_unchecked_read_only) + return change.formatted_print ("opened here as read-only"); + + if (change.m_new_state == m_sm.m_unchecked_write_only) + return change.formatted_print ("opened here as write-only"); + } + + if (change.m_new_state == m_sm.m_closed) + return change.formatted_print ("closed here"); + + if (m_sm.is_unchecked_fd_p (change.m_old_state) + && m_sm.is_valid_fd_p (change.m_new_state)) + { + if (change.m_expr) + return change.formatted_print ( + "assuming %qE is a valid file descriptor (>= 0)", change.m_expr); + else + return change.formatted_print ("assuming a valid file descriptor"); + } + + if (m_sm.is_unchecked_fd_p (change.m_old_state) + && change.m_new_state == m_sm.m_invalid) + { + if (change.m_expr) + return change.formatted_print ( + "assuming %qE is an invalid file descriptor (< 0)", + change.m_expr); + else + return change.formatted_print ("assuming an invalid file descriptor"); + } + + return label_text (); + } + +protected: + const fd_state_machine &m_sm; + tree m_arg; +}; + +class fd_leak : public fd_diagnostic +{ +public: + fd_leak (const fd_state_machine &sm, tree arg) : fd_diagnostic (sm, arg) {} + + const char * + get_kind () const final override + { + return "fd_leak"; + } + + int + get_controlling_option () const final override + { + return OPT_Wanalyzer_fd_leak; + } + + bool + emit (rich_location *rich_loc) final override + { + /*CWE-775: Missing Release of File Descriptor or Handle after Effective + Lifetime + */ + diagnostic_metadata m; + m.add_cwe (775); + if (m_arg) + return warning_meta (rich_loc, m, get_controlling_option (), + "leak of file descriptor %qE", m_arg); + else + return warning_meta (rich_loc, m, get_controlling_option (), + "leak of file descriptor"); + } + + label_text + describe_state_change (const evdesc::state_change &change) final override + { + if (m_sm.is_unchecked_fd_p (change.m_new_state)) + { + m_open_event = change.m_event_id; + return label_text::borrow ("opened here"); + } + + return fd_diagnostic::describe_state_change (change); + } + + label_text + describe_final_event (const evdesc::final_event &ev) final override + { + if (m_open_event.known_p ()) + { + if (ev.m_expr) + return ev.formatted_print ("%qE leaks here; was opened at %@", + ev.m_expr, &m_open_event); + else + return ev.formatted_print ("leaks here; was opened at %@", + &m_open_event); + } + else + { + if (ev.m_expr) + return ev.formatted_print ("%qE leaks here", ev.m_expr); + else + return ev.formatted_print ("leaks here"); + } + } + +private: + diagnostic_event_id_t m_open_event; +}; + +class fd_access_mode_mismatch : public fd_diagnostic +{ +public: + fd_access_mode_mismatch (const fd_state_machine &sm, tree arg, + enum access_direction fd_dir, + const tree callee_fndecl) + : fd_diagnostic (sm, arg), m_fd_dir (fd_dir), + m_callee_fndecl (callee_fndecl) + + { + } + + const char * + get_kind () const final override + { + return "fd_access_mode_mismatch"; + } + + int + get_controlling_option () const final override + { + return OPT_Wanalyzer_fd_access_mode_mismatch; + } + + bool + emit (rich_location *rich_loc) final override + { + switch (m_fd_dir) + { + case DIR_READ: + return warning_at (rich_loc, get_controlling_option (), + "%qE on % file descriptor %qE", + m_callee_fndecl, m_arg); + case DIR_WRITE: + return warning_at (rich_loc, get_controlling_option (), + "%qE on % file descriptor %qE", + m_callee_fndecl, m_arg); + default: + gcc_unreachable (); + } + } + + bool + subclass_equal_p (const pending_diagnostic &base_other) const override + { + const fd_access_mode_mismatch &sub_other + = (const fd_access_mode_mismatch &)base_other; + return (same_tree_p (m_arg, sub_other.m_arg) + && m_callee_fndecl == sub_other.m_callee_fndecl + && m_fd_dir == sub_other.m_fd_dir); + } + + label_text + describe_final_event (const evdesc::final_event &ev) final override + { + switch (m_fd_dir) + { + case DIR_READ: + return ev.formatted_print ("%qE on % file descriptor %qE", + m_callee_fndecl, m_arg); + case DIR_WRITE: + return ev.formatted_print ("%qE on % file descriptor %qE", + m_callee_fndecl, m_arg); + default: + gcc_unreachable (); + } + } + +private: + enum access_direction m_fd_dir; + const tree m_callee_fndecl; +}; + +class double_close : public fd_diagnostic +{ +public: + double_close (const fd_state_machine &sm, tree arg) : fd_diagnostic (sm, arg) + { + } + + const char * + get_kind () const final override + { + return "double_close"; + } + + int + get_controlling_option () const final override + { + return OPT_Wanalyzer_fd_double_close; + } + bool + emit (rich_location *rich_loc) final override + { + diagnostic_metadata m; + // CWE-1341: Multiple Releases of Same Resource or Handle + m.add_cwe (1341); + return warning_meta (rich_loc, m, get_controlling_option (), + "double % of file descriptor %qE", m_arg); + } + + label_text + describe_state_change (const evdesc::state_change &change) override + { + if (m_sm.is_unchecked_fd_p (change.m_new_state)) + return label_text::borrow ("opened here"); + + if (change.m_new_state == m_sm.m_closed) + { + m_first_close_event = change.m_event_id; + return change.formatted_print ("first %qs here", "close"); + } + return fd_diagnostic::describe_state_change (change); + } + + label_text + describe_final_event (const evdesc::final_event &ev) final override + { + if (m_first_close_event.known_p ()) + return ev.formatted_print ("second %qs here; first %qs was at %@", + "close", "close", &m_first_close_event); + return ev.formatted_print ("second %qs here", "close"); + } + +private: + diagnostic_event_id_t m_first_close_event; +}; + +class fd_use_after_close : public fd_diagnostic +{ +public: + fd_use_after_close (const fd_state_machine &sm, tree arg, + const tree callee_fndecl) + : fd_diagnostic (sm, arg), m_callee_fndecl (callee_fndecl) + { + } + + const char * + get_kind () const final override + { + return "fd_use_after_close"; + } + + int + get_controlling_option () const final override + { + return OPT_Wanalyzer_fd_use_after_close; + } + + bool + emit (rich_location *rich_loc) final override + { + return warning_at (rich_loc, get_controlling_option (), + "%qE on closed file descriptor %qE", m_callee_fndecl, + m_arg); + } + + label_text + describe_state_change (const evdesc::state_change &change) override + { + if (m_sm.is_unchecked_fd_p (change.m_new_state)) + return label_text::borrow ("opened here"); + + if (change.m_new_state == m_sm.m_closed) + return change.formatted_print ("closed here"); + + return fd_diagnostic::describe_state_change (change); + } + + label_text + describe_final_event (const evdesc::final_event &ev) final override + { + return ev.formatted_print ("%qE on closed file descriptor %qE here", + m_callee_fndecl, m_arg); + } + +private: + const tree m_callee_fndecl; +}; + +class unchecked_use_of_fd : public fd_diagnostic +{ +public: + unchecked_use_of_fd (const fd_state_machine &sm, tree arg, + const tree callee_fndecl) + : fd_diagnostic (sm, arg), m_callee_fndecl (callee_fndecl) + { + } + + const char * + get_kind () const final override + { + return "unchecked_use_of_fd"; + } + + int + get_controlling_option () const final override + { + return OPT_Wanalyzer_fd_use_without_check; + } + + bool + emit (rich_location *rich_loc) final override + { + return warning_at (rich_loc, get_controlling_option (), + "%qE on possibly invalid file descriptor %qE", + m_callee_fndecl, m_arg); + } + + bool + subclass_equal_p (const pending_diagnostic &base_other) const override + { + const unchecked_use_of_fd &sub_other + = (const unchecked_use_of_fd &)base_other; + return (same_tree_p (m_arg, sub_other.m_arg) + && m_callee_fndecl == sub_other.m_callee_fndecl); + } + + label_text + describe_state_change (const evdesc::state_change &change) override + { + if (m_sm.is_unchecked_fd_p (change.m_new_state)) + { + m_first_open_event = change.m_event_id; + return label_text::borrow ("opened here"); + } + + return fd_diagnostic::describe_state_change (change); + } + + label_text + describe_final_event (const evdesc::final_event &ev) final override + { + if (m_first_open_event.known_p ()) + return ev.formatted_print ( + "%qE could be invalid: unchecked value from %@", m_arg, + &m_first_open_event); + else + return ev.formatted_print ("%qE could be invalid", m_arg); + } + +private: + diagnostic_event_id_t m_first_open_event; + const tree m_callee_fndecl; +}; + +fd_state_machine::fd_state_machine (logger *logger) + : state_machine ("file-descriptor", logger), + m_constant_fd (add_state ("fd-constant")), + m_unchecked_read_write (add_state ("fd-unchecked-read-write")), + m_unchecked_read_only (add_state ("fd-unchecked-read-only")), + m_unchecked_write_only (add_state ("fd-unchecked-write-only")), + m_invalid (add_state ("fd-invalid")), + m_valid_read_write (add_state ("fd-valid-read-write")), + m_valid_read_only (add_state ("fd-valid-read-only")), + m_valid_write_only (add_state ("fd-valid-write-only")), + m_closed (add_state ("fd-closed")), m_stop (add_state ("fd-stop")) +{ +} + +bool +fd_state_machine::is_unchecked_fd_p (state_t s) const +{ + return (s == m_unchecked_read_write + || s == m_unchecked_read_only + || s == m_unchecked_write_only); +} + +bool +fd_state_machine::is_valid_fd_p (state_t s) const +{ + return (s == m_valid_read_write + || s == m_valid_read_only + || s == m_valid_write_only); +} + +enum access_mode +fd_state_machine::get_access_mode_from_flag (int flag) const +{ + /* FIXME: this code assumes the access modes on the host and + target are the same, which in practice might not be the case. */ + + if ((flag & O_ACCMODE) == O_RDONLY) + { + return READ_ONLY; + } + else if ((flag & O_ACCMODE) == O_WRONLY) + { + return WRITE_ONLY; + } + return READ_WRITE; +} + +bool +fd_state_machine::is_readonly_fd_p (state_t state) const +{ + return (state == m_unchecked_read_only || state == m_valid_read_only); +} + +bool +fd_state_machine::is_writeonly_fd_p (state_t state) const +{ + return (state == m_unchecked_write_only || state == m_valid_write_only); +} + +bool +fd_state_machine::is_closed_fd_p (state_t state) const +{ + return (state == m_closed); +} + +bool +fd_state_machine::is_constant_fd_p (state_t state) const +{ + return (state == m_constant_fd); +} + +bool +fd_state_machine::on_stmt (sm_context *sm_ctxt, const supernode *node, + const gimple *stmt) const +{ + if (const gcall *call = dyn_cast (stmt)) + if (tree callee_fndecl = sm_ctxt->get_fndecl_for_call (call)) + { + if (is_named_call_p (callee_fndecl, "open", call, 2)) + { + on_open (sm_ctxt, node, stmt, call); + return true; + } // "open" + + if (is_named_call_p (callee_fndecl, "close", call, 1)) + { + on_close (sm_ctxt, node, stmt, call); + return true; + } // "close" + + if (is_named_call_p (callee_fndecl, "write", call, 3)) + { + on_write (sm_ctxt, node, stmt, call, callee_fndecl); + return true; + } // "write" + + if (is_named_call_p (callee_fndecl, "read", call, 3)) + { + on_read (sm_ctxt, node, stmt, call, callee_fndecl); + return true; + } // "read" + } + + return false; +} + +void +fd_state_machine::on_open (sm_context *sm_ctxt, const supernode *node, + const gimple *stmt, const gcall *call) const +{ + tree lhs = gimple_call_lhs (call); + if (lhs) + { + tree arg = gimple_call_arg (call, 1); + if (TREE_CODE (arg) == INTEGER_CST) + { + int flag = TREE_INT_CST_LOW (arg); + enum access_mode mode = get_access_mode_from_flag (flag); + + switch (mode) + { + case READ_ONLY: + sm_ctxt->on_transition (node, stmt, lhs, m_start, + m_unchecked_read_only); + break; + case WRITE_ONLY: + sm_ctxt->on_transition (node, stmt, lhs, m_start, + m_unchecked_write_only); + break; + default: + sm_ctxt->on_transition (node, stmt, lhs, m_start, + m_unchecked_read_write); + } + } + } + else + { + sm_ctxt->warn (node, stmt, NULL_TREE, new fd_leak (*this, NULL_TREE)); + } +} + +void +fd_state_machine::on_close (sm_context *sm_ctxt, const supernode *node, + const gimple *stmt, const gcall *call) const +{ + tree arg = gimple_call_arg (call, 0); + state_t state = sm_ctxt->get_state (stmt, arg); + tree diag_arg = sm_ctxt->get_diagnostic_tree (arg); + + sm_ctxt->on_transition (node, stmt, arg, m_start, m_closed); + sm_ctxt->on_transition (node, stmt, arg, m_unchecked_read_write, m_closed); + sm_ctxt->on_transition (node, stmt, arg, m_unchecked_read_only, m_closed); + sm_ctxt->on_transition (node, stmt, arg, m_unchecked_write_only, m_closed); + sm_ctxt->on_transition (node, stmt, arg, m_valid_read_write, m_closed); + sm_ctxt->on_transition (node, stmt, arg, m_valid_read_only, m_closed); + sm_ctxt->on_transition (node, stmt, arg, m_valid_write_only, m_closed); + sm_ctxt->on_transition (node, stmt, arg, m_constant_fd, m_closed); + + if (is_closed_fd_p (state)) + { + sm_ctxt->warn (node, stmt, arg, new double_close (*this, diag_arg)); + sm_ctxt->set_next_state (stmt, arg, m_stop); + } +} +void +fd_state_machine::on_read (sm_context *sm_ctxt, const supernode *node, + const gimple *stmt, const gcall *call, + const tree callee_fndecl) const +{ + check_for_open_fd (sm_ctxt, node, stmt, call, callee_fndecl, DIR_READ); +} +void +fd_state_machine::on_write (sm_context *sm_ctxt, const supernode *node, + const gimple *stmt, const gcall *call, + const tree callee_fndecl) const +{ + check_for_open_fd (sm_ctxt, node, stmt, call, callee_fndecl, DIR_WRITE); +} + +void +fd_state_machine::check_for_open_fd ( + sm_context *sm_ctxt, const supernode *node, const gimple *stmt, + const gcall *call, const tree callee_fndecl, + enum access_direction callee_fndecl_dir) const +{ + tree arg = gimple_call_arg (call, 0); + tree diag_arg = sm_ctxt->get_diagnostic_tree (arg); + state_t state = sm_ctxt->get_state (stmt, arg); + + if (is_closed_fd_p (state)) + { + sm_ctxt->warn (node, stmt, arg, + new fd_use_after_close (*this, diag_arg, callee_fndecl)); + } + + else + { + if (!(is_valid_fd_p (state) || (state == m_stop))) + { + if (!is_constant_fd_p (state)) + sm_ctxt->warn ( + node, stmt, arg, + new unchecked_use_of_fd (*this, diag_arg, callee_fndecl)); + } + switch (callee_fndecl_dir) + { + case DIR_READ: + if (is_writeonly_fd_p (state)) + { + tree diag_arg = sm_ctxt->get_diagnostic_tree (arg); + sm_ctxt->warn (node, stmt, arg, + new fd_access_mode_mismatch ( + *this, diag_arg, DIR_WRITE, callee_fndecl)); + } + + break; + case DIR_WRITE: + + if (is_readonly_fd_p (state)) + { + tree diag_arg = sm_ctxt->get_diagnostic_tree (arg); + sm_ctxt->warn (node, stmt, arg, + new fd_access_mode_mismatch ( + *this, diag_arg, DIR_READ, callee_fndecl)); + } + break; + } + } +} + +void +fd_state_machine::on_condition (sm_context *sm_ctxt, const supernode *node, + const gimple *stmt, const svalue *lhs, + enum tree_code op, const svalue *rhs) const +{ + if (tree cst = rhs->maybe_get_constant ()) + { + if (TREE_CODE (cst) == INTEGER_CST) + { + int val = TREE_INT_CST_LOW (cst); + if (val == -1) + { + if (op == NE_EXPR) + make_valid_transitions_on_condition (sm_ctxt, node, stmt, lhs); + + else if (op == EQ_EXPR) + make_invalid_transitions_on_condition (sm_ctxt, node, stmt, + lhs); + } + } + } + + if (rhs->all_zeroes_p ()) + { + if (op == GE_EXPR) + make_valid_transitions_on_condition (sm_ctxt, node, stmt, lhs); + else if (op == LT_EXPR) + make_invalid_transitions_on_condition (sm_ctxt, node, stmt, lhs); + } +} + +void +fd_state_machine::make_valid_transitions_on_condition (sm_context *sm_ctxt, + const supernode *node, + const gimple *stmt, + const svalue *lhs) const +{ + sm_ctxt->on_transition (node, stmt, lhs, m_unchecked_read_write, + m_valid_read_write); + sm_ctxt->on_transition (node, stmt, lhs, m_unchecked_read_only, + m_valid_read_only); + sm_ctxt->on_transition (node, stmt, lhs, m_unchecked_write_only, + m_valid_write_only); +} + +void +fd_state_machine::make_invalid_transitions_on_condition ( + sm_context *sm_ctxt, const supernode *node, const gimple *stmt, + const svalue *lhs) const +{ + sm_ctxt->on_transition (node, stmt, lhs, m_unchecked_read_write, m_invalid); + sm_ctxt->on_transition (node, stmt, lhs, m_unchecked_read_only, m_invalid); + sm_ctxt->on_transition (node, stmt, lhs, m_unchecked_write_only, m_invalid); +} + +bool +fd_state_machine::can_purge_p (state_t s) const +{ + if (is_unchecked_fd_p (s) || is_valid_fd_p (s)) + return false; + else + return true; +} + +pending_diagnostic * +fd_state_machine::on_leak (tree var) const +{ + return new fd_leak (*this, var); +} +} // namespace + +state_machine * +make_fd_state_machine (logger *logger) +{ + return new fd_state_machine (logger); +} +} // namespace ana + +#endif // ENABLE_ANALYZER \ No newline at end of file diff --git a/gcc/analyzer/sm.cc b/gcc/analyzer/sm.cc index 622cb0b..24c20b8 100644 --- a/gcc/analyzer/sm.cc +++ b/gcc/analyzer/sm.cc @@ -167,6 +167,7 @@ make_checkers (auto_delete_vec &out, logger *logger) { out.safe_push (make_malloc_state_machine (logger)); out.safe_push (make_fileptr_state_machine (logger)); + out.safe_push (make_fd_state_machine (logger)); /* The "taint" checker must be explicitly enabled (as it currently leads to state explosions that stop the other checkers working). */ if (flag_analyzer_checker) diff --git a/gcc/analyzer/sm.h b/gcc/analyzer/sm.h index 4cc5453..e80ef1f 100644 --- a/gcc/analyzer/sm.h +++ b/gcc/analyzer/sm.h @@ -301,6 +301,7 @@ extern state_machine *make_sensitive_state_machine (logger *logger); extern state_machine *make_signal_state_machine (logger *logger); extern state_machine *make_pattern_test_state_machine (logger *logger); extern state_machine *make_va_list_state_machine (logger *logger); +extern state_machine *make_fd_state_machine (logger *logger); } // namespace ana diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 757775e..d86e45a 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -9742,6 +9742,11 @@ Enabling this option effectively enables the following warnings: -Wanalyzer-double-fclose @gol -Wanalyzer-double-free @gol -Wanalyzer-exposure-through-output-file @gol +-Wanalyzer-fd-access-mode-mismatch @gol +-Wanalyzer-fd-double-close @gol +-Wanalyzer-fd-leak @gol +-Wanalyzer-fd-use-after-close @gol +-Wanalyzer-fd-use-without-check @gol -Wanalyzer-file-leak @gol -Wanalyzer-free-of-non-heap @gol -Wanalyzer-malloc-leak @gol @@ -9816,6 +9821,56 @@ This diagnostic warns for paths through the code in which a security-sensitive value is written to an output file (such as writing a password to a log file). +@item -Wno-analyzer-fd-access-mode-mismatch +@opindex Wanalyzer-fd-access-mode-mismatch +@opindex Wno-analyzer-fd-access-mode-mismatch +This warning requires @option{-fanalyzer}, which enables it; use +@option{-Wno-analyzer-fd-access-mode-mismatch} +to disable it. + +This diagnostic warns for paths through code in which a +@code{read} on a write-only file descriptor is attempted, or vice versa + +@item -Wno-analyzer-fd-double-close +@opindex Wanalyzer-fd-double-close +@opindex Wno-analyzer-fd-double-close +This warning requires @option{-fanalyzer}, which enables it; use +@option{-Wno-analyzer-fd-double-close} +to disable it. + +This diagnostic warns for paths through code in which a +file descriptor can be closed more than once. + +@item -Wno-analyzer-fd-leak +@opindex Wanalyzer-fd-leak +@opindex Wno-analyzer-fd-leak +This warning requires @option{-fanalyzer}, which enables it; use +@option{-Wno-analyzer-fd-leak} +to disable it. + +This diagnostic warns for paths through code in which an +open file descriptor is leaked. + +@item -Wno-analyzer-fd-use-after-close +@opindex Wanalyzer-fd-use-after-close +@opindex Wno-analyzer-fd-use-after-close +This warning requires @option{-fanalyzer}, which enables it; use +@option{-Wno-analyzer-fd-use-after-close} +to disable it. + +This diagnostic warns for paths through code in which a +read or write is called on a closed file descriptor. + +@item -Wno-analyzer-fd-use-without-check +@opindex Wanalyzer-fd-use-without-check +@opindex Wno-analyzer-fd-use-without-check +This warning requires @option{-fanalyzer}, which enables it; use +@option{-Wno-analyzer-fd-use-without-check} +to disable it. + +This diagnostic warns for paths through code in which a +file descriptor is used without being checked for validity. + @item -Wno-analyzer-file-leak @opindex Wanalyzer-file-leak @opindex Wno-analyzer-file-leak diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-1.c b/gcc/testsuite/gcc.dg/analyzer/fd-1.c new file mode 100644 index 0000000..8a72e63 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/fd-1.c @@ -0,0 +1,39 @@ +int open(const char *, int mode); +#define O_RDONLY 0 +#define O_WRONLY 1 +#define O_RDWR 2 + +void +test_1 (const char *path) +{ + int fd = open (path, O_RDONLY); /* { dg-message "\\(1\\) opened here" } */ + return; /* { dg-warning "leak of file descriptor 'fd' \\\[CWE-775\\\]" "warning" } */ + /* { dg-message "\\(2\\) 'fd' leaks here; was opened at \\(1\\)" "event" { target *-*-* } .-1 } */ +} + +void +test_2 (const char *path) +{ + int fd = open (path, O_RDWR); /* { dg-message "\\(1\\) opened here" } */ + if (fd >= 0) /* { dg-message "\\(2\\) assuming 'fd' is a valid file descriptor" "event1" } */ + /* { dg-message "\\(3\\) following 'true' branch \\(when 'fd >= 0'\\)..." "event2" { target *-*-* } .-1 } */ + { + return; /* { dg-warning "leak of file descriptor 'fd' \\\[CWE-775\\\]" "warning" } */ + /* { dg-message "\\(4\\) ...to here" "event1" { target *-*-* } .-1 } */ + /* { dg-message "\\(5\\) 'fd' leaks here; was opened at \\(1\\)" "event2" { target *-*-* } .-2 } */ + } +} + +void +test_3 (const char *path) +{ + int fd = open (path, O_WRONLY); /* { dg-message "\\(1\\) opened here" } */ + return; /* { dg-warning "leak of file descriptor 'fd' \\\[CWE-775\\\]" "warning" } */ +} + +void test_4 (const char *path) +{ + open(path, O_RDONLY); /* { dg-warning "leak of file descriptor \\\[CWE-775\\\]" } */ + /* { dg-message "\\(1\\) leaks here" "" { target *-*-* } .-1 } */ +} + diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-2.c b/gcc/testsuite/gcc.dg/analyzer/fd-2.c new file mode 100644 index 0000000..96ccf2f --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/fd-2.c @@ -0,0 +1,49 @@ +int open(const char *, int mode); +void close(int fd); +#define O_RDONLY 0 +#define O_WRONLY 1 +#define O_RDWR 2 +#define STDIN 0 + +void +test_1 (const char *path) +{ + int fd = open (path, O_RDWR); /* { dg-message "\\(1\\) opened here" } */ + close (fd); /* { dg-message "\\(2\\) first 'close' here" "event1" } */ + close (fd); /* { dg-warning "double 'close' of file descriptor 'fd' \\\[CWE-1341\\\]" "warning" } */ + /* { dg-message "\\(3\\) second 'close' here; first 'close' was at \\(2\\)" "event2" { target *-*-* } .-1 } */ +} + +void +test_2 (const char *path) +{ + int fd = open (path, O_RDWR); /* { dg-message "\\(1\\) opened here" } */ + if (fd < 0) /* { dg-message "\\(2\\) assuming 'fd' is a valid file descriptor \\(>= 0\\)" "event1" } */ + /* { dg-message "\\(3\\) following 'false' branch \\(when 'fd >= 0'\\)..." "event2" { target *-*-* } .-1 } */ + return; + close (fd); /* { dg-message "\\(4\\) ...to here" "event1" } */ + /* { dg-message "\\(5\\) first 'close' here" "event2" { target *-*-* } .-1 } */ + close (fd); /* { dg-warning "double 'close' of file descriptor 'fd' \\\[CWE-1341\\\]" "warning" } */ + /* {dg-message "\\(6\\) second 'close' here; first was at \\(5\\)" "" { target *-*-* } .-1 } */ +} + +void +test_3 () +{ + /* FD 0 is stdin at the entry to "main" and thus read-only, but we have no + guarantees here that it hasn't been closed and then reopened for + writing, so we can't issue a warning */ + + int fd = STDIN; + close(fd); /* { dg-message "\\(1\\) first 'close' here" } */ + close(fd); /* { dg-warning "double 'close' of file descriptor 'fd' \\\[CWE-1341\\\]" "warning" } */ + /* { dg-message "\\(2\\) second 'close' here; first 'close' was at \\(1\\)" "event2" { target *-*-* } .-1 } */ +} + +void +test_4 () +{ + int fd = -1; + close(fd); + close(fd); +} \ No newline at end of file diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-3.c b/gcc/testsuite/gcc.dg/analyzer/fd-3.c new file mode 100644 index 0000000..40fc8af --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/fd-3.c @@ -0,0 +1,85 @@ +int open(const char *, int mode); +void close(int fd); +int write (int fd, void *buf, int nbytes); +int read (int fd, void *buf, int nbytes); +int some_condition(); + +#define O_RDONLY 0 +#define O_WRONLY 1 +#define O_RDWR 2 +#define STDIN 0 +#define O_NOATIME 262144 + +void +test_1 (const char *path, void *buf) +{ + int fd = open (path, O_RDWR); /* { dg-message "\\(1\\) opened here" } */ + write (fd, buf, 1); /* { dg-message "\\(2\\) 'fd' could be invalid: unchecked value from \\(1\\)" } */ + /* { dg-warning "'write' on possibly invalid file descriptor 'fd'" "warning" { target *-*-* } .-1 } */ + close(fd); +} + +void +test_2 (const char *path, void *buf) +{ + int fd = open (path, O_RDWR); /* { dg-message "\\(1\\) opened here" } */ + read (fd, buf, 1); /* { dg-message "\\(2\\) 'fd' could be invalid: unchecked value from \\(1\\)" } */ + /* { dg-warning "'read' on possibly invalid file descriptor 'fd'" "warning" { target *-*-* } .-1 } */ + close (fd); +} + +void +test_3 (void *buf) +{ + int fd = -1; + read (fd, buf, 1); /* { dg-warning "'read' on possibly invalid file descriptor 'fd'" } */ + /* { dg-message "\\(1\\) 'fd' could be invalid" "" { target *-*-* } .-1 } */ +} + +void +test_4 (void *buf) +{ + int fd = STDIN; + read (fd, buf, 1); + close(fd); +} + +void +test_5 (char *path, void *buf) +{ + int flags = O_RDONLY; + if (some_condition()) + flags |= O_NOATIME; + int fd = open (path, flags); + read (fd, buf, 1); /* { dg-warning "'read' on possibly invalid file descriptor 'fd'" } */ + /* { dg-message "\\(1\\) 'fd' could be invalid" "" { target *-*-* } .-1 } */ + close (fd); +} + + +void +test_6 (char *path, void *buf) +{ + int fd = open (path, O_RDONLY); + if (fd != -1) + { + read (fd, buf, 1); + } + close (fd); +} + + +void +test_7 (char *path, void *buf) +{ + int fd = open (path, O_RDWR); /* { dg-message "\\(1\\) opened here" } */ + if (fd != -1) /* { dg-message "\\(2\\) assuming 'fd' is an invalid file descriptor \\(< 0\\)" } */ + { + read (fd, buf, 1); + } else + { + write (fd, buf, 1); /* { dg-warning "'write' on possibly invalid file descriptor 'fd'" } */ + + } + close(fd); +} \ No newline at end of file diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c new file mode 100644 index 0000000..a973704 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/fd-4.c @@ -0,0 +1,62 @@ +int open(const char *, int mode); +void close(int fd); +int write (int fd, void *buf, int nbytes); +int read (int fd, void *buf, int nbytes); + +#define O_RDONLY 0 +#define O_WRONLY 1 +#define O_RDWR 2 + + +void +test_1 (const char *path, void *buf) +{ + int fd = open (path, O_RDONLY); /* { dg-message "opened here as read-only" } */ + if (fd >= 0) /* { dg-message "assuming 'fd' is a valid file descriptor \\(>= 0\\)" "event1" } */ + /* { dg-message "following 'true' branch \\(when 'fd >= 0'\\)..." "event2" { target *-*-* } .-1 } */ + { + write (fd, buf, 1); /* { dg-warning "'write' on 'read-only' file descriptor 'fd'" "warning" } */ + /* { dg-message "\\(4\\) ...to here" "event1" { target *-*-* } .-1 } */ + /* { dg-message "\\(5\\) 'write' on 'read-only' file descriptor 'fd'" "event2" { target *-*-* } .-2 } */ + close (fd); + } +} + +void +test_2 (const char *path, void *buf) +{ + int fd = open (path, O_WRONLY); /* { dg-message "opened here as write-only" } */ + if (fd >= 0) /* { dg-message "assuming 'fd' is a valid file descriptor \\(>= 0\\)" "event1" } */ + /* { dg-message "following 'true' branch \\(when 'fd >= 0'\\)..." "event2" { target *-*-* } .-1 } */ + { + read (fd, buf, 1); /* { dg-warning "'read' on 'write-only' file descriptor 'fd'" "warning" } */ + /* { dg-message "\\(4\\) ...to here" "event1" { target *-*-* } .-1 } */ + /* { dg-message "\\(5\\) 'read' on 'write-only' file descriptor 'fd'" "event2" { target *-*-* } .-2 } */ + close (fd); + } +} + + +void +test_3 (const char *path, void *buf) +{ + int fd = open (path, O_RDWR); /* { dg-message "\\(1\\) opened here" } */ + if (fd >= 0) + { + close(fd); /* {dg-message "\\(2\\) closed here"} */ + read(fd, buf, 1); /* { dg-warning "'read' on closed file descriptor 'fd'" } */ + /* {dg-message "\\(3\\) 'read' on closed file descriptor 'fd' here" "" {target *-*-*} .-1 } */ + } +} + +void +test_4 (const char *path, void *buf) +{ + int fd = open (path, O_RDWR); /* { dg-message "\\(1\\) opened here" } */ + if (fd >= 0) + { + close(fd); /* {dg-message "\\(2\\) closed here"} */ + write(fd, buf, 1); /* { dg-warning "'write' on closed file descriptor 'fd'" } */ + /* {dg-message "\\(3\\) 'write' on closed file descriptor 'fd' here" "" {target *-*-*} .-1 } */ + } +} -- cgit v1.1 From e6c3bb379f515b27268d08e62b4b3e5d7200b437 Mon Sep 17 00:00:00 2001 From: Tim Lange Date: Fri, 1 Jul 2022 00:02:17 +0200 Subject: analyzer: add allocation size checker [PR105900] This patch adds an checker that warns about code paths in which a buffer is assigned to a incompatible type, i.e. when the allocated buffer size is not a multiple of the pointee's size. Regression-tested on x86_64 Linux. Also compiled coreutils, curl, openssh and httpd with the patch enabled. 2022-07-01 Tim Lange gcc/analyzer/ChangeLog: PR analyzer/105900 * analyzer.opt: Added Wanalyzer-allocation-size. * checker-path.cc (region_creation_event::get_desc): Added call to new virtual function pending_diagnostic::describe_region_creation_event. * checker-path.h: Added region_creation_event::get_desc. * diagnostic-manager.cc (diagnostic_manager::add_event_on_final_node): New function. * diagnostic-manager.h: Added diagnostic_manager::add_event_on_final_node. * pending-diagnostic.h (struct region_creation): New event_desc struct. (pending_diagnostic::describe_region_creation_event): Added virtual function to overwrite description of a region creation. * region-model.cc (class dubious_allocation_size): New class. (capacity_compatible_with_type): New helper function. (class size_visitor): New class. (struct_or_union_with_inheritance_p): New helper function. (is_any_cast_p): New helper function. (region_model::check_region_size): New function. (region_model::set_value): Added call to region_model::check_region_size. * region-model.h (class region_model): New function check_region_size. * svalue.cc (region_svalue::accept): Changed to post-order traversal. (initial_svalue::accept): Likewise. (unaryop_svalue::accept): Likewise. (binop_svalue::accept): Likewise. (sub_svalue::accept): Likewise. (repeated_svalue::accept): Likewise. (bits_within_svalue::accept): Likewise. (widening_svalue::accept): Likewise. (unmergeable_svalue::accept): Likewise. (compound_svalue::accept): Likewise. (conjured_svalue::accept): Likewise. (asm_output_svalue::accept): Likewise. (const_fn_result_svalue::accept): Likewise. gcc/ChangeLog: PR analyzer/105900 * doc/invoke.texi: Added Wanalyzer-allocation-size. gcc/testsuite/ChangeLog: PR analyzer/105900 * gcc.dg/analyzer/pr96639.c: Changed buffer size to omit warning. * gcc.dg/analyzer/allocation-size-1.c: New test. * gcc.dg/analyzer/allocation-size-2.c: New test. * gcc.dg/analyzer/allocation-size-3.c: New test. * gcc.dg/analyzer/allocation-size-4.c: New test. * gcc.dg/analyzer/allocation-size-5.c: New test. Signed-off-by: Tim Lange --- gcc/analyzer/analyzer.opt | 4 + gcc/analyzer/checker-path.cc | 11 +- gcc/analyzer/checker-path.h | 2 +- gcc/analyzer/diagnostic-manager.cc | 61 ++++ gcc/analyzer/diagnostic-manager.h | 4 + gcc/analyzer/pending-diagnostic.h | 20 ++ gcc/analyzer/region-model.cc | 370 ++++++++++++++++++++++ gcc/analyzer/region-model.h | 2 + gcc/analyzer/svalue.cc | 26 +- gcc/doc/invoke.texi | 14 + gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c | 116 +++++++ gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c | 155 +++++++++ gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c | 45 +++ gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c | 60 ++++ gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c | 36 +++ gcc/testsuite/gcc.dg/analyzer/pr96639.c | 2 +- 16 files changed, 912 insertions(+), 16 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c create mode 100644 gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c create mode 100644 gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c create mode 100644 gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c create mode 100644 gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c (limited to 'gcc') diff --git a/gcc/analyzer/analyzer.opt b/gcc/analyzer/analyzer.opt index 8ef6a6f..5021376 100644 --- a/gcc/analyzer/analyzer.opt +++ b/gcc/analyzer/analyzer.opt @@ -54,6 +54,10 @@ The minimum number of supernodes within a function for the analyzer to consider Common Joined UInteger Var(param_analyzer_max_enodes_for_full_dump) Init(200) Param The maximum depth of exploded nodes that should appear in a dot dump before switching to a less verbose format. +Wanalyzer-allocation-size +Common Var(warn_analyzer_allocation_size) Init(1) Warning +Warn about code paths in which a pointer to a buffer is assigned to an incompatible type. + Wanalyzer-double-fclose Common Var(warn_analyzer_double_fclose) Init(1) Warning Warn about code paths in which a stdio FILE can be closed more than once. diff --git a/gcc/analyzer/checker-path.cc b/gcc/analyzer/checker-path.cc index 0133dc9..953e192 100644 --- a/gcc/analyzer/checker-path.cc +++ b/gcc/analyzer/checker-path.cc @@ -302,8 +302,17 @@ region_creation_event::region_creation_event (const region *reg, region_creation_event. */ label_text -region_creation_event::get_desc (bool) const +region_creation_event::get_desc (bool can_colorize) const { + if (m_pending_diagnostic) + { + label_text custom_desc + = m_pending_diagnostic->describe_region_creation_event + (evdesc::region_creation (can_colorize, m_reg)); + if (custom_desc.m_buffer) + return custom_desc; + } + switch (m_reg->get_memory_space ()) { default: diff --git a/gcc/analyzer/checker-path.h b/gcc/analyzer/checker-path.h index 24decf5..8e48d8a 100644 --- a/gcc/analyzer/checker-path.h +++ b/gcc/analyzer/checker-path.h @@ -219,7 +219,7 @@ public: region_creation_event (const region *reg, location_t loc, tree fndecl, int depth); - label_text get_desc (bool) const final override; + label_text get_desc (bool can_colorize) const final override; private: const region *m_reg; diff --git a/gcc/analyzer/diagnostic-manager.cc b/gcc/analyzer/diagnostic-manager.cc index 8ea1f617..4adfda1 100644 --- a/gcc/analyzer/diagnostic-manager.cc +++ b/gcc/analyzer/diagnostic-manager.cc @@ -1476,6 +1476,67 @@ diagnostic_manager::build_emission_path (const path_builder &pb, const exploded_edge *eedge = epath.m_edges[i]; add_events_for_eedge (pb, *eedge, emission_path, &interest); } + add_event_on_final_node (epath.get_final_enode (), emission_path, &interest); +} + +/* Emit a region_creation_event when requested on the last statement in + the path. + + If a region_creation_event should be emitted on the last statement of the + path, we need to peek to the successors to get whether the final enode + created a region. +*/ + +void +diagnostic_manager::add_event_on_final_node (const exploded_node *final_enode, + checker_path *emission_path, + interesting_t *interest) const +{ + const program_point &src_point = final_enode->get_point (); + const int src_stack_depth = src_point.get_stack_depth (); + const program_state &src_state = final_enode->get_state (); + const region_model *src_model = src_state.m_region_model; + + unsigned j; + exploded_edge *e; + FOR_EACH_VEC_ELT (final_enode->m_succs, j, e) + { + exploded_node *dst = e->m_dest; + const program_state &dst_state = dst->get_state (); + const region_model *dst_model = dst_state.m_region_model; + if (src_model->get_dynamic_extents () + != dst_model->get_dynamic_extents ()) + { + unsigned i; + const region *reg; + bool emitted = false; + FOR_EACH_VEC_ELT (interest->m_region_creation, i, reg) + { + const region *base_reg = reg->get_base_region (); + const svalue *old_extents + = src_model->get_dynamic_extents (base_reg); + const svalue *new_extents + = dst_model->get_dynamic_extents (base_reg); + if (old_extents == NULL && new_extents != NULL) + switch (base_reg->get_kind ()) + { + default: + break; + case RK_HEAP_ALLOCATED: + case RK_ALLOCA: + emission_path->add_region_creation_event + (reg, + src_point.get_location (), + src_point.get_fndecl (), + src_stack_depth); + emitted = true; + break; + } + } + if (emitted) + break; + } + } } /* Subclass of state_change_visitor that creates state_change_event diff --git a/gcc/analyzer/diagnostic-manager.h b/gcc/analyzer/diagnostic-manager.h index b9bb7c8..266eed8 100644 --- a/gcc/analyzer/diagnostic-manager.h +++ b/gcc/analyzer/diagnostic-manager.h @@ -149,6 +149,10 @@ private: const exploded_path &epath, checker_path *emission_path) const; + void add_event_on_final_node (const exploded_node *final_enode, + checker_path *emission_path, + interesting_t *interest) const; + void add_events_for_eedge (const path_builder &pb, const exploded_edge &eedge, checker_path *emission_path, diff --git a/gcc/analyzer/pending-diagnostic.h b/gcc/analyzer/pending-diagnostic.h index 9e1c656..4ea469e 100644 --- a/gcc/analyzer/pending-diagnostic.h +++ b/gcc/analyzer/pending-diagnostic.h @@ -58,6 +58,17 @@ struct event_desc bool m_colorize; }; +/* For use by pending_diagnostic::describe_region_creation. */ + +struct region_creation : public event_desc +{ + region_creation (bool colorize, const region *reg) + : event_desc (colorize), m_reg (reg) + {} + + const region *m_reg; +}; + /* For use by pending_diagnostic::describe_state_change. */ struct state_change : public event_desc @@ -215,6 +226,15 @@ class pending_diagnostic description; NULL otherwise (falling back on a more generic description). */ + /* Precision-of-wording vfunc for describing a region creation event + triggered by the mark_interesting_stuff vfunc. */ + virtual label_text + describe_region_creation_event (const evdesc::region_creation &) + { + /* Default no-op implementation. */ + return label_text (); + } + /* Precision-of-wording vfunc for describing a critical state change within the diagnostic_path. diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc index 5bd5dc7..5d93932 100644 --- a/gcc/analyzer/region-model.cc +++ b/gcc/analyzer/region-model.cc @@ -73,6 +73,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-operands.h" #include "ssa-iterators.h" #include "calls.h" +#include "is-a.h" #if ENABLE_ANALYZER @@ -2799,6 +2800,373 @@ region_model::check_region_for_read (const region *src_reg, check_region_access (src_reg, DIR_READ, ctxt); } +/* Concrete subclass for casts of pointers that lead to trailing bytes. */ + +class dubious_allocation_size +: public pending_diagnostic_subclass +{ +public: + dubious_allocation_size (const region *lhs, const region *rhs) + : m_lhs (lhs), m_rhs (rhs), m_expr (NULL_TREE) + {} + + dubious_allocation_size (const region *lhs, const region *rhs, + tree expr) + : m_lhs (lhs), m_rhs (rhs), m_expr (expr) + {} + + const char *get_kind () const final override + { + return "dubious_allocation_size"; + } + + bool operator== (const dubious_allocation_size &other) const + { + return m_lhs == other.m_lhs && m_rhs == other.m_rhs + && pending_diagnostic::same_tree_p (m_expr, other.m_expr); + } + + int get_controlling_option () const final override + { + return OPT_Wanalyzer_allocation_size; + } + + bool emit (rich_location *rich_loc) final override + { + diagnostic_metadata m; + m.add_cwe (131); + + return warning_meta (rich_loc, m, get_controlling_option (), + "allocated buffer size is not a multiple of the pointee's size"); + } + + label_text + describe_region_creation_event (const evdesc::region_creation &ev) final + override + { + m_allocation_event = &ev; + if (m_expr) + { + if (TREE_CODE (m_expr) == INTEGER_CST) + return ev.formatted_print ("allocated %E bytes here", m_expr); + else + return ev.formatted_print ("allocated %qE bytes here", m_expr); + } + + return ev.formatted_print ("allocated here"); + } + + label_text describe_final_event (const evdesc::final_event &ev) final + override + { + tree pointee_type = TREE_TYPE (m_lhs->get_type ()); + if (m_allocation_event) + /* Fallback: Typically, we should always + see an m_allocation_event before. */ + return ev.formatted_print ("assigned to %qT here;" + " % is %qE", + m_lhs->get_type (), pointee_type, + size_in_bytes (pointee_type)); + + if (m_expr) + { + if (TREE_CODE (m_expr) == INTEGER_CST) + return ev.formatted_print ("allocated %E bytes and assigned to" + " %qT here; % is %qE", + m_expr, m_lhs->get_type (), pointee_type, + size_in_bytes (pointee_type)); + else + return ev.formatted_print ("allocated %qE bytes and assigned to" + " %qT here; % is %qE", + m_expr, m_lhs->get_type (), pointee_type, + size_in_bytes (pointee_type)); + } + + return ev.formatted_print ("allocated and assigned to %qT here;" + " % is %qE", + m_lhs->get_type (), pointee_type, + size_in_bytes (pointee_type)); + } + + void mark_interesting_stuff (interesting_t *interest) final override + { + interest->add_region_creation (m_rhs); + } + +private: + const region *m_lhs; + const region *m_rhs; + const tree m_expr; + const evdesc::region_creation *m_allocation_event; +}; + +/* Return true on dubious allocation sizes for constant sizes. */ + +static bool +capacity_compatible_with_type (tree cst, tree pointee_size_tree, + bool is_struct) +{ + gcc_assert (TREE_CODE (cst) == INTEGER_CST); + gcc_assert (TREE_CODE (pointee_size_tree) == INTEGER_CST); + + unsigned HOST_WIDE_INT pointee_size = TREE_INT_CST_LOW (pointee_size_tree); + unsigned HOST_WIDE_INT alloc_size = TREE_INT_CST_LOW (cst); + + if (is_struct) + return alloc_size >= pointee_size; + return alloc_size % pointee_size == 0; +} + +static bool +capacity_compatible_with_type (tree cst, tree pointee_size_tree) +{ + return capacity_compatible_with_type (cst, pointee_size_tree, false); +} + +/* Checks whether SVAL could be a multiple of SIZE_CST. + + It works by visiting all svalues inside SVAL until it reaches + atomic nodes. From those, it goes back up again and adds each + node that might be a multiple of SIZE_CST to the RESULT_SET. */ + +class size_visitor : public visitor +{ +public: + size_visitor (tree size_cst, const svalue *sval, constraint_manager *cm) + : m_size_cst (size_cst), m_sval (sval), m_cm (cm) + { + sval->accept (this); + } + + bool get_result () + { + return result_set.contains (m_sval); + } + + void visit_constant_svalue (const constant_svalue *sval) final override + { + if (capacity_compatible_with_type (sval->get_constant (), m_size_cst)) + result_set.add (sval); + } + + void visit_unknown_svalue (const unknown_svalue *sval ATTRIBUTE_UNUSED) + final override + { + result_set.add (sval); + } + + void visit_poisoned_svalue (const poisoned_svalue *sval ATTRIBUTE_UNUSED) + final override + { + result_set.add (sval); + } + + void visit_unaryop_svalue (const unaryop_svalue *sval) + { + const svalue *arg = sval->get_arg (); + if (result_set.contains (arg)) + result_set.add (sval); + } + + void visit_binop_svalue (const binop_svalue *sval) final override + { + const svalue *arg0 = sval->get_arg0 (); + const svalue *arg1 = sval->get_arg1 (); + + if (sval->get_op () == MULT_EXPR) + { + if (result_set.contains (arg0) || result_set.contains (arg1)) + result_set.add (sval); + } + else + { + if (result_set.contains (arg0) && result_set.contains (arg1)) + result_set.add (sval); + } + } + + void visit_repeated_svalue (const repeated_svalue *sval) + { + sval->get_inner_svalue ()->accept (this); + if (result_set.contains (sval->get_inner_svalue ())) + result_set.add (sval); + } + + void visit_unmergeable_svalue (const unmergeable_svalue *sval) final override + { + sval->get_arg ()->accept (this); + if (result_set.contains (sval->get_arg ())) + result_set.add (sval); + } + + void visit_widening_svalue (const widening_svalue *sval) final override + { + const svalue *base = sval->get_base_svalue (); + const svalue *iter = sval->get_iter_svalue (); + + if (result_set.contains (base) && result_set.contains (iter)) + result_set.add (sval); + } + + void visit_conjured_svalue (const conjured_svalue *sval ATTRIBUTE_UNUSED) + final override + { + equiv_class_id id (-1); + if (m_cm->get_equiv_class_by_svalue (sval, &id)) + { + if (tree cst_val = id.get_obj (*m_cm).get_any_constant ()) + { + if (capacity_compatible_with_type (cst_val, m_size_cst)) + result_set.add (sval); + } + else + { + result_set.add (sval); + } + } + } + + void visit_asm_output_svalue (const asm_output_svalue *sval ATTRIBUTE_UNUSED) + final override + { + result_set.add (sval); + } + + void visit_const_fn_result_svalue (const const_fn_result_svalue + *sval ATTRIBUTE_UNUSED) final override + { + result_set.add (sval); + } + +private: + tree m_size_cst; + const svalue *m_sval; + constraint_manager *m_cm; + svalue_set result_set; /* Used as a mapping of svalue*->bool. */ +}; + +/* Return true if a struct or union either uses the inheritance pattern, + where the first field is a base struct, or the flexible array member + pattern, where the last field is an array without a specified size. */ + +static bool +struct_or_union_with_inheritance_p (tree struc) +{ + tree iter = TYPE_FIELDS (struc); + if (iter == NULL_TREE) + return false; + if (RECORD_OR_UNION_TYPE_P (TREE_TYPE (iter))) + return true; + + tree last_field; + while (iter != NULL_TREE) + { + last_field = iter; + iter = DECL_CHAIN (iter); + } + + if (last_field != NULL_TREE + && TREE_CODE (TREE_TYPE (last_field)) == ARRAY_TYPE) + return true; + + return false; +} + +/* Return true if the lhs and rhs of an assignment have different types. */ + +static bool +is_any_cast_p (const gimple *stmt) +{ + if (const gassign *assign = dyn_cast(stmt)) + return gimple_assign_cast_p (assign) + || !pending_diagnostic::same_tree_p ( + TREE_TYPE (gimple_assign_lhs (assign)), + TREE_TYPE (gimple_assign_rhs1 (assign))); + else if (const gcall *call = dyn_cast(stmt)) + { + tree lhs = gimple_call_lhs (call); + return lhs != NULL_TREE && !pending_diagnostic::same_tree_p ( + TREE_TYPE (gimple_call_lhs (call)), + gimple_call_return_type (call)); + } + + return false; +} + +/* On pointer assignments, check whether the buffer size of + RHS_SVAL is compatible with the type of the LHS_REG. + Use a non-null CTXT to report allocation size warnings. */ + +void +region_model::check_region_size (const region *lhs_reg, const svalue *rhs_sval, + region_model_context *ctxt) const +{ + if (!ctxt || ctxt->get_stmt () == NULL) + return; + /* Only report warnings on assignments that actually change the type. */ + if (!is_any_cast_p (ctxt->get_stmt ())) + return; + + const region_svalue *reg_sval = dyn_cast (rhs_sval); + if (!reg_sval) + return; + + tree pointer_type = lhs_reg->get_type (); + if (pointer_type == NULL_TREE || !POINTER_TYPE_P (pointer_type)) + return; + + tree pointee_type = TREE_TYPE (pointer_type); + /* Make sure that the type on the left-hand size actually has a size. */ + if (pointee_type == NULL_TREE || VOID_TYPE_P (pointee_type) + || TYPE_SIZE_UNIT (pointee_type) == NULL_TREE) + return; + + /* Bail out early on pointers to structs where we can + not deduce whether the buffer size is compatible. */ + bool is_struct = RECORD_OR_UNION_TYPE_P (pointee_type); + if (is_struct && struct_or_union_with_inheritance_p (pointee_type)) + return; + + tree pointee_size_tree = size_in_bytes (pointee_type); + /* We give up if the type size is not known at compile-time or the + type size is always compatible regardless of the buffer size. */ + if (TREE_CODE (pointee_size_tree) != INTEGER_CST + || integer_zerop (pointee_size_tree) + || integer_onep (pointee_size_tree)) + return; + + const region *rhs_reg = reg_sval->get_pointee (); + const svalue *capacity = get_capacity (rhs_reg); + switch (capacity->get_kind ()) + { + case svalue_kind::SK_CONSTANT: + { + const constant_svalue *cst_cap_sval + = as_a (capacity); + tree cst_cap = cst_cap_sval->get_constant (); + if (!capacity_compatible_with_type (cst_cap, pointee_size_tree, + is_struct)) + ctxt->warn (new dubious_allocation_size (lhs_reg, rhs_reg, + cst_cap)); + } + break; + default: + { + if (!is_struct) + { + size_visitor v (pointee_size_tree, capacity, m_constraints); + if (!v.get_result ()) + { + tree expr = get_representative_tree (capacity); + ctxt->warn (new dubious_allocation_size (lhs_reg, rhs_reg, + expr)); + } + } + break; + } + } +} + /* Set the value of the region given by LHS_REG to the value given by RHS_SVAL. Use CTXT to report any warnings associated with writing to LHS_REG. */ @@ -2810,6 +3178,8 @@ region_model::set_value (const region *lhs_reg, const svalue *rhs_sval, gcc_assert (lhs_reg); gcc_assert (rhs_sval); + check_region_size (lhs_reg, rhs_sval, ctxt); + check_region_for_write (lhs_reg, ctxt); m_store.set_value (m_mgr->get_store_manager(), lhs_reg, rhs_sval, diff --git a/gcc/analyzer/region-model.h b/gcc/analyzer/region-model.h index 129aad2..6dda43f 100644 --- a/gcc/analyzer/region-model.h +++ b/gcc/analyzer/region-model.h @@ -865,6 +865,8 @@ class region_model region_model_context *ctxt) const; void check_region_for_read (const region *src_reg, region_model_context *ctxt) const; + void check_region_size (const region *lhs_reg, const svalue *rhs_sval, + region_model_context *ctxt) const; void check_call_args (const call_details &cd) const; void check_external_function_for_access_attr (const gcall *call, diff --git a/gcc/analyzer/svalue.cc b/gcc/analyzer/svalue.cc index 2f91494..7bad3ce 100644 --- a/gcc/analyzer/svalue.cc +++ b/gcc/analyzer/svalue.cc @@ -732,8 +732,8 @@ region_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void region_svalue::accept (visitor *v) const { - v->visit_region_svalue (this); m_reg->accept (v); + v->visit_region_svalue (this); } /* Implementation of svalue::implicitly_live_p vfunc for region_svalue. */ @@ -1031,8 +1031,8 @@ initial_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void initial_svalue::accept (visitor *v) const { - v->visit_initial_svalue (this); m_reg->accept (v); + v->visit_initial_svalue (this); } /* Implementation of svalue::implicitly_live_p vfunc for initial_svalue. */ @@ -1123,8 +1123,8 @@ unaryop_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void unaryop_svalue::accept (visitor *v) const { - v->visit_unaryop_svalue (this); m_arg->accept (v); + v->visit_unaryop_svalue (this); } /* Implementation of svalue::implicitly_live_p vfunc for unaryop_svalue. */ @@ -1225,9 +1225,9 @@ binop_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void binop_svalue::accept (visitor *v) const { - v->visit_binop_svalue (this); m_arg0->accept (v); m_arg1->accept (v); + v->visit_binop_svalue (this); } /* Implementation of svalue::implicitly_live_p vfunc for binop_svalue. */ @@ -1283,9 +1283,9 @@ sub_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void sub_svalue::accept (visitor *v) const { - v->visit_sub_svalue (this); m_parent_svalue->accept (v); m_subregion->accept (v); + v->visit_sub_svalue (this); } /* Implementation of svalue::implicitly_live_p vfunc for sub_svalue. */ @@ -1352,8 +1352,8 @@ repeated_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void repeated_svalue::accept (visitor *v) const { - v->visit_repeated_svalue (this); m_inner_svalue->accept (v); + v->visit_repeated_svalue (this); } /* Implementation of svalue::all_zeroes_p for repeated_svalue. */ @@ -1494,8 +1494,8 @@ bits_within_svalue::maybe_fold_bits_within (tree type, void bits_within_svalue::accept (visitor *v) const { - v->visit_bits_within_svalue (this); m_inner_svalue->accept (v); + v->visit_bits_within_svalue (this); } /* Implementation of svalue::implicitly_live_p vfunc for bits_within_svalue. */ @@ -1544,9 +1544,9 @@ widening_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void widening_svalue::accept (visitor *v) const { - v->visit_widening_svalue (this); m_base_sval->accept (v); m_iter_sval->accept (v); + v->visit_widening_svalue (this); } /* Attempt to determine in which direction this value is changing @@ -1711,8 +1711,8 @@ unmergeable_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void unmergeable_svalue::accept (visitor *v) const { - v->visit_unmergeable_svalue (this); m_arg->accept (v); + v->visit_unmergeable_svalue (this); } /* Implementation of svalue::implicitly_live_p vfunc for unmergeable_svalue. */ @@ -1776,13 +1776,13 @@ compound_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void compound_svalue::accept (visitor *v) const { - v->visit_compound_svalue (this); for (binding_map::iterator_t iter = m_map.begin (); iter != m_map.end (); ++iter) { //(*iter).first.accept (v); (*iter).second->accept (v); } + v->visit_compound_svalue (this); } /* Calculate what the complexity of a compound_svalue instance for MAP @@ -1903,8 +1903,8 @@ conjured_svalue::dump_to_pp (pretty_printer *pp, bool simple) const void conjured_svalue::accept (visitor *v) const { - v->visit_conjured_svalue (this); m_id_reg->accept (v); + v->visit_conjured_svalue (this); } /* class asm_output_svalue : public svalue. */ @@ -1968,9 +1968,9 @@ asm_output_svalue::input_idx_to_asm_idx (unsigned input_idx) const void asm_output_svalue::accept (visitor *v) const { - v->visit_asm_output_svalue (this); for (unsigned i = 0; i < m_num_inputs; i++) m_input_arr[i]->accept (v); + v->visit_asm_output_svalue (this); } /* class const_fn_result_svalue : public svalue. */ @@ -2021,9 +2021,9 @@ const_fn_result_svalue::dump_input (pretty_printer *pp, void const_fn_result_svalue::accept (visitor *v) const { - v->visit_const_fn_result_svalue (this); for (unsigned i = 0; i < m_num_inputs; i++) m_input_arr[i]->accept (v); + v->visit_const_fn_result_svalue (this); } } // namespace ana diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d86e45a..89c8dce 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -9739,6 +9739,7 @@ This analysis is much more expensive than other GCC warnings. Enabling this option effectively enables the following warnings: @gccoptlist{ @gol +-Wanalyzer-allocation-size @gol -Wanalyzer-double-fclose @gol -Wanalyzer-double-free @gol -Wanalyzer-exposure-through-output-file @gol @@ -9791,6 +9792,19 @@ By default, the analysis silently stops if the code is too complicated for the analyzer to fully explore and it reaches an internal limit. The @option{-Wanalyzer-too-complex} option warns if this occurs. +@item -Wno-analyzer-allocation-size +@opindex Wanalyzer-allocation-size +@opindex Wno-analyzer-allocation-size +This warning requires @option{-fanalyzer}, which enables it; use +@option{-Wno-analyzer-allocation-size} +to disable it. + +This diagnostic warns for paths through the code in which a pointer to +a buffer is assigned to point at a buffer with a size that is not a +multiple of @code{sizeof (*pointer)}. + +See @url{https://cwe.mitre.org/data/definitions/131.html, CWE-131: Incorrect Calculation of Buffer Size}. + @item -Wno-analyzer-double-fclose @opindex Wanalyzer-double-fclose @opindex Wno-analyzer-double-fclose diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c new file mode 100644 index 0000000..4fc2bf7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c @@ -0,0 +1,116 @@ +#include +#include + +/* Tests with constant buffer sizes. */ + +void test_1 (void) +{ + short *ptr = malloc (21 * sizeof (short)); + free (ptr); +} + +void test_2 (void) +{ + int *ptr = malloc (21 * sizeof (short)); /* { dg-line malloc2 } */ + free (ptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ + /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc2 } */ +} + +void test_3 (void) +{ + void *ptr = malloc (21 * sizeof (short)); + short *sptr = (short *)ptr; + free (sptr); +} + +void test_4 (void) +{ + void *ptr = malloc (21 * sizeof (short)); /* { dg-message "\\d+ bytes" } */ + int *iptr = (int *)ptr; /* { dg-line assign4 } */ + free (iptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign4 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign4 } */ +} + +void test_5 (void) +{ + int user_input; + scanf("%i", &user_input); + int n; + if (user_input == 0) + n = 21 * sizeof (short); + else + n = 42 * sizeof (short); + void *ptr = malloc (n); + short *sptr = (short *)ptr; + free (sptr); +} + +void test_6 (void) +{ + int user_input; + scanf("%i", &user_input); + int n; + if (user_input == 0) + n = 21 * sizeof (short); + else + n = 42 * sizeof (short); + void *ptr = malloc (n); /* { dg-message "" "note" } */ + /* ^^^ on widening_svalues no expr is returned + by get_representative_tree at the moment. */ + int *iptr = (int *)ptr; /* { dg-line assign6 } */ + free (iptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign6 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign6 } */ +} + +void test_7 (void) +{ + int user_input; + scanf("%i", &user_input); + int n; + if (user_input == 0) + n = 1; + else if (user_input == 2) + n = 5; + else + n = 7; + /* n is an unknown_svalue at this point. */ + void *ptr = malloc (n); + int *iptr = (int *)ptr; + free (iptr); +} + +void *create_buffer (int n) +{ + return malloc(n); +} + +void test_8 (void) +{ + int *buf = create_buffer(4 * sizeof (int)); + free (buf); +} + +void test_9 (void) +{ + /* FIXME: At the moment, region_model::set_value (lhs, ) + is called at the src_node of the return edge. This edge has no stmts + associated with it, leading to a rejection of the warning inside + impl_region_model_context::warn. To ensure that the indentation + in the diagnostic is right, the warning has to be emitted on an EN + that is after the return edge. */ + int *buf = create_buffer(42); /* { dg-warning "" "" { xfail *-*-* } } */ + free (buf); +} + +void test_10 (int n) +{ + char *ptr = malloc (7 * n); + free (ptr); +} \ No newline at end of file diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c new file mode 100644 index 0000000..37bbbac --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c @@ -0,0 +1,155 @@ +#include +#include + +/* Tests with symbolic buffer sizes. */ + +void test_1 (int n) +{ + short *ptr = malloc (n * sizeof (short)); + free (ptr); +} + +void test_2 (int n) +{ + int *ptr = malloc (n * sizeof (short)); /* { dg-line malloc2 } */ + free (ptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ + /* { dg-message "'\[a-z0-9\\*\\(\\)\\s\]*' bytes" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc2 } */ +} + +void test_3 (int n) +{ + void *ptr = malloc (n * sizeof (short)); + short *sptr = (short *)ptr; + free (sptr); +} + +void test_4 (int n) +{ + void *ptr = malloc (n * sizeof (short)); /* { dg-message "'\[a-z0-9\\*\\(\\)\\s\]*'" "note" } */ + int *iptr = (int *)ptr; /* { dg-line assign4 } */ + free (iptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign4 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign4 } */ +} + +void test_5 (void) +{ + int user_input; + scanf("%i", &user_input); + int n; + if (user_input == 0) + n = 3 * user_input * sizeof (short); + else + n = 5 * user_input * sizeof (short); + void *ptr = malloc (n); + short *sptr = (short *)ptr; + free (sptr); +} + +void test_6 (void) +{ + int user_input; + scanf("%i", &user_input); + int n; + if (user_input == 0) + n = user_input; + else if (user_input == 2) + n = user_input * 3; + else + n = user_input * 5; + /* n is an unknown_svalue at this point. */ + void *ptr = malloc (n); + int *iptr = (int *)ptr; + free (iptr); +} + +void *create_buffer(int n) +{ + return malloc(n); +} + +void test_7(int n) +{ + int *buf = create_buffer(n * sizeof (int)); + free (buf); +} + +void test_8(int n) +{ + /* FIXME: At the moment, region_model::set_value (lhs, ) + is called at the src_node of the return edge. This edge has no stmts + associated with it, leading to a rejection of the warning inside + impl_region_model_context::warn. To ensure that the indentation + in the diagnostic is right, the warning has to be emitted on an EN + that is after the return edge. */ + int *buf = create_buffer(n * sizeof(short)); /* { dg-warning "" "" { xfail *-*-* } } */ + free (buf); +} + +void test_9 (void) +{ + int n; + scanf("%i", &n); + /* n is a conjured_svalue. */ + void *ptr = malloc (n); /* { dg-message "'n' bytes" "note" } */ + int *iptr = (int *)ptr; /* { dg-line assign9 } */ + free (iptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign9 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign9 } */ +} + +void test_11 (void) +{ + int n; + scanf("%i", &n); + void *ptr = malloc (n); + if (n == sizeof (int)) + { + /* n is a conjured_svalue but guarded such that we + know the value is a multiple of sizeof (*iptr). */ + int *iptr = (int *)ptr; + free (iptr); + } + else + free (ptr); +} + +void test_12 (void) +{ + int n; + scanf("%i", &n); + void *ptr = malloc (n); /* { dg-message "'n' bytes" } */ + if (n == 5) + { + /* n is a conjured_svalue but guarded such that we + know the value isn't a multiple of sizeof (*iptr). */ + int *iptr = (int *)ptr; /* { dg-line assign12 } */ + free (iptr); + } + else + free (ptr); + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign12 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign12 } */ +} + +void test_13 (void) +{ + int n; + scanf("%i", &n); + void *ptr = malloc (n); + if (n == n * n) + { + /* n is a conjured_svalue but guarded such that we don't have an + equivalence class for it. In such cases, we assume that the + condition ensures that the value is okay. */ + int *iptr = (int *)ptr; + free (iptr); + } + else + free (ptr); +} diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c new file mode 100644 index 0000000..fdc1c56 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c @@ -0,0 +1,45 @@ +#include +#include + +/* CWE-131 example 5 */ +void test_1 (void) +{ + int *id_sequence = (int *) malloc (3); /* { dg-line malloc1 } */ + if (id_sequence == NULL) exit (1); + + id_sequence[0] = 13579; + id_sequence[1] = 24680; + id_sequence[2] = 97531; + + free (id_sequence); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc1 } */ + /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc1 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc1 } */ +} + +void test_2 (void) +{ + int *ptr = malloc (10 + sizeof(int)); /* { dg-line malloc2 } */ + free (ptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ + /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc2 } */ +} + +void test_3 (int n) +{ + int *ptr = malloc (n + sizeof (int)); /* { dg-line malloc3 } */ + free (ptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc3 } */ + /* { dg-message "'\[a-z0-9\\+\\(\\)\\s\]*' bytes" "note" { target *-*-* } malloc3 } */ + /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc3 } */ +} + +void test_4 (int n, int m) +{ + int *ptr = malloc ((n + m) * sizeof (int)); + free (ptr); +} diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c new file mode 100644 index 0000000..e475c15 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c @@ -0,0 +1,60 @@ +#include + +/* Tests related to structs. */ + +struct base { + int i; +}; + +struct sub { + struct base b; + int j; +}; + +struct var_len { + int i; + char arr[]; +}; + + +void test_1 (void) +{ + struct base *ptr = malloc (5 * sizeof (struct base)); + free (ptr); +} + +void test_2 (void) +{ + long *ptr = malloc (5 * sizeof (struct base)); /* { dg-line malloc2 } */ + free (ptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ + /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'long (int)? \\*' here; 'sizeof \\(long (int)?\\)' is '\\d+'" "note" { target *-*-* } malloc2 } */ +} + +void test_3 (void) +{ + /* Even though 10 bytes is not a multiple of 4, we do not warn to prevent + a false positive in case s is the base struct of a struct inheritance. */ + struct base *ptr = malloc (10); + free (ptr); +} + +void test_4 (void) +{ + struct var_len *ptr = malloc (10); + free (ptr); +} + +void test_5 (void) +{ + /* For constant sizes, we warn if the buffer + is too small to hold a single struct. */ + struct base *ptr = malloc (2); /* { dg-line malloc5 } */ + free (ptr); + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc5 } */ + /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc5 } */ + /* { dg-message "'struct base \\*' here; 'sizeof \\(struct base\\)' is '\\d+'" "note" { target *-*-* } malloc5 } */ +} diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c new file mode 100644 index 0000000..ae7e107 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c @@ -0,0 +1,36 @@ +#include +#include + +/* Tests related to statically allocated buffers. */ + +typedef struct a { + short s; +} a; + +int *test_1 (void) +{ + a A; /* { dg-message "\\d+ bytes" "note" } */ + A.s = 1; + int *ptr = (int *) &A; /* { dg-line assign1 } */ + return ptr; + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign1 } */ + /* { dg-message "assigned to 'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign1 } */ +} + +int *test2 (void) +{ + char arr[sizeof (int)]; + int *ptr = (int *)arr; + return ptr; +} + +int *test3 (void) +{ + char arr[sizeof (short)]; /* { dg-message "\\d+ bytes" "note" } */ + int *ptr = (int *)arr; /* { dg-line assign3 } */ + return ptr; + + /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign3 } */ + /* { dg-message "assigned to 'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign3 } */ +} diff --git a/gcc/testsuite/gcc.dg/analyzer/pr96639.c b/gcc/testsuite/gcc.dg/analyzer/pr96639.c index 02ca3f0..aedf046 100644 --- a/gcc/testsuite/gcc.dg/analyzer/pr96639.c +++ b/gcc/testsuite/gcc.dg/analyzer/pr96639.c @@ -3,7 +3,7 @@ void *calloc (__SIZE_TYPE__, __SIZE_TYPE__); int x7 (void) { - int **md = calloc (1, 1); + int **md = calloc (1, sizeof (void *)); return md[0][0]; /* { dg-warning "possibly-NULL" "unchecked deref" } */ /* { dg-warning "leak of 'md'" "leak" { target *-*-* } .-1 } */ -- cgit v1.1 From 20f0f30522de3cfc7e3cff5069deb737ca4c6049 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 3 Jul 2022 00:16:23 +0000 Subject: Daily bump. --- gcc/ChangeLog | 13 +++++++++++++ gcc/DATESTAMP | 2 +- gcc/analyzer/ChangeLog | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/testsuite/ChangeLog | 18 ++++++++++++++++++ 4 files changed, 81 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33642b6..674004c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2022-07-02 Tim Lange + + PR analyzer/105900 + * doc/invoke.texi: Added Wanalyzer-allocation-size. + +2022-07-02 Immad Mir + + PR analyzer/106003 + * Makefile.in (ANALYZER_OBJS): Add sm-fd.o. + * doc/invoke.texi: Add -Wanalyzer-fd-double-close, -Wanalyzer-fd-leak, + -Wanalyzer-fd-access-mode-mismatch, -Wanalyzer-fd-use-without-check, + -Wanalyzer-fd-use-after-close. + 2022-07-01 Aldy Hernandez * wide-int.h (struct trailing_wide_ints): Add m_num_elements. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index eb05de3..758f2bf 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220702 +20220703 diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog index bf58d57..fa732ab 100644 --- a/gcc/analyzer/ChangeLog +++ b/gcc/analyzer/ChangeLog @@ -1,3 +1,52 @@ +2022-07-02 Tim Lange + + PR analyzer/105900 + * analyzer.opt: Added Wanalyzer-allocation-size. + * checker-path.cc (region_creation_event::get_desc): Added call to new + virtual function pending_diagnostic::describe_region_creation_event. + * checker-path.h: Added region_creation_event::get_desc. + * diagnostic-manager.cc (diagnostic_manager::add_event_on_final_node): + New function. + * diagnostic-manager.h: + Added diagnostic_manager::add_event_on_final_node. + * pending-diagnostic.h (struct region_creation): New event_desc struct. + (pending_diagnostic::describe_region_creation_event): Added virtual + function to overwrite description of a region creation. + * region-model.cc (class dubious_allocation_size): New class. + (capacity_compatible_with_type): New helper function. + (class size_visitor): New class. + (struct_or_union_with_inheritance_p): New helper function. + (is_any_cast_p): New helper function. + (region_model::check_region_size): New function. + (region_model::set_value): Added call to + region_model::check_region_size. + * region-model.h (class region_model): New function check_region_size. + * svalue.cc (region_svalue::accept): Changed to post-order traversal. + (initial_svalue::accept): Likewise. + (unaryop_svalue::accept): Likewise. + (binop_svalue::accept): Likewise. + (sub_svalue::accept): Likewise. + (repeated_svalue::accept): Likewise. + (bits_within_svalue::accept): Likewise. + (widening_svalue::accept): Likewise. + (unmergeable_svalue::accept): Likewise. + (compound_svalue::accept): Likewise. + (conjured_svalue::accept): Likewise. + (asm_output_svalue::accept): Likewise. + (const_fn_result_svalue::accept): Likewise. + +2022-07-02 Immad Mir + + PR analyzer/106003 + * analyzer.opt (Wanalyzer-fd-leak): New option. + (Wanalyzer-fd-access-mode-mismatch): New option. + (Wanalyzer-fd-use-without-check): New option. + (Wanalyzer-fd-double-close): New option. + (Wanalyzer-fd-use-after-close): New option. + * sm.h (make_fd_state_machine): New decl. + * sm.cc (make_checkers): Call make_fd_state_machine. + * sm-fd.cc: New file. + 2022-06-24 David Malcolm * call-string.cc: Add includes of "analyzer/analyzer.h" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 04a986e..14cbed3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,21 @@ +2022-07-02 Tim Lange + + PR analyzer/105900 + * gcc.dg/analyzer/pr96639.c: Changed buffer size to omit warning. + * gcc.dg/analyzer/allocation-size-1.c: New test. + * gcc.dg/analyzer/allocation-size-2.c: New test. + * gcc.dg/analyzer/allocation-size-3.c: New test. + * gcc.dg/analyzer/allocation-size-4.c: New test. + * gcc.dg/analyzer/allocation-size-5.c: New test. + +2022-07-02 Immad Mir + + PR analyzer/106003 + * gcc.dg/analyzer/fd-1.c: New test. + * gcc.dg/analyzer/fd-2.c: New test. + * gcc.dg/analyzer/fd-3.c: New test. + * gcc.dg/analyzer/fd-4.c: New test. + 2022-07-01 Marek Polacek PR c++/105550 -- cgit v1.1 From d86a20ee8bed8840d39ab781c935a411e28fa0b6 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 1 Jul 2022 14:51:45 -0700 Subject: tree-optimization: only DSE trapping insn if -fdelete-dead-exceptions gcc/ChangeLog: * tree-ssa-dse.cc (dse_optimize_stmt): Only delete a trapping statement if -fdelete-dead-exceptions. gcc/testsuite/ChangeLog: * g++.dg/torture/except-1.C: New test. --- gcc/testsuite/g++.dg/torture/except-1.C | 44 +++++++++++++++++++++++++++++++++ gcc/tree-ssa-dse.cc | 3 ++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/torture/except-1.C (limited to 'gcc') diff --git a/gcc/testsuite/g++.dg/torture/except-1.C b/gcc/testsuite/g++.dg/torture/except-1.C new file mode 100644 index 0000000..7050a33 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/except-1.C @@ -0,0 +1,44 @@ +// { dg-do run { target { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } } +// { dg-additional-options "-fexceptions -fnon-call-exceptions -fno-delete-dead-exceptions" } + +#include +#include +#include + +static void +sighandler (int signo, siginfo_t* si, void* uc) +{ + throw (5); +} + +struct S { void *p1, *p2; }; + +struct S v; + +__attribute__ ((noinline)) +int +dosegv () +{ + struct S *p = 0; + struct S s __attribute__((unused)) = *p; + return 0; +} + +int main () +{ + struct sigaction sa; + + memset (&sa, 0, sizeof sa); + sa.sa_sigaction = sighandler; + sigaction (SIGSEGV, &sa, NULL); + sigaction (SIGBUS, &sa, NULL); + + try { + dosegv (); + } + catch (int x) { + return (x != 5); + } + + return 1; +} diff --git a/gcc/tree-ssa-dse.cc b/gcc/tree-ssa-dse.cc index 62efafe..8d1739a 100644 --- a/gcc/tree-ssa-dse.cc +++ b/gcc/tree-ssa-dse.cc @@ -1463,7 +1463,8 @@ dse_optimize_stmt (function *fun, gimple_stmt_iterator *gsi, sbitmap live_bytes) gimple_call_set_lhs (stmt, NULL_TREE); update_stmt (stmt); } - else + else if (!stmt_could_throw_p (fun, stmt) + || fun->can_delete_dead_exceptions) delete_dead_or_redundant_assignment (gsi, "dead", need_eh_cleanup, need_ab_cleanup); } -- cgit v1.1 From b5c3dd3df381896b09fa76b52cd7a49b9b24afb3 Mon Sep 17 00:00:00 2001 From: Tim Lange Date: Sun, 3 Jul 2022 03:22:30 +0200 Subject: Use fixed-width types in allocation size tests The patch changes the types inside the tests for the allocation size checker to fixed-width types of stdint.h to account for different architectures with different type widths. 2022-07-03 Tim Lange gcc/testsuite/ChangeLog: * gcc.dg/analyzer/allocation-size-1.c: Use fixed-length types. * gcc.dg/analyzer/allocation-size-2.c: Likewise. * gcc.dg/analyzer/allocation-size-3.c: Likewise. * gcc.dg/analyzer/allocation-size-4.c: Likewise. * gcc.dg/analyzer/allocation-size-5.c: Likewise. --- gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c | 55 ++++++++--------- gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c | 73 ++++++++++++----------- gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c | 23 +++---- gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c | 15 ++--- gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c | 23 +++---- 5 files changed, 97 insertions(+), 92 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c index 4fc2bf7..4a78a81 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c @@ -1,79 +1,80 @@ #include #include +#include /* Tests with constant buffer sizes. */ void test_1 (void) { - short *ptr = malloc (21 * sizeof (short)); + int16_t *ptr = malloc (21 * sizeof (int16_t)); free (ptr); } void test_2 (void) { - int *ptr = malloc (21 * sizeof (short)); /* { dg-line malloc2 } */ + int32_t *ptr = malloc (21 * sizeof (int16_t)); /* { dg-line malloc2 } */ free (ptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ - /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc2 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc2 } */ + /* { dg-message "42 bytes" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc2 } */ } void test_3 (void) { - void *ptr = malloc (21 * sizeof (short)); - short *sptr = (short *)ptr; + void *ptr = malloc (21 * sizeof (int16_t)); + int16_t *sptr = (int16_t *)ptr; free (sptr); } void test_4 (void) { - void *ptr = malloc (21 * sizeof (short)); /* { dg-message "\\d+ bytes" } */ - int *iptr = (int *)ptr; /* { dg-line assign4 } */ + void *ptr = malloc (21 * sizeof (int16_t)); /* { dg-message "42 bytes" } */ + int32_t *iptr = (int32_t *)ptr; /* { dg-line assign4 } */ free (iptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign4 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign4 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign4 } */ } void test_5 (void) { - int user_input; + int32_t user_input; scanf("%i", &user_input); - int n; + int32_t n; if (user_input == 0) - n = 21 * sizeof (short); + n = 21 * sizeof (int16_t); else - n = 42 * sizeof (short); + n = 42 * sizeof (int16_t); void *ptr = malloc (n); - short *sptr = (short *)ptr; + int16_t *sptr = (int16_t *)ptr; free (sptr); } void test_6 (void) { - int user_input; + int32_t user_input; scanf("%i", &user_input); - int n; + int32_t n; if (user_input == 0) - n = 21 * sizeof (short); + n = 21 * sizeof (int16_t); else - n = 42 * sizeof (short); + n = 42 * sizeof (int16_t); void *ptr = malloc (n); /* { dg-message "" "note" } */ /* ^^^ on widening_svalues no expr is returned by get_representative_tree at the moment. */ - int *iptr = (int *)ptr; /* { dg-line assign6 } */ + int32_t *iptr = (int32_t *)ptr; /* { dg-line assign6 } */ free (iptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign6 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign6 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign6 } */ } void test_7 (void) { - int user_input; + int32_t user_input; scanf("%i", &user_input); - int n; + int32_t n; if (user_input == 0) n = 1; else if (user_input == 2) @@ -82,18 +83,18 @@ void test_7 (void) n = 7; /* n is an unknown_svalue at this point. */ void *ptr = malloc (n); - int *iptr = (int *)ptr; + int32_t *iptr = (int32_t *)ptr; free (iptr); } -void *create_buffer (int n) +void *create_buffer (int32_t n) { return malloc(n); } void test_8 (void) { - int *buf = create_buffer(4 * sizeof (int)); + int32_t *buf = create_buffer(4 * sizeof (int)); free (buf); } @@ -105,11 +106,11 @@ void test_9 (void) impl_region_model_context::warn. To ensure that the indentation in the diagnostic is right, the warning has to be emitted on an EN that is after the return edge. */ - int *buf = create_buffer(42); /* { dg-warning "" "" { xfail *-*-* } } */ + int32_t *buf = create_buffer(42); /* { dg-warning "" "" { xfail *-*-* } } */ free (buf); } -void test_10 (int n) +void test_10 (int32_t n) { char *ptr = malloc (7 * n); free (ptr); diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c index 37bbbac..d541d5e 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c @@ -1,60 +1,61 @@ #include #include +#include /* Tests with symbolic buffer sizes. */ -void test_1 (int n) +void test_1 (int32_t n) { - short *ptr = malloc (n * sizeof (short)); + int16_t *ptr = malloc (n * sizeof (int16_t)); free (ptr); } -void test_2 (int n) +void test_2 (int32_t n) { - int *ptr = malloc (n * sizeof (short)); /* { dg-line malloc2 } */ + int32_t *ptr = malloc (n * sizeof (int16_t)); /* { dg-line malloc2 } */ free (ptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ /* { dg-message "'\[a-z0-9\\*\\(\\)\\s\]*' bytes" "note" { target *-*-* } malloc2 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4" "note" { target *-*-* } malloc2 } */ } -void test_3 (int n) +void test_3 (int32_t n) { - void *ptr = malloc (n * sizeof (short)); - short *sptr = (short *)ptr; + void *ptr = malloc (n * sizeof (int16_t)); + int16_t *sptr = (int16_t *)ptr; free (sptr); } -void test_4 (int n) +void test_4 (int32_t n) { - void *ptr = malloc (n * sizeof (short)); /* { dg-message "'\[a-z0-9\\*\\(\\)\\s\]*'" "note" } */ - int *iptr = (int *)ptr; /* { dg-line assign4 } */ + void *ptr = malloc (n * sizeof (int16_t)); /* { dg-message "'\[a-z0-9\\*\\(\\)\\s\]*'" "note" } */ + int32_t *iptr = (int32_t *)ptr; /* { dg-line assign4 } */ free (iptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign4 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign4 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign4 } */ } void test_5 (void) { - int user_input; + int32_t user_input; scanf("%i", &user_input); - int n; + int32_t n; if (user_input == 0) - n = 3 * user_input * sizeof (short); + n = 3 * user_input * sizeof (int16_t); else - n = 5 * user_input * sizeof (short); + n = 5 * user_input * sizeof (int16_t); void *ptr = malloc (n); - short *sptr = (short *)ptr; + int16_t *sptr = (int16_t *)ptr; free (sptr); } void test_6 (void) { - int user_input; + int32_t user_input; scanf("%i", &user_input); - int n; + int32_t n; if (user_input == 0) n = user_input; else if (user_input == 2) @@ -63,22 +64,22 @@ void test_6 (void) n = user_input * 5; /* n is an unknown_svalue at this point. */ void *ptr = malloc (n); - int *iptr = (int *)ptr; + int32_t *iptr = (int32_t *)ptr; free (iptr); } -void *create_buffer(int n) +void *create_buffer(int32_t n) { return malloc(n); } -void test_7(int n) +void test_7(int32_t n) { - int *buf = create_buffer(n * sizeof (int)); + int32_t *buf = create_buffer(n * sizeof (int32_t)); free (buf); } -void test_8(int n) +void test_8(int32_t n) { /* FIXME: At the moment, region_model::set_value (lhs, ) is called at the src_node of the return edge. This edge has no stmts @@ -86,33 +87,33 @@ void test_8(int n) impl_region_model_context::warn. To ensure that the indentation in the diagnostic is right, the warning has to be emitted on an EN that is after the return edge. */ - int *buf = create_buffer(n * sizeof(short)); /* { dg-warning "" "" { xfail *-*-* } } */ + int32_t *buf = create_buffer(n * sizeof(int16_t)); /* { dg-warning "" "" { xfail *-*-* } } */ free (buf); } void test_9 (void) { - int n; + int32_t n; scanf("%i", &n); /* n is a conjured_svalue. */ void *ptr = malloc (n); /* { dg-message "'n' bytes" "note" } */ - int *iptr = (int *)ptr; /* { dg-line assign9 } */ + int32_t *iptr = (int32_t *)ptr; /* { dg-line assign9 } */ free (iptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign9 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign9 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign9 } */ } void test_11 (void) { - int n; + int32_t n; scanf("%i", &n); void *ptr = malloc (n); - if (n == sizeof (int)) + if (n == sizeof (int32_t)) { /* n is a conjured_svalue but guarded such that we know the value is a multiple of sizeof (*iptr). */ - int *iptr = (int *)ptr; + int32_t *iptr = (int32_t *)ptr; free (iptr); } else @@ -121,25 +122,25 @@ void test_11 (void) void test_12 (void) { - int n; + int32_t n; scanf("%i", &n); void *ptr = malloc (n); /* { dg-message "'n' bytes" } */ if (n == 5) { /* n is a conjured_svalue but guarded such that we know the value isn't a multiple of sizeof (*iptr). */ - int *iptr = (int *)ptr; /* { dg-line assign12 } */ + int32_t *iptr = (int32_t *)ptr; /* { dg-line assign12 } */ free (iptr); } else free (ptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign12 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign12 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign12 } */ } void test_13 (void) { - int n; + int32_t n; scanf("%i", &n); void *ptr = malloc (n); if (n == n * n) @@ -147,7 +148,7 @@ void test_13 (void) /* n is a conjured_svalue but guarded such that we don't have an equivalence class for it. In such cases, we assume that the condition ensures that the value is okay. */ - int *iptr = (int *)ptr; + int32_t *iptr = (int32_t *)ptr; free (iptr); } else diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c index fdc1c56..012dbbe 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c @@ -1,10 +1,11 @@ #include #include +#include /* CWE-131 example 5 */ void test_1 (void) { - int *id_sequence = (int *) malloc (3); /* { dg-line malloc1 } */ + int32_t *id_sequence = (int32_t *) malloc (3); /* { dg-line malloc1 } */ if (id_sequence == NULL) exit (1); id_sequence[0] = 13579; @@ -14,32 +15,32 @@ void test_1 (void) free (id_sequence); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc1 } */ - /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc1 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc1 } */ + /* { dg-message "3 bytes" "note" { target *-*-* } malloc1 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc1 } */ } void test_2 (void) { - int *ptr = malloc (10 + sizeof(int)); /* { dg-line malloc2 } */ + int32_t *ptr = malloc (10 + sizeof(int32_t)); /* { dg-line malloc2 } */ free (ptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ - /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc2 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc2 } */ + /* { dg-message "14 bytes" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc2 } */ } -void test_3 (int n) +void test_3 (int32_t n) { - int *ptr = malloc (n + sizeof (int)); /* { dg-line malloc3 } */ + int32_t *ptr = malloc (n + sizeof (int32_t)); /* { dg-line malloc3 } */ free (ptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc3 } */ /* { dg-message "'\[a-z0-9\\+\\(\\)\\s\]*' bytes" "note" { target *-*-* } malloc3 } */ - /* { dg-message "'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } malloc3 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc3 } */ } -void test_4 (int n, int m) +void test_4 (int32_t n, int32_t m) { - int *ptr = malloc ((n + m) * sizeof (int)); + int32_t *ptr = malloc ((n + m) * sizeof (int32_t)); free (ptr); } diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c index e475c15..90df687 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c @@ -1,18 +1,19 @@ #include +#include /* Tests related to structs. */ struct base { - int i; + int16_t i; }; struct sub { struct base b; - int j; + int16_t j; }; struct var_len { - int i; + int16_t i; char arr[]; }; @@ -25,12 +26,12 @@ void test_1 (void) void test_2 (void) { - long *ptr = malloc (5 * sizeof (struct base)); /* { dg-line malloc2 } */ + int32_t *ptr = malloc (5 * sizeof (struct base)); /* { dg-line malloc2 } */ free (ptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc2 } */ - /* { dg-message "'long (int)? \\*' here; 'sizeof \\(long (int)?\\)' is '\\d+'" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc2 } */ } void test_3 (void) @@ -51,10 +52,10 @@ void test_5 (void) { /* For constant sizes, we warn if the buffer is too small to hold a single struct. */ - struct base *ptr = malloc (2); /* { dg-line malloc5 } */ + struct base *ptr = malloc (1); /* { dg-line malloc5 } */ free (ptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc5 } */ - /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc5 } */ + /* { dg-message "1 bytes" "note" { target *-*-* } malloc5 } */ /* { dg-message "'struct base \\*' here; 'sizeof \\(struct base\\)' is '\\d+'" "note" { target *-*-* } malloc5 } */ } diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c index ae7e107..5b92f19 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c @@ -1,36 +1,37 @@ #include #include +#include /* Tests related to statically allocated buffers. */ typedef struct a { - short s; + int16_t s; } a; -int *test_1 (void) +int32_t *test_1 (void) { a A; /* { dg-message "\\d+ bytes" "note" } */ A.s = 1; - int *ptr = (int *) &A; /* { dg-line assign1 } */ + int32_t *ptr = (int32_t *) &A; /* { dg-line assign1 } */ return ptr; /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign1 } */ - /* { dg-message "assigned to 'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign1 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign1 } */ } -int *test2 (void) +int32_t *test2 (void) { - char arr[sizeof (int)]; - int *ptr = (int *)arr; + char arr[sizeof (int32_t)]; + int32_t *ptr = (int32_t *)arr; return ptr; } -int *test3 (void) +int32_t *test3 (void) { - char arr[sizeof (short)]; /* { dg-message "\\d+ bytes" "note" } */ - int *ptr = (int *)arr; /* { dg-line assign3 } */ + char arr[sizeof (int16_t)]; /* { dg-message "\\d+ bytes" "note" } */ + int32_t *ptr = (int32_t *)arr; /* { dg-line assign3 } */ return ptr; /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign3 } */ - /* { dg-message "assigned to 'int \\*' here; 'sizeof \\(int\\)' is '\\d+'" "note" { target *-*-* } assign3 } */ + /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign3 } */ } -- cgit v1.1 From f150dc1bd11802b70277f0fa209f2d23695a1095 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 2 Jul 2022 16:16:44 +0800 Subject: loongarch: use -mno-check-zero-division as the default for optimized code Integer division by zero is undefined behavior anyway, and there are already many platforms where neither the GCC port and the hardware do anything to trap on division by zero. So any portable program shall not rely on SIGFPE on division by zero, in both theory and practice. As the result, there is no real reason to cost two additional instructions just for the trap on division by zero with a new ISA. One remaining reason to trap on division by zero may be debugging, especially while -fsanitize=integer-divide-by-zero is not implemented for LoongArch yet. To make debugging easier, keep -mcheck-zero-division as the default for -O0 and -Og, but use -mno-check-zero-division as the default for all other optimization levels. Co-authored-by: Lulu Cheng gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_check_zero_div_p): New static function. (loongarch_idiv_insns): Use loongarch_check_zero_div_p instead of TARGET_CHECK_ZERO_DIV. (loongarch_output_division): Likewise. * common/config/loongarch/loongarch-common.cc (TARGET_DEFAULT_TARGET_FLAGS): Remove unneeded hook. * doc/invoke.texi: Update to match the new behavior. gcc/testsuite/ChangeLog: * gcc.c-torture/execute/20101011-1.c (dg-additional-options): add -mcheck-zero-division for LoongArch targets. --- gcc/common/config/loongarch/loongarch-common.cc | 3 --- gcc/config/loongarch/loongarch.cc | 18 +++++++++++++++--- gcc/doc/invoke.texi | 3 ++- gcc/testsuite/gcc.c-torture/execute/20101011-1.c | 1 + 4 files changed, 18 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/common/config/loongarch/loongarch-common.cc b/gcc/common/config/loongarch/loongarch-common.cc index 085d3d9..ed3730f 100644 --- a/gcc/common/config/loongarch/loongarch-common.cc +++ b/gcc/common/config/loongarch/loongarch-common.cc @@ -37,7 +37,4 @@ static const struct default_options loongarch_option_optimization_table[] = { OPT_LEVELS_NONE, 0, NULL, 0 } }; -#undef TARGET_DEFAULT_TARGET_FLAGS -#define TARGET_DEFAULT_TARGET_FLAGS MASK_CHECK_ZERO_DIV - struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index 48d9ccd..d72b256 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -2102,6 +2102,19 @@ loongarch_load_store_insns (rtx mem, rtx_insn *insn) return loongarch_address_insns (XEXP (mem, 0), mode, might_split_p); } +/* Return true if we need to trap on division by zero. */ + +static bool +loongarch_check_zero_div_p (void) +{ + /* if -m[no-]check-zero-division is given explicitly. */ + if (target_flags_explicit & MASK_CHECK_ZERO_DIV) + return TARGET_CHECK_ZERO_DIV; + + /* if not, don't trap for optimized code except -Og. */ + return !optimize || optimize_debug; +} + /* Return the number of instructions needed for an integer division. */ int @@ -2110,7 +2123,7 @@ loongarch_idiv_insns (machine_mode mode ATTRIBUTE_UNUSED) int count; count = 1; - if (TARGET_CHECK_ZERO_DIV) + if (loongarch_check_zero_div_p ()) count += 2; return count; @@ -4051,7 +4064,6 @@ loongarch_do_optimize_block_move_p (void) return !optimize_size; } - /* Expand a QI or HI mode atomic memory operation. GENERATOR contains a pointer to the gen_* function that generates @@ -5263,7 +5275,7 @@ loongarch_output_division (const char *division, rtx *operands) const char *s; s = division; - if (TARGET_CHECK_ZERO_DIV) + if (loongarch_check_zero_div_p ()) { output_asm_insn (s, operands); s = "bne\t%2,%.,1f\n\tbreak\t7\n1:"; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 89c8dce..d5ff101 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -24806,7 +24806,8 @@ Set the cost of branches to roughly @var{n} instructions. @itemx -mno-check-zero-divison @opindex -mcheck-zero-division Trap (do not trap) on integer division by zero. The default is -@option{-mcheck-zero-division}. +@option{-mcheck-zero-division} for @option{-O0} or @option{-Og}, and +@option{-mno-check-zero-division} for other optimization levels. @item -mcond-move-int @itemx -mno-cond-move-int diff --git a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c index 649e168..d2c0f9a 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c @@ -1,6 +1,7 @@ /* { dg-options "-fnon-call-exceptions" } */ /* With -fnon-call-exceptions 0 / 0 should not be eliminated. */ /* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */ +/* { dg-additional-options "-mcheck-zero-division" { target { loongarch*-*-* } } } */ #ifdef SIGNAL_SUPPRESS # define DO_TEST 0 -- cgit v1.1 From a26f3eb26832b33703fcdb0bda3bafb560c7db90 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Fri, 10 Jun 2022 14:59:40 +0200 Subject: Implement class vrange_storage to stream ranges to long term memory. This patch implements a storage class that will be used to stream out ranges to long term storage, initially in SSA_NAME_RANGE_INFO, but it is flexible enough to use with our obstack allocator. For instance, in the future we could use it in the ranger cache to save memory. The current size of range_info_def which is used in SSA_NAME_RANGE_INFO is 16 bytes. With this patch, the size of the slot (irange_storage_slot) will be 24 bytes. But we'll have the ability to be able to store up to 5 pairs of sub-ranges if necessary. If we ever need to save more (say for switches), we could explore a trailing_wide_ints structure with a pointer to the m_len[N] bits as Jakub has suggested. In follow-up patches I will contribute the SSA_NAME_RANGE_INFO changes as well as changes storing the nonzero bits within an irange. For reference, the main interface is rather simple: class vrange_storage { public: vrange_storage (vrange_allocator *alloc) : m_alloc (alloc) { } void *alloc_slot (const vrange &r); void free (void *slot); void get_vrange (const void *slot, vrange &r, tree type); void set_vrange (void *slot, const vrange &r); static bool fits_p (const void *slot, const vrange &r); }; The above class will have the knowledge to stream out the different ranges we support (currently only irange_storage_slot). As has been discussed, the irange storage will use trailing wide ints: class GTY ((variable_size)) irange_storage_slot { // This is the maximum number of wide_int's allowed in the trailing // ints structure, without going over 16 bytes (128 bits) in the // control word that preceeds the HOST_WIDE_INTs in // trailing_wide_ints::m_val[]. static const unsigned MAX_INTS = 12; // Maximum number of range pairs we can handle, considering the // nonzero bits take one wide_int. static const unsigned MAX_PAIRS = (MAX_INTS - 1) / 2; trailing_wide_ints m_ints; }; Tested on x86-64 Linux. gcc/ChangeLog: * Makefile.in (OBJS): Add value-range-storage.o. (GTFILES): Add value-range-storage.h. * gengtype.cc (open_base_files): Add value-range-storage.h. * value-range-storage.cc: New file. * value-range-storage.h: New file. --- gcc/Makefile.in | 2 + gcc/gengtype.cc | 1 + gcc/value-range-storage.cc | 212 +++++++++++++++++++++++++++++++++++++++++++++ gcc/value-range-storage.h | 85 ++++++++++++++++++ 4 files changed, 300 insertions(+) create mode 100644 gcc/value-range-storage.cc create mode 100644 gcc/value-range-storage.h (limited to 'gcc') diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 69ac81a..3ae2370 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1711,6 +1711,7 @@ OBJS = \ value-query.o \ value-range.o \ value-range-equiv.o \ + value-range-storage.o \ value-relation.o \ value-prof.o \ var-tracking.o \ @@ -2719,6 +2720,7 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \ $(srcdir)/tree-ssanames.h \ $(srcdir)/tree-vrp.h \ $(srcdir)/value-range.h \ + $(srcdir)/value-range-storage.h \ $(srcdir)/ipa-prop.h \ $(srcdir)/trans-mem.cc \ $(srcdir)/lto-streamer.h \ diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc index 1967625..4236343 100644 --- a/gcc/gengtype.cc +++ b/gcc/gengtype.cc @@ -1705,6 +1705,7 @@ open_base_files (void) "stmt.h", "expr.h", "alloc-pool.h", "cselib.h", "insn-addr.h", "optabs.h", "libfuncs.h", "debug.h", "internal-fn.h", "gimple-iterator.h", "gimple-fold.h", "value-range.h", + "value-range-storage.h", "tree-eh.h", "gimple-ssa.h", "tree-cfg.h", "tree-vrp.h", "tree-phinodes.h", "ssa-iterators.h", "stringpool.h", "tree-ssanames.h", "tree-ssa-loop.h", "tree-ssa-loop-ivopts.h", diff --git a/gcc/value-range-storage.cc b/gcc/value-range-storage.cc new file mode 100644 index 0000000..ea9b18f --- /dev/null +++ b/gcc/value-range-storage.cc @@ -0,0 +1,212 @@ +/* Support routines for vrange storage. + Copyright (C) 2022 Free Software Foundation, Inc. + Contributed by Aldy Hernandez . + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "backend.h" +#include "tree.h" +#include "gimple.h" +#include "ssa.h" +#include "tree-pretty-print.h" +#include "fold-const.h" +#include "gimple-range.h" +#include "value-range-storage.h" + +// Return a newly allocated slot holding R. + +void * +vrange_storage::alloc_slot (const vrange &r) +{ + gcc_checking_assert (m_alloc); + + if (is_a (r)) + return irange_storage_slot::alloc_slot (*m_alloc, as_a (r)); + + gcc_unreachable (); + return NULL; +} + +// Set SLOT to R. + +void +vrange_storage::set_vrange (void *slot, const vrange &r) +{ + if (is_a (r)) + { + irange_storage_slot *s = static_cast (slot); + gcc_checking_assert (s->fits_p (as_a (r))); + s->set_irange (as_a (r)); + } + else + gcc_unreachable (); +} + +// Restore R from SLOT. TYPE is the type of R. + +void +vrange_storage::get_vrange (const void *slot, vrange &r, tree type) +{ + if (is_a (r)) + { + const irange_storage_slot *s + = static_cast (slot); + s->get_irange (as_a (r), type); + } + else + gcc_unreachable (); +} + +// Return TRUE if SLOT can fit R. + +bool +vrange_storage::fits_p (const void *slot, const vrange &r) +{ + if (is_a (r)) + { + const irange_storage_slot *s + = static_cast (slot); + return s->fits_p (as_a (r)); + } + gcc_unreachable (); + return false; +} + +// Factory that creates a new irange_storage_slot object containing R. +// This is the only way to construct an irange slot as stack creation +// is disallowed. + +irange_storage_slot * +irange_storage_slot::alloc_slot (vrange_allocator &allocator, const irange &r) +{ + size_t size = irange_storage_slot::size (r); + irange_storage_slot *p + = static_cast (allocator.alloc (size)); + new (p) irange_storage_slot (r); + return p; +} + +// Initialize the current slot with R. + +irange_storage_slot::irange_storage_slot (const irange &r) +{ + gcc_checking_assert (!r.undefined_p ()); + + unsigned prec = TYPE_PRECISION (r.type ()); + unsigned n = num_wide_ints_needed (r); + if (n > MAX_INTS) + { + int_range squash (r); + m_ints.set_precision (prec, num_wide_ints_needed (squash)); + set_irange (squash); + } + else + { + m_ints.set_precision (prec, n); + set_irange (r); + } +} + +// Store R into the current slot. + +void +irange_storage_slot::set_irange (const irange &r) +{ + gcc_checking_assert (fits_p (r)); + + //m_ints[0] = r.get_nonzero_bits (); + unsigned pairs = r.num_pairs (); + for (unsigned i = 0; i < pairs; ++i) + { + m_ints[i*2 + 1] = r.lower_bound (i); + m_ints[i*2 + 2] = r.upper_bound (i); + } +} + +// Restore a range of TYPE from the current slot into R. + +void +irange_storage_slot::get_irange (irange &r, tree type) const +{ + gcc_checking_assert (TYPE_PRECISION (type) == m_ints.get_precision ()); + + r.set_undefined (); + unsigned nelements = m_ints.num_elements (); + for (unsigned i = 1; i < nelements; i += 2) + { + int_range<2> tmp (type, m_ints[i], m_ints[i + 1]); + r.union_ (tmp); + } + //r.set_nonzero_bits (get_nonzero_bits ()); +} + +// Return the size in bytes to allocate a slot that can hold R. + +size_t +irange_storage_slot::size (const irange &r) +{ + gcc_checking_assert (!r.undefined_p ()); + + unsigned prec = TYPE_PRECISION (r.type ()); + unsigned n = num_wide_ints_needed (r); + if (n > MAX_INTS) + n = MAX_INTS; + return (sizeof (irange_storage_slot) + + trailing_wide_ints::extra_size (prec, n)); +} + +// Return the number of wide ints needed to represent R. + +unsigned int +irange_storage_slot::num_wide_ints_needed (const irange &r) +{ + return r.num_pairs () * 2 + 1; +} + +// Return TRUE if R fits in the current slot. + +bool +irange_storage_slot::fits_p (const irange &r) const +{ + return m_ints.num_elements () >= num_wide_ints_needed (r); +} + +// Dump the current slot. + +void +irange_storage_slot::dump () const +{ + fprintf (stderr, "raw irange_storage_slot:\n"); + for (unsigned i = 1; i < m_ints.num_elements (); i += 2) + { + m_ints[i].dump (); + m_ints[i + 1].dump (); + } + fprintf (stderr, "NONZERO "); + wide_int nz = get_nonzero_bits (); + nz.dump (); +} + +DEBUG_FUNCTION void +debug (const irange_storage_slot &storage) +{ + storage.dump (); + fprintf (stderr, "\n"); +} diff --git a/gcc/value-range-storage.h b/gcc/value-range-storage.h new file mode 100644 index 0000000..58c5e11 --- /dev/null +++ b/gcc/value-range-storage.h @@ -0,0 +1,85 @@ +/* Support routines for vrange storage. + Copyright (C) 2022 Free Software Foundation, Inc. + Contributed by Aldy Hernandez . + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#ifndef GCC_VALUE_RANGE_STORAGE_H +#define GCC_VALUE_RANGE_STORAGE_H + +// This class is used to allocate chunks of memory that can store +// ranges as memory efficiently as possible. It is meant to be used +// when long term storage of a range is needed. The class can be used +// with any vrange_allocator (i.e. alloca or GC). + +class vrange_storage +{ +public: + vrange_storage (vrange_allocator *alloc) : m_alloc (alloc) { } + void *alloc_slot (const vrange &r); + void free (void *slot) { m_alloc->free (slot); } + void get_vrange (const void *slot, vrange &r, tree type); + void set_vrange (void *slot, const vrange &r); + static bool fits_p (const void *slot, const vrange &r); +private: + DISABLE_COPY_AND_ASSIGN (vrange_storage); + vrange_allocator *m_alloc; +}; + + +// INTERNAL USE ONLY. The remaining interfaces are only exposed for +// the GTY machinery to play nice with tree_ssa_name. + +// A chunk of memory pointing to an irange storage. + +class GTY ((variable_size)) irange_storage_slot +{ +public: + static irange_storage_slot *alloc_slot (vrange_allocator &, const irange &r); + void set_irange (const irange &r); + void get_irange (irange &r, tree type) const; + wide_int get_nonzero_bits () const { return m_ints[0]; } + bool fits_p (const irange &r) const; + static size_t size (const irange &r); + void dump () const; +private: + DISABLE_COPY_AND_ASSIGN (irange_storage_slot); + friend void gt_ggc_mx_irange_storage_slot (void *); + friend void gt_pch_p_19irange_storage_slot (void *, void *, + gt_pointer_operator, void *); + friend void gt_pch_nx_irange_storage_slot (void *); + + // This is the maximum number of wide_int's allowed in the trailing + // ints structure, without going over 16 bytes (128 bits) in the + // control word that preceeds the HOST_WIDE_INTs in + // trailing_wide_ints::m_val[]. + static const unsigned MAX_INTS = 12; + + // Maximum number of range pairs we can handle, considering the + // nonzero bits take one wide_int. + static const unsigned MAX_PAIRS = (MAX_INTS - 1) / 2; + + // Constructor is private to disallow stack initialization. Use + // alloc_slot() to create objects. + irange_storage_slot (const irange &r); + + static unsigned num_wide_ints_needed (const irange &r); + + trailing_wide_ints m_ints; +}; + +#endif // GCC_VALUE_RANGE_STORAGE_H -- cgit v1.1 From 3ae9def08565c36af2dc0bff495545ee1e9db642 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Sun, 3 Jul 2022 15:25:38 +0200 Subject: Move range allocator code to value-range-storage.* Now that vrange_storage is in its own file, I think it's prudent to move all the vrange allocator code there since it's all related. The users of value-range.h do not need to know the implementation details of the storage facilities. Tested and benchmarked on x86-64 Linux. gcc/ChangeLog: * gimple-range-cache.cc: Include value-range-storage.h. * gimple-range-cache.h (class block_range_cache): Add "class" to m_range_allocator. * gimple-range-edge.cc (gimple_outgoing_range::gimple_outgoing_range): Allocate allocator. (gimple_outgoing_range::~gimple_outgoing_range): Free allocator. (gimple_outgoing_range::calc_switch_ranges): Dereference allocator. * gimple-range-edge.h: Add "class" to m_range_allocator. * gimple-range-infer.cc (infer_range_manager::infer_range_manager): Allocate allocator. (infer_range_manager::~infer_range_manager): Free allocator. (infer_range_manager::get_nonzero): Dereference allocator. (infer_range_manager::add_range): Same. * gimple-range-infer.h (class vrange_allocator): Add "class" to m_range_allocator. * value-range-storage.h (class vrange_allocator): Move from value-range.h. (class obstack_vrange_allocator): Same. (class ggc_vrange_allocator): Same. (vrange_allocator::alloc_vrange): Same. (vrange_allocator::alloc_irange): Same. * value-range.h (class vrange_allocator): Move to value-range-storage.h. (class obstack_vrange_allocator): Same. (class ggc_vrange_allocator): Same. --- gcc/gimple-range-cache.cc | 1 + gcc/gimple-range-cache.h | 2 +- gcc/gimple-range-edge.cc | 7 ++- gcc/gimple-range-edge.h | 2 +- gcc/gimple-range-infer.cc | 9 ++-- gcc/gimple-range-infer.h | 2 +- gcc/value-range-storage.h | 113 ++++++++++++++++++++++++++++++++++++++++++++-- gcc/value-range.h | 109 -------------------------------------------- 8 files changed, 124 insertions(+), 121 deletions(-) (limited to 'gcc') diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc index 5bb52d5..9be8bc6 100644 --- a/gcc/gimple-range-cache.cc +++ b/gcc/gimple-range-cache.cc @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "ssa.h" #include "gimple-pretty-print.h" #include "gimple-range.h" +#include "value-range-storage.h" #include "tree-cfg.h" #include "target.h" #include "attribs.h" diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h index a784eba..0341192 100644 --- a/gcc/gimple-range-cache.h +++ b/gcc/gimple-range-cache.h @@ -44,7 +44,7 @@ private: vec m_ssa_ranges; ssa_block_ranges &get_block_ranges (tree name); ssa_block_ranges *query_block_ranges (tree name); - vrange_allocator *m_range_allocator; + class vrange_allocator *m_range_allocator; bitmap_obstack m_bitmaps; }; diff --git a/gcc/gimple-range-edge.cc b/gcc/gimple-range-edge.cc index 03a804a..194e8f8 100644 --- a/gcc/gimple-range-edge.cc +++ b/gcc/gimple-range-edge.cc @@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple-iterator.h" #include "tree-cfg.h" #include "gimple-range.h" +#include "value-range-storage.h" // If there is a range control statment at the end of block BB, return it. // Otherwise return NULL. @@ -68,6 +69,7 @@ gimple_outgoing_range::gimple_outgoing_range (int max_sw_edges) { m_edge_table = NULL; m_max_edges = max_sw_edges; + m_range_allocator = new obstack_vrange_allocator; } @@ -75,6 +77,7 @@ gimple_outgoing_range::~gimple_outgoing_range () { if (m_edge_table) delete m_edge_table; + delete m_range_allocator; } @@ -162,13 +165,13 @@ gimple_outgoing_range::calc_switch_ranges (gswitch *sw) // If there was an existing range and it doesn't fit, we lose the memory. // It'll get reclaimed when the obstack is freed. This seems less // intrusive than allocating max ranges for each case. - slot = m_range_allocator.clone (case_range); + slot = m_range_allocator->clone (case_range); } irange *&slot = m_edge_table->get_or_insert (default_edge, &existed); // This should be the first call into this switch. gcc_checking_assert (!existed); - irange *dr = m_range_allocator.clone (default_range); + irange *dr = m_range_allocator->clone (default_range); slot = dr; } diff --git a/gcc/gimple-range-edge.h b/gcc/gimple-range-edge.h index c81b943..1a4dee9 100644 --- a/gcc/gimple-range-edge.h +++ b/gcc/gimple-range-edge.h @@ -47,7 +47,7 @@ private: int m_max_edges; hash_map *m_edge_table; - obstack_vrange_allocator m_range_allocator; + class obstack_vrange_allocator *m_range_allocator; }; // If there is a range control statement at the end of block BB, return it. diff --git a/gcc/gimple-range-infer.cc b/gcc/gimple-range-infer.cc index eee1491..2d12f86 100644 --- a/gcc/gimple-range-infer.cc +++ b/gcc/gimple-range-infer.cc @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "ssa.h" #include "gimple-pretty-print.h" #include "gimple-range.h" +#include "value-range-storage.h" #include "tree-cfg.h" #include "target.h" #include "attribs.h" @@ -166,6 +167,7 @@ infer_range_manager::infer_range_manager (bool do_search) // Non-zero elements are very common, so cache them for each ssa-name. m_nonzero.create (0); m_nonzero.safe_grow_cleared (num_ssa_names + 1); + m_range_allocator = new obstack_vrange_allocator; } // Destruct a range infer manager. @@ -176,6 +178,7 @@ infer_range_manager::~infer_range_manager () obstack_free (&m_list_obstack, NULL); m_on_exit.release (); bitmap_obstack_release (&m_bitmaps); + delete m_range_allocator; } // Return a non-zero range value of the appropriate type for NAME from @@ -189,7 +192,7 @@ infer_range_manager::get_nonzero (tree name) m_nonzero.safe_grow_cleared (num_ssa_names + 20); if (!m_nonzero[v]) { - m_nonzero[v] = m_range_allocator.alloc_vrange (TREE_TYPE (name)); + m_nonzero[v] = m_range_allocator->alloc_vrange (TREE_TYPE (name)); m_nonzero[v]->set_nonzero (TREE_TYPE (name)); } return *(m_nonzero[v]); @@ -261,7 +264,7 @@ infer_range_manager::add_range (tree name, basic_block bb, const vrange &r) else { vrange &v = cur; - ptr->range = m_range_allocator.clone (v); + ptr->range = m_range_allocator->clone (v); } return; } @@ -269,7 +272,7 @@ infer_range_manager::add_range (tree name, basic_block bb, const vrange &r) // Otherwise create a record. bitmap_set_bit (m_on_exit[bb->index].m_names, SSA_NAME_VERSION (name)); ptr = (exit_range *)obstack_alloc (&m_list_obstack, sizeof (exit_range)); - ptr->range = m_range_allocator.clone (r); + ptr->range = m_range_allocator->clone (r); ptr->name = name; ptr->next = m_on_exit[bb->index].head; m_on_exit[bb->index].head = ptr; diff --git a/gcc/gimple-range-infer.h b/gcc/gimple-range-infer.h index bf27d0d..468b7d11 100644 --- a/gcc/gimple-range-infer.h +++ b/gcc/gimple-range-infer.h @@ -78,7 +78,7 @@ private: bitmap m_seen; bitmap_obstack m_bitmaps; struct obstack m_list_obstack; - obstack_vrange_allocator m_range_allocator; + class obstack_vrange_allocator *m_range_allocator; }; #endif // GCC_GIMPLE_RANGE_SIDE_H diff --git a/gcc/value-range-storage.h b/gcc/value-range-storage.h index 58c5e11..7e005e4 100644 --- a/gcc/value-range-storage.h +++ b/gcc/value-range-storage.h @@ -21,6 +21,27 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_VALUE_RANGE_STORAGE_H #define GCC_VALUE_RANGE_STORAGE_H +// This class is used to allocate the minimum amount of storage needed +// for a given range. Storage is automatically freed at destruction +// of the class. + +class vrange_allocator +{ +public: + vrange_allocator () { } + virtual ~vrange_allocator () { } + // Allocate a range of TYPE. + vrange *alloc_vrange (tree type); + // Allocate a memory block of BYTES. + virtual void *alloc (unsigned bytes) = 0; + virtual void free (void *p) = 0; + // Return a clone of SRC. + template T *clone (const T &src); +private: + irange *alloc_irange (unsigned pairs); + void operator= (const vrange_allocator &) = delete; +}; + // This class is used to allocate chunks of memory that can store // ranges as memory efficiently as possible. It is meant to be used // when long term storage of a range is needed. The class can be used @@ -40,10 +61,6 @@ private: vrange_allocator *m_alloc; }; - -// INTERNAL USE ONLY. The remaining interfaces are only exposed for -// the GTY machinery to play nice with tree_ssa_name. - // A chunk of memory pointing to an irange storage. class GTY ((variable_size)) irange_storage_slot @@ -82,4 +99,92 @@ private: trailing_wide_ints m_ints; }; +class obstack_vrange_allocator : public vrange_allocator +{ +public: + obstack_vrange_allocator () + { + obstack_init (&m_obstack); + } + virtual ~obstack_vrange_allocator () final override + { + obstack_free (&m_obstack, NULL); + } + virtual void *alloc (unsigned bytes) final override + { + return obstack_alloc (&m_obstack, bytes); + } + virtual void free (void *) final override { } +private: + obstack m_obstack; +}; + +class ggc_vrange_allocator : public vrange_allocator +{ +public: + ggc_vrange_allocator () { } + virtual ~ggc_vrange_allocator () final override { } + virtual void *alloc (unsigned bytes) final override + { + return ggc_internal_alloc (bytes); + } + virtual void free (void *p) final override + { + return ggc_free (p); + } +}; + +// Return a new range to hold ranges of TYPE. The newly allocated +// range is initialized to VR_UNDEFINED. + +inline vrange * +vrange_allocator::alloc_vrange (tree type) +{ + if (irange::supports_p (type)) + return alloc_irange (2); + + gcc_unreachable (); +} + +// Return a new range with NUM_PAIRS. + +inline irange * +vrange_allocator::alloc_irange (unsigned num_pairs) +{ + // Never allocate 0 pairs. + // Don't allocate 1 either, or we get legacy value_range's. + if (num_pairs < 2) + num_pairs = 2; + + size_t nbytes = sizeof (tree) * 2 * num_pairs; + + // Allocate the irange and required memory for the vector. + void *r = alloc (sizeof (irange)); + tree *mem = static_cast (alloc (nbytes)); + return new (r) irange (mem, num_pairs); +} + +// Return a clone of an irange. + +template <> +inline irange * +vrange_allocator::clone (const irange &src) +{ + irange *r = alloc_irange (src.num_pairs ()); + *r = src; + return r; +} + +// Return a clone of a vrange. + +template <> +inline vrange * +vrange_allocator::clone (const vrange &src) +{ + if (is_a (src)) + return clone (as_a (src)); + + gcc_unreachable (); +} + #endif // GCC_VALUE_RANGE_STORAGE_H diff --git a/gcc/value-range.h b/gcc/value-range.h index 627d221..8ee7793 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -896,113 +896,4 @@ vrp_val_min (const_tree type) return NULL_TREE; } -// This is the range storage class. It is used to allocate the -// minimum amount of storage needed for a given range. Storage is -// automatically freed at destruction of the class. - -class vrange_allocator -{ -public: - vrange_allocator () { } - virtual ~vrange_allocator () { } - // Allocate a range of TYPE. - vrange *alloc_vrange (tree type); - // Allocate a memory block of BYTES. - virtual void *alloc (unsigned bytes) = 0; - virtual void free (void *p) = 0; - // Return a clone of SRC. - template T *clone (const T &src); -private: - irange *alloc_irange (unsigned pairs); - void operator= (const vrange_allocator &) = delete; -}; - -class obstack_vrange_allocator : public vrange_allocator -{ -public: - obstack_vrange_allocator () - { - obstack_init (&m_obstack); - } - virtual ~obstack_vrange_allocator () final override - { - obstack_free (&m_obstack, NULL); - } - virtual void *alloc (unsigned bytes) final override - { - return obstack_alloc (&m_obstack, bytes); - } - virtual void free (void *) final override { } -private: - obstack m_obstack; -}; - -class ggc_vrange_allocator : public vrange_allocator -{ -public: - ggc_vrange_allocator () { } - virtual ~ggc_vrange_allocator () final override { } - virtual void *alloc (unsigned bytes) final override - { - return ggc_internal_alloc (bytes); - } - virtual void free (void *p) final override - { - return ggc_free (p); - } -}; - -// Return a new range to hold ranges of TYPE. The newly allocated -// range is initialized to VR_UNDEFINED. - -inline vrange * -vrange_allocator::alloc_vrange (tree type) -{ - if (irange::supports_p (type)) - return alloc_irange (2); - - gcc_unreachable (); -} - -// Return a new range with NUM_PAIRS. - -inline irange * -vrange_allocator::alloc_irange (unsigned num_pairs) -{ - // Never allocate 0 pairs. - // Don't allocate 1 either, or we get legacy value_range's. - if (num_pairs < 2) - num_pairs = 2; - - size_t nbytes = sizeof (tree) * 2 * num_pairs; - - // Allocate the irange and required memory for the vector. - void *r = alloc (sizeof (irange)); - tree *mem = static_cast (alloc (nbytes)); - return new (r) irange (mem, num_pairs); -} - -// Return a clone of an irange. - -template <> -inline irange * -vrange_allocator::clone (const irange &src) -{ - irange *r = alloc_irange (src.num_pairs ()); - *r = src; - return r; -} - -// Return a clone of a vrange. - -template <> -inline vrange * -vrange_allocator::clone (const vrange &src) -{ - if (is_a (src)) - return clone (as_a (src)); - - gcc_unreachable (); -} - #endif // GCC_VALUE_RANGE_H -- cgit v1.1 From f3a5e75cb66dc96efca7d494fe6060746c88acb1 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 17 Jun 2022 17:02:05 -0700 Subject: x86: Support 2/4/8 byte constant vector stores 1. Add a predicate for constant vectors which can be converted to integer constants suitable for constant integer stores. For a 8-byte constant vector, the converted 64-bit integer must be valid for store with 64-bit immediate, which is a 64-bit integer sign-extended from a 32-bit integer. 2. Add a new pattern to allow 2-byte, 4-byte and 8-byte constant vector stores, like (set (mem:V2HI (reg:DI 84)) (const_vector:V2HI [(const_int 0 [0]) (const_int 1 [0x1])])) 3. After reload, convert constant vector stores to constant integer stores, like (set (mem:SI (reg:DI 5 di [84])) (const_int 65536 [0x10000])) For void foo (short * c) { c[0] = 0; c[1] = 1; } it generates movl $65536, (%rdi) instead of movl .LC0(%rip), %eax movl %eax, (%rdi) gcc/ PR target/106022 * config/i386/i386-protos.h (ix86_convert_const_vector_to_integer): New. * config/i386/i386.cc (ix86_convert_const_vector_to_integer): New. * config/i386/mmx.md (V_16_32_64): New. (*mov_imm): New patterns for stores with 16-bit, 32-bit and 64-bit constant vector. * config/i386/predicates.md (x86_64_const_vector_operand): New. gcc/testsuite/ PR target/106022 * gcc.target/i386/pr106022-1.c: New test. * gcc.target/i386/pr106022-2.c: Likewise. * gcc.target/i386/pr106022-3.c: Likewise. * gcc.target/i386/pr106022-4.c: Likewise. --- gcc/config/i386/i386-protos.h | 2 ++ gcc/config/i386/i386.cc | 47 ++++++++++++++++++++++++++++++ gcc/config/i386/mmx.md | 37 +++++++++++++++++++++++ gcc/config/i386/predicates.md | 11 +++++++ gcc/testsuite/gcc.target/i386/pr106022-1.c | 13 +++++++++ gcc/testsuite/gcc.target/i386/pr106022-2.c | 14 +++++++++ gcc/testsuite/gcc.target/i386/pr106022-3.c | 14 +++++++++ gcc/testsuite/gcc.target/i386/pr106022-4.c | 14 +++++++++ 8 files changed, 152 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr106022-1.c create mode 100644 gcc/testsuite/gcc.target/i386/pr106022-2.c create mode 100644 gcc/testsuite/gcc.target/i386/pr106022-3.c create mode 100644 gcc/testsuite/gcc.target/i386/pr106022-4.c (limited to 'gcc') diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index 3596ce8..cf84775 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -122,6 +122,8 @@ extern void ix86_expand_unary_operator (enum rtx_code, machine_mode, rtx[]); extern rtx ix86_build_const_vector (machine_mode, bool, rtx); extern rtx ix86_build_signbit_mask (machine_mode, bool, bool); +extern HOST_WIDE_INT ix86_convert_const_vector_to_integer (rtx, + machine_mode); extern void ix86_split_convert_uns_si_sse (rtx[]); extern void ix86_expand_convert_uns_didf_sse (rtx, rtx); extern void ix86_expand_convert_uns_sixf_sse (rtx, rtx); diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index b15b489..0cfe996 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -15723,6 +15723,53 @@ ix86_build_signbit_mask (machine_mode mode, bool vect, bool invert) return force_reg (vec_mode, v); } +/* Return HOST_WIDE_INT for const vector OP in MODE. */ + +HOST_WIDE_INT +ix86_convert_const_vector_to_integer (rtx op, machine_mode mode) +{ + if (GET_MODE_SIZE (mode) > UNITS_PER_WORD) + gcc_unreachable (); + + int nunits = GET_MODE_NUNITS (mode); + wide_int val = wi::zero (GET_MODE_BITSIZE (mode)); + machine_mode innermode = GET_MODE_INNER (mode); + unsigned int innermode_bits = GET_MODE_BITSIZE (innermode); + + switch (mode) + { + case E_V2QImode: + case E_V4QImode: + case E_V2HImode: + case E_V8QImode: + case E_V4HImode: + case E_V2SImode: + for (int i = 0; i < nunits; ++i) + { + int v = INTVAL (XVECEXP (op, 0, i)); + wide_int wv = wi::shwi (v, innermode_bits); + val = wi::insert (val, wv, innermode_bits * i, innermode_bits); + } + break; + case E_V2HFmode: + case E_V4HFmode: + case E_V2SFmode: + for (int i = 0; i < nunits; ++i) + { + rtx x = XVECEXP (op, 0, i); + int v = real_to_target (NULL, CONST_DOUBLE_REAL_VALUE (x), + REAL_MODE_FORMAT (innermode)); + wide_int wv = wi::shwi (v, innermode_bits); + val = wi::insert (val, wv, innermode_bits * i, innermode_bits); + } + break; + default: + gcc_unreachable (); + } + + return val.to_shwi (); +} + /* Return TRUE or FALSE depending on whether the first SET in INSN has source and destination with matching CC modes, and that the CC mode is at least as constrained as REQ_MODE. */ diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index ba53007a..3294c1e 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -69,6 +69,12 @@ ;; 4-byte and 2-byte QImode vector modes (define_mode_iterator VI1_16_32 [V4QI V2QI]) +;; All 2-byte, 4-byte and 8-byte vector modes with more than 1 element +(define_mode_iterator V_16_32_64 + [V2QI V4QI V2HI V2HF + (V8QI "TARGET_64BIT") (V4HI "TARGET_64BIT") (V4HF "TARGET_64BIT") + (V2SI "TARGET_64BIT") (V2SF "TARGET_64BIT")]) + ;; V2S* modes (define_mode_iterator V2FI [V2SF V2SI]) @@ -331,6 +337,37 @@ ] (symbol_ref "true")))]) +;; 16-bit, 32-bit and 64-bit constant vector stores. After reload, +;; convert them to immediate integer stores. +(define_insn_and_split "*mov_imm" + [(set (match_operand:V_16_32_64 0 "memory_operand" "=m") + (match_operand:V_16_32_64 1 "x86_64_const_vector_operand" "i"))] + "" + "#" + "&& reload_completed" + [(set (match_dup 0) (match_dup 1))] +{ + HOST_WIDE_INT val = ix86_convert_const_vector_to_integer (operands[1], + mode); + operands[1] = GEN_INT (val); + machine_mode mode; + switch (GET_MODE_SIZE (mode)) + { + case 2: + mode = HImode; + break; + case 4: + mode = SImode; + break; + case 8: + mode = DImode; + break; + default: + gcc_unreachable (); + } + operands[0] = lowpart_subreg (mode, operands[0], mode); +}) + ;; For TARGET_64BIT we always round up to 8 bytes. (define_insn "*push2_rex64" [(set (match_operand:V_32 0 "push_operand" "=X,X") diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 128144f..c71c453 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -1194,6 +1194,17 @@ (ior (match_operand 0 "register_operand") (match_code "const_vector"))) +;; Return true when OP is CONST_VECTOR which can be converted to a +;; sign extended 32-bit integer. +(define_predicate "x86_64_const_vector_operand" + (match_code "const_vector") +{ + if (GET_MODE_SIZE (mode) > UNITS_PER_WORD) + return false; + HOST_WIDE_INT val = ix86_convert_const_vector_to_integer (op, mode); + return trunc_int_for_mode (val, SImode) == val; +}) + ;; Return true when OP is nonimmediate or standard SSE constant. (define_predicate "nonimmediate_or_sse_const_operand" (ior (match_operand 0 "nonimmediate_operand") diff --git a/gcc/testsuite/gcc.target/i386/pr106022-1.c b/gcc/testsuite/gcc.target/i386/pr106022-1.c new file mode 100644 index 0000000..6643b4c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr106022-1.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=x86-64" } */ + +void +foo (char *c) +{ + c[0] = 0; + c[1] = 1; + c[2] = 2; + c[3] = 3; +} + +/* { dg-final { scan-assembler-times "movl\[ \\t\]+\\\$50462976," 1 } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr106022-2.c b/gcc/testsuite/gcc.target/i386/pr106022-2.c new file mode 100644 index 0000000..0e79fb5 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr106022-2.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=x86-64" } */ + +void +foo (int *c) +{ + c = __builtin_assume_aligned (c, 16); + c[0] = -1; + c[1] = -1; +} + +/* { dg-final { scan-assembler-times "movq\[ \\t\]+\[^\n\]*%xmm" 2 { target { ia32 } } } } */ +/* { dg-final { scan-assembler-times "movq\[ \\t\]+\\\$-1," 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "xmm" { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr106022-3.c b/gcc/testsuite/gcc.target/i386/pr106022-3.c new file mode 100644 index 0000000..8b0c2a8 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr106022-3.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=x86-64" } */ + +void +foo (int *c) +{ + c[0] = 0; + c[1] = 1; + c[2] = 2; + c[3] = 3; +} + +/* { dg-final { scan-assembler-times "movdqa\[ \\t\]+\[^\n\]*%xmm" 1 } } */ +/* { dg-final { scan-assembler-times "movups\[ \\t\]+\[^\n\]*%xmm" 1 } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr106022-4.c b/gcc/testsuite/gcc.target/i386/pr106022-4.c new file mode 100644 index 0000000..8ecda17 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr106022-4.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=x86-64" } */ + +void +foo (float *c) +{ + c[0] = 2.3; + c[1] = 0.0; +} + +/* { dg-final { scan-assembler-times "movl\[ \\t\]+\\\$0x40133333" 1 { target { ia32 } } } } */ +/* { dg-final { scan-assembler-times "movl\[ \\t\]+\\\$0x00000000" 1 { target { ia32 } } } } */ +/* { dg-final { scan-assembler-times "movq\[ \\t\]+\\\$1075000115," 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "xmm" } } */ -- cgit v1.1 From 3731dd0bea8994c3d7b5a4879f89f3e7a0eb2cf4 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Mon, 4 Jul 2022 00:16:19 +0000 Subject: Daily bump. --- gcc/ChangeLog | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/testsuite/ChangeLog | 26 ++++++++++++++++++++ 3 files changed, 91 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 674004c..a7bf96a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,67 @@ +2022-07-03 H.J. Lu + + PR target/106022 + * config/i386/i386-protos.h (ix86_convert_const_vector_to_integer): + New. + * config/i386/i386.cc (ix86_convert_const_vector_to_integer): + New. + * config/i386/mmx.md (V_16_32_64): New. + (*mov_imm): New patterns for stores with 16-bit, 32-bit + and 64-bit constant vector. + * config/i386/predicates.md (x86_64_const_vector_operand): New. + +2022-07-03 Aldy Hernandez + + * gimple-range-cache.cc: Include value-range-storage.h. + * gimple-range-cache.h (class block_range_cache): Add "class" to + m_range_allocator. + * gimple-range-edge.cc + (gimple_outgoing_range::gimple_outgoing_range): Allocate allocator. + (gimple_outgoing_range::~gimple_outgoing_range): Free allocator. + (gimple_outgoing_range::calc_switch_ranges): Dereference allocator. + * gimple-range-edge.h: Add "class" to m_range_allocator. + * gimple-range-infer.cc + (infer_range_manager::infer_range_manager): Allocate allocator. + (infer_range_manager::~infer_range_manager): Free allocator. + (infer_range_manager::get_nonzero): Dereference allocator. + (infer_range_manager::add_range): Same. + * gimple-range-infer.h (class vrange_allocator): Add "class" to + m_range_allocator. + * value-range-storage.h (class vrange_allocator): Move from + value-range.h. + (class obstack_vrange_allocator): Same. + (class ggc_vrange_allocator): Same. + (vrange_allocator::alloc_vrange): Same. + (vrange_allocator::alloc_irange): Same. + * value-range.h (class vrange_allocator): Move to value-range-storage.h. + (class obstack_vrange_allocator): Same. + (class ggc_vrange_allocator): Same. + +2022-07-03 Aldy Hernandez + + * Makefile.in (OBJS): Add value-range-storage.o. + (GTFILES): Add value-range-storage.h. + * gengtype.cc (open_base_files): Add value-range-storage.h. + * value-range-storage.cc: New file. + * value-range-storage.h: New file. + +2022-07-03 Xi Ruoyao + Lulu Cheng + + * config/loongarch/loongarch.cc (loongarch_check_zero_div_p): + New static function. + (loongarch_idiv_insns): Use loongarch_check_zero_div_p instead + of TARGET_CHECK_ZERO_DIV. + (loongarch_output_division): Likewise. + * common/config/loongarch/loongarch-common.cc + (TARGET_DEFAULT_TARGET_FLAGS): Remove unneeded hook. + * doc/invoke.texi: Update to match the new behavior. + +2022-07-03 Ian Lance Taylor + + * tree-ssa-dse.cc (dse_optimize_stmt): Only delete a trapping + statement if -fdelete-dead-exceptions. + 2022-07-02 Tim Lange PR analyzer/105900 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 758f2bf..d929766 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220703 +20220704 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 14cbed3..c5772c7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,29 @@ +2022-07-03 H.J. Lu + + PR target/106022 + * gcc.target/i386/pr106022-1.c: New test. + * gcc.target/i386/pr106022-2.c: Likewise. + * gcc.target/i386/pr106022-3.c: Likewise. + * gcc.target/i386/pr106022-4.c: Likewise. + +2022-07-03 Xi Ruoyao + Lulu Cheng + + * gcc.c-torture/execute/20101011-1.c (dg-additional-options): + add -mcheck-zero-division for LoongArch targets. + +2022-07-03 Tim Lange + + * gcc.dg/analyzer/allocation-size-1.c: Use fixed-length types. + * gcc.dg/analyzer/allocation-size-2.c: Likewise. + * gcc.dg/analyzer/allocation-size-3.c: Likewise. + * gcc.dg/analyzer/allocation-size-4.c: Likewise. + * gcc.dg/analyzer/allocation-size-5.c: Likewise. + +2022-07-03 Ian Lance Taylor + + * g++.dg/torture/except-1.C: New test. + 2022-07-02 Tim Lange PR analyzer/105900 -- cgit v1.1 From bbe836bc7c557b3f4119e03d24cb61f23906cba9 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Sun, 3 Jul 2022 18:22:11 +0200 Subject: Remove some deprecated irange methods. Tested on x86-64 Linux. gcc/ChangeLog: * ipa-cp.cc (ipcp_vr_lattice::meet_with_1): Use operator!=. * ipa-prop.cc (struct ipa_vr_ggc_hash_traits): Same. * tree-ssa-loop-unswitch.cc (struct unswitch_predicate): Use set with two arguments. (find_unswitching_predicates_for_bb): Same. * tree-vrp.cc (range_fold_unary_symbolics_p): Same. * value-range-equiv.cc (value_range_equiv::equal_p): Use operator==. * value-range.cc (irange::equal_p): Rename to... (irange::operator==): ...this. * value-range.h (irange::set): Remove. (irange::operator==): Remove. (irange::set_zero): Use set with two arguments. * vr-values.cc (vr_values::extract_range_from_binary_expr): Same. (vr_values::extract_range_from_unary_expr): Same. (check_for_binary_op_overflow): Same. (bounds_of_var_in_loop): Same. --- gcc/ipa-cp.cc | 2 +- gcc/ipa-prop.cc | 2 +- gcc/tree-ssa-loop-unswitch.cc | 4 ++-- gcc/tree-vrp.cc | 3 ++- gcc/value-range-equiv.cc | 2 +- gcc/value-range.cc | 2 +- gcc/value-range.h | 16 +--------------- gcc/vr-values.cc | 20 ++++++++++---------- 8 files changed, 19 insertions(+), 32 deletions(-) (limited to 'gcc') diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc index 18d2559..543a933 100644 --- a/gcc/ipa-cp.cc +++ b/gcc/ipa-cp.cc @@ -1020,7 +1020,7 @@ ipcp_vr_lattice::meet_with_1 (const value_range *other_vr) value_range save (m_vr); m_vr.union_ (*other_vr); - return !m_vr.equal_p (save); + return m_vr != save; } /* Return true if value range information in the lattice is yet unknown. */ diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc index 7791563..fb8f973 100644 --- a/gcc/ipa-prop.cc +++ b/gcc/ipa-prop.cc @@ -126,7 +126,7 @@ struct ipa_vr_ggc_hash_traits : public ggc_cache_remove static bool equal (const value_range *a, const value_range *b) { - return (a->equal_p (*b) + return (*a == *b && types_compatible_p (a->type (), b->type ())); } static const bool empty_zero_p = true; diff --git a/gcc/tree-ssa-loop-unswitch.cc b/gcc/tree-ssa-loop-unswitch.cc index afae982..3a827f2 100644 --- a/gcc/tree-ssa-loop-unswitch.cc +++ b/gcc/tree-ssa-loop-unswitch.cc @@ -139,7 +139,7 @@ struct unswitch_predicate auto range_op = range_op_handler (code, TREE_TYPE (lhs)); int_range<2> rhs_range (TREE_TYPE (rhs)); if (CONSTANT_CLASS_P (rhs)) - rhs_range.set (rhs); + rhs_range.set (rhs, rhs); if (!range_op.op1_range (true_range, TREE_TYPE (lhs), int_range<2> (boolean_true_node, boolean_true_node), rhs_range) @@ -535,7 +535,7 @@ find_unswitching_predicates_for_bb (basic_block bb, class loop *loop, else { cmp = fold_build2 (EQ_EXPR, boolean_type_node, idx, low); - lab_range.set (low); + lab_range.set (low, low); } /* Combine the expression with the existing one. */ diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc index 2d15bb5..ed881be 100644 --- a/gcc/tree-vrp.cc +++ b/gcc/tree-vrp.cc @@ -1024,7 +1024,8 @@ range_fold_unary_symbolics_p (value_range *vr, { /* ~X is simply -1 - X. */ value_range minusone; - minusone.set (build_int_cst (vr0->type (), -1)); + tree t = build_int_cst (vr0->type (), -1); + minusone.set (t, t); range_fold_binary_expr (vr, MINUS_EXPR, expr_type, &minusone, vr0); return true; } diff --git a/gcc/value-range-equiv.cc b/gcc/value-range-equiv.cc index b0ae128..bd58e5a 100644 --- a/gcc/value-range-equiv.cc +++ b/gcc/value-range-equiv.cc @@ -162,7 +162,7 @@ bool value_range_equiv::equal_p (const value_range_equiv &other, bool ignore_equivs) const { - return (value_range::equal_p (other) + return (value_range::operator== (other) && (ignore_equivs || vr_bitmap_equal_p (m_equiv, other.m_equiv))); } diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 815cb78..574c510 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -688,7 +688,7 @@ irange::legacy_equal_p (const irange &other) const } bool -irange::equal_p (const irange &other) const +irange::operator== (const irange &other) const { if (legacy_mode_p ()) { diff --git a/gcc/value-range.h b/gcc/value-range.h index 8ee7793..fd67031 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -157,8 +157,6 @@ public: void normalize_symbolics (); // DEPRECATED void normalize_addresses (); // DEPRECATED bool may_contain_p (tree) const; // DEPRECATED - void set (tree); // DEPRECATED - bool equal_p (const irange &) const; // DEPRECATED bool legacy_verbose_union_ (const class irange *); // DEPRECATED bool legacy_verbose_intersect (const irange *); // DEPRECATED @@ -720,12 +718,6 @@ int_range::operator= (const int_range &src) } inline void -irange::set (tree val) -{ - set (val, val); -} - -inline void irange::set_undefined () { m_kind = VR_UNDEFINED; @@ -765,12 +757,6 @@ irange::set_varying (tree type) m_base[0] = m_base[1] = error_mark_node; } -inline bool -irange::operator== (const irange &r) const -{ - return equal_p (r); -} - // Return the lower bound of a sub-range. PAIR is the sub-range in // question. @@ -846,7 +832,7 @@ irange::set_zero (tree type) { tree z = build_int_cst (type, 0); if (legacy_mode_p ()) - set (z); + set (z, z); else irange_set (z, z); } diff --git a/gcc/vr-values.cc b/gcc/vr-values.cc index 38f204e..6b9c630 100644 --- a/gcc/vr-values.cc +++ b/gcc/vr-values.cc @@ -831,14 +831,14 @@ vr_values::extract_range_from_binary_expr (value_range_equiv *vr, if (TREE_CODE (op0) == SSA_NAME) vr0 = *(get_value_range (op0)); else if (is_gimple_min_invariant (op0)) - vr0.set (op0); + vr0.set (op0, op0); else vr0.set_varying (TREE_TYPE (op0)); if (TREE_CODE (op1) == SSA_NAME) vr1 = *(get_value_range (op1)); else if (is_gimple_min_invariant (op1)) - vr1.set (op1); + vr1.set (op1, op1); else vr1.set_varying (TREE_TYPE (op1)); @@ -936,7 +936,7 @@ vr_values::extract_range_from_binary_expr (value_range_equiv *vr, /* Try with [OP0, OP0] and VR1. */ else - n_vr0.set (op0); + n_vr0.set (op0, op0); range_fold_binary_expr (vr, code, expr_type, &n_vr0, &vr1); } @@ -976,7 +976,7 @@ vr_values::extract_range_from_unary_expr (value_range_equiv *vr, if (TREE_CODE (op0) == SSA_NAME) vr0 = *(get_value_range (op0)); else if (is_gimple_min_invariant (op0)) - vr0.set (op0); + vr0.set (op0, op0); else vr0.set_varying (type); @@ -1064,14 +1064,14 @@ check_for_binary_op_overflow (range_query *query, if (TREE_CODE (op0) == SSA_NAME) vr0 = *query->get_value_range (op0, s); else if (TREE_CODE (op0) == INTEGER_CST) - vr0.set (op0); + vr0.set (op0, op0); else vr0.set_varying (TREE_TYPE (op0)); if (TREE_CODE (op1) == SSA_NAME) vr1 = *query->get_value_range (op1, s); else if (TREE_CODE (op1) == INTEGER_CST) - vr1.set (op1); + vr1.set (op1, op1); else vr1.set_varying (TREE_TYPE (op1)); @@ -1747,7 +1747,7 @@ bounds_of_var_in_loop (tree *min, tree *max, range_query *query, if (TREE_CODE (init) == SSA_NAME) query->range_of_expr (vr0, init, stmt); else if (is_gimple_min_invariant (init)) - vr0.set (init); + vr0.set (init, init); else vr0.set_varying (TREE_TYPE (init)); tree tem = wide_int_to_tree (TREE_TYPE (init), wtmp); @@ -1763,7 +1763,7 @@ bounds_of_var_in_loop (tree *min, tree *max, range_query *query, if (TREE_CODE (init) == SSA_NAME) query->range_of_expr (initvr, init, stmt); else if (is_gimple_min_invariant (init)) - initvr.set (init); + initvr.set (init, init); else return false; @@ -3291,14 +3291,14 @@ simplify_using_ranges::simplify_bit_ops_using_ranges if (TREE_CODE (op0) == SSA_NAME) vr0 = *(query->get_value_range (op0, stmt)); else if (is_gimple_min_invariant (op0)) - vr0.set (op0); + vr0.set (op0, op0); else return false; if (TREE_CODE (op1) == SSA_NAME) vr1 = *(query->get_value_range (op1, stmt)); else if (is_gimple_min_invariant (op1)) - vr1.set (op1); + vr1.set (op1, op1); else return false; -- cgit v1.1 From 73f942c08deef3cce312263b3347f7a44dd44150 Mon Sep 17 00:00:00 2001 From: Haochen Jiang Date: Mon, 30 May 2022 17:12:31 +0800 Subject: i386: Extend cvtps2pd to memory gcc/ChangeLog: PR target/43618 * config/i386/sse.md (extendv2sfv2df2): New define_expand. (sse2_cvtps2pd_): Change constraint of operands[1]. (*sse2_cvtps2pd__1): Rename from extendvsdfv2df2. gcc/testsuite/ChangeLog: PR target/43618 * gcc.target/i386/pr43618-1.c: New test. --- gcc/config/i386/sse.md | 26 +++++++++++++++++++++----- gcc/testsuite/gcc.target/i386/pr43618-1.c | 12 ++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr43618-1.c (limited to 'gcc') diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index f2f72e8..3396ff7 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -9176,11 +9176,27 @@ (set_attr "prefix" "evex") (set_attr "mode" "")]) +(define_expand "extendv2sfv2df2" + [(set (match_operand:V2DF 0 "register_operand") + (float_extend:V2DF + (match_operand:V2SF 1 "nonimmediate_operand")))] + "TARGET_MMX_WITH_SSE" +{ + if (!MEM_P (operands[1])) + { + operands[1] = lowpart_subreg (V4SFmode, + force_reg (V2SFmode, operands[1]), + V2SFmode); + emit_insn (gen_sse2_cvtps2pd (operands[0], operands[1])); + DONE; + } +}) + (define_insn "sse2_cvtps2pd" [(set (match_operand:V2DF 0 "register_operand" "=v") (float_extend:V2DF (vec_select:V2SF - (match_operand:V4SF 1 "vector_operand" "vm") + (match_operand:V4SF 1 "register_operand" "v") (parallel [(const_int 0) (const_int 1)]))))] "TARGET_SSE2 && " "%vcvtps2pd\t{%1, %0|%0, %q1}" @@ -9192,12 +9208,12 @@ (set_attr "prefix" "maybe_vex") (set_attr "mode" "V2DF")]) -(define_insn "extendv2sfv2df2" +(define_insn "*sse2_cvtps2pd_1" [(set (match_operand:V2DF 0 "register_operand" "=v") (float_extend:V2DF - (match_operand:V2SF 1 "register_operand" "v")))] - "TARGET_MMX_WITH_SSE" - "%vcvtps2pd\t{%1, %0|%0, %1}" + (match_operand:V2SF 1 "memory_operand" "m")))] + "TARGET_SSE2 && " + "%vcvtps2pd\t{%1, %0|%0, %q1}" [(set_attr "type" "ssecvt") (set_attr "amdfam10_decode" "direct") (set_attr "athlon_decode" "double") diff --git a/gcc/testsuite/gcc.target/i386/pr43618-1.c b/gcc/testsuite/gcc.target/i386/pr43618-1.c new file mode 100644 index 0000000..7d16f0e --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr43618-1.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { ! ia32 } } } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler-not "movq" } } */ +/* { dg-final { scan-assembler "cvtps2pd" } } */ + +void +foo (float a[2], double b[2]) +{ + int i; + for (i = 0; i < 2; i++) + b[i] = a[i]; +} -- cgit v1.1 From d74d98784a9d0101aad8095d692193a74a2f62f6 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 1 Jul 2022 15:32:30 +0200 Subject: tree-optimization/106055 - issue with autopar When autopar uses graphites canonicalize_loop_closed_ssa it fails to check whether propagation is allowed and thus it ends up messing up abnormal constraints. 2022-07-01 Richard Biener PR tree-optimization/106055 * graphite.cc (canonicalize_loop_closed_ssa): Check whether we can propagate. * gcc.dg/graphite/pr106055.c: New testcase. --- gcc/graphite.cc | 5 +++- gcc/testsuite/gcc.dg/graphite/pr106055.c | 41 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/graphite/pr106055.c (limited to 'gcc') diff --git a/gcc/graphite.cc b/gcc/graphite.cc index a88b13c..fd4f7a1 100644 --- a/gcc/graphite.cc +++ b/gcc/graphite.cc @@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-loop-manip.h" #include "tree-ssa.h" #include "tree-into-ssa.h" +#include "tree-ssa-propagate.h" #include "graphite.h" /* Print global statistics to FILE. */ @@ -337,7 +338,9 @@ canonicalize_loop_closed_ssa (loop_p loop, edge e) /* Iterate over the next phis and remove duplicates. */ gsi_next (&gsi); while (!gsi_end_p (gsi)) - if (gimple_phi_arg_def (phi, 0) == gimple_phi_arg_def (gsi.phi (), 0)) + if (gimple_phi_arg_def (phi, 0) == gimple_phi_arg_def (gsi.phi (), 0) + && may_propagate_copy (gimple_phi_result (gsi.phi ()), + gimple_phi_result (phi))) { replace_uses_by (gimple_phi_result (gsi.phi ()), gimple_phi_result (phi)); diff --git a/gcc/testsuite/gcc.dg/graphite/pr106055.c b/gcc/testsuite/gcc.dg/graphite/pr106055.c new file mode 100644 index 0000000..22be62b --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/pr106055.c @@ -0,0 +1,41 @@ +/* { dg-do compile } */ +/* { dg-options "-Os -floop-parallelize-all -fno-tree-dce" } */ + +__attribute__ ((returns_twice)) int +bar (void); + +void +quux (void); + +void +empty (void) +{ +} + +unsigned int +choose (unsigned int x, unsigned int y) +{ + return y ? x : 0; +} + +int +foo (int *p, unsigned int x, int y) +{ + unsigned int acc = 0; + + empty (); + + while (x) + { + bar (); + ++x; + } + + while (y) + acc += y; + + *p = choose (acc, 1); + quux (); + + return x; +} -- cgit v1.1 From ad7ed87a43655162cbd5765445681870aa99a3a8 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 23 May 2022 09:48:49 +0200 Subject: [Ada] Adjust description of Pure_Function pragma The current wording can be read as implying that the result of a call to a pure function does not depend on the context, which is incorrect. The pragma only guarantees the absence of side effects of such a call. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Pure_Function): Fix ambiguous wording about context dependence. * gnat_rm.texi: Regenerate. --- gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst | 6 +++--- gcc/ada/gnat_rm.texi | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst index af85600..4318a34 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst @@ -5504,9 +5504,9 @@ overloaded declaration exists, in which case the pragma applies to all entities). It specifies that the function ``Entity`` is to be considered pure for the purposes of code generation. This means that the compiler can assume that there are no side effects, and -in particular that two calls with identical arguments produce the -same result. It also means that the function can be used in an -address clause. +in particular that two identical calls produce the same result in +the same context. It also means that the function can be used in +an address clause. Note that, quite deliberately, there are no static checks to try to ensure that this promise is met, so ``Pure_Function`` can be used diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index a7077e0..13cff21 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT Reference Manual , May 24, 2022 +GNAT Reference Manual , Jun 24, 2022 AdaCore @@ -7088,9 +7088,9 @@ overloaded declaration exists, in which case the pragma applies to all entities). It specifies that the function @code{Entity} is to be considered pure for the purposes of code generation. This means that the compiler can assume that there are no side effects, and -in particular that two calls with identical arguments produce the -same result. It also means that the function can be used in an -address clause. +in particular that two identical calls produce the same result in +the same context. It also means that the function can be used in +an address clause. Note that, quite deliberately, there are no static checks to try to ensure that this promise is met, so @code{Pure_Function} can be used -- cgit v1.1 From 089a4a48ac3db93f07585563f3b41e92bac798fe Mon Sep 17 00:00:00 2001 From: Julien Bortolussi Date: Wed, 4 May 2022 17:45:34 +0200 Subject: [Ada] Create new unbounded functional sequence Add a new unbounded functional sequence. This sequence is indexed by Big_Positive and so is unbounded from the user and spark points view. Hower the actually implemented sequence are bounded by Count_Type'Last. gcc/ada/ * libgnat/a-cfinse.adb, libgnat/a-cfinse.ads: Implementation files of the sequence. * Makefile.rtl, impunit.adb: Take into account the add of the new files --- gcc/ada/Makefile.rtl | 1 + gcc/ada/impunit.adb | 1 + gcc/ada/libgnat/a-cfinse.adb | 304 ++++++++++++++++++++++++++++++++++ gcc/ada/libgnat/a-cfinse.ads | 377 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 683 insertions(+) create mode 100644 gcc/ada/libgnat/a-cfinse.adb create mode 100644 gcc/ada/libgnat/a-cfinse.ads (limited to 'gcc') diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 43d54f1..09395d3 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -114,6 +114,7 @@ GNATRTL_NONTASKING_OBJS= \ a-cfhama$(objext) \ a-cfhase$(objext) \ a-cfinve$(objext) \ + a-cfinse$(objext) \ a-cforma$(objext) \ a-cforse$(objext) \ a-cgaaso$(objext) \ diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb index 0b1b13b..b6a7bde 100644 --- a/gcc/ada/impunit.adb +++ b/gcc/ada/impunit.adb @@ -605,6 +605,7 @@ package body Impunit is -- GNAT Defined Additions to Ada 2012 -- ---------------------------------------- + ("a-cfinse", F), -- Ada.Containers.Functional_Infinite_Sequences ("a-cfinve", F), -- Ada.Containers.Formal_Indefinite_Vectors ("a-coboho", F), -- Ada.Containers.Bounded_Holders ("a-cofove", F), -- Ada.Containers.Formal_Vectors diff --git a/gcc/ada/libgnat/a-cfinse.adb b/gcc/ada/libgnat/a-cfinse.adb new file mode 100644 index 0000000..7b457f6 --- /dev/null +++ b/gcc/ada/libgnat/a-cfinse.adb @@ -0,0 +1,304 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT LIBRARY COMPONENTS -- +-- -- +-- ADA.CONTAINERS.FUNCTIONAL_INFINITE_SEQUENCE -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 2022-2022, Free Software Foundation, Inc. -- +-- -- +-- This specification is derived from the Ada Reference Manual for use with -- +-- GNAT. The copyright notice above, and the license provisions that follow -- +-- apply solely to the contents of the part following the private keyword. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- . -- +------------------------------------------------------------------------------ + +pragma Ada_2012; + +package body Ada.Containers.Functional_Infinite_Sequences +with SPARK_Mode => Off +is + use Containers; + + ----------------------- + -- Local Subprograms -- + ----------------------- + + package Big_From_Count is new Signed_Conversions + (Int => Count_Type); + + function Big (C : Count_Type) return Big_Integer renames + Big_From_Count.To_Big_Integer; + + -- Store Count_Type'Last as a Big Natural because it is often used + + Count_Type_Big_Last : constant Big_Natural := Big (Count_Type'Last); + + function To_Count (C : Big_Natural) return Count_Type; + -- Convert Big_Natural to Count_Type + + --------- + -- "<" -- + --------- + + function "<" (Left : Sequence; Right : Sequence) return Boolean is + (Length (Left) < Length (Right) + and then (for all N in Left => + Get (Left, N) = Get (Right, N))); + + ---------- + -- "<=" -- + ---------- + + function "<=" (Left : Sequence; Right : Sequence) return Boolean is + (Length (Left) <= Length (Right) + and then (for all N in Left => + Get (Left, N) = Get (Right, N))); + + --------- + -- "=" -- + --------- + + function "=" (Left : Sequence; Right : Sequence) return Boolean is + (Left.Content = Right.Content); + + --------- + -- Add -- + --------- + + function Add (Container : Sequence; New_Item : Element_Type) return Sequence + is + (Add (Container, Last (Container) + 1, New_Item)); + + function Add + (Container : Sequence; + Position : Big_Positive; + New_Item : Element_Type) return Sequence is + (Content => Add (Container.Content, To_Count (Position), New_Item)); + + -------------------- + -- Constant_Range -- + -------------------- + + function Constant_Range + (Container : Sequence; + Fst : Big_Positive; + Lst : Big_Natural; + Item : Element_Type) return Boolean + is + Count_Fst : constant Count_Type := To_Count (Fst); + Count_Lst : constant Count_Type := To_Count (Lst); + + begin + for J in Count_Fst .. Count_Lst loop + if Get (Container.Content, J) /= Item then + return False; + end if; + end loop; + + return True; + end Constant_Range; + + -------------- + -- Contains -- + -------------- + + function Contains + (Container : Sequence; + Fst : Big_Positive; + Lst : Big_Natural; + Item : Element_Type) return Boolean + is + Count_Fst : constant Count_Type := To_Count (Fst); + Count_Lst : constant Count_Type := To_Count (Lst); + + begin + for J in Count_Fst .. Count_Lst loop + if Get (Container.Content, J) = Item then + return True; + end if; + end loop; + + return False; + end Contains; + + -------------------- + -- Empty_Sequence -- + -------------------- + + function Empty_Sequence return Sequence is + (Content => <>); + + ------------------ + -- Equal_Except -- + ------------------ + + function Equal_Except + (Left : Sequence; + Right : Sequence; + Position : Big_Positive) return Boolean + is + Count_Pos : constant Count_Type := To_Count (Position); + Count_Lst : constant Count_Type := To_Count (Last (Left)); + + begin + if Length (Left) /= Length (Right) then + return False; + end if; + + for J in 1 .. Count_Lst loop + if J /= Count_Pos + and then Get (Left.Content, J) /= Get (Right.Content, J) + then + return False; + end if; + end loop; + + return True; + end Equal_Except; + + function Equal_Except + (Left : Sequence; + Right : Sequence; + X : Big_Positive; + Y : Big_Positive) return Boolean + is + Count_X : constant Count_Type := To_Count (X); + Count_Y : constant Count_Type := To_Count (Y); + Count_Lst : constant Count_Type := To_Count (Last (Left)); + + begin + if Length (Left) /= Length (Right) then + return False; + end if; + + for J in 1 .. Count_Lst loop + if J /= Count_X + and then J /= Count_Y + and then Get (Left.Content, J) /= Get (Right.Content, J) + then + return False; + end if; + end loop; + + return True; + end Equal_Except; + + --------- + -- Get -- + --------- + + function Get + (Container : Sequence; + Position : Big_Integer) return Element_Type is + (Get (Container.Content, To_Count (Position))); + + ---------- + -- Last -- + ---------- + + function Last (Container : Sequence) return Big_Natural is + (Length (Container)); + + ------------ + -- Length -- + ------------ + + function Length (Container : Sequence) return Big_Natural is + (Big (Length (Container.Content))); + + ----------------- + -- Range_Equal -- + ----------------- + + function Range_Equal + (Left : Sequence; + Right : Sequence; + Fst : Big_Positive; + Lst : Big_Natural) return Boolean + is + Count_Fst : constant Count_Type := To_Count (Fst); + Count_Lst : constant Count_Type := To_Count (Lst); + + begin + for J in Count_Fst .. Count_Lst loop + if Get (Left.Content, J) /= Get (Right.Content, J) then + return False; + end if; + end loop; + + return True; + end Range_Equal; + + ------------------- + -- Range_Shifted -- + ------------------- + + function Range_Shifted + (Left : Sequence; + Right : Sequence; + Fst : Big_Positive; + Lst : Big_Natural; + Offset : Big_Integer) return Boolean + is + Count_Fst : constant Count_Type := To_Count (Fst); + Count_Lst : constant Count_Type := To_Count (Lst); + + begin + for J in Count_Fst .. Count_Lst loop + if Get (Left.Content, J) /= Get (Right, Big (J) + Offset) then + return False; + end if; + end loop; + + return True; + end Range_Shifted; + + ------------ + -- Remove -- + ------------ + + function Remove + (Container : Sequence; + Position : Big_Positive) return Sequence is + (Content => Remove (Container.Content, To_Count (Position))); + + --------- + -- Set -- + --------- + + function Set + (Container : Sequence; + Position : Big_Positive; + New_Item : Element_Type) return Sequence is + (Content => Set (Container.Content, To_Count (Position), New_Item)); + + -------------- + -- To_Count -- + -------------- + + function To_Count (C : Big_Natural) return Count_Type is + begin + if C > Count_Type_Big_Last then + raise Program_Error with "Big_Integer too large for Count_Type"; + end if; + return Big_From_Count.From_Big_Integer (C); + end To_Count; + +end Ada.Containers.Functional_Infinite_Sequences; diff --git a/gcc/ada/libgnat/a-cfinse.ads b/gcc/ada/libgnat/a-cfinse.ads new file mode 100644 index 0000000..cff2900 --- /dev/null +++ b/gcc/ada/libgnat/a-cfinse.ads @@ -0,0 +1,377 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT LIBRARY COMPONENTS -- +-- -- +-- ADA.CONTAINERS.FUNCTIONAL_INFINITE_SEQUENCE -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2022-2022, Free Software Foundation, Inc. -- +-- -- +-- This specification is derived from the Ada Reference Manual for use with -- +-- GNAT. The copyright notice above, and the license provisions that follow -- +-- apply solely to the contents of the part following the private keyword. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 3, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. -- +-- -- +-- As a special exception under Section 7 of GPL version 3, you are granted -- +-- additional permissions described in the GCC Runtime Library Exception, -- +-- version 3.1, as published by the Free Software Foundation. -- +-- -- +-- You should have received a copy of the GNU General Public License and -- +-- a copy of the GCC Runtime Library Exception along with this program; -- +-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- +-- . -- +------------------------------------------------------------------------------ + +pragma Ada_2012; +private with Ada.Containers.Functional_Base; +with Ada.Numerics.Big_Numbers.Big_Integers; +use Ada.Numerics.Big_Numbers.Big_Integers; + +generic + type Element_Type (<>) is private; + with function "=" (Left, Right : Element_Type) return Boolean is <>; + +package Ada.Containers.Functional_Infinite_Sequences with SPARK_Mode is + + type Sequence is private + with Default_Initial_Condition => Length (Sequence) = 0, + Iterable => (First => Iter_First, + Has_Element => Iter_Has_Element, + Next => Iter_Next, + Element => Get); + -- Sequences are empty when default initialized. + -- Quantification over sequences can be done using the regular + -- quantification over its range or directly on its elements with "for of". + + ----------------------- + -- Basic operations -- + ----------------------- + + -- Sequences are axiomatized using Length and Get, providing respectively + -- the length of a sequence and an accessor to its Nth element: + + function Length (Container : Sequence) return Big_Natural with + -- Length of a sequence + + Global => null; + + function Get + (Container : Sequence; + Position : Big_Integer) return Element_Type + -- Access the Element at position Position in Container + + with + Global => null, + Pre => Iter_Has_Element (Container, Position); + + function Last (Container : Sequence) return Big_Natural with + -- Last index of a sequence + + Global => null, + Post => + Last'Result = Length (Container); + pragma Annotate (GNATprove, Inline_For_Proof, Last); + + function First return Big_Positive is (1) with + -- First index of a sequence + + Global => null; + + ------------------------ + -- Property Functions -- + ------------------------ + + function "=" (Left : Sequence; Right : Sequence) return Boolean with + -- Extensional equality over sequences + + Global => null, + Post => + "="'Result = + (Length (Left) = Length (Right) + and then (for all N in Left => Get (Left, N) = Get (Right, N))); + pragma Annotate (GNATprove, Inline_For_Proof, "="); + + function "<" (Left : Sequence; Right : Sequence) return Boolean with + -- Left is a strict subsequence of Right + + Global => null, + Post => + "<"'Result = + (Length (Left) < Length (Right) + and then (for all N in Left => Get (Left, N) = Get (Right, N))); + pragma Annotate (GNATprove, Inline_For_Proof, "<"); + + function "<=" (Left : Sequence; Right : Sequence) return Boolean with + -- Left is a subsequence of Right + + Global => null, + Post => + "<="'Result = + (Length (Left) <= Length (Right) + and then (for all N in Left => Get (Left, N) = Get (Right, N))); + pragma Annotate (GNATprove, Inline_For_Proof, "<="); + + function Contains + (Container : Sequence; + Fst : Big_Positive; + Lst : Big_Natural; + Item : Element_Type) return Boolean + -- Returns True if Item occurs in the range from Fst to Lst of Container + + with + Global => null, + Pre => Lst <= Last (Container), + Post => + Contains'Result = + (for some J in Container => + Fst <= J and J <= Lst and Get (Container, J) = Item); + pragma Annotate (GNATprove, Inline_For_Proof, Contains); + + function Constant_Range + (Container : Sequence; + Fst : Big_Positive; + Lst : Big_Natural; + Item : Element_Type) return Boolean + -- Returns True if every element of the range from Fst to Lst of Container + -- is equal to Item. + + with + Global => null, + Pre => Lst <= Last (Container), + Post => + Constant_Range'Result = + (for all J in Container => + (if Fst <= J and J <= Lst then Get (Container, J) = Item)); + pragma Annotate (GNATprove, Inline_For_Proof, Constant_Range); + + function Equal_Except + (Left : Sequence; + Right : Sequence; + Position : Big_Positive) return Boolean + -- Returns True is Left and Right are the same except at position Position + + with + Global => null, + Pre => Position <= Last (Left), + Post => + Equal_Except'Result = + (Length (Left) = Length (Right) + and then (for all J in Left => + (if J /= Position then + Get (Left, J) = Get (Right, J)))); + pragma Annotate (GNATprove, Inline_For_Proof, Equal_Except); + + function Equal_Except + (Left : Sequence; + Right : Sequence; + X : Big_Positive; + Y : Big_Positive) return Boolean + -- Returns True is Left and Right are the same except at positions X and Y + + with + Global => null, + Pre => X <= Last (Left) and Y <= Last (Left), + Post => + Equal_Except'Result = + (Length (Left) = Length (Right) + and then (for all J in Left => + (if J /= X and J /= Y then + Get (Left, J) = Get (Right, J)))); + pragma Annotate (GNATprove, Inline_For_Proof, Equal_Except); + + function Range_Equal + (Left : Sequence; + Right : Sequence; + Fst : Big_Positive; + Lst : Big_Natural) return Boolean + -- Returns True if the ranges from Fst to Lst contain the same elements in + -- Left and Right. + + with + Global => null, + Pre => Lst <= Last (Left) and Lst <= Last (Right), + Post => + Range_Equal'Result = + (for all J in Left => + (if Fst <= J and J <= Lst then Get (Left, J) = Get (Right, J))); + pragma Annotate (GNATprove, Inline_For_Proof, Range_Equal); + + function Range_Shifted + (Left : Sequence; + Right : Sequence; + Fst : Big_Positive; + Lst : Big_Natural; + Offset : Big_Integer) return Boolean + -- Returns True if the range from Fst to Lst in Left contains the same + -- elements as the range from Fst + Offset to Lst + Offset in Right. + + with + Global => null, + Pre => + Lst <= Last (Left) + and then + (if Fst <= Lst then + Offset + Fst >= 1 and Offset + Lst <= Length (Right)), + Post => + Range_Shifted'Result = + ((for all J in Left => + (if Fst <= J and J <= Lst then + Get (Left, J) = Get (Right, J + Offset))) + and + (for all J in Right => + (if Fst + Offset <= J and J <= Lst + Offset then + Get (Left, J - Offset) = Get (Right, J)))); + pragma Annotate (GNATprove, Inline_For_Proof, Range_Shifted); + + ---------------------------- + -- Construction Functions -- + ---------------------------- + + -- For better efficiency of both proofs and execution, avoid using + -- construction functions in annotations and rather use property functions. + + function Set + (Container : Sequence; + Position : Big_Positive; + New_Item : Element_Type) return Sequence + -- Returns a new sequence which contains the same elements as Container + -- except for the one at position Position which is replaced by New_Item. + + with + Global => null, + Pre => Position <= Last (Container), + Post => + Get (Set'Result, Position) = New_Item + and then Equal_Except (Container, Set'Result, Position); + + function Add (Container : Sequence; New_Item : Element_Type) return Sequence + -- Returns a new sequence which contains the same elements as Container + -- plus New_Item at the end. + + with + Global => null, + Post => + Length (Add'Result) = Length (Container) + 1 + and then Get (Add'Result, Last (Add'Result)) = New_Item + and then Container <= Add'Result; + + function Add + (Container : Sequence; + Position : Big_Positive; + New_Item : Element_Type) return Sequence + with + -- Returns a new sequence which contains the same elements as Container + -- except that New_Item has been inserted at position Position. + + Global => null, + Pre => Position <= Last (Container) + 1, + Post => + Length (Add'Result) = Length (Container) + 1 + and then Get (Add'Result, Position) = New_Item + and then Range_Equal + (Left => Container, + Right => Add'Result, + Fst => 1, + Lst => Position - 1) + and then Range_Shifted + (Left => Container, + Right => Add'Result, + Fst => Position, + Lst => Last (Container), + Offset => 1); + + function Remove + (Container : Sequence; + Position : Big_Positive) return Sequence + -- Returns a new sequence which contains the same elements as Container + -- except that the element at position Position has been removed. + + with + Global => null, + Pre => Position <= Last (Container), + Post => + Length (Remove'Result) = Length (Container) - 1 + and then Range_Equal + (Left => Container, + Right => Remove'Result, + Fst => 1, + Lst => Position - 1) + and then Range_Shifted + (Left => Remove'Result, + Right => Container, + Fst => Position, + Lst => Last (Remove'Result), + Offset => 1); + + function Copy_Element (Item : Element_Type) return Element_Type is (Item); + -- Elements of containers are copied by numerous primitives in this + -- package. This function causes GNATprove to verify that such a copy is + -- valid (in particular, it does not break the ownership policy of SPARK, + -- i.e. it does not contain pointers that could be used to alias mutable + -- data). + + function Empty_Sequence return Sequence with + -- Return an empty Sequence + + Global => null, + Post => Length (Empty_Sequence'Result) = 0; + + --------------------------- + -- Iteration Primitives -- + --------------------------- + + function Iter_First (Container : Sequence) return Big_Integer with + Global => null, + Post => Iter_First'Result = 1; + + function Iter_Has_Element + (Container : Sequence; + Position : Big_Integer) return Boolean + with + Global => null, + Post => Iter_Has_Element'Result = + In_Range (Position, 1, Length (Container)); + pragma Annotate (GNATprove, Inline_For_Proof, Iter_Has_Element); + + function Iter_Next + (Container : Sequence; + Position : Big_Integer) return Big_Integer + with + Global => null, + Pre => Iter_Has_Element (Container, Position), + Post => Iter_Next'Result = Position + 1; + +private + pragma SPARK_Mode (Off); + + subtype Positive_Count_Type is Count_Type range 1 .. Count_Type'Last; + + package Containers is new Ada.Containers.Functional_Base + (Index_Type => Positive_Count_Type, + Element_Type => Element_Type); + + type Sequence is record + Content : Containers.Container; + end record; + + function Iter_First (Container : Sequence) return Big_Integer is (1); + + function Iter_Next + (Container : Sequence; + Position : Big_Integer) return Big_Integer + is + (Position + 1); + + function Iter_Has_Element + (Container : Sequence; + Position : Big_Integer) return Boolean + is + (In_Range (Position, 1, Length (Container))); +end Ada.Containers.Functional_Infinite_Sequences; -- cgit v1.1 From df69e326b39dabc34f0c9b31f694079e5fa1343a Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Fri, 20 May 2022 22:29:51 +0200 Subject: [Ada] Fix for resolution of overloaded subprogram for Iterable aspect When resolving the Iterable aspect we look for a functions that are declared in the same scope as the annotated type and that have the required number and types formal parameters. However, we didn't guard against functions that have no formal parameter at all. gcc/ada/ * sem_ch13.adb (Resolve_Iterable_Operation): Add guard to prevent crash when the examined function has no formal parameters and Etype is called on Empty entity. --- gcc/ada/sem_ch13.adb | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc') diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 0b8911b..27f3250 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -15943,6 +15943,7 @@ package body Sem_Ch13 is while Present (It.Typ) loop if Ekind (It.Nam) = E_Function and then Scope (It.Nam) = Scope (Typ) + and then Present (First_Formal (It.Nam)) and then Etype (First_Formal (It.Nam)) = Typ then F1 := First_Formal (It.Nam); -- cgit v1.1 From bdd5056736b642f0124e6cb26f9c2fd8be028908 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 24 May 2022 01:14:18 +0200 Subject: [Ada] Plug loophole for built-in-place return with limited_with clause When the result type of a function requiring built-in-place return is only visible through a limited_with clause, the compiled needs to wait for the nonlimited view to be available in order to compute whether the built-in-place return is needed, and this comprises tagging the function with the Returns_By_Ref flag. gcc/ada/ * exp_ch6.adb (Build_In_Place_Formal): Also compute Returns_By_Ref for the function if the extra formals were not built initially. --- gcc/ada/exp_ch6.adb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 15a2039..88157b9 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -850,11 +850,12 @@ package body Exp_Ch6 is -- The return type in the function declaration may have been a limited -- view, and the extra formals for the function were not generated at -- that point. At the point of call the full view must be available and - -- the extra formals can be created. + -- the extra formals can be created and Returns_By_Ref computed. if No (Extra_Formal) then Create_Extra_Formals (Func); Extra_Formal := Extra_Formals (Func); + Compute_Returns_By_Ref (Func); end if; -- We search for a formal with a matching suffix. We can't search -- cgit v1.1 From ddd88925273e86018b6cf57c9f6acc798a38e112 Mon Sep 17 00:00:00 2001 From: Justin Squirek Date: Thu, 24 Mar 2022 18:42:09 +0000 Subject: [Ada] Incorrect accessibility check on return of discriminated type This patch corrects an error in the compiler whereby the presence of a call to a function returning a type with an access discriminant within an expanded loop condition caused the wrong value to be supplied for the extra- accessibility-of-result actual, thus causing incorrect checks within the callee at the point of return. This change also corrects a problem where spurious "null value not allowed" warnings were generated for tagged type declarations with an access discriminant specified as "null." gcc/ada/ * sem_disp.adb (Most_Descendant_Use_Clause): Remove call to deprecated Is_Internal. * sem_util.adb (Innermost_Master_Scope_Depth): Use Find_Enclosing_Scope instead of Nearest_Dynamic_Scope to avoid cases where relevant scopes get skipped leading to an incorrect scope depth calculation. --- gcc/ada/sem_disp.adb | 9 ++++----- gcc/ada/sem_util.adb | 12 ++++++------ 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb index 7bead6b..226142f 100644 --- a/gcc/ada/sem_disp.adb +++ b/gcc/ada/sem_disp.adb @@ -508,12 +508,11 @@ package body Sem_Disp is return Empty; -- The dispatching type and the primitive operation must be defined in - -- the same scope, except in the case of internal operations and formal - -- abstract subprograms. + -- the same scope, except in the case of abstract formal subprograms. - elsif ((Scope (Subp) = Scope (Tagged_Type) or else Is_Internal (Subp)) - and then (not Is_Generic_Type (Tagged_Type) - or else not Comes_From_Source (Subp))) + elsif (Scope (Subp) = Scope (Tagged_Type) + and then (not Is_Generic_Type (Tagged_Type) + or else not Comes_From_Source (Subp))) or else (Is_Formal_Subprogram (Subp) and then Is_Abstract_Subprogram (Subp)) or else diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 9f861a2..addad83 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -275,9 +275,9 @@ package body Sem_Util is -- with its type set to Natural. function Innermost_Master_Scope_Depth (N : Node_Id) return Uint; - -- Returns the scope depth of the given node's innermost - -- enclosing dynamic scope (effectively the accessibility - -- level of the innermost enclosing master). + -- Returns the scope depth of the given node's innermost enclosing + -- scope (effectively the accessibility level of the innermost + -- enclosing master). function Function_Call_Or_Allocator_Level (N : Node_Id) return Node_Id; -- Centralized processing of subprogram calls which may appear in @@ -301,7 +301,7 @@ package body Sem_Util is begin -- Locate the nearest enclosing node (by traversing Parents) -- that Defining_Entity can be applied to, and return the - -- depth of that entity's nearest enclosing dynamic scope. + -- depth of that entity's nearest enclosing scope. -- The rules that define what a master are defined in -- RM 7.6.1 (3), and include statements and conditions for loops @@ -311,13 +311,13 @@ package body Sem_Util is Ent := Defining_Entity_Or_Empty (Node_Par); if Present (Ent) then - Encl_Scop := Nearest_Dynamic_Scope (Ent); + Encl_Scop := Find_Enclosing_Scope (Ent); -- Ignore transient scopes made during expansion if Comes_From_Source (Node_Par) then return - Scope_Depth_Default_0 (Encl_Scop) + Master_Lvl_Modifier; + Scope_Depth (Encl_Scop) + Master_Lvl_Modifier; end if; -- For a return statement within a function, return -- cgit v1.1 From 82b63eb0f30333b3c59e8f37c4007cb6fd3fe0f9 Mon Sep 17 00:00:00 2001 From: Claire Dross Date: Tue, 24 May 2022 10:42:46 +0200 Subject: [Ada] Add GNAT specific pragmas to the equivalent Assertion_Policy for -gnata All assertion pragmas are enabled by default when using -gnata. We need to add the GNAT specific ones to the list. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging and Assertion Control): Add GNAT specific assertion pragmas to the equivalent Assertion_Policy for the -gnata option. * gnat_ugn.texi: Regenerate. --- .../building_executable_programs_with_gnat.rst | 34 ++++++++++++++----- gcc/ada/gnat_ugn.texi | 38 +++++++++++++++------- 2 files changed, 52 insertions(+), 20 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst index 29293e1..2e835f2 100644 --- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst @@ -4331,15 +4331,31 @@ Debugging and Assertion Control Which is a shorthand for:: pragma Assertion_Policy - (Assert => Check, - Static_Predicate => Check, - Dynamic_Predicate => Check, - Pre => Check, - Pre'Class => Check, - Post => Check, - Post'Class => Check, - Type_Invariant => Check, - Type_Invariant'Class => Check); + -- Ada RM assertion pragmas + (Assert => Check, + Static_Predicate => Check, + Dynamic_Predicate => Check, + Pre => Check, + Pre'Class => Check, + Post => Check, + Post'Class => Check, + Type_Invariant => Check, + Type_Invariant'Class => Check, + Default_Initial_Condition => Check, + -- GNAT specific assertion pragmas + Assert_And_Cut => Check, + Assume => Check, + Contract_Cases => Check, + Debug => Check, + Ghost => Check, + Initial_Condition => Check, + Loop_Invariant => Check, + Loop_Variant => Check, + Postcondition => Check, + Precondition => Check, + Predicate => Check, + Refined_Post => Check, + Subprogram_Variant => Check); The pragmas ``Assert`` and ``Debug`` normally have no effect and are ignored. This switch, where ``a`` stands for 'assert', causes diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index a2a2990..a080cd4 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , May 24, 2022 +GNAT User's Guide for Native Platforms , Jun 24, 2022 AdaCore @@ -12853,15 +12853,31 @@ Which is a shorthand for: @example pragma Assertion_Policy - (Assert => Check, - Static_Predicate => Check, - Dynamic_Predicate => Check, - Pre => Check, - Pre'Class => Check, - Post => Check, - Post'Class => Check, - Type_Invariant => Check, - Type_Invariant'Class => Check); +-- Ada RM assertion pragmas + (Assert => Check, + Static_Predicate => Check, + Dynamic_Predicate => Check, + Pre => Check, + Pre'Class => Check, + Post => Check, + Post'Class => Check, + Type_Invariant => Check, + Type_Invariant'Class => Check, + Default_Initial_Condition => Check, +-- GNAT specific assertion pragmas + Assert_And_Cut => Check, + Assume => Check, + Contract_Cases => Check, + Debug => Check, + Ghost => Check, + Initial_Condition => Check, + Loop_Invariant => Check, + Loop_Variant => Check, + Postcondition => Check, + Precondition => Check, + Predicate => Check, + Refined_Post => Check, + Subprogram_Variant => Check); @end example The pragmas @code{Assert} and @code{Debug} normally have no effect and @@ -29249,8 +29265,8 @@ to permit their use in free software. @printindex ge -@anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{ } @anchor{cf}@w{ } +@anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{ } @c %**end of body @bye -- cgit v1.1 From 2e9b2ab3b5bf6e4a0bdabfeb7358206b18253e3c Mon Sep 17 00:00:00 2001 From: Claire Dross Date: Tue, 24 May 2022 16:37:18 +0200 Subject: [Ada] Update the documentation of functional containers Functional containers are now controlled. Update the documentation accordingly. gcc/ada/ * doc/gnat_rm/the_gnat_library.rst: Functional vectors, sets, and maps are now controlled. * gnat_rm.texi: Regenerate. --- gcc/ada/doc/gnat_rm/the_gnat_library.rst | 40 +++++++++++++++----------------- gcc/ada/gnat_rm.texi | 40 +++++++++++++++----------------- 2 files changed, 38 insertions(+), 42 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/doc/gnat_rm/the_gnat_library.rst b/gcc/ada/doc/gnat_rm/the_gnat_library.rst index 72ec5e6..85044f3 100644 --- a/gcc/ada/doc/gnat_rm/the_gnat_library.rst +++ b/gcc/ada/doc/gnat_rm/the_gnat_library.rst @@ -285,17 +285,16 @@ specification of this unit is compatible with SPARK 2014. .. index:: Functional sets This child of ``Ada.Containers`` defines immutable sets. These containers are -unbounded and may contain indefinite elements. Furthermore, to be usable in -every context, they are neither controlled nor limited. As they are functional, -that is, no primitives are provided which would allow modifying an existing -container, these containers can still be used safely. +unbounded and may contain indefinite elements. Their API features functions +creating new containers from existing ones. To remain reasonably efficient, +their implementation involves sharing between data-structures. As they are +functional, that is, no primitives are provided which would allow modifying an +existing container, these containers can still be used safely. -Their API features functions creating new containers from existing ones. -As a consequence, these containers are highly inefficient. They are also -memory consuming, as the allocated memory is not reclaimed when the container -is no longer referenced. Thus, they should in general be used in ghost code -and annotations, so that they can be removed from the final executable. The -specification of this unit is compatible with SPARK 2014. +These containers are controlled so that the allocated memory can be reclaimed +when the container is no longer referenced. Thus, they cannot directly be used +in contexts where controlled types are not supported. +The specification of this unit is compatible with SPARK 2014. .. _`Ada.Containers.Functional_Maps_(a-cofuma.ads)`: @@ -307,17 +306,16 @@ specification of this unit is compatible with SPARK 2014. .. index:: Functional maps This child of ``Ada.Containers`` defines immutable maps. These containers are -unbounded and may contain indefinite elements. Furthermore, to be usable in -every context, they are neither controlled nor limited. As they are functional, -that is, no primitives are provided which would allow modifying an existing -container, these containers can still be used safely. - -Their API features functions creating new containers from existing ones. -As a consequence, these containers are highly inefficient. They are also -memory consuming, as the allocated memory is not reclaimed when the container -is no longer referenced. Thus, they should in general be used in ghost code -and annotations, so that they can be removed from the final executable. The -specification of this unit is compatible with SPARK 2014. +unbounded and may contain indefinite elements. Their API features functions +creating new containers from existing ones. To remain reasonably efficient, +their implementation involves sharing between data-structures. As they are +functional, that is, no primitives are provided which would allow modifying an +existing container, these containers can still be used safely. + +These containers are controlled so that the allocated memory can be reclaimed +when the container is no longer referenced. Thus, they cannot directly be used +in contexts where controlled types are not supported. +The specification of this unit is compatible with SPARK 2014. .. _`Ada.Containers.Bounded_Holders_(a-coboho.ads)`: diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 13cff21..a893912 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -23520,17 +23520,16 @@ specification of this unit is compatible with SPARK 2014. @geindex Functional sets This child of @code{Ada.Containers} defines immutable sets. These containers are -unbounded and may contain indefinite elements. Furthermore, to be usable in -every context, they are neither controlled nor limited. As they are functional, -that is, no primitives are provided which would allow modifying an existing -container, these containers can still be used safely. +unbounded and may contain indefinite elements. Their API features functions +creating new containers from existing ones. To remain reasonably efficient, +their implementation involves sharing between data-structures. As they are +functional, that is, no primitives are provided which would allow modifying an +existing container, these containers can still be used safely. -Their API features functions creating new containers from existing ones. -As a consequence, these containers are highly inefficient. They are also -memory consuming, as the allocated memory is not reclaimed when the container -is no longer referenced. Thus, they should in general be used in ghost code -and annotations, so that they can be removed from the final executable. The -specification of this unit is compatible with SPARK 2014. +These containers are controlled so that the allocated memory can be reclaimed +when the container is no longer referenced. Thus, they cannot directly be used +in contexts where controlled types are not supported. +The specification of this unit is compatible with SPARK 2014. @node Ada Containers Functional_Maps a-cofuma ads,Ada Containers Bounded_Holders a-coboho ads,Ada Containers Functional_Sets a-cofuse ads,The GNAT Library @anchor{gnat_rm/the_gnat_library ada-containers-functional-maps-a-cofuma-ads}@anchor{2f4}@anchor{gnat_rm/the_gnat_library id16}@anchor{2f5} @@ -23542,17 +23541,16 @@ specification of this unit is compatible with SPARK 2014. @geindex Functional maps This child of @code{Ada.Containers} defines immutable maps. These containers are -unbounded and may contain indefinite elements. Furthermore, to be usable in -every context, they are neither controlled nor limited. As they are functional, -that is, no primitives are provided which would allow modifying an existing -container, these containers can still be used safely. - -Their API features functions creating new containers from existing ones. -As a consequence, these containers are highly inefficient. They are also -memory consuming, as the allocated memory is not reclaimed when the container -is no longer referenced. Thus, they should in general be used in ghost code -and annotations, so that they can be removed from the final executable. The -specification of this unit is compatible with SPARK 2014. +unbounded and may contain indefinite elements. Their API features functions +creating new containers from existing ones. To remain reasonably efficient, +their implementation involves sharing between data-structures. As they are +functional, that is, no primitives are provided which would allow modifying an +existing container, these containers can still be used safely. + +These containers are controlled so that the allocated memory can be reclaimed +when the container is no longer referenced. Thus, they cannot directly be used +in contexts where controlled types are not supported. +The specification of this unit is compatible with SPARK 2014. @node Ada Containers Bounded_Holders a-coboho ads,Ada Command_Line Environment a-colien ads,Ada Containers Functional_Maps a-cofuma ads,The GNAT Library @anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{2f6}@anchor{gnat_rm/the_gnat_library id17}@anchor{2f7} -- cgit v1.1 From a8a1da109efe9b12183353faa87b113f6992898f Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Mon, 23 May 2022 09:47:18 -0400 Subject: [Ada] Add Ada 2022 features to sets containers This patch adds some Ada 2022 features to the set children of Ada.Containers. gcc/ada/ * libgnat/a-cbhase.adb, libgnat/a-cbhase.ads, libgnat/a-cborse.adb, libgnat/a-cborse.ads, libgnat/a-cihase.adb, libgnat/a-cihase.ads, libgnat/a-ciorse.adb, libgnat/a-ciorse.ads, libgnat/a-cohase.adb, libgnat/a-cohase.ads, libgnat/a-conhel.adb, libgnat/a-conhel.ads, libgnat/a-coorse.adb, libgnat/a-coorse.ads: Add Has_Element, Element, Query_Element, and Next subprograms that take a Set parameter. Add Tampering_With_Cursors_Prohibited function. These are all new in Ada 2022. --- gcc/ada/libgnat/a-cbhase.adb | 58 ++++++++++++++++++++++++++++++++++++++++++++ gcc/ada/libgnat/a-cbhase.ads | 19 +++++++++++++++ gcc/ada/libgnat/a-cborse.adb | 56 ++++++++++++++++++++++++++++++++++++++++++ gcc/ada/libgnat/a-cborse.ads | 19 +++++++++++++++ gcc/ada/libgnat/a-cihase.adb | 58 ++++++++++++++++++++++++++++++++++++++++++++ gcc/ada/libgnat/a-cihase.ads | 19 +++++++++++++++ gcc/ada/libgnat/a-ciorse.adb | 55 +++++++++++++++++++++++++++++++++++++++++ gcc/ada/libgnat/a-ciorse.ads | 19 +++++++++++++++ gcc/ada/libgnat/a-cohase.adb | 58 ++++++++++++++++++++++++++++++++++++++++++++ gcc/ada/libgnat/a-cohase.ads | 19 +++++++++++++++ gcc/ada/libgnat/a-conhel.adb | 8 +++--- gcc/ada/libgnat/a-conhel.ads | 28 ++++++++++++++++++--- gcc/ada/libgnat/a-coorse.adb | 55 +++++++++++++++++++++++++++++++++++++++++ gcc/ada/libgnat/a-coorse.ads | 19 +++++++++++++++ 14 files changed, 482 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/libgnat/a-cbhase.adb b/gcc/ada/libgnat/a-cbhase.adb index 9076d8e..b83ab80 100644 --- a/gcc/ada/libgnat/a-cbhase.adb +++ b/gcc/ada/libgnat/a-cbhase.adb @@ -1599,6 +1599,64 @@ is raise Program_Error with "attempt to stream reference"; end Write; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean is + begin + pragma Assert (Vet (Position), "bad cursor in Has_Element"); + pragma Assert ((Position.Container = null) = (Position.Node = 0), + "bad nullity in Has_Element"); + return Position.Container = Container'Unrestricted_Access; + end Has_Element; + + function Tampering_With_Cursors_Prohibited + (Container : Set) return Boolean + is + begin + return Is_Busy (Container.TC); + end Tampering_With_Cursors_Prohibited; + + function Element (Container : Set; Position : Cursor) return Element_Type is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + return Element (Position); + end Element; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)) is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + Query_Element (Position, Process); + end Query_Element; + + function Next (Container : Set; Position : Cursor) return Cursor is + begin + if Checks and then + not (Position = No_Element or else Has_Element (Container, Position)) + then + raise Program_Error with "Position for wrong Container"; + end if; + + return Next (Position); + end Next; + + procedure Next (Container : Set; Position : in out Cursor) is + begin + Position := Next (Container, Position); + end Next; + + ------------------ + -- Generic_Keys -- + ------------------ + package body Generic_Keys is ----------------------- diff --git a/gcc/ada/libgnat/a-cbhase.ads b/gcc/ada/libgnat/a-cbhase.ads index c30a364..7079c51 100644 --- a/gcc/ada/libgnat/a-cbhase.ads +++ b/gcc/ada/libgnat/a-cbhase.ads @@ -369,6 +369,25 @@ is (Container : Set) return Set_Iterator_Interfaces.Forward_Iterator'Class; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean; + + function Tampering_With_Cursors_Prohibited (Container : Set) return Boolean; + + function Element (Container : Set; Position : Cursor) return Element_Type; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)); + + function Next (Container : Set; Position : Cursor) return Cursor; + + procedure Next (Container : Set; Position : in out Cursor); + + ---------------- + generic type Key_Type (<>) is private; diff --git a/gcc/ada/libgnat/a-cborse.adb b/gcc/ada/libgnat/a-cborse.adb index 55eca40..bc52b45 100644 --- a/gcc/ada/libgnat/a-cborse.adb +++ b/gcc/ada/libgnat/a-cborse.adb @@ -688,6 +688,62 @@ is else Cursor'(Container'Unrestricted_Access, Node)); end Floor; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean is + begin + pragma Assert + (Position.Container = null or else Vet (Container, Position.Node), + "bad cursor in Has_Element"); + pragma Assert ((Position.Container = null) = (Position.Node = 0), + "bad nullity in Has_Element"); + return Position.Container = Container'Unrestricted_Access; + end Has_Element; + + function Tampering_With_Cursors_Prohibited + (Container : Set) return Boolean + is + begin + return Is_Busy (Container.TC); + end Tampering_With_Cursors_Prohibited; + + function Element (Container : Set; Position : Cursor) return Element_Type is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + return Element (Position); + end Element; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)) is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + Query_Element (Position, Process); + end Query_Element; + + function Next (Container : Set; Position : Cursor) return Cursor is + begin + if Checks and then + not (Position = No_Element or else Has_Element (Container, Position)) + then + raise Program_Error with "Position for wrong Container"; + end if; + + return Next (Position); + end Next; + + procedure Next (Container : Set; Position : in out Cursor) is + begin + Position := Next (Container, Position); + end Next; + ------------------ -- Generic_Keys -- ------------------ diff --git a/gcc/ada/libgnat/a-cborse.ads b/gcc/ada/libgnat/a-cborse.ads index ceaf885..be22c25 100644 --- a/gcc/ada/libgnat/a-cborse.ads +++ b/gcc/ada/libgnat/a-cborse.ads @@ -230,6 +230,25 @@ is Start : Cursor) return Set_Iterator_Interfaces.Reversible_Iterator'class; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean; + + function Tampering_With_Cursors_Prohibited (Container : Set) return Boolean; + + function Element (Container : Set; Position : Cursor) return Element_Type; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)); + + function Next (Container : Set; Position : Cursor) return Cursor; + + procedure Next (Container : Set; Position : in out Cursor); + + ---------------- + generic type Key_Type (<>) is private; diff --git a/gcc/ada/libgnat/a-cihase.adb b/gcc/ada/libgnat/a-cihase.adb index 090d01c..0a9aabd 100644 --- a/gcc/ada/libgnat/a-cihase.adb +++ b/gcc/ada/libgnat/a-cihase.adb @@ -2031,6 +2031,64 @@ is Element_Type'Output (Stream, Node.Element.all); end Write_Node; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean is + begin + pragma Assert (Vet (Position), "bad cursor in Has_Element"); + pragma Assert ((Position.Container = null) = (Position.Node = null), + "bad nullity in Has_Element"); + return Position.Container = Container'Unrestricted_Access; + end Has_Element; + + function Tampering_With_Cursors_Prohibited + (Container : Set) return Boolean + is + begin + return Is_Busy (Container.HT.TC); + end Tampering_With_Cursors_Prohibited; + + function Element (Container : Set; Position : Cursor) return Element_Type is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + return Element (Position); + end Element; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)) is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + Query_Element (Position, Process); + end Query_Element; + + function Next (Container : Set; Position : Cursor) return Cursor is + begin + if Checks and then + not (Position = No_Element or else Has_Element (Container, Position)) + then + raise Program_Error with "Position for wrong Container"; + end if; + + return Next (Position); + end Next; + + procedure Next (Container : Set; Position : in out Cursor) is + begin + Position := Next (Container, Position); + end Next; + + ------------------ + -- Generic_Keys -- + ------------------ + package body Generic_Keys is ----------------------- diff --git a/gcc/ada/libgnat/a-cihase.ads b/gcc/ada/libgnat/a-cihase.ads index cff713d..dcd1d6a 100644 --- a/gcc/ada/libgnat/a-cihase.ads +++ b/gcc/ada/libgnat/a-cihase.ads @@ -355,6 +355,25 @@ is function Iterate (Container : Set) return Set_Iterator_Interfaces.Forward_Iterator'Class; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean; + + function Tampering_With_Cursors_Prohibited (Container : Set) return Boolean; + + function Element (Container : Set; Position : Cursor) return Element_Type; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)); + + function Next (Container : Set; Position : Cursor) return Cursor; + + procedure Next (Container : Set; Position : in out Cursor); + + ---------------- + generic type Key_Type (<>) is private; diff --git a/gcc/ada/libgnat/a-ciorse.adb b/gcc/ada/libgnat/a-ciorse.adb index b23b252..d5502ea 100644 --- a/gcc/ada/libgnat/a-ciorse.adb +++ b/gcc/ada/libgnat/a-ciorse.adb @@ -721,6 +721,61 @@ is Deallocate (X); end Free; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean is + begin + pragma Assert + (Vet (Container.Tree, Position.Node), "bad cursor in Has_Element"); + pragma Assert ((Position.Container = null) = (Position.Node = null), + "bad nullity in Has_Element"); + return Position.Container = Container'Unrestricted_Access; + end Has_Element; + + function Tampering_With_Cursors_Prohibited + (Container : Set) return Boolean + is + begin + return Is_Busy (Container.Tree.TC); + end Tampering_With_Cursors_Prohibited; + + function Element (Container : Set; Position : Cursor) return Element_Type is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + return Element (Position); + end Element; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)) is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + Query_Element (Position, Process); + end Query_Element; + + function Next (Container : Set; Position : Cursor) return Cursor is + begin + if Checks and then + not (Position = No_Element or else Has_Element (Container, Position)) + then + raise Program_Error with "Position for wrong Container"; + end if; + + return Next (Position); + end Next; + + procedure Next (Container : Set; Position : in out Cursor) is + begin + Position := Next (Container, Position); + end Next; + ------------------ -- Generic_Keys -- ------------------ diff --git a/gcc/ada/libgnat/a-ciorse.ads b/gcc/ada/libgnat/a-ciorse.ads index 13272e2..d053ac7 100644 --- a/gcc/ada/libgnat/a-ciorse.ads +++ b/gcc/ada/libgnat/a-ciorse.ads @@ -238,6 +238,25 @@ is Start : Cursor) return Set_Iterator_Interfaces.Reversible_Iterator'class; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean; + + function Tampering_With_Cursors_Prohibited (Container : Set) return Boolean; + + function Element (Container : Set; Position : Cursor) return Element_Type; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)); + + function Next (Container : Set; Position : Cursor) return Cursor; + + procedure Next (Container : Set; Position : in out Cursor); + + ---------------- + generic type Key_Type (<>) is private; diff --git a/gcc/ada/libgnat/a-cohase.adb b/gcc/ada/libgnat/a-cohase.adb index 986b354..4656868 100644 --- a/gcc/ada/libgnat/a-cohase.adb +++ b/gcc/ada/libgnat/a-cohase.adb @@ -1844,6 +1844,64 @@ is Element_Type'Write (Stream, Node.Element); end Write_Node; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean is + begin + pragma Assert (Vet (Position), "bad cursor in Has_Element"); + pragma Assert ((Position.Container = null) = (Position.Node = null), + "bad nullity in Has_Element"); + return Position.Container = Container'Unrestricted_Access; + end Has_Element; + + function Tampering_With_Cursors_Prohibited + (Container : Set) return Boolean + is + begin + return Is_Busy (Container.HT.TC); + end Tampering_With_Cursors_Prohibited; + + function Element (Container : Set; Position : Cursor) return Element_Type is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + return Element (Position); + end Element; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)) is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + Query_Element (Position, Process); + end Query_Element; + + function Next (Container : Set; Position : Cursor) return Cursor is + begin + if Checks and then + not (Position = No_Element or else Has_Element (Container, Position)) + then + raise Program_Error with "Position for wrong Container"; + end if; + + return Next (Position); + end Next; + + procedure Next (Container : Set; Position : in out Cursor) is + begin + Position := Next (Container, Position); + end Next; + + ------------------ + -- Generic_Keys -- + ------------------ + package body Generic_Keys is ----------------------- diff --git a/gcc/ada/libgnat/a-cohase.ads b/gcc/ada/libgnat/a-cohase.ads index ada212c..9f562d8 100644 --- a/gcc/ada/libgnat/a-cohase.ads +++ b/gcc/ada/libgnat/a-cohase.ads @@ -367,6 +367,25 @@ is function Iterate (Container : Set) return Set_Iterator_Interfaces.Forward_Iterator'Class; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean; + + function Tampering_With_Cursors_Prohibited (Container : Set) return Boolean; + + function Element (Container : Set; Position : Cursor) return Element_Type; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)); + + function Next (Container : Set; Position : Cursor) return Cursor; + + procedure Next (Container : Set; Position : in out Cursor); + + ---------------- + generic type Key_Type (<>) is private; diff --git a/gcc/ada/libgnat/a-conhel.adb b/gcc/ada/libgnat/a-conhel.adb index b24be67..46f1bcc 100644 --- a/gcc/ada/libgnat/a-conhel.adb +++ b/gcc/ada/libgnat/a-conhel.adb @@ -36,8 +36,6 @@ package body Ada.Containers.Helpers is package body Generic_Implementation is - use type SAC.Atomic_Unsigned; - ------------ -- Adjust -- ------------ @@ -133,7 +131,7 @@ package body Ada.Containers.Helpers is procedure TC_Check (T_Counts : Tamper_Counts) is begin if T_Check then - if T_Counts.Busy > 0 then + if Is_Busy (T_Counts) then raise Program_Error with "attempt to tamper with cursors"; end if; @@ -144,7 +142,7 @@ package body Ada.Containers.Helpers is -- Thus if the busy count is zero, then the lock count -- must also be zero. - pragma Assert (T_Counts.Lock = 0); + pragma Assert (not Is_Locked (T_Counts)); end if; end TC_Check; @@ -154,7 +152,7 @@ package body Ada.Containers.Helpers is procedure TE_Check (T_Counts : Tamper_Counts) is begin - if T_Check and then T_Counts.Lock > 0 then + if T_Check and then Is_Locked (T_Counts) then raise Program_Error with "attempt to tamper with elements"; end if; diff --git a/gcc/ada/libgnat/a-conhel.ads b/gcc/ada/libgnat/a-conhel.ads index 47811f5..92e23d0 100644 --- a/gcc/ada/libgnat/a-conhel.ads +++ b/gcc/ada/libgnat/a-conhel.ads @@ -121,9 +121,31 @@ package Ada.Containers.Helpers is pragma Inline (TE_Check); -- Tampering-with-elements check - ----------------- - -- RAII Types -- - ----------------- + --------------------------------------- + -- Queries of busy and locked status -- + --------------------------------------- + + -- These are never called when tampering checks are suppressed. + + use type SAC.Atomic_Unsigned; + + pragma Warnings (Off); + -- Otherwise, the -gnatw.n switch triggers unwanted warnings on the + -- references to atomic variables below. + + function Is_Busy (T_Counts : Tamper_Counts) return Boolean is + (if T_Check then T_Counts.Busy > 0 else raise Program_Error); + pragma Inline (Is_Busy); + + function Is_Locked (T_Counts : Tamper_Counts) return Boolean is + (if T_Check then T_Counts.Lock > 0 else raise Program_Error); + pragma Inline (Is_Locked); + + pragma Warnings (On); + + ---------------- + -- RAII Types -- + ---------------- -- Initialize of With_Busy increments the Busy count, and Finalize -- decrements it. Thus, to prohibit tampering with elements within a diff --git a/gcc/ada/libgnat/a-coorse.adb b/gcc/ada/libgnat/a-coorse.adb index 7998ee8..848022e 100644 --- a/gcc/ada/libgnat/a-coorse.adb +++ b/gcc/ada/libgnat/a-coorse.adb @@ -643,6 +643,61 @@ is end if; end Free; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean is + begin + pragma Assert + (Vet (Container.Tree, Position.Node), "bad cursor in Has_Element"); + pragma Assert ((Position.Container = null) = (Position.Node = null), + "bad nullity in Has_Element"); + return Position.Container = Container'Unrestricted_Access; + end Has_Element; + + function Tampering_With_Cursors_Prohibited + (Container : Set) return Boolean + is + begin + return Is_Busy (Container.Tree.TC); + end Tampering_With_Cursors_Prohibited; + + function Element (Container : Set; Position : Cursor) return Element_Type is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + return Element (Position); + end Element; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)) is + begin + if Checks and then not Has_Element (Container, Position) then + raise Program_Error with "Position for wrong Container"; + end if; + + Query_Element (Position, Process); + end Query_Element; + + function Next (Container : Set; Position : Cursor) return Cursor is + begin + if Checks and then + not (Position = No_Element or else Has_Element (Container, Position)) + then + raise Program_Error with "Position for wrong Container"; + end if; + + return Next (Position); + end Next; + + procedure Next (Container : Set; Position : in out Cursor) is + begin + Position := Next (Container, Position); + end Next; + ------------------ -- Generic_Keys -- ------------------ diff --git a/gcc/ada/libgnat/a-coorse.ads b/gcc/ada/libgnat/a-coorse.ads index 1833336..9619599 100644 --- a/gcc/ada/libgnat/a-coorse.ads +++ b/gcc/ada/libgnat/a-coorse.ads @@ -231,6 +231,25 @@ is Start : Cursor) return Set_Iterator_Interfaces.Reversible_Iterator'class; + -- Ada 2022 features: + + function Has_Element (Container : Set; Position : Cursor) return Boolean; + + function Tampering_With_Cursors_Prohibited (Container : Set) return Boolean; + + function Element (Container : Set; Position : Cursor) return Element_Type; + + procedure Query_Element + (Container : Set; + Position : Cursor; + Process : not null access procedure (Element : Element_Type)); + + function Next (Container : Set; Position : Cursor) return Cursor; + + procedure Next (Container : Set; Position : in out Cursor); + + ---------------- + generic type Key_Type (<>) is private; -- cgit v1.1 From 4030e83c276c63700b62c3cebd49097f83cf6288 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 24 May 2022 20:38:01 +0200 Subject: [Ada] Give missing error on ambiguous operand of equality operator When the code responsible for giving errors on ambiguous operands of comparison and equality operators was moved from the 1st phase (analysis) to the 2nd phase (resolution) of semantic processing, it was incorrectly restricted to the operator case, which was valid during the 1st phase but is not during the 2nd phase. gcc/ada/ * sem_res.adb (Resolve_Comparison_Op): Deal with ambiguous operands in all cases. (Resolve_Equality_Op): Likewise, except for the case of the implicit inequality operator created for a user-defined operator that is not an intrinsic subprogram. --- gcc/ada/sem_res.adb | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 7d595eb..fd1615d 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -7539,9 +7539,7 @@ package body Sem_Res is if T = Any_Type then -- Deal with explicit ambiguity of operands - if Ekind (Entity (N)) = E_Operator - and then (Is_Overloaded (L) or else Is_Overloaded (R)) - then + if Is_Overloaded (L) or else Is_Overloaded (R) then Ambiguous_Operands (N); end if; @@ -8563,6 +8561,16 @@ package body Sem_Res is L : constant Node_Id := Left_Opnd (N); R : constant Node_Id := Right_Opnd (N); + Implicit_NE_For_User_Defined_Operator : constant Boolean := + Nkind (N) = N_Op_Ne + and then Ekind (Entity (N)) = E_Function + and then not Comes_From_Source (Entity (N)) + and then not + Is_Intrinsic_Subprogram (Corresponding_Equality (Entity (N))); + -- Whether this is a call to the implicit inequality operator created + -- for a user-defined operator that is not an intrinsic subprogram, in + -- which case we need to skip some processing. + T : Entity_Id := Find_Unique_Type (L, R); procedure Check_Access_Attribute (N : Node_Id); @@ -8833,9 +8841,12 @@ package body Sem_Res is Generate_Reference (T, N, ' '); if T = Any_Type then - -- Deal with explicit ambiguity of operands + -- Deal with explicit ambiguity of operands, unless this is a call + -- to the implicit inequality operator created for a user-defined + -- operator that is not an intrinsic subprogram, since the common + -- resolution of operands done here does not apply to it. - if Ekind (Entity (N)) = E_Operator + if not Implicit_NE_For_User_Defined_Operator and then (Is_Overloaded (L) or else Is_Overloaded (R)) then Ambiguous_Operands (N); @@ -9009,17 +9020,11 @@ package body Sem_Res is Generate_Operator_Reference (N, T); Check_Low_Bound_Tested (N); - -- If this is an inequality, it may be the implicit inequality - -- created for a user-defined operation, in which case the corres- - -- ponding equality operation is not intrinsic, and the operation - -- cannot be constant-folded. Else fold. + -- Unless this is a call to the implicit inequality operator created + -- for a user-defined operator that is not an intrinsic subprogram, + -- try to fold the operation. - if Nkind (N) = N_Op_Eq - or else Comes_From_Source (Entity (N)) - or else Ekind (Entity (N)) = E_Operator - or else - Is_Intrinsic_Subprogram (Corresponding_Equality (Entity (N))) - then + if not Implicit_NE_For_User_Defined_Operator then Analyze_Dimension (N); Eval_Relational_Op (N); -- cgit v1.1 From e7428fff12ca000b59185c71dee511ac0c886089 Mon Sep 17 00:00:00 2001 From: Julien Bortolussi Date: Tue, 24 May 2022 16:15:47 +0200 Subject: [Ada] Add a RM entry for the functional infinite sequences Modify the RM to take into account the new functional container. gcc/ada/ * doc/gnat_rm/the_gnat_library.rst: Add the new entry. * gnat_rm.texi: Regenerate. --- gcc/ada/doc/gnat_rm/the_gnat_library.rst | 22 ++ gcc/ada/gnat_rm.texi | 430 ++++++++++++++++--------------- 2 files changed, 249 insertions(+), 203 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/doc/gnat_rm/the_gnat_library.rst b/gcc/ada/doc/gnat_rm/the_gnat_library.rst index 85044f3..a682f01 100644 --- a/gcc/ada/doc/gnat_rm/the_gnat_library.rst +++ b/gcc/ada/doc/gnat_rm/the_gnat_library.rst @@ -253,6 +253,28 @@ in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering. +.. _`Ada.Containers.Functional_Infinite_Sequences_(a-cfinse.ads)`: + +``Ada.Containers.Functional_Infinite_Sequences`` (:file:`a-cfinse.ads`) +======================================================================= + +.. index:: Ada.Containers.Functional_Infinite_Sequences (a-cfinse.ads) + +.. index:: Functional Infinite Sequences + +This child of ``Ada.Containers`` defines immutable sequences indexed by +``Big_Integer``. These containers are unbounded and may contain indefinite +elements. Their API features functions creating new containers from existing +ones. To remain reasonably efficient, their implementation involves sharing +between data-structures. As they are functional, that is, no primitives are +provided which would allow modifying an existing container, these containers +can still be used safely. + +These containers are controlled so that the allocated memory can be reclaimed +when the container is no longer referenced. Thus, they cannot directly be used +in contexts where controlled types are not supported. +The specification of this unit is compatible with SPARK 2014. + .. _`Ada.Containers.Functional_Vectors_(a-cofuve.ads)`: ``Ada.Containers.Functional_Vectors`` (:file:`a-cofuve.ads`) diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index a893912..b264a45 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -703,6 +703,7 @@ The GNAT Library * Ada.Containers.Formal_Ordered_Sets (a-cforse.ads): Ada Containers Formal_Ordered_Sets a-cforse ads. * Ada.Containers.Formal_Vectors (a-cofove.ads): Ada Containers Formal_Vectors a-cofove ads. * Ada.Containers.Formal_Indefinite_Vectors (a-cfinve.ads): Ada Containers Formal_Indefinite_Vectors a-cfinve ads. +* Ada.Containers.Functional_Infinite_Sequences (a-cfinse.ads): Ada Containers Functional_Infinite_Sequences a-cfinse ads. * Ada.Containers.Functional_Vectors (a-cofuve.ads): Ada Containers Functional_Vectors a-cofuve ads. * Ada.Containers.Functional_Sets (a-cofuse.ads): Ada Containers Functional_Sets a-cofuse ads. * Ada.Containers.Functional_Maps (a-cofuma.ads): Ada Containers Functional_Maps a-cofuma ads. @@ -23121,6 +23122,7 @@ of GNAT, and will generate a warning message. * Ada.Containers.Formal_Ordered_Sets (a-cforse.ads): Ada Containers Formal_Ordered_Sets a-cforse ads. * Ada.Containers.Formal_Vectors (a-cofove.ads): Ada Containers Formal_Vectors a-cofove ads. * Ada.Containers.Formal_Indefinite_Vectors (a-cfinve.ads): Ada Containers Formal_Indefinite_Vectors a-cfinve ads. +* Ada.Containers.Functional_Infinite_Sequences (a-cfinse.ads): Ada Containers Functional_Infinite_Sequences a-cfinse ads. * Ada.Containers.Functional_Vectors (a-cofuve.ads): Ada Containers Functional_Vectors a-cofuve ads. * Ada.Containers.Functional_Sets (a-cofuse.ads): Ada Containers Functional_Sets a-cofuse ads. * Ada.Containers.Functional_Maps (a-cofuma.ads): Ada Containers Functional_Maps a-cofuma ads. @@ -23469,7 +23471,7 @@ in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering. -@node Ada Containers Formal_Indefinite_Vectors a-cfinve ads,Ada Containers Functional_Vectors a-cofuve ads,Ada Containers Formal_Vectors a-cofove ads,The GNAT Library +@node Ada Containers Formal_Indefinite_Vectors a-cfinve ads,Ada Containers Functional_Infinite_Sequences a-cfinse ads,Ada Containers Formal_Vectors a-cofove ads,The GNAT Library @anchor{gnat_rm/the_gnat_library ada-containers-formal-indefinite-vectors-a-cfinve-ads}@anchor{2ee}@anchor{gnat_rm/the_gnat_library id13}@anchor{2ef} @section @code{Ada.Containers.Formal_Indefinite_Vectors} (@code{a-cfinve.ads}) @@ -23488,8 +23490,30 @@ in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering. -@node Ada Containers Functional_Vectors a-cofuve ads,Ada Containers Functional_Sets a-cofuse ads,Ada Containers Formal_Indefinite_Vectors a-cfinve ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-containers-functional-vectors-a-cofuve-ads}@anchor{2f0}@anchor{gnat_rm/the_gnat_library id14}@anchor{2f1} +@node Ada Containers Functional_Infinite_Sequences a-cfinse ads,Ada Containers Functional_Vectors a-cofuve ads,Ada Containers Formal_Indefinite_Vectors a-cfinve ads,The GNAT Library +@anchor{gnat_rm/the_gnat_library ada-containers-functional-infinite-sequences-a-cfinse-ads}@anchor{2f0}@anchor{gnat_rm/the_gnat_library id14}@anchor{2f1} +@section @code{Ada.Containers.Functional_Infinite_Sequences} (@code{a-cfinse.ads}) + + +@geindex Ada.Containers.Functional_Infinite_Sequences (a-cfinse.ads) + +@geindex Functional Infinite Sequences + +This child of @code{Ada.Containers} defines immutable sequences indexed by +@code{Big_Integer}. These containers are unbounded and may contain indefinite +elements. Their API features functions creating new containers from existing +ones. To remain reasonably efficient, their implementation involves sharing +between data-structures. As they are functional, that is, no primitives are +provided which would allow modifying an existing container, these containers +can still be used safely. + +These containers are controlled so that the allocated memory can be reclaimed +when the container is no longer referenced. Thus, they cannot directly be used +in contexts where controlled types are not supported. +The specification of this unit is compatible with SPARK 2014. + +@node Ada Containers Functional_Vectors a-cofuve ads,Ada Containers Functional_Sets a-cofuse ads,Ada Containers Functional_Infinite_Sequences a-cfinse ads,The GNAT Library +@anchor{gnat_rm/the_gnat_library ada-containers-functional-vectors-a-cofuve-ads}@anchor{2f2}@anchor{gnat_rm/the_gnat_library id15}@anchor{2f3} @section @code{Ada.Containers.Functional_Vectors} (@code{a-cofuve.ads}) @@ -23511,7 +23535,7 @@ and annotations, so that they can be removed from the final executable. The specification of this unit is compatible with SPARK 2014. @node Ada Containers Functional_Sets a-cofuse ads,Ada Containers Functional_Maps a-cofuma ads,Ada Containers Functional_Vectors a-cofuve ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-containers-functional-sets-a-cofuse-ads}@anchor{2f2}@anchor{gnat_rm/the_gnat_library id15}@anchor{2f3} +@anchor{gnat_rm/the_gnat_library ada-containers-functional-sets-a-cofuse-ads}@anchor{2f4}@anchor{gnat_rm/the_gnat_library id16}@anchor{2f5} @section @code{Ada.Containers.Functional_Sets} (@code{a-cofuse.ads}) @@ -23532,7 +23556,7 @@ in contexts where controlled types are not supported. The specification of this unit is compatible with SPARK 2014. @node Ada Containers Functional_Maps a-cofuma ads,Ada Containers Bounded_Holders a-coboho ads,Ada Containers Functional_Sets a-cofuse ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-containers-functional-maps-a-cofuma-ads}@anchor{2f4}@anchor{gnat_rm/the_gnat_library id16}@anchor{2f5} +@anchor{gnat_rm/the_gnat_library ada-containers-functional-maps-a-cofuma-ads}@anchor{2f6}@anchor{gnat_rm/the_gnat_library id17}@anchor{2f7} @section @code{Ada.Containers.Functional_Maps} (@code{a-cofuma.ads}) @@ -23553,7 +23577,7 @@ in contexts where controlled types are not supported. The specification of this unit is compatible with SPARK 2014. @node Ada Containers Bounded_Holders a-coboho ads,Ada Command_Line Environment a-colien ads,Ada Containers Functional_Maps a-cofuma ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{2f6}@anchor{gnat_rm/the_gnat_library id17}@anchor{2f7} +@anchor{gnat_rm/the_gnat_library ada-containers-bounded-holders-a-coboho-ads}@anchor{2f8}@anchor{gnat_rm/the_gnat_library id18}@anchor{2f9} @section @code{Ada.Containers.Bounded_Holders} (@code{a-coboho.ads}) @@ -23565,7 +23589,7 @@ This child of @code{Ada.Containers} defines a modified version of Indefinite_Holders that avoids heap allocation. @node Ada Command_Line Environment a-colien ads,Ada Command_Line Remove a-colire ads,Ada Containers Bounded_Holders a-coboho ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-command-line-environment-a-colien-ads}@anchor{2f8}@anchor{gnat_rm/the_gnat_library id18}@anchor{2f9} +@anchor{gnat_rm/the_gnat_library ada-command-line-environment-a-colien-ads}@anchor{2fa}@anchor{gnat_rm/the_gnat_library id19}@anchor{2fb} @section @code{Ada.Command_Line.Environment} (@code{a-colien.ads}) @@ -23578,7 +23602,7 @@ provides a mechanism for obtaining environment values on systems where this concept makes sense. @node Ada Command_Line Remove a-colire ads,Ada Command_Line Response_File a-clrefi ads,Ada Command_Line Environment a-colien ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2fa}@anchor{gnat_rm/the_gnat_library id19}@anchor{2fb} +@anchor{gnat_rm/the_gnat_library ada-command-line-remove-a-colire-ads}@anchor{2fc}@anchor{gnat_rm/the_gnat_library id20}@anchor{2fd} @section @code{Ada.Command_Line.Remove} (@code{a-colire.ads}) @@ -23596,7 +23620,7 @@ to further calls on the subprograms in @code{Ada.Command_Line} will not see the removed argument. @node Ada Command_Line Response_File a-clrefi ads,Ada Direct_IO C_Streams a-diocst ads,Ada Command_Line Remove a-colire ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-command-line-response-file-a-clrefi-ads}@anchor{2fc}@anchor{gnat_rm/the_gnat_library id20}@anchor{2fd} +@anchor{gnat_rm/the_gnat_library ada-command-line-response-file-a-clrefi-ads}@anchor{2fe}@anchor{gnat_rm/the_gnat_library id21}@anchor{2ff} @section @code{Ada.Command_Line.Response_File} (@code{a-clrefi.ads}) @@ -23616,7 +23640,7 @@ Using a response file allow passing a set of arguments to an executable longer than the maximum allowed by the system on the command line. @node Ada Direct_IO C_Streams a-diocst ads,Ada Exceptions Is_Null_Occurrence a-einuoc ads,Ada Command_Line Response_File a-clrefi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{2fe}@anchor{gnat_rm/the_gnat_library id21}@anchor{2ff} +@anchor{gnat_rm/the_gnat_library ada-direct-io-c-streams-a-diocst-ads}@anchor{300}@anchor{gnat_rm/the_gnat_library id22}@anchor{301} @section @code{Ada.Direct_IO.C_Streams} (@code{a-diocst.ads}) @@ -23631,7 +23655,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Exceptions Is_Null_Occurrence a-einuoc ads,Ada Exceptions Last_Chance_Handler a-elchha ads,Ada Direct_IO C_Streams a-diocst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{300}@anchor{gnat_rm/the_gnat_library id22}@anchor{301} +@anchor{gnat_rm/the_gnat_library ada-exceptions-is-null-occurrence-a-einuoc-ads}@anchor{302}@anchor{gnat_rm/the_gnat_library id23}@anchor{303} @section @code{Ada.Exceptions.Is_Null_Occurrence} (@code{a-einuoc.ads}) @@ -23645,7 +23669,7 @@ exception occurrence (@code{Null_Occurrence}) without raising an exception. @node Ada Exceptions Last_Chance_Handler a-elchha ads,Ada Exceptions Traceback a-exctra ads,Ada Exceptions Is_Null_Occurrence a-einuoc ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{302}@anchor{gnat_rm/the_gnat_library id23}@anchor{303} +@anchor{gnat_rm/the_gnat_library ada-exceptions-last-chance-handler-a-elchha-ads}@anchor{304}@anchor{gnat_rm/the_gnat_library id24}@anchor{305} @section @code{Ada.Exceptions.Last_Chance_Handler} (@code{a-elchha.ads}) @@ -23659,7 +23683,7 @@ exceptions (hence the name last chance), and perform clean ups before terminating the program. Note that this subprogram never returns. @node Ada Exceptions Traceback a-exctra ads,Ada Sequential_IO C_Streams a-siocst ads,Ada Exceptions Last_Chance_Handler a-elchha ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-exceptions-traceback-a-exctra-ads}@anchor{304}@anchor{gnat_rm/the_gnat_library id24}@anchor{305} +@anchor{gnat_rm/the_gnat_library ada-exceptions-traceback-a-exctra-ads}@anchor{306}@anchor{gnat_rm/the_gnat_library id25}@anchor{307} @section @code{Ada.Exceptions.Traceback} (@code{a-exctra.ads}) @@ -23672,7 +23696,7 @@ give a traceback array of addresses based on an exception occurrence. @node Ada Sequential_IO C_Streams a-siocst ads,Ada Streams Stream_IO C_Streams a-ssicst ads,Ada Exceptions Traceback a-exctra ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-sequential-io-c-streams-a-siocst-ads}@anchor{306}@anchor{gnat_rm/the_gnat_library id25}@anchor{307} +@anchor{gnat_rm/the_gnat_library ada-sequential-io-c-streams-a-siocst-ads}@anchor{308}@anchor{gnat_rm/the_gnat_library id26}@anchor{309} @section @code{Ada.Sequential_IO.C_Streams} (@code{a-siocst.ads}) @@ -23687,7 +23711,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Streams Stream_IO C_Streams a-ssicst ads,Ada Strings Unbounded Text_IO a-suteio ads,Ada Sequential_IO C_Streams a-siocst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{308}@anchor{gnat_rm/the_gnat_library id26}@anchor{309} +@anchor{gnat_rm/the_gnat_library ada-streams-stream-io-c-streams-a-ssicst-ads}@anchor{30a}@anchor{gnat_rm/the_gnat_library id27}@anchor{30b} @section @code{Ada.Streams.Stream_IO.C_Streams} (@code{a-ssicst.ads}) @@ -23702,7 +23726,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Strings Unbounded Text_IO a-suteio ads,Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,Ada Streams Stream_IO C_Streams a-ssicst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-strings-unbounded-text-io-a-suteio-ads}@anchor{30a}@anchor{gnat_rm/the_gnat_library id27}@anchor{30b} +@anchor{gnat_rm/the_gnat_library ada-strings-unbounded-text-io-a-suteio-ads}@anchor{30c}@anchor{gnat_rm/the_gnat_library id28}@anchor{30d} @section @code{Ada.Strings.Unbounded.Text_IO} (@code{a-suteio.ads}) @@ -23719,7 +23743,7 @@ strings, avoiding the necessity for an intermediate operation with ordinary strings. @node Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,Ada Strings Unbounded Text_IO a-suteio ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{30c}@anchor{gnat_rm/the_gnat_library id28}@anchor{30d} +@anchor{gnat_rm/the_gnat_library ada-strings-wide-unbounded-wide-text-io-a-swuwti-ads}@anchor{30e}@anchor{gnat_rm/the_gnat_library id29}@anchor{30f} @section @code{Ada.Strings.Wide_Unbounded.Wide_Text_IO} (@code{a-swuwti.ads}) @@ -23736,7 +23760,7 @@ wide strings, avoiding the necessity for an intermediate operation with ordinary wide strings. @node Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,Ada Task_Initialization a-tasini ads,Ada Strings Wide_Unbounded Wide_Text_IO a-swuwti ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{30e}@anchor{gnat_rm/the_gnat_library id29}@anchor{30f} +@anchor{gnat_rm/the_gnat_library ada-strings-wide-wide-unbounded-wide-wide-text-io-a-szuzti-ads}@anchor{310}@anchor{gnat_rm/the_gnat_library id30}@anchor{311} @section @code{Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO} (@code{a-szuzti.ads}) @@ -23753,7 +23777,7 @@ wide wide strings, avoiding the necessity for an intermediate operation with ordinary wide wide strings. @node Ada Task_Initialization a-tasini ads,Ada Text_IO C_Streams a-tiocst ads,Ada Strings Wide_Wide_Unbounded Wide_Wide_Text_IO a-szuzti ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-task-initialization-a-tasini-ads}@anchor{310}@anchor{gnat_rm/the_gnat_library id30}@anchor{311} +@anchor{gnat_rm/the_gnat_library ada-task-initialization-a-tasini-ads}@anchor{312}@anchor{gnat_rm/the_gnat_library id31}@anchor{313} @section @code{Ada.Task_Initialization} (@code{a-tasini.ads}) @@ -23765,7 +23789,7 @@ parameterless procedures. Note that such a handler is only invoked for those tasks activated after the handler is set. @node Ada Text_IO C_Streams a-tiocst ads,Ada Text_IO Reset_Standard_Files a-tirsfi ads,Ada Task_Initialization a-tasini ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-text-io-c-streams-a-tiocst-ads}@anchor{312}@anchor{gnat_rm/the_gnat_library id31}@anchor{313} +@anchor{gnat_rm/the_gnat_library ada-text-io-c-streams-a-tiocst-ads}@anchor{314}@anchor{gnat_rm/the_gnat_library id32}@anchor{315} @section @code{Ada.Text_IO.C_Streams} (@code{a-tiocst.ads}) @@ -23780,7 +23804,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Text_IO Reset_Standard_Files a-tirsfi ads,Ada Wide_Characters Unicode a-wichun ads,Ada Text_IO C_Streams a-tiocst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-text-io-reset-standard-files-a-tirsfi-ads}@anchor{314}@anchor{gnat_rm/the_gnat_library id32}@anchor{315} +@anchor{gnat_rm/the_gnat_library ada-text-io-reset-standard-files-a-tirsfi-ads}@anchor{316}@anchor{gnat_rm/the_gnat_library id33}@anchor{317} @section @code{Ada.Text_IO.Reset_Standard_Files} (@code{a-tirsfi.ads}) @@ -23795,7 +23819,7 @@ execution (for example a standard input file may be redefined to be interactive). @node Ada Wide_Characters Unicode a-wichun ads,Ada Wide_Text_IO C_Streams a-wtcstr ads,Ada Text_IO Reset_Standard_Files a-tirsfi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{316}@anchor{gnat_rm/the_gnat_library id33}@anchor{317} +@anchor{gnat_rm/the_gnat_library ada-wide-characters-unicode-a-wichun-ads}@anchor{318}@anchor{gnat_rm/the_gnat_library id34}@anchor{319} @section @code{Ada.Wide_Characters.Unicode} (@code{a-wichun.ads}) @@ -23808,7 +23832,7 @@ This package provides subprograms that allow categorization of Wide_Character values according to Unicode categories. @node Ada Wide_Text_IO C_Streams a-wtcstr ads,Ada Wide_Text_IO Reset_Standard_Files a-wrstfi ads,Ada Wide_Characters Unicode a-wichun ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{318}@anchor{gnat_rm/the_gnat_library id34}@anchor{319} +@anchor{gnat_rm/the_gnat_library ada-wide-text-io-c-streams-a-wtcstr-ads}@anchor{31a}@anchor{gnat_rm/the_gnat_library id35}@anchor{31b} @section @code{Ada.Wide_Text_IO.C_Streams} (@code{a-wtcstr.ads}) @@ -23823,7 +23847,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Wide_Text_IO Reset_Standard_Files a-wrstfi ads,Ada Wide_Wide_Characters Unicode a-zchuni ads,Ada Wide_Text_IO C_Streams a-wtcstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-text-io-reset-standard-files-a-wrstfi-ads}@anchor{31a}@anchor{gnat_rm/the_gnat_library id35}@anchor{31b} +@anchor{gnat_rm/the_gnat_library ada-wide-text-io-reset-standard-files-a-wrstfi-ads}@anchor{31c}@anchor{gnat_rm/the_gnat_library id36}@anchor{31d} @section @code{Ada.Wide_Text_IO.Reset_Standard_Files} (@code{a-wrstfi.ads}) @@ -23838,7 +23862,7 @@ execution (for example a standard input file may be redefined to be interactive). @node Ada Wide_Wide_Characters Unicode a-zchuni ads,Ada Wide_Wide_Text_IO C_Streams a-ztcstr ads,Ada Wide_Text_IO Reset_Standard_Files a-wrstfi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{31c}@anchor{gnat_rm/the_gnat_library id36}@anchor{31d} +@anchor{gnat_rm/the_gnat_library ada-wide-wide-characters-unicode-a-zchuni-ads}@anchor{31e}@anchor{gnat_rm/the_gnat_library id37}@anchor{31f} @section @code{Ada.Wide_Wide_Characters.Unicode} (@code{a-zchuni.ads}) @@ -23851,7 +23875,7 @@ This package provides subprograms that allow categorization of Wide_Wide_Character values according to Unicode categories. @node Ada Wide_Wide_Text_IO C_Streams a-ztcstr ads,Ada Wide_Wide_Text_IO Reset_Standard_Files a-zrstfi ads,Ada Wide_Wide_Characters Unicode a-zchuni ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{31e}@anchor{gnat_rm/the_gnat_library id37}@anchor{31f} +@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-c-streams-a-ztcstr-ads}@anchor{320}@anchor{gnat_rm/the_gnat_library id38}@anchor{321} @section @code{Ada.Wide_Wide_Text_IO.C_Streams} (@code{a-ztcstr.ads}) @@ -23866,7 +23890,7 @@ extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. @node Ada Wide_Wide_Text_IO Reset_Standard_Files a-zrstfi ads,GNAT Altivec g-altive ads,Ada Wide_Wide_Text_IO C_Streams a-ztcstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-reset-standard-files-a-zrstfi-ads}@anchor{320}@anchor{gnat_rm/the_gnat_library id38}@anchor{321} +@anchor{gnat_rm/the_gnat_library ada-wide-wide-text-io-reset-standard-files-a-zrstfi-ads}@anchor{322}@anchor{gnat_rm/the_gnat_library id39}@anchor{323} @section @code{Ada.Wide_Wide_Text_IO.Reset_Standard_Files} (@code{a-zrstfi.ads}) @@ -23881,7 +23905,7 @@ change during execution (for example a standard input file may be redefined to be interactive). @node GNAT Altivec g-altive ads,GNAT Altivec Conversions g-altcon ads,Ada Wide_Wide_Text_IO Reset_Standard_Files a-zrstfi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-g-altive-ads}@anchor{322}@anchor{gnat_rm/the_gnat_library id39}@anchor{323} +@anchor{gnat_rm/the_gnat_library gnat-altivec-g-altive-ads}@anchor{324}@anchor{gnat_rm/the_gnat_library id40}@anchor{325} @section @code{GNAT.Altivec} (@code{g-altive.ads}) @@ -23894,7 +23918,7 @@ definitions of constants and types common to all the versions of the binding. @node GNAT Altivec Conversions g-altcon ads,GNAT Altivec Vector_Operations g-alveop ads,GNAT Altivec g-altive ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-conversions-g-altcon-ads}@anchor{324}@anchor{gnat_rm/the_gnat_library id40}@anchor{325} +@anchor{gnat_rm/the_gnat_library gnat-altivec-conversions-g-altcon-ads}@anchor{326}@anchor{gnat_rm/the_gnat_library id41}@anchor{327} @section @code{GNAT.Altivec.Conversions} (@code{g-altcon.ads}) @@ -23905,7 +23929,7 @@ binding. This package provides the Vector/View conversion routines. @node GNAT Altivec Vector_Operations g-alveop ads,GNAT Altivec Vector_Types g-alvety ads,GNAT Altivec Conversions g-altcon ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{326}@anchor{gnat_rm/the_gnat_library id41}@anchor{327} +@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-operations-g-alveop-ads}@anchor{328}@anchor{gnat_rm/the_gnat_library id42}@anchor{329} @section @code{GNAT.Altivec.Vector_Operations} (@code{g-alveop.ads}) @@ -23919,7 +23943,7 @@ library. The hard binding is provided as a separate package. This unit is common to both bindings. @node GNAT Altivec Vector_Types g-alvety ads,GNAT Altivec Vector_Views g-alvevi ads,GNAT Altivec Vector_Operations g-alveop ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-types-g-alvety-ads}@anchor{328}@anchor{gnat_rm/the_gnat_library id42}@anchor{329} +@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-types-g-alvety-ads}@anchor{32a}@anchor{gnat_rm/the_gnat_library id43}@anchor{32b} @section @code{GNAT.Altivec.Vector_Types} (@code{g-alvety.ads}) @@ -23931,7 +23955,7 @@ This package exposes the various vector types part of the Ada binding to AltiVec facilities. @node GNAT Altivec Vector_Views g-alvevi ads,GNAT Array_Split g-arrspl ads,GNAT Altivec Vector_Types g-alvety ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-views-g-alvevi-ads}@anchor{32a}@anchor{gnat_rm/the_gnat_library id43}@anchor{32b} +@anchor{gnat_rm/the_gnat_library gnat-altivec-vector-views-g-alvevi-ads}@anchor{32c}@anchor{gnat_rm/the_gnat_library id44}@anchor{32d} @section @code{GNAT.Altivec.Vector_Views} (@code{g-alvevi.ads}) @@ -23946,7 +23970,7 @@ vector elements and provides a simple way to initialize vector objects. @node GNAT Array_Split g-arrspl ads,GNAT AWK g-awk ads,GNAT Altivec Vector_Views g-alvevi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-array-split-g-arrspl-ads}@anchor{32c}@anchor{gnat_rm/the_gnat_library id44}@anchor{32d} +@anchor{gnat_rm/the_gnat_library gnat-array-split-g-arrspl-ads}@anchor{32e}@anchor{gnat_rm/the_gnat_library id45}@anchor{32f} @section @code{GNAT.Array_Split} (@code{g-arrspl.ads}) @@ -23959,7 +23983,7 @@ an array wherever the separators appear, and provide direct access to the resulting slices. @node GNAT AWK g-awk ads,GNAT Binary_Search g-binsea ads,GNAT Array_Split g-arrspl ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{32e}@anchor{gnat_rm/the_gnat_library id45}@anchor{32f} +@anchor{gnat_rm/the_gnat_library gnat-awk-g-awk-ads}@anchor{330}@anchor{gnat_rm/the_gnat_library id46}@anchor{331} @section @code{GNAT.AWK} (@code{g-awk.ads}) @@ -23974,7 +23998,7 @@ or more files containing formatted data. The file is viewed as a database where each record is a line and a field is a data element in this line. @node GNAT Binary_Search g-binsea ads,GNAT Bind_Environment g-binenv ads,GNAT AWK g-awk ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-binary-search-g-binsea-ads}@anchor{330}@anchor{gnat_rm/the_gnat_library id46}@anchor{331} +@anchor{gnat_rm/the_gnat_library gnat-binary-search-g-binsea-ads}@anchor{332}@anchor{gnat_rm/the_gnat_library id47}@anchor{333} @section @code{GNAT.Binary_Search} (@code{g-binsea.ads}) @@ -23986,7 +24010,7 @@ Allow binary search of a sorted array (or of an array-like container; the generic does not reference the array directly). @node GNAT Bind_Environment g-binenv ads,GNAT Branch_Prediction g-brapre ads,GNAT Binary_Search g-binsea ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{332}@anchor{gnat_rm/the_gnat_library id47}@anchor{333} +@anchor{gnat_rm/the_gnat_library gnat-bind-environment-g-binenv-ads}@anchor{334}@anchor{gnat_rm/the_gnat_library id48}@anchor{335} @section @code{GNAT.Bind_Environment} (@code{g-binenv.ads}) @@ -23999,7 +24023,7 @@ These associations can be specified using the @code{-V} binder command line switch. @node GNAT Branch_Prediction g-brapre ads,GNAT Bounded_Buffers g-boubuf ads,GNAT Bind_Environment g-binenv ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-branch-prediction-g-brapre-ads}@anchor{334}@anchor{gnat_rm/the_gnat_library id48}@anchor{335} +@anchor{gnat_rm/the_gnat_library gnat-branch-prediction-g-brapre-ads}@anchor{336}@anchor{gnat_rm/the_gnat_library id49}@anchor{337} @section @code{GNAT.Branch_Prediction} (@code{g-brapre.ads}) @@ -24010,7 +24034,7 @@ line switch. Provides routines giving hints to the branch predictor of the code generator. @node GNAT Bounded_Buffers g-boubuf ads,GNAT Bounded_Mailboxes g-boumai ads,GNAT Branch_Prediction g-brapre ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bounded-buffers-g-boubuf-ads}@anchor{336}@anchor{gnat_rm/the_gnat_library id49}@anchor{337} +@anchor{gnat_rm/the_gnat_library gnat-bounded-buffers-g-boubuf-ads}@anchor{338}@anchor{gnat_rm/the_gnat_library id50}@anchor{339} @section @code{GNAT.Bounded_Buffers} (@code{g-boubuf.ads}) @@ -24025,7 +24049,7 @@ useful directly or as parts of the implementations of other abstractions, such as mailboxes. @node GNAT Bounded_Mailboxes g-boumai ads,GNAT Bubble_Sort g-bubsor ads,GNAT Bounded_Buffers g-boubuf ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bounded-mailboxes-g-boumai-ads}@anchor{338}@anchor{gnat_rm/the_gnat_library id50}@anchor{339} +@anchor{gnat_rm/the_gnat_library gnat-bounded-mailboxes-g-boumai-ads}@anchor{33a}@anchor{gnat_rm/the_gnat_library id51}@anchor{33b} @section @code{GNAT.Bounded_Mailboxes} (@code{g-boumai.ads}) @@ -24038,7 +24062,7 @@ such as mailboxes. Provides a thread-safe asynchronous intertask mailbox communication facility. @node GNAT Bubble_Sort g-bubsor ads,GNAT Bubble_Sort_A g-busora ads,GNAT Bounded_Mailboxes g-boumai ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-bubsor-ads}@anchor{33a}@anchor{gnat_rm/the_gnat_library id51}@anchor{33b} +@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-bubsor-ads}@anchor{33c}@anchor{gnat_rm/the_gnat_library id52}@anchor{33d} @section @code{GNAT.Bubble_Sort} (@code{g-bubsor.ads}) @@ -24053,7 +24077,7 @@ data items. Exchange and comparison procedures are provided by passing access-to-procedure values. @node GNAT Bubble_Sort_A g-busora ads,GNAT Bubble_Sort_G g-busorg ads,GNAT Bubble_Sort g-bubsor ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{33c}@anchor{gnat_rm/the_gnat_library id52}@anchor{33d} +@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-a-g-busora-ads}@anchor{33e}@anchor{gnat_rm/the_gnat_library id53}@anchor{33f} @section @code{GNAT.Bubble_Sort_A} (@code{g-busora.ads}) @@ -24069,7 +24093,7 @@ access-to-procedure values. This is an older version, retained for compatibility. Usually @code{GNAT.Bubble_Sort} will be preferable. @node GNAT Bubble_Sort_G g-busorg ads,GNAT Byte_Order_Mark g-byorma ads,GNAT Bubble_Sort_A g-busora ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-g-busorg-ads}@anchor{33e}@anchor{gnat_rm/the_gnat_library id53}@anchor{33f} +@anchor{gnat_rm/the_gnat_library gnat-bubble-sort-g-g-busorg-ads}@anchor{340}@anchor{gnat_rm/the_gnat_library id54}@anchor{341} @section @code{GNAT.Bubble_Sort_G} (@code{g-busorg.ads}) @@ -24085,7 +24109,7 @@ if the procedures can be inlined, at the expense of duplicating code for multiple instantiations. @node GNAT Byte_Order_Mark g-byorma ads,GNAT Byte_Swapping g-bytswa ads,GNAT Bubble_Sort_G g-busorg ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-byte-order-mark-g-byorma-ads}@anchor{340}@anchor{gnat_rm/the_gnat_library id54}@anchor{341} +@anchor{gnat_rm/the_gnat_library gnat-byte-order-mark-g-byorma-ads}@anchor{342}@anchor{gnat_rm/the_gnat_library id55}@anchor{343} @section @code{GNAT.Byte_Order_Mark} (@code{g-byorma.ads}) @@ -24101,7 +24125,7 @@ the encoding of the string. The routine includes detection of special XML sequences for various UCS input formats. @node GNAT Byte_Swapping g-bytswa ads,GNAT Calendar g-calend ads,GNAT Byte_Order_Mark g-byorma ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-byte-swapping-g-bytswa-ads}@anchor{342}@anchor{gnat_rm/the_gnat_library id55}@anchor{343} +@anchor{gnat_rm/the_gnat_library gnat-byte-swapping-g-bytswa-ads}@anchor{344}@anchor{gnat_rm/the_gnat_library id56}@anchor{345} @section @code{GNAT.Byte_Swapping} (@code{g-bytswa.ads}) @@ -24115,7 +24139,7 @@ General routines for swapping the bytes in 2-, 4-, and 8-byte quantities. Machine-specific implementations are available in some cases. @node GNAT Calendar g-calend ads,GNAT Calendar Time_IO g-catiio ads,GNAT Byte_Swapping g-bytswa ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{344}@anchor{gnat_rm/the_gnat_library id56}@anchor{345} +@anchor{gnat_rm/the_gnat_library gnat-calendar-g-calend-ads}@anchor{346}@anchor{gnat_rm/the_gnat_library id57}@anchor{347} @section @code{GNAT.Calendar} (@code{g-calend.ads}) @@ -24129,7 +24153,7 @@ Also provides conversion of @code{Ada.Calendar.Time} values to and from the C @code{timeval} format. @node GNAT Calendar Time_IO g-catiio ads,GNAT CRC32 g-crc32 ads,GNAT Calendar g-calend ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-calendar-time-io-g-catiio-ads}@anchor{346}@anchor{gnat_rm/the_gnat_library id57}@anchor{347} +@anchor{gnat_rm/the_gnat_library gnat-calendar-time-io-g-catiio-ads}@anchor{348}@anchor{gnat_rm/the_gnat_library id58}@anchor{349} @section @code{GNAT.Calendar.Time_IO} (@code{g-catiio.ads}) @@ -24140,7 +24164,7 @@ C @code{timeval} format. @geindex GNAT.Calendar.Time_IO (g-catiio.ads) @node GNAT CRC32 g-crc32 ads,GNAT Case_Util g-casuti ads,GNAT Calendar Time_IO g-catiio ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{348}@anchor{gnat_rm/the_gnat_library id58}@anchor{349} +@anchor{gnat_rm/the_gnat_library gnat-crc32-g-crc32-ads}@anchor{34a}@anchor{gnat_rm/the_gnat_library id59}@anchor{34b} @section @code{GNAT.CRC32} (@code{g-crc32.ads}) @@ -24157,7 +24181,7 @@ of this algorithm see Aug. 1988. Sarwate, D.V. @node GNAT Case_Util g-casuti ads,GNAT CGI g-cgi ads,GNAT CRC32 g-crc32 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-case-util-g-casuti-ads}@anchor{34a}@anchor{gnat_rm/the_gnat_library id59}@anchor{34b} +@anchor{gnat_rm/the_gnat_library gnat-case-util-g-casuti-ads}@anchor{34c}@anchor{gnat_rm/the_gnat_library id60}@anchor{34d} @section @code{GNAT.Case_Util} (@code{g-casuti.ads}) @@ -24172,7 +24196,7 @@ without the overhead of the full casing tables in @code{Ada.Characters.Handling}. @node GNAT CGI g-cgi ads,GNAT CGI Cookie g-cgicoo ads,GNAT Case_Util g-casuti ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{34c}@anchor{gnat_rm/the_gnat_library id60}@anchor{34d} +@anchor{gnat_rm/the_gnat_library gnat-cgi-g-cgi-ads}@anchor{34e}@anchor{gnat_rm/the_gnat_library id61}@anchor{34f} @section @code{GNAT.CGI} (@code{g-cgi.ads}) @@ -24187,7 +24211,7 @@ builds a table whose index is the key and provides some services to deal with this table. @node GNAT CGI Cookie g-cgicoo ads,GNAT CGI Debug g-cgideb ads,GNAT CGI g-cgi ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-cgi-cookie-g-cgicoo-ads}@anchor{34e}@anchor{gnat_rm/the_gnat_library id61}@anchor{34f} +@anchor{gnat_rm/the_gnat_library gnat-cgi-cookie-g-cgicoo-ads}@anchor{350}@anchor{gnat_rm/the_gnat_library id62}@anchor{351} @section @code{GNAT.CGI.Cookie} (@code{g-cgicoo.ads}) @@ -24202,7 +24226,7 @@ Common Gateway Interface (CGI). It exports services to deal with Web cookies (piece of information kept in the Web client software). @node GNAT CGI Debug g-cgideb ads,GNAT Command_Line g-comlin ads,GNAT CGI Cookie g-cgicoo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-cgi-debug-g-cgideb-ads}@anchor{350}@anchor{gnat_rm/the_gnat_library id62}@anchor{351} +@anchor{gnat_rm/the_gnat_library gnat-cgi-debug-g-cgideb-ads}@anchor{352}@anchor{gnat_rm/the_gnat_library id63}@anchor{353} @section @code{GNAT.CGI.Debug} (@code{g-cgideb.ads}) @@ -24214,7 +24238,7 @@ This is a package to help debugging CGI (Common Gateway Interface) programs written in Ada. @node GNAT Command_Line g-comlin ads,GNAT Compiler_Version g-comver ads,GNAT CGI Debug g-cgideb ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{352}@anchor{gnat_rm/the_gnat_library id63}@anchor{353} +@anchor{gnat_rm/the_gnat_library gnat-command-line-g-comlin-ads}@anchor{354}@anchor{gnat_rm/the_gnat_library id64}@anchor{355} @section @code{GNAT.Command_Line} (@code{g-comlin.ads}) @@ -24227,7 +24251,7 @@ including the ability to scan for named switches with optional parameters and expand file names using wildcard notations. @node GNAT Compiler_Version g-comver ads,GNAT Ctrl_C g-ctrl_c ads,GNAT Command_Line g-comlin ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-compiler-version-g-comver-ads}@anchor{354}@anchor{gnat_rm/the_gnat_library id64}@anchor{355} +@anchor{gnat_rm/the_gnat_library gnat-compiler-version-g-comver-ads}@anchor{356}@anchor{gnat_rm/the_gnat_library id65}@anchor{357} @section @code{GNAT.Compiler_Version} (@code{g-comver.ads}) @@ -24245,7 +24269,7 @@ of the compiler if a consistent tool set is used to compile all units of a partition). @node GNAT Ctrl_C g-ctrl_c ads,GNAT Current_Exception g-curexc ads,GNAT Compiler_Version g-comver ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-ctrl-c-g-ctrl-c-ads}@anchor{356}@anchor{gnat_rm/the_gnat_library id65}@anchor{357} +@anchor{gnat_rm/the_gnat_library gnat-ctrl-c-g-ctrl-c-ads}@anchor{358}@anchor{gnat_rm/the_gnat_library id66}@anchor{359} @section @code{GNAT.Ctrl_C} (@code{g-ctrl_c.ads}) @@ -24256,7 +24280,7 @@ of a partition). Provides a simple interface to handle Ctrl-C keyboard events. @node GNAT Current_Exception g-curexc ads,GNAT Debug_Pools g-debpoo ads,GNAT Ctrl_C g-ctrl_c ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{358}@anchor{gnat_rm/the_gnat_library id66}@anchor{359} +@anchor{gnat_rm/the_gnat_library gnat-current-exception-g-curexc-ads}@anchor{35a}@anchor{gnat_rm/the_gnat_library id67}@anchor{35b} @section @code{GNAT.Current_Exception} (@code{g-curexc.ads}) @@ -24273,7 +24297,7 @@ This is particularly useful in simulating typical facilities for obtaining information about exceptions provided by Ada 83 compilers. @node GNAT Debug_Pools g-debpoo ads,GNAT Debug_Utilities g-debuti ads,GNAT Current_Exception g-curexc ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-debug-pools-g-debpoo-ads}@anchor{35a}@anchor{gnat_rm/the_gnat_library id67}@anchor{35b} +@anchor{gnat_rm/the_gnat_library gnat-debug-pools-g-debpoo-ads}@anchor{35c}@anchor{gnat_rm/the_gnat_library id68}@anchor{35d} @section @code{GNAT.Debug_Pools} (@code{g-debpoo.ads}) @@ -24290,7 +24314,7 @@ problems. See @code{The GNAT Debug_Pool Facility} section in the @cite{GNAT User’s Guide}. @node GNAT Debug_Utilities g-debuti ads,GNAT Decode_String g-decstr ads,GNAT Debug_Pools g-debpoo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-debug-utilities-g-debuti-ads}@anchor{35c}@anchor{gnat_rm/the_gnat_library id68}@anchor{35d} +@anchor{gnat_rm/the_gnat_library gnat-debug-utilities-g-debuti-ads}@anchor{35e}@anchor{gnat_rm/the_gnat_library id69}@anchor{35f} @section @code{GNAT.Debug_Utilities} (@code{g-debuti.ads}) @@ -24303,7 +24327,7 @@ to and from string images of address values. Supports both C and Ada formats for hexadecimal literals. @node GNAT Decode_String g-decstr ads,GNAT Decode_UTF8_String g-deutst ads,GNAT Debug_Utilities g-debuti ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-decode-string-g-decstr-ads}@anchor{35e}@anchor{gnat_rm/the_gnat_library id69}@anchor{35f} +@anchor{gnat_rm/the_gnat_library gnat-decode-string-g-decstr-ads}@anchor{360}@anchor{gnat_rm/the_gnat_library id70}@anchor{361} @section @code{GNAT.Decode_String} (@code{g-decstr.ads}) @@ -24327,7 +24351,7 @@ Useful in conjunction with Unicode character coding. Note there is a preinstantiation for UTF-8. See next entry. @node GNAT Decode_UTF8_String g-deutst ads,GNAT Directory_Operations g-dirope ads,GNAT Decode_String g-decstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-decode-utf8-string-g-deutst-ads}@anchor{360}@anchor{gnat_rm/the_gnat_library id70}@anchor{361} +@anchor{gnat_rm/the_gnat_library gnat-decode-utf8-string-g-deutst-ads}@anchor{362}@anchor{gnat_rm/the_gnat_library id71}@anchor{363} @section @code{GNAT.Decode_UTF8_String} (@code{g-deutst.ads}) @@ -24348,7 +24372,7 @@ preinstantiation for UTF-8. See next entry. A preinstantiation of GNAT.Decode_Strings for UTF-8 encoding. @node GNAT Directory_Operations g-dirope ads,GNAT Directory_Operations Iteration g-diopit ads,GNAT Decode_UTF8_String g-deutst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{362}@anchor{gnat_rm/the_gnat_library id71}@anchor{363} +@anchor{gnat_rm/the_gnat_library gnat-directory-operations-g-dirope-ads}@anchor{364}@anchor{gnat_rm/the_gnat_library id72}@anchor{365} @section @code{GNAT.Directory_Operations} (@code{g-dirope.ads}) @@ -24361,7 +24385,7 @@ the current directory, making new directories, and scanning the files in a directory. @node GNAT Directory_Operations Iteration g-diopit ads,GNAT Dynamic_HTables g-dynhta ads,GNAT Directory_Operations g-dirope ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{364}@anchor{gnat_rm/the_gnat_library id72}@anchor{365} +@anchor{gnat_rm/the_gnat_library gnat-directory-operations-iteration-g-diopit-ads}@anchor{366}@anchor{gnat_rm/the_gnat_library id73}@anchor{367} @section @code{GNAT.Directory_Operations.Iteration} (@code{g-diopit.ads}) @@ -24373,7 +24397,7 @@ A child unit of GNAT.Directory_Operations providing additional operations for iterating through directories. @node GNAT Dynamic_HTables g-dynhta ads,GNAT Dynamic_Tables g-dyntab ads,GNAT Directory_Operations Iteration g-diopit ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{366}@anchor{gnat_rm/the_gnat_library id73}@anchor{367} +@anchor{gnat_rm/the_gnat_library gnat-dynamic-htables-g-dynhta-ads}@anchor{368}@anchor{gnat_rm/the_gnat_library id74}@anchor{369} @section @code{GNAT.Dynamic_HTables} (@code{g-dynhta.ads}) @@ -24391,7 +24415,7 @@ dynamic instances of the hash table, while an instantiation of @code{GNAT.HTable} creates a single instance of the hash table. @node GNAT Dynamic_Tables g-dyntab ads,GNAT Encode_String g-encstr ads,GNAT Dynamic_HTables g-dynhta ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-dynamic-tables-g-dyntab-ads}@anchor{368}@anchor{gnat_rm/the_gnat_library id74}@anchor{369} +@anchor{gnat_rm/the_gnat_library gnat-dynamic-tables-g-dyntab-ads}@anchor{36a}@anchor{gnat_rm/the_gnat_library id75}@anchor{36b} @section @code{GNAT.Dynamic_Tables} (@code{g-dyntab.ads}) @@ -24411,7 +24435,7 @@ dynamic instances of the table, while an instantiation of @code{GNAT.Table} creates a single instance of the table type. @node GNAT Encode_String g-encstr ads,GNAT Encode_UTF8_String g-enutst ads,GNAT Dynamic_Tables g-dyntab ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{36a}@anchor{gnat_rm/the_gnat_library id75}@anchor{36b} +@anchor{gnat_rm/the_gnat_library gnat-encode-string-g-encstr-ads}@anchor{36c}@anchor{gnat_rm/the_gnat_library id76}@anchor{36d} @section @code{GNAT.Encode_String} (@code{g-encstr.ads}) @@ -24433,7 +24457,7 @@ encoding method. Useful in conjunction with Unicode character coding. Note there is a preinstantiation for UTF-8. See next entry. @node GNAT Encode_UTF8_String g-enutst ads,GNAT Exception_Actions g-excact ads,GNAT Encode_String g-encstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-encode-utf8-string-g-enutst-ads}@anchor{36c}@anchor{gnat_rm/the_gnat_library id76}@anchor{36d} +@anchor{gnat_rm/the_gnat_library gnat-encode-utf8-string-g-enutst-ads}@anchor{36e}@anchor{gnat_rm/the_gnat_library id77}@anchor{36f} @section @code{GNAT.Encode_UTF8_String} (@code{g-enutst.ads}) @@ -24454,7 +24478,7 @@ Note there is a preinstantiation for UTF-8. See next entry. A preinstantiation of GNAT.Encode_Strings for UTF-8 encoding. @node GNAT Exception_Actions g-excact ads,GNAT Exception_Traces g-exctra ads,GNAT Encode_UTF8_String g-enutst ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-exception-actions-g-excact-ads}@anchor{36e}@anchor{gnat_rm/the_gnat_library id77}@anchor{36f} +@anchor{gnat_rm/the_gnat_library gnat-exception-actions-g-excact-ads}@anchor{370}@anchor{gnat_rm/the_gnat_library id78}@anchor{371} @section @code{GNAT.Exception_Actions} (@code{g-excact.ads}) @@ -24467,7 +24491,7 @@ for specific exceptions, or when any exception is raised. This can be used for instance to force a core dump to ease debugging. @node GNAT Exception_Traces g-exctra ads,GNAT Exceptions g-except ads,GNAT Exception_Actions g-excact ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-exception-traces-g-exctra-ads}@anchor{370}@anchor{gnat_rm/the_gnat_library id78}@anchor{371} +@anchor{gnat_rm/the_gnat_library gnat-exception-traces-g-exctra-ads}@anchor{372}@anchor{gnat_rm/the_gnat_library id79}@anchor{373} @section @code{GNAT.Exception_Traces} (@code{g-exctra.ads}) @@ -24481,7 +24505,7 @@ Provides an interface allowing to control automatic output upon exception occurrences. @node GNAT Exceptions g-except ads,GNAT Expect g-expect ads,GNAT Exception_Traces g-exctra ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-except-ads}@anchor{372}@anchor{gnat_rm/the_gnat_library id79}@anchor{373} +@anchor{gnat_rm/the_gnat_library gnat-exceptions-g-except-ads}@anchor{374}@anchor{gnat_rm/the_gnat_library id80}@anchor{375} @section @code{GNAT.Exceptions} (@code{g-except.ads}) @@ -24502,7 +24526,7 @@ predefined exceptions, and for example allow raising @code{Constraint_Error} with a message from a pure subprogram. @node GNAT Expect g-expect ads,GNAT Expect TTY g-exptty ads,GNAT Exceptions g-except ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{374}@anchor{gnat_rm/the_gnat_library id80}@anchor{375} +@anchor{gnat_rm/the_gnat_library gnat-expect-g-expect-ads}@anchor{376}@anchor{gnat_rm/the_gnat_library id81}@anchor{377} @section @code{GNAT.Expect} (@code{g-expect.ads}) @@ -24518,7 +24542,7 @@ It is not implemented for cross ports, and in particular is not implemented for VxWorks or LynxOS. @node GNAT Expect TTY g-exptty ads,GNAT Float_Control g-flocon ads,GNAT Expect g-expect ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-expect-tty-g-exptty-ads}@anchor{376}@anchor{gnat_rm/the_gnat_library id81}@anchor{377} +@anchor{gnat_rm/the_gnat_library gnat-expect-tty-g-exptty-ads}@anchor{378}@anchor{gnat_rm/the_gnat_library id82}@anchor{379} @section @code{GNAT.Expect.TTY} (@code{g-exptty.ads}) @@ -24530,7 +24554,7 @@ ports. It is not implemented for cross ports, and in particular is not implemented for VxWorks or LynxOS. @node GNAT Float_Control g-flocon ads,GNAT Formatted_String g-forstr ads,GNAT Expect TTY g-exptty ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{378}@anchor{gnat_rm/the_gnat_library id82}@anchor{379} +@anchor{gnat_rm/the_gnat_library gnat-float-control-g-flocon-ads}@anchor{37a}@anchor{gnat_rm/the_gnat_library id83}@anchor{37b} @section @code{GNAT.Float_Control} (@code{g-flocon.ads}) @@ -24544,7 +24568,7 @@ library calls may cause this mode to be modified, and the Reset procedure in this package can be used to reestablish the required mode. @node GNAT Formatted_String g-forstr ads,GNAT Generic_Fast_Math_Functions g-gfmafu ads,GNAT Float_Control g-flocon ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-formatted-string-g-forstr-ads}@anchor{37a}@anchor{gnat_rm/the_gnat_library id83}@anchor{37b} +@anchor{gnat_rm/the_gnat_library gnat-formatted-string-g-forstr-ads}@anchor{37c}@anchor{gnat_rm/the_gnat_library id84}@anchor{37d} @section @code{GNAT.Formatted_String} (@code{g-forstr.ads}) @@ -24559,7 +24583,7 @@ derived from Integer, Float or enumerations as values for the formatted string. @node GNAT Generic_Fast_Math_Functions g-gfmafu ads,GNAT Heap_Sort g-heasor ads,GNAT Formatted_String g-forstr ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-generic-fast-math-functions-g-gfmafu-ads}@anchor{37c}@anchor{gnat_rm/the_gnat_library id84}@anchor{37d} +@anchor{gnat_rm/the_gnat_library gnat-generic-fast-math-functions-g-gfmafu-ads}@anchor{37e}@anchor{gnat_rm/the_gnat_library id85}@anchor{37f} @section @code{GNAT.Generic_Fast_Math_Functions} (@code{g-gfmafu.ads}) @@ -24577,7 +24601,7 @@ have a vector implementation that can be automatically used by the compiler when auto-vectorization is enabled. @node GNAT Heap_Sort g-heasor ads,GNAT Heap_Sort_A g-hesora ads,GNAT Generic_Fast_Math_Functions g-gfmafu ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-heasor-ads}@anchor{37e}@anchor{gnat_rm/the_gnat_library id85}@anchor{37f} +@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-heasor-ads}@anchor{380}@anchor{gnat_rm/the_gnat_library id86}@anchor{381} @section @code{GNAT.Heap_Sort} (@code{g-heasor.ads}) @@ -24591,7 +24615,7 @@ access-to-procedure values. The algorithm used is a modified heap sort that performs approximately N*log(N) comparisons in the worst case. @node GNAT Heap_Sort_A g-hesora ads,GNAT Heap_Sort_G g-hesorg ads,GNAT Heap_Sort g-heasor ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-heap-sort-a-g-hesora-ads}@anchor{380}@anchor{gnat_rm/the_gnat_library id86}@anchor{381} +@anchor{gnat_rm/the_gnat_library gnat-heap-sort-a-g-hesora-ads}@anchor{382}@anchor{gnat_rm/the_gnat_library id87}@anchor{383} @section @code{GNAT.Heap_Sort_A} (@code{g-hesora.ads}) @@ -24607,7 +24631,7 @@ This differs from @code{GNAT.Heap_Sort} in having a less convenient interface, but may be slightly more efficient. @node GNAT Heap_Sort_G g-hesorg ads,GNAT HTable g-htable ads,GNAT Heap_Sort_A g-hesora ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{382}@anchor{gnat_rm/the_gnat_library id87}@anchor{383} +@anchor{gnat_rm/the_gnat_library gnat-heap-sort-g-g-hesorg-ads}@anchor{384}@anchor{gnat_rm/the_gnat_library id88}@anchor{385} @section @code{GNAT.Heap_Sort_G} (@code{g-hesorg.ads}) @@ -24621,7 +24645,7 @@ if the procedures can be inlined, at the expense of duplicating code for multiple instantiations. @node GNAT HTable g-htable ads,GNAT IO g-io ads,GNAT Heap_Sort_G g-hesorg ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{384}@anchor{gnat_rm/the_gnat_library id88}@anchor{385} +@anchor{gnat_rm/the_gnat_library gnat-htable-g-htable-ads}@anchor{386}@anchor{gnat_rm/the_gnat_library id89}@anchor{387} @section @code{GNAT.HTable} (@code{g-htable.ads}) @@ -24634,7 +24658,7 @@ data. Provides two approaches, one a simple static approach, and the other allowing arbitrary dynamic hash tables. @node GNAT IO g-io ads,GNAT IO_Aux g-io_aux ads,GNAT HTable g-htable ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{386}@anchor{gnat_rm/the_gnat_library id89}@anchor{387} +@anchor{gnat_rm/the_gnat_library gnat-io-g-io-ads}@anchor{388}@anchor{gnat_rm/the_gnat_library id90}@anchor{389} @section @code{GNAT.IO} (@code{g-io.ads}) @@ -24650,7 +24674,7 @@ Standard_Input, and writing characters, strings and integers to either Standard_Output or Standard_Error. @node GNAT IO_Aux g-io_aux ads,GNAT Lock_Files g-locfil ads,GNAT IO g-io ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{388}@anchor{gnat_rm/the_gnat_library id90}@anchor{389} +@anchor{gnat_rm/the_gnat_library gnat-io-aux-g-io-aux-ads}@anchor{38a}@anchor{gnat_rm/the_gnat_library id91}@anchor{38b} @section @code{GNAT.IO_Aux} (@code{g-io_aux.ads}) @@ -24664,7 +24688,7 @@ Provides some auxiliary functions for use with Text_IO, including a test for whether a file exists, and functions for reading a line of text. @node GNAT Lock_Files g-locfil ads,GNAT MBBS_Discrete_Random g-mbdira ads,GNAT IO_Aux g-io_aux ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-lock-files-g-locfil-ads}@anchor{38a}@anchor{gnat_rm/the_gnat_library id91}@anchor{38b} +@anchor{gnat_rm/the_gnat_library gnat-lock-files-g-locfil-ads}@anchor{38c}@anchor{gnat_rm/the_gnat_library id92}@anchor{38d} @section @code{GNAT.Lock_Files} (@code{g-locfil.ads}) @@ -24678,7 +24702,7 @@ Provides a general interface for using files as locks. Can be used for providing program level synchronization. @node GNAT MBBS_Discrete_Random g-mbdira ads,GNAT MBBS_Float_Random g-mbflra ads,GNAT Lock_Files g-locfil ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{38c}@anchor{gnat_rm/the_gnat_library id92}@anchor{38d} +@anchor{gnat_rm/the_gnat_library gnat-mbbs-discrete-random-g-mbdira-ads}@anchor{38e}@anchor{gnat_rm/the_gnat_library id93}@anchor{38f} @section @code{GNAT.MBBS_Discrete_Random} (@code{g-mbdira.ads}) @@ -24690,7 +24714,7 @@ The original implementation of @code{Ada.Numerics.Discrete_Random}. Uses a modified version of the Blum-Blum-Shub generator. @node GNAT MBBS_Float_Random g-mbflra ads,GNAT MD5 g-md5 ads,GNAT MBBS_Discrete_Random g-mbdira ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{38e}@anchor{gnat_rm/the_gnat_library id93}@anchor{38f} +@anchor{gnat_rm/the_gnat_library gnat-mbbs-float-random-g-mbflra-ads}@anchor{390}@anchor{gnat_rm/the_gnat_library id94}@anchor{391} @section @code{GNAT.MBBS_Float_Random} (@code{g-mbflra.ads}) @@ -24702,7 +24726,7 @@ The original implementation of @code{Ada.Numerics.Float_Random}. Uses a modified version of the Blum-Blum-Shub generator. @node GNAT MD5 g-md5 ads,GNAT Memory_Dump g-memdum ads,GNAT MBBS_Float_Random g-mbflra ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{390}@anchor{gnat_rm/the_gnat_library id94}@anchor{391} +@anchor{gnat_rm/the_gnat_library gnat-md5-g-md5-ads}@anchor{392}@anchor{gnat_rm/the_gnat_library id95}@anchor{393} @section @code{GNAT.MD5} (@code{g-md5.ads}) @@ -24715,7 +24739,7 @@ the HMAC-MD5 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT Memory_Dump g-memdum ads,GNAT Most_Recent_Exception g-moreex ads,GNAT MD5 g-md5 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{392}@anchor{gnat_rm/the_gnat_library id95}@anchor{393} +@anchor{gnat_rm/the_gnat_library gnat-memory-dump-g-memdum-ads}@anchor{394}@anchor{gnat_rm/the_gnat_library id96}@anchor{395} @section @code{GNAT.Memory_Dump} (@code{g-memdum.ads}) @@ -24728,7 +24752,7 @@ standard output or standard error files. Uses GNAT.IO for actual output. @node GNAT Most_Recent_Exception g-moreex ads,GNAT OS_Lib g-os_lib ads,GNAT Memory_Dump g-memdum ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-most-recent-exception-g-moreex-ads}@anchor{394}@anchor{gnat_rm/the_gnat_library id96}@anchor{395} +@anchor{gnat_rm/the_gnat_library gnat-most-recent-exception-g-moreex-ads}@anchor{396}@anchor{gnat_rm/the_gnat_library id97}@anchor{397} @section @code{GNAT.Most_Recent_Exception} (@code{g-moreex.ads}) @@ -24742,7 +24766,7 @@ various logging purposes, including duplicating functionality of some Ada 83 implementation dependent extensions. @node GNAT OS_Lib g-os_lib ads,GNAT Perfect_Hash_Generators g-pehage ads,GNAT Most_Recent_Exception g-moreex ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-os-lib-g-os-lib-ads}@anchor{396}@anchor{gnat_rm/the_gnat_library id97}@anchor{397} +@anchor{gnat_rm/the_gnat_library gnat-os-lib-g-os-lib-ads}@anchor{398}@anchor{gnat_rm/the_gnat_library id98}@anchor{399} @section @code{GNAT.OS_Lib} (@code{g-os_lib.ads}) @@ -24758,7 +24782,7 @@ including a portable spawn procedure, and access to environment variables and error return codes. @node GNAT Perfect_Hash_Generators g-pehage ads,GNAT Random_Numbers g-rannum ads,GNAT OS_Lib g-os_lib ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-perfect-hash-generators-g-pehage-ads}@anchor{398}@anchor{gnat_rm/the_gnat_library id98}@anchor{399} +@anchor{gnat_rm/the_gnat_library gnat-perfect-hash-generators-g-pehage-ads}@anchor{39a}@anchor{gnat_rm/the_gnat_library id99}@anchor{39b} @section @code{GNAT.Perfect_Hash_Generators} (@code{g-pehage.ads}) @@ -24776,7 +24800,7 @@ hashcode are in the same order. These hashing functions are very convenient for use with realtime applications. @node GNAT Random_Numbers g-rannum ads,GNAT Regexp g-regexp ads,GNAT Perfect_Hash_Generators g-pehage ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-random-numbers-g-rannum-ads}@anchor{39a}@anchor{gnat_rm/the_gnat_library id99}@anchor{39b} +@anchor{gnat_rm/the_gnat_library gnat-random-numbers-g-rannum-ads}@anchor{39c}@anchor{gnat_rm/the_gnat_library id100}@anchor{39d} @section @code{GNAT.Random_Numbers} (@code{g-rannum.ads}) @@ -24788,7 +24812,7 @@ Provides random number capabilities which extend those available in the standard Ada library and are more convenient to use. @node GNAT Regexp g-regexp ads,GNAT Registry g-regist ads,GNAT Random_Numbers g-rannum ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-regexp-g-regexp-ads}@anchor{25d}@anchor{gnat_rm/the_gnat_library id100}@anchor{39c} +@anchor{gnat_rm/the_gnat_library gnat-regexp-g-regexp-ads}@anchor{25d}@anchor{gnat_rm/the_gnat_library id101}@anchor{39e} @section @code{GNAT.Regexp} (@code{g-regexp.ads}) @@ -24804,7 +24828,7 @@ simplest of the three pattern matching packages provided, and is particularly suitable for ‘file globbing’ applications. @node GNAT Registry g-regist ads,GNAT Regpat g-regpat ads,GNAT Regexp g-regexp ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{39d}@anchor{gnat_rm/the_gnat_library id101}@anchor{39e} +@anchor{gnat_rm/the_gnat_library gnat-registry-g-regist-ads}@anchor{39f}@anchor{gnat_rm/the_gnat_library id102}@anchor{3a0} @section @code{GNAT.Registry} (@code{g-regist.ads}) @@ -24818,7 +24842,7 @@ registry API, but at a lower level of abstraction, refer to the Win32.Winreg package provided with the Win32Ada binding @node GNAT Regpat g-regpat ads,GNAT Rewrite_Data g-rewdat ads,GNAT Registry g-regist ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-regpat-g-regpat-ads}@anchor{39f}@anchor{gnat_rm/the_gnat_library id102}@anchor{3a0} +@anchor{gnat_rm/the_gnat_library gnat-regpat-g-regpat-ads}@anchor{3a1}@anchor{gnat_rm/the_gnat_library id103}@anchor{3a2} @section @code{GNAT.Regpat} (@code{g-regpat.ads}) @@ -24833,7 +24857,7 @@ from the original V7 style regular expression library written in C by Henry Spencer (and binary compatible with this C library). @node GNAT Rewrite_Data g-rewdat ads,GNAT Secondary_Stack_Info g-sestin ads,GNAT Regpat g-regpat ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{3a1}@anchor{gnat_rm/the_gnat_library id103}@anchor{3a2} +@anchor{gnat_rm/the_gnat_library gnat-rewrite-data-g-rewdat-ads}@anchor{3a3}@anchor{gnat_rm/the_gnat_library id104}@anchor{3a4} @section @code{GNAT.Rewrite_Data} (@code{g-rewdat.ads}) @@ -24847,7 +24871,7 @@ full content to be processed is not loaded into memory all at once. This makes this interface usable for large files or socket streams. @node GNAT Secondary_Stack_Info g-sestin ads,GNAT Semaphores g-semaph ads,GNAT Rewrite_Data g-rewdat ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-secondary-stack-info-g-sestin-ads}@anchor{3a3}@anchor{gnat_rm/the_gnat_library id104}@anchor{3a4} +@anchor{gnat_rm/the_gnat_library gnat-secondary-stack-info-g-sestin-ads}@anchor{3a5}@anchor{gnat_rm/the_gnat_library id105}@anchor{3a6} @section @code{GNAT.Secondary_Stack_Info} (@code{g-sestin.ads}) @@ -24859,7 +24883,7 @@ Provide the capability to query the high water mark of the current task’s secondary stack. @node GNAT Semaphores g-semaph ads,GNAT Serial_Communications g-sercom ads,GNAT Secondary_Stack_Info g-sestin ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{3a5}@anchor{gnat_rm/the_gnat_library id105}@anchor{3a6} +@anchor{gnat_rm/the_gnat_library gnat-semaphores-g-semaph-ads}@anchor{3a7}@anchor{gnat_rm/the_gnat_library id106}@anchor{3a8} @section @code{GNAT.Semaphores} (@code{g-semaph.ads}) @@ -24870,7 +24894,7 @@ secondary stack. Provides classic counting and binary semaphores using protected types. @node GNAT Serial_Communications g-sercom ads,GNAT SHA1 g-sha1 ads,GNAT Semaphores g-semaph ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-serial-communications-g-sercom-ads}@anchor{3a7}@anchor{gnat_rm/the_gnat_library id106}@anchor{3a8} +@anchor{gnat_rm/the_gnat_library gnat-serial-communications-g-sercom-ads}@anchor{3a9}@anchor{gnat_rm/the_gnat_library id107}@anchor{3aa} @section @code{GNAT.Serial_Communications} (@code{g-sercom.ads}) @@ -24882,7 +24906,7 @@ Provides a simple interface to send and receive data over a serial port. This is only supported on GNU/Linux and Windows. @node GNAT SHA1 g-sha1 ads,GNAT SHA224 g-sha224 ads,GNAT Serial_Communications g-sercom ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha1-g-sha1-ads}@anchor{3a9}@anchor{gnat_rm/the_gnat_library id107}@anchor{3aa} +@anchor{gnat_rm/the_gnat_library gnat-sha1-g-sha1-ads}@anchor{3ab}@anchor{gnat_rm/the_gnat_library id108}@anchor{3ac} @section @code{GNAT.SHA1} (@code{g-sha1.ads}) @@ -24895,7 +24919,7 @@ and RFC 3174, and the HMAC-SHA1 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT SHA224 g-sha224 ads,GNAT SHA256 g-sha256 ads,GNAT SHA1 g-sha1 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha224-g-sha224-ads}@anchor{3ab}@anchor{gnat_rm/the_gnat_library id108}@anchor{3ac} +@anchor{gnat_rm/the_gnat_library gnat-sha224-g-sha224-ads}@anchor{3ad}@anchor{gnat_rm/the_gnat_library id109}@anchor{3ae} @section @code{GNAT.SHA224} (@code{g-sha224.ads}) @@ -24908,7 +24932,7 @@ and the HMAC-SHA224 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT SHA256 g-sha256 ads,GNAT SHA384 g-sha384 ads,GNAT SHA224 g-sha224 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha256-g-sha256-ads}@anchor{3ad}@anchor{gnat_rm/the_gnat_library id109}@anchor{3ae} +@anchor{gnat_rm/the_gnat_library gnat-sha256-g-sha256-ads}@anchor{3af}@anchor{gnat_rm/the_gnat_library id110}@anchor{3b0} @section @code{GNAT.SHA256} (@code{g-sha256.ads}) @@ -24921,7 +24945,7 @@ and the HMAC-SHA256 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT SHA384 g-sha384 ads,GNAT SHA512 g-sha512 ads,GNAT SHA256 g-sha256 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{3af}@anchor{gnat_rm/the_gnat_library id110}@anchor{3b0} +@anchor{gnat_rm/the_gnat_library gnat-sha384-g-sha384-ads}@anchor{3b1}@anchor{gnat_rm/the_gnat_library id111}@anchor{3b2} @section @code{GNAT.SHA384} (@code{g-sha384.ads}) @@ -24934,7 +24958,7 @@ and the HMAC-SHA384 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT SHA512 g-sha512 ads,GNAT Signals g-signal ads,GNAT SHA384 g-sha384 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sha512-g-sha512-ads}@anchor{3b1}@anchor{gnat_rm/the_gnat_library id111}@anchor{3b2} +@anchor{gnat_rm/the_gnat_library gnat-sha512-g-sha512-ads}@anchor{3b3}@anchor{gnat_rm/the_gnat_library id112}@anchor{3b4} @section @code{GNAT.SHA512} (@code{g-sha512.ads}) @@ -24947,7 +24971,7 @@ and the HMAC-SHA512 message authentication function as described in RFC 2104 and FIPS PUB 198. @node GNAT Signals g-signal ads,GNAT Sockets g-socket ads,GNAT SHA512 g-sha512 ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-signals-g-signal-ads}@anchor{3b3}@anchor{gnat_rm/the_gnat_library id112}@anchor{3b4} +@anchor{gnat_rm/the_gnat_library gnat-signals-g-signal-ads}@anchor{3b5}@anchor{gnat_rm/the_gnat_library id113}@anchor{3b6} @section @code{GNAT.Signals} (@code{g-signal.ads}) @@ -24959,7 +24983,7 @@ Provides the ability to manipulate the blocked status of signals on supported targets. @node GNAT Sockets g-socket ads,GNAT Source_Info g-souinf ads,GNAT Signals g-signal ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sockets-g-socket-ads}@anchor{3b5}@anchor{gnat_rm/the_gnat_library id113}@anchor{3b6} +@anchor{gnat_rm/the_gnat_library gnat-sockets-g-socket-ads}@anchor{3b7}@anchor{gnat_rm/the_gnat_library id114}@anchor{3b8} @section @code{GNAT.Sockets} (@code{g-socket.ads}) @@ -24974,7 +24998,7 @@ on all native GNAT ports and on VxWorks cross prots. It is not implemented for the LynxOS cross port. @node GNAT Source_Info g-souinf ads,GNAT Spelling_Checker g-speche ads,GNAT Sockets g-socket ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-source-info-g-souinf-ads}@anchor{3b7}@anchor{gnat_rm/the_gnat_library id114}@anchor{3b8} +@anchor{gnat_rm/the_gnat_library gnat-source-info-g-souinf-ads}@anchor{3b9}@anchor{gnat_rm/the_gnat_library id115}@anchor{3ba} @section @code{GNAT.Source_Info} (@code{g-souinf.ads}) @@ -24988,7 +25012,7 @@ subprograms yielding the date and time of the current compilation (like the C macros @code{__DATE__} and @code{__TIME__}) @node GNAT Spelling_Checker g-speche ads,GNAT Spelling_Checker_Generic g-spchge ads,GNAT Source_Info g-souinf ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-g-speche-ads}@anchor{3b9}@anchor{gnat_rm/the_gnat_library id115}@anchor{3ba} +@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-g-speche-ads}@anchor{3bb}@anchor{gnat_rm/the_gnat_library id116}@anchor{3bc} @section @code{GNAT.Spelling_Checker} (@code{g-speche.ads}) @@ -25000,7 +25024,7 @@ Provides a function for determining whether one string is a plausible near misspelling of another string. @node GNAT Spelling_Checker_Generic g-spchge ads,GNAT Spitbol Patterns g-spipat ads,GNAT Spelling_Checker g-speche ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-generic-g-spchge-ads}@anchor{3bb}@anchor{gnat_rm/the_gnat_library id116}@anchor{3bc} +@anchor{gnat_rm/the_gnat_library gnat-spelling-checker-generic-g-spchge-ads}@anchor{3bd}@anchor{gnat_rm/the_gnat_library id117}@anchor{3be} @section @code{GNAT.Spelling_Checker_Generic} (@code{g-spchge.ads}) @@ -25013,7 +25037,7 @@ determining whether one string is a plausible near misspelling of another string. @node GNAT Spitbol Patterns g-spipat ads,GNAT Spitbol g-spitbo ads,GNAT Spelling_Checker_Generic g-spchge ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-patterns-g-spipat-ads}@anchor{3bd}@anchor{gnat_rm/the_gnat_library id117}@anchor{3be} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-patterns-g-spipat-ads}@anchor{3bf}@anchor{gnat_rm/the_gnat_library id118}@anchor{3c0} @section @code{GNAT.Spitbol.Patterns} (@code{g-spipat.ads}) @@ -25029,7 +25053,7 @@ the SNOBOL4 dynamic pattern construction and matching capabilities, using the efficient algorithm developed by Robert Dewar for the SPITBOL system. @node GNAT Spitbol g-spitbo ads,GNAT Spitbol Table_Boolean g-sptabo ads,GNAT Spitbol Patterns g-spipat ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{3bf}@anchor{gnat_rm/the_gnat_library id118}@anchor{3c0} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-g-spitbo-ads}@anchor{3c1}@anchor{gnat_rm/the_gnat_library id119}@anchor{3c2} @section @code{GNAT.Spitbol} (@code{g-spitbo.ads}) @@ -25044,7 +25068,7 @@ useful for constructing arbitrary mappings from strings in the style of the SNOBOL4 TABLE function. @node GNAT Spitbol Table_Boolean g-sptabo ads,GNAT Spitbol Table_Integer g-sptain ads,GNAT Spitbol g-spitbo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-boolean-g-sptabo-ads}@anchor{3c1}@anchor{gnat_rm/the_gnat_library id119}@anchor{3c2} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-boolean-g-sptabo-ads}@anchor{3c3}@anchor{gnat_rm/the_gnat_library id120}@anchor{3c4} @section @code{GNAT.Spitbol.Table_Boolean} (@code{g-sptabo.ads}) @@ -25059,7 +25083,7 @@ for type @code{Standard.Boolean}, giving an implementation of sets of string values. @node GNAT Spitbol Table_Integer g-sptain ads,GNAT Spitbol Table_VString g-sptavs ads,GNAT Spitbol Table_Boolean g-sptabo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-integer-g-sptain-ads}@anchor{3c3}@anchor{gnat_rm/the_gnat_library id120}@anchor{3c4} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-integer-g-sptain-ads}@anchor{3c5}@anchor{gnat_rm/the_gnat_library id121}@anchor{3c6} @section @code{GNAT.Spitbol.Table_Integer} (@code{g-sptain.ads}) @@ -25076,7 +25100,7 @@ for type @code{Standard.Integer}, giving an implementation of maps from string to integer values. @node GNAT Spitbol Table_VString g-sptavs ads,GNAT SSE g-sse ads,GNAT Spitbol Table_Integer g-sptain ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{3c5}@anchor{gnat_rm/the_gnat_library id121}@anchor{3c6} +@anchor{gnat_rm/the_gnat_library gnat-spitbol-table-vstring-g-sptavs-ads}@anchor{3c7}@anchor{gnat_rm/the_gnat_library id122}@anchor{3c8} @section @code{GNAT.Spitbol.Table_VString} (@code{g-sptavs.ads}) @@ -25093,7 +25117,7 @@ a variable length string type, giving an implementation of general maps from strings to strings. @node GNAT SSE g-sse ads,GNAT SSE Vector_Types g-ssvety ads,GNAT Spitbol Table_VString g-sptavs ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{3c7}@anchor{gnat_rm/the_gnat_library id122}@anchor{3c8} +@anchor{gnat_rm/the_gnat_library gnat-sse-g-sse-ads}@anchor{3c9}@anchor{gnat_rm/the_gnat_library id123}@anchor{3ca} @section @code{GNAT.SSE} (@code{g-sse.ads}) @@ -25105,7 +25129,7 @@ targets. It exposes vector component types together with a general introduction to the binding contents and use. @node GNAT SSE Vector_Types g-ssvety ads,GNAT String_Hash g-strhas ads,GNAT SSE g-sse ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-sse-vector-types-g-ssvety-ads}@anchor{3c9}@anchor{gnat_rm/the_gnat_library id123}@anchor{3ca} +@anchor{gnat_rm/the_gnat_library gnat-sse-vector-types-g-ssvety-ads}@anchor{3cb}@anchor{gnat_rm/the_gnat_library id124}@anchor{3cc} @section @code{GNAT.SSE.Vector_Types} (@code{g-ssvety.ads}) @@ -25114,7 +25138,7 @@ introduction to the binding contents and use. SSE vector types for use with SSE related intrinsics. @node GNAT String_Hash g-strhas ads,GNAT Strings g-string ads,GNAT SSE Vector_Types g-ssvety ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-string-hash-g-strhas-ads}@anchor{3cb}@anchor{gnat_rm/the_gnat_library id124}@anchor{3cc} +@anchor{gnat_rm/the_gnat_library gnat-string-hash-g-strhas-ads}@anchor{3cd}@anchor{gnat_rm/the_gnat_library id125}@anchor{3ce} @section @code{GNAT.String_Hash} (@code{g-strhas.ads}) @@ -25126,7 +25150,7 @@ Provides a generic hash function working on arrays of scalars. Both the scalar type and the hash result type are parameters. @node GNAT Strings g-string ads,GNAT String_Split g-strspl ads,GNAT String_Hash g-strhas ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{3cd}@anchor{gnat_rm/the_gnat_library id125}@anchor{3ce} +@anchor{gnat_rm/the_gnat_library gnat-strings-g-string-ads}@anchor{3cf}@anchor{gnat_rm/the_gnat_library id126}@anchor{3d0} @section @code{GNAT.Strings} (@code{g-string.ads}) @@ -25136,7 +25160,7 @@ Common String access types and related subprograms. Basically it defines a string access and an array of string access types. @node GNAT String_Split g-strspl ads,GNAT Table g-table ads,GNAT Strings g-string ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-string-split-g-strspl-ads}@anchor{3cf}@anchor{gnat_rm/the_gnat_library id126}@anchor{3d0} +@anchor{gnat_rm/the_gnat_library gnat-string-split-g-strspl-ads}@anchor{3d1}@anchor{gnat_rm/the_gnat_library id127}@anchor{3d2} @section @code{GNAT.String_Split} (@code{g-strspl.ads}) @@ -25150,7 +25174,7 @@ to the resulting slices. This package is instantiated from @code{GNAT.Array_Split}. @node GNAT Table g-table ads,GNAT Task_Lock g-tasloc ads,GNAT String_Split g-strspl ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-table-g-table-ads}@anchor{3d1}@anchor{gnat_rm/the_gnat_library id127}@anchor{3d2} +@anchor{gnat_rm/the_gnat_library gnat-table-g-table-ads}@anchor{3d3}@anchor{gnat_rm/the_gnat_library id128}@anchor{3d4} @section @code{GNAT.Table} (@code{g-table.ads}) @@ -25170,7 +25194,7 @@ while an instantiation of @code{GNAT.Dynamic_Tables} creates a type that can be used to define dynamic instances of the table. @node GNAT Task_Lock g-tasloc ads,GNAT Time_Stamp g-timsta ads,GNAT Table g-table ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-task-lock-g-tasloc-ads}@anchor{3d3}@anchor{gnat_rm/the_gnat_library id128}@anchor{3d4} +@anchor{gnat_rm/the_gnat_library gnat-task-lock-g-tasloc-ads}@anchor{3d5}@anchor{gnat_rm/the_gnat_library id129}@anchor{3d6} @section @code{GNAT.Task_Lock} (@code{g-tasloc.ads}) @@ -25187,7 +25211,7 @@ single global task lock. Appropriate for use in situations where contention between tasks is very rarely expected. @node GNAT Time_Stamp g-timsta ads,GNAT Threads g-thread ads,GNAT Task_Lock g-tasloc ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-time-stamp-g-timsta-ads}@anchor{3d5}@anchor{gnat_rm/the_gnat_library id129}@anchor{3d6} +@anchor{gnat_rm/the_gnat_library gnat-time-stamp-g-timsta-ads}@anchor{3d7}@anchor{gnat_rm/the_gnat_library id130}@anchor{3d8} @section @code{GNAT.Time_Stamp} (@code{g-timsta.ads}) @@ -25202,7 +25226,7 @@ represents the current date and time in ISO 8601 format. This is a very simple routine with minimal code and there are no dependencies on any other unit. @node GNAT Threads g-thread ads,GNAT Traceback g-traceb ads,GNAT Time_Stamp g-timsta ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-threads-g-thread-ads}@anchor{3d7}@anchor{gnat_rm/the_gnat_library id130}@anchor{3d8} +@anchor{gnat_rm/the_gnat_library gnat-threads-g-thread-ads}@anchor{3d9}@anchor{gnat_rm/the_gnat_library id131}@anchor{3da} @section @code{GNAT.Threads} (@code{g-thread.ads}) @@ -25219,7 +25243,7 @@ further details if your program has threads that are created by a non-Ada environment which then accesses Ada code. @node GNAT Traceback g-traceb ads,GNAT Traceback Symbolic g-trasym ads,GNAT Threads g-thread ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{3d9}@anchor{gnat_rm/the_gnat_library id131}@anchor{3da} +@anchor{gnat_rm/the_gnat_library gnat-traceback-g-traceb-ads}@anchor{3db}@anchor{gnat_rm/the_gnat_library id132}@anchor{3dc} @section @code{GNAT.Traceback} (@code{g-traceb.ads}) @@ -25231,7 +25255,7 @@ Provides a facility for obtaining non-symbolic traceback information, useful in various debugging situations. @node GNAT Traceback Symbolic g-trasym ads,GNAT UTF_32 g-table ads,GNAT Traceback g-traceb ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-traceback-symbolic-g-trasym-ads}@anchor{3db}@anchor{gnat_rm/the_gnat_library id132}@anchor{3dc} +@anchor{gnat_rm/the_gnat_library gnat-traceback-symbolic-g-trasym-ads}@anchor{3dd}@anchor{gnat_rm/the_gnat_library id133}@anchor{3de} @section @code{GNAT.Traceback.Symbolic} (@code{g-trasym.ads}) @@ -25240,7 +25264,7 @@ in various debugging situations. @geindex Trace back facilities @node GNAT UTF_32 g-table ads,GNAT Wide_Spelling_Checker g-u3spch ads,GNAT Traceback Symbolic g-trasym ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-table-ads}@anchor{3dd}@anchor{gnat_rm/the_gnat_library id133}@anchor{3de} +@anchor{gnat_rm/the_gnat_library gnat-utf-32-g-table-ads}@anchor{3df}@anchor{gnat_rm/the_gnat_library id134}@anchor{3e0} @section @code{GNAT.UTF_32} (@code{g-table.ads}) @@ -25259,7 +25283,7 @@ lower case to upper case fold routine corresponding to the Ada 2005 rules for identifier equivalence. @node GNAT Wide_Spelling_Checker g-u3spch ads,GNAT Wide_Spelling_Checker g-wispch ads,GNAT UTF_32 g-table ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-u3spch-ads}@anchor{3df}@anchor{gnat_rm/the_gnat_library id134}@anchor{3e0} +@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-u3spch-ads}@anchor{3e1}@anchor{gnat_rm/the_gnat_library id135}@anchor{3e2} @section @code{GNAT.Wide_Spelling_Checker} (@code{g-u3spch.ads}) @@ -25272,7 +25296,7 @@ near misspelling of another wide wide string, where the strings are represented using the UTF_32_String type defined in System.Wch_Cnv. @node GNAT Wide_Spelling_Checker g-wispch ads,GNAT Wide_String_Split g-wistsp ads,GNAT Wide_Spelling_Checker g-u3spch ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-wispch-ads}@anchor{3e1}@anchor{gnat_rm/the_gnat_library id135}@anchor{3e2} +@anchor{gnat_rm/the_gnat_library gnat-wide-spelling-checker-g-wispch-ads}@anchor{3e3}@anchor{gnat_rm/the_gnat_library id136}@anchor{3e4} @section @code{GNAT.Wide_Spelling_Checker} (@code{g-wispch.ads}) @@ -25284,7 +25308,7 @@ Provides a function for determining whether one wide string is a plausible near misspelling of another wide string. @node GNAT Wide_String_Split g-wistsp ads,GNAT Wide_Wide_Spelling_Checker g-zspche ads,GNAT Wide_Spelling_Checker g-wispch ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-wide-string-split-g-wistsp-ads}@anchor{3e3}@anchor{gnat_rm/the_gnat_library id136}@anchor{3e4} +@anchor{gnat_rm/the_gnat_library gnat-wide-string-split-g-wistsp-ads}@anchor{3e5}@anchor{gnat_rm/the_gnat_library id137}@anchor{3e6} @section @code{GNAT.Wide_String_Split} (@code{g-wistsp.ads}) @@ -25298,7 +25322,7 @@ to the resulting slices. This package is instantiated from @code{GNAT.Array_Split}. @node GNAT Wide_Wide_Spelling_Checker g-zspche ads,GNAT Wide_Wide_String_Split g-zistsp ads,GNAT Wide_String_Split g-wistsp ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-wide-wide-spelling-checker-g-zspche-ads}@anchor{3e5}@anchor{gnat_rm/the_gnat_library id137}@anchor{3e6} +@anchor{gnat_rm/the_gnat_library gnat-wide-wide-spelling-checker-g-zspche-ads}@anchor{3e7}@anchor{gnat_rm/the_gnat_library id138}@anchor{3e8} @section @code{GNAT.Wide_Wide_Spelling_Checker} (@code{g-zspche.ads}) @@ -25310,7 +25334,7 @@ Provides a function for determining whether one wide wide string is a plausible near misspelling of another wide wide string. @node GNAT Wide_Wide_String_Split g-zistsp ads,Interfaces C Extensions i-cexten ads,GNAT Wide_Wide_Spelling_Checker g-zspche ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library gnat-wide-wide-string-split-g-zistsp-ads}@anchor{3e7}@anchor{gnat_rm/the_gnat_library id138}@anchor{3e8} +@anchor{gnat_rm/the_gnat_library gnat-wide-wide-string-split-g-zistsp-ads}@anchor{3e9}@anchor{gnat_rm/the_gnat_library id139}@anchor{3ea} @section @code{GNAT.Wide_Wide_String_Split} (@code{g-zistsp.ads}) @@ -25324,7 +25348,7 @@ to the resulting slices. This package is instantiated from @code{GNAT.Array_Split}. @node Interfaces C Extensions i-cexten ads,Interfaces C Streams i-cstrea ads,GNAT Wide_Wide_String_Split g-zistsp ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id139}@anchor{3e9}@anchor{gnat_rm/the_gnat_library interfaces-c-extensions-i-cexten-ads}@anchor{3ea} +@anchor{gnat_rm/the_gnat_library id140}@anchor{3eb}@anchor{gnat_rm/the_gnat_library interfaces-c-extensions-i-cexten-ads}@anchor{3ec} @section @code{Interfaces.C.Extensions} (@code{i-cexten.ads}) @@ -25335,7 +25359,7 @@ for use with either manually or automatically generated bindings to C libraries. @node Interfaces C Streams i-cstrea ads,Interfaces Packed_Decimal i-pacdec ads,Interfaces C Extensions i-cexten ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id140}@anchor{3eb}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{3ec} +@anchor{gnat_rm/the_gnat_library id141}@anchor{3ed}@anchor{gnat_rm/the_gnat_library interfaces-c-streams-i-cstrea-ads}@anchor{3ee} @section @code{Interfaces.C.Streams} (@code{i-cstrea.ads}) @@ -25348,7 +25372,7 @@ This package is a binding for the most commonly used operations on C streams. @node Interfaces Packed_Decimal i-pacdec ads,Interfaces VxWorks i-vxwork ads,Interfaces C Streams i-cstrea ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id141}@anchor{3ed}@anchor{gnat_rm/the_gnat_library interfaces-packed-decimal-i-pacdec-ads}@anchor{3ee} +@anchor{gnat_rm/the_gnat_library id142}@anchor{3ef}@anchor{gnat_rm/the_gnat_library interfaces-packed-decimal-i-pacdec-ads}@anchor{3f0} @section @code{Interfaces.Packed_Decimal} (@code{i-pacdec.ads}) @@ -25363,7 +25387,7 @@ from a packed decimal format compatible with that used on IBM mainframes. @node Interfaces VxWorks i-vxwork ads,Interfaces VxWorks Int_Connection i-vxinco ads,Interfaces Packed_Decimal i-pacdec ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id142}@anchor{3ef}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-i-vxwork-ads}@anchor{3f0} +@anchor{gnat_rm/the_gnat_library id143}@anchor{3f1}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-i-vxwork-ads}@anchor{3f2} @section @code{Interfaces.VxWorks} (@code{i-vxwork.ads}) @@ -25379,7 +25403,7 @@ In particular, it interfaces with the VxWorks hardware interrupt facilities. @node Interfaces VxWorks Int_Connection i-vxinco ads,Interfaces VxWorks IO i-vxwoio ads,Interfaces VxWorks i-vxwork ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id143}@anchor{3f1}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-int-connection-i-vxinco-ads}@anchor{3f2} +@anchor{gnat_rm/the_gnat_library id144}@anchor{3f3}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-int-connection-i-vxinco-ads}@anchor{3f4} @section @code{Interfaces.VxWorks.Int_Connection} (@code{i-vxinco.ads}) @@ -25395,7 +25419,7 @@ intConnect() with a custom routine for installing interrupt handlers. @node Interfaces VxWorks IO i-vxwoio ads,System Address_Image s-addima ads,Interfaces VxWorks Int_Connection i-vxinco ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id144}@anchor{3f3}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-io-i-vxwoio-ads}@anchor{3f4} +@anchor{gnat_rm/the_gnat_library id145}@anchor{3f5}@anchor{gnat_rm/the_gnat_library interfaces-vxworks-io-i-vxwoio-ads}@anchor{3f6} @section @code{Interfaces.VxWorks.IO} (@code{i-vxwoio.ads}) @@ -25418,7 +25442,7 @@ function codes. A particular use of this package is to enable the use of Get_Immediate under VxWorks. @node System Address_Image s-addima ads,System Assertions s-assert ads,Interfaces VxWorks IO i-vxwoio ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id145}@anchor{3f5}@anchor{gnat_rm/the_gnat_library system-address-image-s-addima-ads}@anchor{3f6} +@anchor{gnat_rm/the_gnat_library id146}@anchor{3f7}@anchor{gnat_rm/the_gnat_library system-address-image-s-addima-ads}@anchor{3f8} @section @code{System.Address_Image} (@code{s-addima.ads}) @@ -25434,7 +25458,7 @@ function that gives an (implementation dependent) string which identifies an address. @node System Assertions s-assert ads,System Atomic_Counters s-atocou ads,System Address_Image s-addima ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id146}@anchor{3f7}@anchor{gnat_rm/the_gnat_library system-assertions-s-assert-ads}@anchor{3f8} +@anchor{gnat_rm/the_gnat_library id147}@anchor{3f9}@anchor{gnat_rm/the_gnat_library system-assertions-s-assert-ads}@anchor{3fa} @section @code{System.Assertions} (@code{s-assert.ads}) @@ -25450,7 +25474,7 @@ by an run-time assertion failure, as well as the routine that is used internally to raise this assertion. @node System Atomic_Counters s-atocou ads,System Memory s-memory ads,System Assertions s-assert ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id147}@anchor{3f9}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{3fa} +@anchor{gnat_rm/the_gnat_library id148}@anchor{3fb}@anchor{gnat_rm/the_gnat_library system-atomic-counters-s-atocou-ads}@anchor{3fc} @section @code{System.Atomic_Counters} (@code{s-atocou.ads}) @@ -25464,7 +25488,7 @@ on most targets, including all Alpha, AARCH64, ARM, ia64, PowerPC, SPARC V9, x86, and x86_64 platforms. @node System Memory s-memory ads,System Multiprocessors s-multip ads,System Atomic_Counters s-atocou ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id148}@anchor{3fb}@anchor{gnat_rm/the_gnat_library system-memory-s-memory-ads}@anchor{3fc} +@anchor{gnat_rm/the_gnat_library id149}@anchor{3fd}@anchor{gnat_rm/the_gnat_library system-memory-s-memory-ads}@anchor{3fe} @section @code{System.Memory} (@code{s-memory.ads}) @@ -25482,7 +25506,7 @@ calls to this unit may be made for low level allocation uses (for example see the body of @code{GNAT.Tables}). @node System Multiprocessors s-multip ads,System Multiprocessors Dispatching_Domains s-mudido ads,System Memory s-memory ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id149}@anchor{3fd}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{3fe} +@anchor{gnat_rm/the_gnat_library id150}@anchor{3ff}@anchor{gnat_rm/the_gnat_library system-multiprocessors-s-multip-ads}@anchor{400} @section @code{System.Multiprocessors} (@code{s-multip.ads}) @@ -25495,7 +25519,7 @@ in GNAT we also make it available in Ada 95 and Ada 2005 (where it is technically an implementation-defined addition). @node System Multiprocessors Dispatching_Domains s-mudido ads,System Partition_Interface s-parint ads,System Multiprocessors s-multip ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id150}@anchor{3ff}@anchor{gnat_rm/the_gnat_library system-multiprocessors-dispatching-domains-s-mudido-ads}@anchor{400} +@anchor{gnat_rm/the_gnat_library id151}@anchor{401}@anchor{gnat_rm/the_gnat_library system-multiprocessors-dispatching-domains-s-mudido-ads}@anchor{402} @section @code{System.Multiprocessors.Dispatching_Domains} (@code{s-mudido.ads}) @@ -25508,7 +25532,7 @@ in GNAT we also make it available in Ada 95 and Ada 2005 (where it is technically an implementation-defined addition). @node System Partition_Interface s-parint ads,System Pool_Global s-pooglo ads,System Multiprocessors Dispatching_Domains s-mudido ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id151}@anchor{401}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{402} +@anchor{gnat_rm/the_gnat_library id152}@anchor{403}@anchor{gnat_rm/the_gnat_library system-partition-interface-s-parint-ads}@anchor{404} @section @code{System.Partition_Interface} (@code{s-parint.ads}) @@ -25521,7 +25545,7 @@ is used primarily in a distribution context when using Annex E with @code{GLADE}. @node System Pool_Global s-pooglo ads,System Pool_Local s-pooloc ads,System Partition_Interface s-parint ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id152}@anchor{403}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{404} +@anchor{gnat_rm/the_gnat_library id153}@anchor{405}@anchor{gnat_rm/the_gnat_library system-pool-global-s-pooglo-ads}@anchor{406} @section @code{System.Pool_Global} (@code{s-pooglo.ads}) @@ -25538,7 +25562,7 @@ declared. It uses malloc/free to allocate/free and does not attempt to do any automatic reclamation. @node System Pool_Local s-pooloc ads,System Restrictions s-restri ads,System Pool_Global s-pooglo ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id153}@anchor{405}@anchor{gnat_rm/the_gnat_library system-pool-local-s-pooloc-ads}@anchor{406} +@anchor{gnat_rm/the_gnat_library id154}@anchor{407}@anchor{gnat_rm/the_gnat_library system-pool-local-s-pooloc-ads}@anchor{408} @section @code{System.Pool_Local} (@code{s-pooloc.ads}) @@ -25555,7 +25579,7 @@ a list of allocated blocks, so that all storage allocated for the pool can be freed automatically when the pool is finalized. @node System Restrictions s-restri ads,System Rident s-rident ads,System Pool_Local s-pooloc ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id154}@anchor{407}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{408} +@anchor{gnat_rm/the_gnat_library id155}@anchor{409}@anchor{gnat_rm/the_gnat_library system-restrictions-s-restri-ads}@anchor{40a} @section @code{System.Restrictions} (@code{s-restri.ads}) @@ -25571,7 +25595,7 @@ compiler determined information on which restrictions are violated by one or more packages in the partition. @node System Rident s-rident ads,System Strings Stream_Ops s-ststop ads,System Restrictions s-restri ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id155}@anchor{409}@anchor{gnat_rm/the_gnat_library system-rident-s-rident-ads}@anchor{40a} +@anchor{gnat_rm/the_gnat_library id156}@anchor{40b}@anchor{gnat_rm/the_gnat_library system-rident-s-rident-ads}@anchor{40c} @section @code{System.Rident} (@code{s-rident.ads}) @@ -25587,7 +25611,7 @@ since the necessary instantiation is included in package System.Restrictions. @node System Strings Stream_Ops s-ststop ads,System Unsigned_Types s-unstyp ads,System Rident s-rident ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id156}@anchor{40b}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{40c} +@anchor{gnat_rm/the_gnat_library id157}@anchor{40d}@anchor{gnat_rm/the_gnat_library system-strings-stream-ops-s-ststop-ads}@anchor{40e} @section @code{System.Strings.Stream_Ops} (@code{s-ststop.ads}) @@ -25603,7 +25627,7 @@ stream attributes are applied to string types, but the subprograms in this package can be used directly by application programs. @node System Unsigned_Types s-unstyp ads,System Wch_Cnv s-wchcnv ads,System Strings Stream_Ops s-ststop ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id157}@anchor{40d}@anchor{gnat_rm/the_gnat_library system-unsigned-types-s-unstyp-ads}@anchor{40e} +@anchor{gnat_rm/the_gnat_library id158}@anchor{40f}@anchor{gnat_rm/the_gnat_library system-unsigned-types-s-unstyp-ads}@anchor{410} @section @code{System.Unsigned_Types} (@code{s-unstyp.ads}) @@ -25616,7 +25640,7 @@ also contains some related definitions for other specialized types used by the compiler in connection with packed array types. @node System Wch_Cnv s-wchcnv ads,System Wch_Con s-wchcon ads,System Unsigned_Types s-unstyp ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id158}@anchor{40f}@anchor{gnat_rm/the_gnat_library system-wch-cnv-s-wchcnv-ads}@anchor{410} +@anchor{gnat_rm/the_gnat_library id159}@anchor{411}@anchor{gnat_rm/the_gnat_library system-wch-cnv-s-wchcnv-ads}@anchor{412} @section @code{System.Wch_Cnv} (@code{s-wchcnv.ads}) @@ -25637,7 +25661,7 @@ encoding method. It uses definitions in package @code{System.Wch_Con}. @node System Wch_Con s-wchcon ads,,System Wch_Cnv s-wchcnv ads,The GNAT Library -@anchor{gnat_rm/the_gnat_library id159}@anchor{411}@anchor{gnat_rm/the_gnat_library system-wch-con-s-wchcon-ads}@anchor{412} +@anchor{gnat_rm/the_gnat_library id160}@anchor{413}@anchor{gnat_rm/the_gnat_library system-wch-con-s-wchcon-ads}@anchor{414} @section @code{System.Wch_Con} (@code{s-wchcon.ads}) @@ -25649,7 +25673,7 @@ in ordinary strings. These definitions are used by the package @code{System.Wch_Cnv}. @node Interfacing to Other Languages,Specialized Needs Annexes,The GNAT Library,Top -@anchor{gnat_rm/interfacing_to_other_languages doc}@anchor{413}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{414}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-other-languages}@anchor{11} +@anchor{gnat_rm/interfacing_to_other_languages doc}@anchor{415}@anchor{gnat_rm/interfacing_to_other_languages id1}@anchor{416}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-other-languages}@anchor{11} @chapter Interfacing to Other Languages @@ -25667,7 +25691,7 @@ provided. @end menu @node Interfacing to C,Interfacing to C++,,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{415}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-c}@anchor{416} +@anchor{gnat_rm/interfacing_to_other_languages id2}@anchor{417}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-c}@anchor{418} @section Interfacing to C @@ -25807,7 +25831,7 @@ of the length corresponding to the @code{type'Size} value in Ada. @end itemize @node Interfacing to C++,Interfacing to COBOL,Interfacing to C,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{47}@anchor{gnat_rm/interfacing_to_other_languages id4}@anchor{417} +@anchor{gnat_rm/interfacing_to_other_languages id3}@anchor{47}@anchor{gnat_rm/interfacing_to_other_languages id4}@anchor{419} @section Interfacing to C++ @@ -25864,7 +25888,7 @@ The @code{External_Name} is the name of the C++ RTTI symbol. You can then cover a specific C++ exception in an exception handler. @node Interfacing to COBOL,Interfacing to Fortran,Interfacing to C++,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id5}@anchor{418}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{419} +@anchor{gnat_rm/interfacing_to_other_languages id5}@anchor{41a}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-cobol}@anchor{41b} @section Interfacing to COBOL @@ -25872,7 +25896,7 @@ Interfacing to COBOL is achieved as described in section B.4 of the Ada Reference Manual. @node Interfacing to Fortran,Interfacing to non-GNAT Ada code,Interfacing to COBOL,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id6}@anchor{41a}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{41b} +@anchor{gnat_rm/interfacing_to_other_languages id6}@anchor{41c}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-fortran}@anchor{41d} @section Interfacing to Fortran @@ -25882,7 +25906,7 @@ multi-dimensional array causes the array to be stored in column-major order as required for convenient interface to Fortran. @node Interfacing to non-GNAT Ada code,,Interfacing to Fortran,Interfacing to Other Languages -@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{41c}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-non-gnat-ada-code}@anchor{41d} +@anchor{gnat_rm/interfacing_to_other_languages id7}@anchor{41e}@anchor{gnat_rm/interfacing_to_other_languages interfacing-to-non-gnat-ada-code}@anchor{41f} @section Interfacing to non-GNAT Ada code @@ -25906,7 +25930,7 @@ values or simple record types without variants, or simple array types with fixed bounds. @node Specialized Needs Annexes,Implementation of Specific Ada Features,Interfacing to Other Languages,Top -@anchor{gnat_rm/specialized_needs_annexes doc}@anchor{41e}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{41f}@anchor{gnat_rm/specialized_needs_annexes specialized-needs-annexes}@anchor{12} +@anchor{gnat_rm/specialized_needs_annexes doc}@anchor{420}@anchor{gnat_rm/specialized_needs_annexes id1}@anchor{421}@anchor{gnat_rm/specialized_needs_annexes specialized-needs-annexes}@anchor{12} @chapter Specialized Needs Annexes @@ -25947,7 +25971,7 @@ in Ada 2005) is fully implemented. @end table @node Implementation of Specific Ada Features,Implementation of Ada 2012 Features,Specialized Needs Annexes,Top -@anchor{gnat_rm/implementation_of_specific_ada_features doc}@anchor{420}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{421}@anchor{gnat_rm/implementation_of_specific_ada_features implementation-of-specific-ada-features}@anchor{13} +@anchor{gnat_rm/implementation_of_specific_ada_features doc}@anchor{422}@anchor{gnat_rm/implementation_of_specific_ada_features id1}@anchor{423}@anchor{gnat_rm/implementation_of_specific_ada_features implementation-of-specific-ada-features}@anchor{13} @chapter Implementation of Specific Ada Features @@ -25966,7 +25990,7 @@ facilities. @end menu @node Machine Code Insertions,GNAT Implementation of Tasking,,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{422}@anchor{gnat_rm/implementation_of_specific_ada_features machine-code-insertions}@anchor{166} +@anchor{gnat_rm/implementation_of_specific_ada_features id2}@anchor{424}@anchor{gnat_rm/implementation_of_specific_ada_features machine-code-insertions}@anchor{166} @section Machine Code Insertions @@ -26134,7 +26158,7 @@ according to normal visibility rules. In particular if there is no qualification is required. @node GNAT Implementation of Tasking,GNAT Implementation of Shared Passive Packages,Machine Code Insertions,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{423}@anchor{gnat_rm/implementation_of_specific_ada_features id3}@anchor{424} +@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-tasking}@anchor{425}@anchor{gnat_rm/implementation_of_specific_ada_features id3}@anchor{426} @section GNAT Implementation of Tasking @@ -26150,7 +26174,7 @@ to compliance with the Real-Time Systems Annex. @end menu @node Mapping Ada Tasks onto the Underlying Kernel Threads,Ensuring Compliance with the Real-Time Annex,,GNAT Implementation of Tasking -@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{425}@anchor{gnat_rm/implementation_of_specific_ada_features mapping-ada-tasks-onto-the-underlying-kernel-threads}@anchor{426} +@anchor{gnat_rm/implementation_of_specific_ada_features id4}@anchor{427}@anchor{gnat_rm/implementation_of_specific_ada_features mapping-ada-tasks-onto-the-underlying-kernel-threads}@anchor{428} @subsection Mapping Ada Tasks onto the Underlying Kernel Threads @@ -26219,7 +26243,7 @@ support this functionality when the parent contains more than one task. @geindex Forking a new process @node Ensuring Compliance with the Real-Time Annex,Support for Locking Policies,Mapping Ada Tasks onto the Underlying Kernel Threads,GNAT Implementation of Tasking -@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{427}@anchor{gnat_rm/implementation_of_specific_ada_features id5}@anchor{428} +@anchor{gnat_rm/implementation_of_specific_ada_features ensuring-compliance-with-the-real-time-annex}@anchor{429}@anchor{gnat_rm/implementation_of_specific_ada_features id5}@anchor{42a} @subsection Ensuring Compliance with the Real-Time Annex @@ -26270,7 +26294,7 @@ placed at the end. @c Support_for_Locking_Policies @node Support for Locking Policies,,Ensuring Compliance with the Real-Time Annex,GNAT Implementation of Tasking -@anchor{gnat_rm/implementation_of_specific_ada_features support-for-locking-policies}@anchor{429} +@anchor{gnat_rm/implementation_of_specific_ada_features support-for-locking-policies}@anchor{42b} @subsection Support for Locking Policies @@ -26304,7 +26328,7 @@ then ceiling locking is used. Otherwise, the @code{Ceiling_Locking} policy is ignored. @node GNAT Implementation of Shared Passive Packages,Code Generation for Array Aggregates,GNAT Implementation of Tasking,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{42a}@anchor{gnat_rm/implementation_of_specific_ada_features id6}@anchor{42b} +@anchor{gnat_rm/implementation_of_specific_ada_features gnat-implementation-of-shared-passive-packages}@anchor{42c}@anchor{gnat_rm/implementation_of_specific_ada_features id6}@anchor{42d} @section GNAT Implementation of Shared Passive Packages @@ -26402,7 +26426,7 @@ This is used to provide the required locking semantics for proper protected object synchronization. @node Code Generation for Array Aggregates,The Size of Discriminated Records with Default Discriminants,GNAT Implementation of Shared Passive Packages,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features code-generation-for-array-aggregates}@anchor{42c}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{42d} +@anchor{gnat_rm/implementation_of_specific_ada_features code-generation-for-array-aggregates}@anchor{42e}@anchor{gnat_rm/implementation_of_specific_ada_features id7}@anchor{42f} @section Code Generation for Array Aggregates @@ -26433,7 +26457,7 @@ component values and static subtypes also lead to simpler code. @end menu @node Static constant aggregates with static bounds,Constant aggregates with unconstrained nominal types,,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{42e}@anchor{gnat_rm/implementation_of_specific_ada_features static-constant-aggregates-with-static-bounds}@anchor{42f} +@anchor{gnat_rm/implementation_of_specific_ada_features id8}@anchor{430}@anchor{gnat_rm/implementation_of_specific_ada_features static-constant-aggregates-with-static-bounds}@anchor{431} @subsection Static constant aggregates with static bounds @@ -26480,7 +26504,7 @@ Zero2: constant two_dim := (others => (others => 0)); @end example @node Constant aggregates with unconstrained nominal types,Aggregates with static bounds,Static constant aggregates with static bounds,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features constant-aggregates-with-unconstrained-nominal-types}@anchor{430}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{431} +@anchor{gnat_rm/implementation_of_specific_ada_features constant-aggregates-with-unconstrained-nominal-types}@anchor{432}@anchor{gnat_rm/implementation_of_specific_ada_features id9}@anchor{433} @subsection Constant aggregates with unconstrained nominal types @@ -26495,7 +26519,7 @@ Cr_Unc : constant One_Unc := (12,24,36); @end example @node Aggregates with static bounds,Aggregates with nonstatic bounds,Constant aggregates with unconstrained nominal types,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{432}@anchor{gnat_rm/implementation_of_specific_ada_features id10}@anchor{433} +@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-static-bounds}@anchor{434}@anchor{gnat_rm/implementation_of_specific_ada_features id10}@anchor{435} @subsection Aggregates with static bounds @@ -26523,7 +26547,7 @@ end loop; @end example @node Aggregates with nonstatic bounds,Aggregates in assignment statements,Aggregates with static bounds,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{434}@anchor{gnat_rm/implementation_of_specific_ada_features id11}@anchor{435} +@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-with-nonstatic-bounds}@anchor{436}@anchor{gnat_rm/implementation_of_specific_ada_features id11}@anchor{437} @subsection Aggregates with nonstatic bounds @@ -26534,7 +26558,7 @@ have to be applied to sub-arrays individually, if they do not have statically compatible subtypes. @node Aggregates in assignment statements,,Aggregates with nonstatic bounds,Code Generation for Array Aggregates -@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{436}@anchor{gnat_rm/implementation_of_specific_ada_features id12}@anchor{437} +@anchor{gnat_rm/implementation_of_specific_ada_features aggregates-in-assignment-statements}@anchor{438}@anchor{gnat_rm/implementation_of_specific_ada_features id12}@anchor{439} @subsection Aggregates in assignment statements @@ -26576,7 +26600,7 @@ a temporary (created either by the front-end or the code generator) and then that temporary will be copied onto the target. @node The Size of Discriminated Records with Default Discriminants,Image Values For Nonscalar Types,Code Generation for Array Aggregates,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features id13}@anchor{438}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{439} +@anchor{gnat_rm/implementation_of_specific_ada_features id13}@anchor{43a}@anchor{gnat_rm/implementation_of_specific_ada_features the-size-of-discriminated-records-with-default-discriminants}@anchor{43b} @section The Size of Discriminated Records with Default Discriminants @@ -26656,7 +26680,7 @@ say) must be consistent, so it is imperative that the object, once created, remain invariant. @node Image Values For Nonscalar Types,Strict Conformance to the Ada Reference Manual,The Size of Discriminated Records with Default Discriminants,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{43a}@anchor{gnat_rm/implementation_of_specific_ada_features image-values-for-nonscalar-types}@anchor{43b} +@anchor{gnat_rm/implementation_of_specific_ada_features id14}@anchor{43c}@anchor{gnat_rm/implementation_of_specific_ada_features image-values-for-nonscalar-types}@anchor{43d} @section Image Values For Nonscalar Types @@ -26676,7 +26700,7 @@ control of image text is required for some type T, then T’Put_Image should be explicitly specified. @node Strict Conformance to the Ada Reference Manual,,Image Values For Nonscalar Types,Implementation of Specific Ada Features -@anchor{gnat_rm/implementation_of_specific_ada_features id15}@anchor{43c}@anchor{gnat_rm/implementation_of_specific_ada_features strict-conformance-to-the-ada-reference-manual}@anchor{43d} +@anchor{gnat_rm/implementation_of_specific_ada_features id15}@anchor{43e}@anchor{gnat_rm/implementation_of_specific_ada_features strict-conformance-to-the-ada-reference-manual}@anchor{43f} @section Strict Conformance to the Ada Reference Manual @@ -26703,7 +26727,7 @@ behavior (although at the cost of a significant performance penalty), so infinite and NaN values are properly generated. @node Implementation of Ada 2012 Features,Security Hardening Features,Implementation of Specific Ada Features,Top -@anchor{gnat_rm/implementation_of_ada_2012_features doc}@anchor{43e}@anchor{gnat_rm/implementation_of_ada_2012_features id1}@anchor{43f}@anchor{gnat_rm/implementation_of_ada_2012_features implementation-of-ada-2012-features}@anchor{14} +@anchor{gnat_rm/implementation_of_ada_2012_features doc}@anchor{440}@anchor{gnat_rm/implementation_of_ada_2012_features id1}@anchor{441}@anchor{gnat_rm/implementation_of_ada_2012_features implementation-of-ada-2012-features}@anchor{14} @chapter Implementation of Ada 2012 Features @@ -28869,7 +28893,7 @@ RM References: H.04 (8/1) @end itemize @node Security Hardening Features,Obsolescent Features,Implementation of Ada 2012 Features,Top -@anchor{gnat_rm/security_hardening_features doc}@anchor{440}@anchor{gnat_rm/security_hardening_features id1}@anchor{441}@anchor{gnat_rm/security_hardening_features security-hardening-features}@anchor{15} +@anchor{gnat_rm/security_hardening_features doc}@anchor{442}@anchor{gnat_rm/security_hardening_features id1}@anchor{443}@anchor{gnat_rm/security_hardening_features security-hardening-features}@anchor{15} @chapter Security Hardening Features @@ -28891,7 +28915,7 @@ change. @end menu @node Register Scrubbing,Stack Scrubbing,,Security Hardening Features -@anchor{gnat_rm/security_hardening_features register-scrubbing}@anchor{442} +@anchor{gnat_rm/security_hardening_features register-scrubbing}@anchor{444} @section Register Scrubbing @@ -28920,7 +28944,7 @@ programming languages, see @cite{Using the GNU Compiler Collection (GCC)}. @c Stack Scrubbing: @node Stack Scrubbing,Hardened Conditionals,Register Scrubbing,Security Hardening Features -@anchor{gnat_rm/security_hardening_features stack-scrubbing}@anchor{443} +@anchor{gnat_rm/security_hardening_features stack-scrubbing}@anchor{445} @section Stack Scrubbing @@ -29015,7 +29039,7 @@ Bar_Callable_Ptr. @c Hardened Conditionals: @node Hardened Conditionals,Hardened Booleans,Stack Scrubbing,Security Hardening Features -@anchor{gnat_rm/security_hardening_features hardened-conditionals}@anchor{444} +@anchor{gnat_rm/security_hardening_features hardened-conditionals}@anchor{446} @section Hardened Conditionals @@ -29062,7 +29086,7 @@ be used with other programming languages supported by GCC. @c Hardened Booleans: @node Hardened Booleans,Control Flow Redundancy,Hardened Conditionals,Security Hardening Features -@anchor{gnat_rm/security_hardening_features hardened-booleans}@anchor{445} +@anchor{gnat_rm/security_hardening_features hardened-booleans}@anchor{447} @section Hardened Booleans @@ -29103,7 +29127,7 @@ For usage and more details on that attribute, see @cite{Using the GNU Compiler C @c Control Flow Redundancy: @node Control Flow Redundancy,,Hardened Booleans,Security Hardening Features -@anchor{gnat_rm/security_hardening_features control-flow-redundancy}@anchor{446} +@anchor{gnat_rm/security_hardening_features control-flow-redundancy}@anchor{448} @section Control Flow Redundancy @@ -29152,7 +29176,7 @@ see @cite{Using the GNU Compiler Collection (GCC)}. These options can be used with other programming languages supported by GCC. @node Obsolescent Features,Compatibility and Porting Guide,Security Hardening Features,Top -@anchor{gnat_rm/obsolescent_features doc}@anchor{447}@anchor{gnat_rm/obsolescent_features id1}@anchor{448}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{16} +@anchor{gnat_rm/obsolescent_features doc}@anchor{449}@anchor{gnat_rm/obsolescent_features id1}@anchor{44a}@anchor{gnat_rm/obsolescent_features obsolescent-features}@anchor{16} @chapter Obsolescent Features @@ -29171,7 +29195,7 @@ compatibility purposes. @end menu @node pragma No_Run_Time,pragma Ravenscar,,Obsolescent Features -@anchor{gnat_rm/obsolescent_features id2}@anchor{449}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{44a} +@anchor{gnat_rm/obsolescent_features id2}@anchor{44b}@anchor{gnat_rm/obsolescent_features pragma-no-run-time}@anchor{44c} @section pragma No_Run_Time @@ -29184,7 +29208,7 @@ preferred usage is to use an appropriately configured run-time that includes just those features that are to be made accessible. @node pragma Ravenscar,pragma Restricted_Run_Time,pragma No_Run_Time,Obsolescent Features -@anchor{gnat_rm/obsolescent_features id3}@anchor{44b}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{44c} +@anchor{gnat_rm/obsolescent_features id3}@anchor{44d}@anchor{gnat_rm/obsolescent_features pragma-ravenscar}@anchor{44e} @section pragma Ravenscar @@ -29193,7 +29217,7 @@ The pragma @code{Ravenscar} has exactly the same effect as pragma is part of the new Ada 2005 standard. @node pragma Restricted_Run_Time,pragma Task_Info,pragma Ravenscar,Obsolescent Features -@anchor{gnat_rm/obsolescent_features id4}@anchor{44d}@anchor{gnat_rm/obsolescent_features pragma-restricted-run-time}@anchor{44e} +@anchor{gnat_rm/obsolescent_features id4}@anchor{44f}@anchor{gnat_rm/obsolescent_features pragma-restricted-run-time}@anchor{450} @section pragma Restricted_Run_Time @@ -29203,7 +29227,7 @@ preferred since the Ada 2005 pragma @code{Profile} is intended for this kind of implementation dependent addition. @node pragma Task_Info,package System Task_Info s-tasinf ads,pragma Restricted_Run_Time,Obsolescent Features -@anchor{gnat_rm/obsolescent_features id5}@anchor{44f}@anchor{gnat_rm/obsolescent_features pragma-task-info}@anchor{450} +@anchor{gnat_rm/obsolescent_features id5}@anchor{451}@anchor{gnat_rm/obsolescent_features pragma-task-info}@anchor{452} @section pragma Task_Info @@ -29229,7 +29253,7 @@ in the spec of package System.Task_Info in the runtime library. @node package System Task_Info s-tasinf ads,,pragma Task_Info,Obsolescent Features -@anchor{gnat_rm/obsolescent_features package-system-task-info}@anchor{451}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{452} +@anchor{gnat_rm/obsolescent_features package-system-task-info}@anchor{453}@anchor{gnat_rm/obsolescent_features package-system-task-info-s-tasinf-ads}@anchor{454} @section package System.Task_Info (@code{s-tasinf.ads}) @@ -29239,7 +29263,7 @@ to support the @code{Task_Info} pragma. The predefined Ada package standard replacement for GNAT’s @code{Task_Info} functionality. @node Compatibility and Porting Guide,GNU Free Documentation License,Obsolescent Features,Top -@anchor{gnat_rm/compatibility_and_porting_guide doc}@anchor{453}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-and-porting-guide}@anchor{17}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{454} +@anchor{gnat_rm/compatibility_and_porting_guide doc}@anchor{455}@anchor{gnat_rm/compatibility_and_porting_guide compatibility-and-porting-guide}@anchor{17}@anchor{gnat_rm/compatibility_and_porting_guide id1}@anchor{456} @chapter Compatibility and Porting Guide @@ -29261,7 +29285,7 @@ applications developed in other Ada environments. @end menu @node Writing Portable Fixed-Point Declarations,Compatibility with Ada 83,,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide id2}@anchor{455}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{456} +@anchor{gnat_rm/compatibility_and_porting_guide id2}@anchor{457}@anchor{gnat_rm/compatibility_and_porting_guide writing-portable-fixed-point-declarations}@anchor{458} @section Writing Portable Fixed-Point Declarations @@ -29383,7 +29407,7 @@ If you follow this scheme you will be guaranteed that your fixed-point types will be portable. @node Compatibility with Ada 83,Compatibility between Ada 95 and Ada 2005,Writing Portable Fixed-Point Declarations,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-ada-83}@anchor{457}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{458} +@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-ada-83}@anchor{459}@anchor{gnat_rm/compatibility_and_porting_guide id3}@anchor{45a} @section Compatibility with Ada 83 @@ -29411,7 +29435,7 @@ following subsections treat the most likely issues to be encountered. @end menu @node Legal Ada 83 programs that are illegal in Ada 95,More deterministic semantics,,Compatibility with Ada 83 -@anchor{gnat_rm/compatibility_and_porting_guide id4}@anchor{459}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{45a} +@anchor{gnat_rm/compatibility_and_porting_guide id4}@anchor{45b}@anchor{gnat_rm/compatibility_and_porting_guide legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{45c} @subsection Legal Ada 83 programs that are illegal in Ada 95 @@ -29511,7 +29535,7 @@ the fix is usually simply to add the @code{(<>)} to the generic declaration. @end itemize @node More deterministic semantics,Changed semantics,Legal Ada 83 programs that are illegal in Ada 95,Compatibility with Ada 83 -@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{45b}@anchor{gnat_rm/compatibility_and_porting_guide more-deterministic-semantics}@anchor{45c} +@anchor{gnat_rm/compatibility_and_porting_guide id5}@anchor{45d}@anchor{gnat_rm/compatibility_and_porting_guide more-deterministic-semantics}@anchor{45e} @subsection More deterministic semantics @@ -29539,7 +29563,7 @@ which open select branches are executed. @end itemize @node Changed semantics,Other language compatibility issues,More deterministic semantics,Compatibility with Ada 83 -@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{45d}@anchor{gnat_rm/compatibility_and_porting_guide id6}@anchor{45e} +@anchor{gnat_rm/compatibility_and_porting_guide changed-semantics}@anchor{45f}@anchor{gnat_rm/compatibility_and_porting_guide id6}@anchor{460} @subsection Changed semantics @@ -29581,7 +29605,7 @@ covers only the restricted range. @end itemize @node Other language compatibility issues,,Changed semantics,Compatibility with Ada 83 -@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{45f}@anchor{gnat_rm/compatibility_and_porting_guide other-language-compatibility-issues}@anchor{460} +@anchor{gnat_rm/compatibility_and_porting_guide id7}@anchor{461}@anchor{gnat_rm/compatibility_and_porting_guide other-language-compatibility-issues}@anchor{462} @subsection Other language compatibility issues @@ -29614,7 +29638,7 @@ include @code{pragma Interface} and the floating point type attributes @end itemize @node Compatibility between Ada 95 and Ada 2005,Implementation-dependent characteristics,Compatibility with Ada 83,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide compatibility-between-ada-95-and-ada-2005}@anchor{461}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{462} +@anchor{gnat_rm/compatibility_and_porting_guide compatibility-between-ada-95-and-ada-2005}@anchor{463}@anchor{gnat_rm/compatibility_and_porting_guide id8}@anchor{464} @section Compatibility between Ada 95 and Ada 2005 @@ -29686,7 +29710,7 @@ can declare a function returning a value from an anonymous access type. @end itemize @node Implementation-dependent characteristics,Compatibility with Other Ada Systems,Compatibility between Ada 95 and Ada 2005,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{463}@anchor{gnat_rm/compatibility_and_porting_guide implementation-dependent-characteristics}@anchor{464} +@anchor{gnat_rm/compatibility_and_porting_guide id9}@anchor{465}@anchor{gnat_rm/compatibility_and_porting_guide implementation-dependent-characteristics}@anchor{466} @section Implementation-dependent characteristics @@ -29709,7 +29733,7 @@ transition from certain Ada 83 compilers. @end menu @node Implementation-defined pragmas,Implementation-defined attributes,,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{465}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-pragmas}@anchor{466} +@anchor{gnat_rm/compatibility_and_porting_guide id10}@anchor{467}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-pragmas}@anchor{468} @subsection Implementation-defined pragmas @@ -29731,7 +29755,7 @@ avoiding compiler rejection of units that contain such pragmas; they are not relevant in a GNAT context and hence are not otherwise implemented. @node Implementation-defined attributes,Libraries,Implementation-defined pragmas,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide id11}@anchor{467}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{468} +@anchor{gnat_rm/compatibility_and_porting_guide id11}@anchor{469}@anchor{gnat_rm/compatibility_and_porting_guide implementation-defined-attributes}@anchor{46a} @subsection Implementation-defined attributes @@ -29745,7 +29769,7 @@ Ada 83, GNAT supplies the attributes @code{Bit}, @code{Machine_Size} and @code{Type_Class}. @node Libraries,Elaboration order,Implementation-defined attributes,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{469}@anchor{gnat_rm/compatibility_and_porting_guide libraries}@anchor{46a} +@anchor{gnat_rm/compatibility_and_porting_guide id12}@anchor{46b}@anchor{gnat_rm/compatibility_and_porting_guide libraries}@anchor{46c} @subsection Libraries @@ -29774,7 +29798,7 @@ be preferable to retrofit the application using modular types. @end itemize @node Elaboration order,Target-specific aspects,Libraries,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide elaboration-order}@anchor{46b}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{46c} +@anchor{gnat_rm/compatibility_and_porting_guide elaboration-order}@anchor{46d}@anchor{gnat_rm/compatibility_and_porting_guide id13}@anchor{46e} @subsection Elaboration order @@ -29810,7 +29834,7 @@ pragmas either globally (as an effect of the @emph{-gnatE} switch) or locally @end itemize @node Target-specific aspects,,Elaboration order,Implementation-dependent characteristics -@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{46d}@anchor{gnat_rm/compatibility_and_porting_guide target-specific-aspects}@anchor{46e} +@anchor{gnat_rm/compatibility_and_porting_guide id14}@anchor{46f}@anchor{gnat_rm/compatibility_and_porting_guide target-specific-aspects}@anchor{470} @subsection Target-specific aspects @@ -29823,10 +29847,10 @@ on the robustness of the original design. Moreover, Ada 95 (and thus Ada 2005 and Ada 2012) are sometimes incompatible with typical Ada 83 compiler practices regarding implicit packing, the meaning of the Size attribute, and the size of access values. -GNAT’s approach to these issues is described in @ref{46f,,Representation Clauses}. +GNAT’s approach to these issues is described in @ref{471,,Representation Clauses}. @node Compatibility with Other Ada Systems,Representation Clauses,Implementation-dependent characteristics,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{470}@anchor{gnat_rm/compatibility_and_porting_guide id15}@anchor{471} +@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-other-ada-systems}@anchor{472}@anchor{gnat_rm/compatibility_and_porting_guide id15}@anchor{473} @section Compatibility with Other Ada Systems @@ -29869,7 +29893,7 @@ far beyond this minimal set, as described in the next section. @end itemize @node Representation Clauses,Compatibility with HP Ada 83,Compatibility with Other Ada Systems,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{472}@anchor{gnat_rm/compatibility_and_porting_guide representation-clauses}@anchor{46f} +@anchor{gnat_rm/compatibility_and_porting_guide id16}@anchor{474}@anchor{gnat_rm/compatibility_and_porting_guide representation-clauses}@anchor{471} @section Representation Clauses @@ -29962,7 +29986,7 @@ with thin pointers. @end itemize @node Compatibility with HP Ada 83,,Representation Clauses,Compatibility and Porting Guide -@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-hp-ada-83}@anchor{473}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{474} +@anchor{gnat_rm/compatibility_and_porting_guide compatibility-with-hp-ada-83}@anchor{475}@anchor{gnat_rm/compatibility_and_porting_guide id17}@anchor{476} @section Compatibility with HP Ada 83 @@ -29992,7 +30016,7 @@ extension of package System. @end itemize @node GNU Free Documentation License,Index,Compatibility and Porting Guide,Top -@anchor{share/gnu_free_documentation_license doc}@anchor{475}@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{476} +@anchor{share/gnu_free_documentation_license doc}@anchor{477}@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{478} @chapter GNU Free Documentation License -- cgit v1.1 From f7c05e82037356ac4610e9e5d1365b345a17d0f7 Mon Sep 17 00:00:00 2001 From: Steve Baird Date: Tue, 24 May 2022 14:09:14 -0700 Subject: [Ada] Avoid unwanted warnings for statically-known-successful assertions The -gnatwc switch enables warnings for test condition outcomes that are known at compile time. Such warnings are unlikely to be useful in the case of an assertion expression (or a subexpression thereof), so do not generate them in that case. gcc/ada/ * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not generate a warning if the expression in question is an assertion expression, or a subexpression thereof. But do call Test_Comparison so that it can generate warnings for the cases that it generates warnings for. * sem_prag.ads: Modify Assertion_Expression_Pragma constant so that the predicate Sem_Util.In_Assertion_Expression_Pragma returns True for the expression of a Compile_Time_Error pragma. --- gcc/ada/sem_prag.ads | 1 + gcc/ada/sem_warn.adb | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads index 0a1ad5b..e8a65ce 100644 --- a/gcc/ada/sem_prag.ads +++ b/gcc/ada/sem_prag.ads @@ -135,6 +135,7 @@ package Sem_Prag is Pragma_Assert_And_Cut => True, Pragma_Assume => True, Pragma_Check => True, + Pragma_Compile_Time_Error => True, Pragma_Contract_Cases => True, Pragma_Default_Initial_Condition => True, Pragma_Initial_Condition => True, diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb index b23be72..1d73f21 100644 --- a/gcc/ada/sem_warn.adb +++ b/gcc/ada/sem_warn.adb @@ -3401,9 +3401,14 @@ package body Sem_Warn is False_Result => False_Result); -- Warn on a possible evaluation to False / True in the presence of - -- invalid values. + -- invalid values. But issue no warning for an assertion expression + -- (or a subexpression thereof); in particular, we don't want a + -- warning about an assertion that will always succeed. - if True_Result then + if In_Assertion_Expression_Pragma (Op) then + null; + + elsif True_Result then Error_Msg_N ("condition can only be False if invalid values present?c?", Op); -- cgit v1.1 From 063c8f4c01bc1a5e6960c8624077df7137dc5dad Mon Sep 17 00:00:00 2001 From: Steve Baird Date: Tue, 24 May 2022 16:03:58 -0700 Subject: [Ada] Compiler rejects legal allocator in record component constraint expression In some cases when a legal allocator which defines a new subtype for the allocated object occurs as part of a record component constraint expression, the compiler would incorrectly reject the allocator. gcc/ada/ * sem_ch4.adb (Analyze_Allocator): After calling Insert_Action to insert a subtype declaration associated with an allocator, the subtype declaration will usually be analyzed. But not always. Add an explicit call to Preanalyze to cope with the unusual case. The subtype declaration must be at least preanalyzed before the call to Sem_Ch3.Process_Subtype a little while later, during which we analyze an identifier that refers to the subtype. --- gcc/ada/sem_ch4.adb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 8fe2077..4bc3696 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -670,10 +670,19 @@ package body Sem_Ch4 is then Def_Id := Make_Temporary (Loc, 'S'); - Insert_Action (E, - Make_Subtype_Declaration (Loc, - Defining_Identifier => Def_Id, - Subtype_Indication => Relocate_Node (E))); + declare + Subtype_Decl : constant Node_Id := + Make_Subtype_Declaration (Loc, + Defining_Identifier => Def_Id, + Subtype_Indication => Relocate_Node (E)); + begin + Insert_Action (E, Subtype_Decl); + + -- Handle unusual case where Insert_Action does not + -- analyze the declaration. Subtype_Decl must be + -- preanalyzed before call to Process_Subtype below. + Preanalyze (Subtype_Decl); + end; if Sav_Errs /= Serious_Errors_Detected and then Nkind (Constraint (E)) = -- cgit v1.1 From cac397f3f6f29fe60d78d437c91f8a3842d567c9 Mon Sep 17 00:00:00 2001 From: Vasiliy Fofanov Date: Wed, 25 May 2022 17:49:38 +0200 Subject: [Ada] Fix length of title underlines. gcc/ada/ * doc/gnat_rm/the_gnat_library.rst: Fix length of title underlines. --- gcc/ada/doc/gnat_rm/the_gnat_library.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/doc/gnat_rm/the_gnat_library.rst b/gcc/ada/doc/gnat_rm/the_gnat_library.rst index a682f01..524e3e0 100644 --- a/gcc/ada/doc/gnat_rm/the_gnat_library.rst +++ b/gcc/ada/doc/gnat_rm/the_gnat_library.rst @@ -278,7 +278,7 @@ The specification of this unit is compatible with SPARK 2014. .. _`Ada.Containers.Functional_Vectors_(a-cofuve.ads)`: ``Ada.Containers.Functional_Vectors`` (:file:`a-cofuve.ads`) -================================================================= +============================================================ .. index:: Ada.Containers.Functional_Vectors (a-cofuve.ads) @@ -300,7 +300,7 @@ specification of this unit is compatible with SPARK 2014. .. _`Ada.Containers.Functional_Sets_(a-cofuse.ads)`: ``Ada.Containers.Functional_Sets`` (:file:`a-cofuse.ads`) -================================================================= +========================================================= .. index:: Ada.Containers.Functional_Sets (a-cofuse.ads) @@ -321,7 +321,7 @@ The specification of this unit is compatible with SPARK 2014. .. _`Ada.Containers.Functional_Maps_(a-cofuma.ads)`: ``Ada.Containers.Functional_Maps`` (:file:`a-cofuma.ads`) -================================================================= +========================================================= .. index:: Ada.Containers.Functional_Maps (a-cofuma.ads) -- cgit v1.1 From eb6e8a7acd1b8ecf36489e01cafad61add528f23 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Tue, 24 May 2022 13:03:21 -0400 Subject: [Ada] Add Ada 2022 Key function to sets containers This patch adds the new Generic_Keys.Key function to the set children of Ada.Containers. gcc/ada/ * libgnat/a-cbhase.ads, libgnat/a-cborse.ads, libgnat/a-cihase.ads, libgnat/a-ciorse.ads, libgnat/a-cohase.ads, libgnat/a-coorse.ads (Key): New function that takes a Container parameter, implemented as an expression function, so it is self explanatory (doesn't need a comment). --- gcc/ada/libgnat/a-cbhase.ads | 3 +++ gcc/ada/libgnat/a-cborse.ads | 3 +++ gcc/ada/libgnat/a-cihase.ads | 3 +++ gcc/ada/libgnat/a-ciorse.ads | 3 +++ gcc/ada/libgnat/a-cohase.ads | 3 +++ gcc/ada/libgnat/a-coorse.ads | 3 +++ 6 files changed, 18 insertions(+) (limited to 'gcc') diff --git a/gcc/ada/libgnat/a-cbhase.ads b/gcc/ada/libgnat/a-cbhase.ads index 7079c51..351014d 100644 --- a/gcc/ada/libgnat/a-cbhase.ads +++ b/gcc/ada/libgnat/a-cbhase.ads @@ -403,6 +403,9 @@ is -- Applies generic formal operation Key to the element of the node -- designated by Position. + function Key (Container : Set; Position : Cursor) return Key_Type is + (Key (Element (Container, Position))); + function Element (Container : Set; Key : Key_Type) return Element_Type; -- Searches (as per the key-based Find) for the node containing Key, and -- returns the associated element. diff --git a/gcc/ada/libgnat/a-cborse.ads b/gcc/ada/libgnat/a-cborse.ads index be22c25..53acf35 100644 --- a/gcc/ada/libgnat/a-cborse.ads +++ b/gcc/ada/libgnat/a-cborse.ads @@ -262,6 +262,9 @@ is function Key (Position : Cursor) return Key_Type; + function Key (Container : Set; Position : Cursor) return Key_Type is + (Key (Element (Container, Position))); + function Element (Container : Set; Key : Key_Type) return Element_Type; procedure Replace diff --git a/gcc/ada/libgnat/a-cihase.ads b/gcc/ada/libgnat/a-cihase.ads index dcd1d6a..2bb4527 100644 --- a/gcc/ada/libgnat/a-cihase.ads +++ b/gcc/ada/libgnat/a-cihase.ads @@ -389,6 +389,9 @@ is -- Applies generic formal operation Key to the element of the node -- designated by Position. + function Key (Container : Set; Position : Cursor) return Key_Type is + (Key (Element (Container, Position))); + function Element (Container : Set; Key : Key_Type) return Element_Type; -- Searches (as per the key-based Find) for the node containing Key, and -- returns the associated element. diff --git a/gcc/ada/libgnat/a-ciorse.ads b/gcc/ada/libgnat/a-ciorse.ads index d053ac7..51545d6 100644 --- a/gcc/ada/libgnat/a-ciorse.ads +++ b/gcc/ada/libgnat/a-ciorse.ads @@ -270,6 +270,9 @@ is function Key (Position : Cursor) return Key_Type; + function Key (Container : Set; Position : Cursor) return Key_Type is + (Key (Element (Container, Position))); + function Element (Container : Set; Key : Key_Type) return Element_Type; procedure Replace diff --git a/gcc/ada/libgnat/a-cohase.ads b/gcc/ada/libgnat/a-cohase.ads index 9f562d8..fb7dcca 100644 --- a/gcc/ada/libgnat/a-cohase.ads +++ b/gcc/ada/libgnat/a-cohase.ads @@ -401,6 +401,9 @@ is -- Applies generic formal operation Key to the element of the node -- designated by Position. + function Key (Container : Set; Position : Cursor) return Key_Type is + (Key (Element (Container, Position))); + function Element (Container : Set; Key : Key_Type) return Element_Type; -- Searches (as per the key-based Find) for the node containing Key, and -- returns the associated element. diff --git a/gcc/ada/libgnat/a-coorse.ads b/gcc/ada/libgnat/a-coorse.ads index 9619599..7596ed6 100644 --- a/gcc/ada/libgnat/a-coorse.ads +++ b/gcc/ada/libgnat/a-coorse.ads @@ -263,6 +263,9 @@ is function Key (Position : Cursor) return Key_Type; + function Key (Container : Set; Position : Cursor) return Key_Type is + (Key (Element (Container, Position))); + function Element (Container : Set; Key : Key_Type) return Element_Type; procedure Replace -- cgit v1.1 From c901877facf9635149ed69cabd88c871f60931fe Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 26 May 2022 11:06:01 +0200 Subject: [Ada] Call-initialize all controlled objects in place This changes the compiler to build in place almost all objects that need finalization and are initialized with the result of a function call, thus saving a pair of Adjust/Finalize calls for the anonymous return object. gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): Don't adjust the object if the expression is a function call. : Return true if the object needs finalization and is initialized with the result of a function call returned on the secondary stack. * exp_ch6.adb (Expand_Ctrl_Function_Call): Add Use_Sec_Stack boolean parameter. Early return if the parent is an object declaration and Use_Sec_Stack is false. (Expand_Call_Helper): Adjust call to Expand_Ctrl_Function_Call. * exp_ch7.adb (Find_Last_Init): Be prepared for initialization still present in the object declaration. * sem_ch3.adb (Analyze_Object_Declaration): Call the predicates Needs_Secondary_Stack and Needs_Finalization to guard the renaming optimization. --- gcc/ada/exp_ch3.adb | 48 +++++++++++++++++++++++------------------------- gcc/ada/exp_ch6.adb | 31 +++++++++++++++++++++---------- gcc/ada/exp_ch7.adb | 9 +++++++-- gcc/ada/sem_ch3.adb | 10 +++++----- 4 files changed, 56 insertions(+), 42 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index d02a863..12173ae 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -6810,28 +6810,25 @@ package body Exp_Ch3 is -- If the object declaration appears in the form - -- Obj : Ctrl_Typ := Func (...); + -- Obj : Typ := Func (...); - -- where Ctrl_Typ is controlled but not immutably limited type, then - -- the expansion of the function call should use a dereference of the - -- result to reference the value on the secondary stack. + -- where Typ both needs finalization and is returned on the secondary + -- stack, the object declaration can be rewritten into a dereference + -- of the reference to the result built on the secondary stack (see + -- Expand_Ctrl_Function_Call for this expansion of the call): - -- Obj : Ctrl_Typ renames Func (...).all; + -- type Axx is access all Typ; + -- Rxx : constant Axx := Func (...)'reference; + -- Obj : Typ renames Rxx.all; - -- As a result, the call avoids an extra copy. This an optimization, - -- but it is required for passing ACATS tests in some cases where it - -- would otherwise make two copies. The RM allows removing redunant - -- Adjust/Finalize calls, but does not allow insertion of extra ones. + -- This avoids an extra copy and the pair of Adjust/Finalize calls. - -- This part is disabled for now, because it breaks GNAT Studio - -- builds - - (False -- ??? + (not Is_Library_Level_Entity (Def_Id) and then Nkind (Expr_Q) = N_Explicit_Dereference and then not Comes_From_Source (Expr_Q) and then Nkind (Original_Node (Expr_Q)) = N_Function_Call - and then Nkind (Object_Definition (N)) in N_Has_Entity - and then (Needs_Finalization (Entity (Object_Definition (N))))) + and then Needs_Finalization (Typ) + and then not Is_Class_Wide_Type (Typ)) -- If the initializing expression is for a variable with attribute -- OK_To_Rename set, then transform: @@ -6843,8 +6840,7 @@ package body Exp_Ch3 is -- Obj : Typ renames Expr; -- provided that Obj is not aliased. The aliased case has to be - -- excluded in general because Expr will not be aliased in - -- general. + -- excluded in general because Expr will not be aliased in general. or else (not Aliased_Present (N) @@ -6853,7 +6849,7 @@ package body Exp_Ch3 is and then OK_To_Rename (Entity (Expr_Q)) and then Is_Entity_Name (Obj_Def)); begin - -- Return False if there are any aspect specifications, because + -- ??? Return False if there are any aspect specifications, because -- otherwise we duplicate that corresponding implicit attribute -- definition, and call Insert_Action, which has no place to insert -- the attribute definition. The attribute definition is stored in @@ -7423,16 +7419,18 @@ package body Exp_Ch3 is end if; end if; - -- If the type is controlled and not inherently limited, then - -- the target is adjusted after the copy and attached to the - -- finalization list. However, no adjustment is done in the case - -- where the object was initialized by a call to a function whose - -- result is built in place, since no copy occurred. Similarly, no - -- adjustment is required if we are going to rewrite the object - -- declaration into a renaming declaration. + -- If the type needs finalization and is not inherently limited, + -- then the target is adjusted after the copy and attached to the + -- finalization list. However, no adjustment is needed in the case + -- where the object has been initialized by a call to a function + -- returning on the primary stack (see Expand_Ctrl_Function_Call) + -- since no copy occurred, given that the type is by-reference. + -- Similarly, no adjustment is needed if we are going to rewrite + -- the object declaration into a renaming declaration. if Needs_Finalization (Typ) and then not Is_Limited_View (Typ) + and then Nkind (Expr_Q) /= N_Function_Call and then not Rewrite_As_Renaming then Adj_Call := diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 88157b9..77e20bc 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -247,10 +247,10 @@ package body Exp_Ch6 is procedure Expand_Call_Helper (N : Node_Id; Post_Call : out List_Id); -- Does the main work of Expand_Call. Post_Call is as for Expand_Actuals. - procedure Expand_Ctrl_Function_Call (N : Node_Id); + procedure Expand_Ctrl_Function_Call (N : Node_Id; Use_Sec_Stack : Boolean); -- N is a function call which returns a controlled object. Transform the -- call into a temporary which retrieves the returned object from the - -- secondary stack using 'reference. + -- primary or secondary stack (Use_Sec_Stack says which) using 'reference. procedure Expand_Non_Function_Return (N : Node_Id); -- Expand a simple return statement found in a procedure body, entry body, @@ -4916,7 +4916,7 @@ package body Exp_Ch6 is -- different processing applies. If the call is to a protected function, -- the expansion above will call Expand_Call recursively. Otherwise the -- function call is transformed into a reference to the result that has - -- been built either on the return or the secondary stack. + -- been built either on the primary or the secondary stack. if Needs_Finalization (Etype (Subp)) then if not Is_Build_In_Place_Function_Call (Call_Node) @@ -4925,7 +4925,8 @@ package body Exp_Ch6 is or else not Is_Concurrent_Record_Type (Etype (First_Formal (Subp)))) then - Expand_Ctrl_Function_Call (Call_Node); + Expand_Ctrl_Function_Call + (Call_Node, Needs_Secondary_Stack (Etype (Subp))); -- Build-in-place function calls which appear in anonymous contexts -- need a transient scope to ensure the proper finalization of the @@ -4956,7 +4957,10 @@ package body Exp_Ch6 is -- Expand_Ctrl_Function_Call -- ------------------------------- - procedure Expand_Ctrl_Function_Call (N : Node_Id) is + procedure Expand_Ctrl_Function_Call (N : Node_Id; Use_Sec_Stack : Boolean) + is + Par : constant Node_Id := Parent (N); + function Is_Element_Reference (N : Node_Id) return Boolean; -- Determine whether node N denotes a reference to an Ada 2012 container -- element. @@ -4981,12 +4985,19 @@ package body Exp_Ch6 is -- Start of processing for Expand_Ctrl_Function_Call begin - -- Optimization, if the returned value (which is on the sec-stack) is - -- returned again, no need to copy/readjust/finalize, we can just pass - -- the value thru (see Expand_N_Simple_Return_Statement), and thus no - -- attachment is needed. + -- Optimization: if the returned value is returned again, then no need + -- to copy/readjust/finalize, we can just pass the value through (see + -- Expand_N_Simple_Return_Statement), and thus no attachment is needed. + + if Nkind (Par) = N_Simple_Return_Statement then + return; + end if; + + -- Another optimization: if the returned value is used to initialize an + -- object, and the secondary stack is not involved in the call, then no + -- need to copy/readjust/finalize, we can just initialize it in place. - if Nkind (Parent (N)) = N_Simple_Return_Statement then + if Nkind (Par) = N_Object_Declaration and then not Use_Sec_Stack then return; end if; diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 5f1c357..2be891e 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -3063,6 +3063,13 @@ package body Exp_Ch7 is return; + -- If the initialization is in the declaration, we're done, so + -- early return if we have no more statements or they have been + -- rewritten, which means that they were in the source code. + + elsif No (Stmt) or else Original_Node (Stmt) /= Stmt then + return; + -- In all other cases the initialization calls follow the related -- object. The general structure of object initialization built by -- routine Default_Initialize_Object is as follows: @@ -3091,8 +3098,6 @@ package body Exp_Ch7 is -- Otherwise the initialization calls follow the related object else - pragma Assert (Present (Stmt)); - Stmt_2 := Next_Suitable_Statement (Stmt); -- Check for an optional call to Deep_Initialize which may diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 2dbba15..3bbb788 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -5046,21 +5046,21 @@ package body Sem_Ch3 is end if; -- Another optimization: if the nominal subtype is unconstrained and - -- the expression is a function call that returns an unconstrained - -- type, rewrite the declaration as a renaming of the result of the + -- the expression is a function call that returns on the secondary + -- stack, rewrite the declaration as a renaming of the result of the -- call. The exceptions below are cases where the copy is expected, -- either by the back end (Aliased case) or by the semantics, as for -- initializing controlled types or copying tags for class-wide types. + -- ??? To be moved to Expand_N_Object_Declaration.Rewrite_As_Renaming. if Present (E) and then Nkind (E) = N_Explicit_Dereference and then Nkind (Original_Node (E)) = N_Function_Call and then not Is_Library_Level_Entity (Id) - and then not Is_Constrained (Underlying_Type (T)) and then not Is_Aliased (Id) + and then Needs_Secondary_Stack (T) and then not Is_Class_Wide_Type (T) - and then not Is_Controlled (T) - and then not Has_Controlled_Component (Base_Type (T)) + and then not Needs_Finalization (T) and then Expander_Active then Rewrite (N, -- cgit v1.1 From 02e41e69d4762937f6ba927059e22abf84801b32 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 26 May 2022 13:34:55 +0200 Subject: [Ada] Do not use front-end build-in-place mechanism for nonlimited types It was only used in specific cases for controlled types but no longer provides any significant benefit in practice. gcc/ada/ * debug.adb (d.9): Remove usage. * exp_ch6.adb (Expand_Simple_Function_Return): Remove redundant test on Debug_Flag_Dot_L. (Is_Build_In_Place_Result_Type): Return false for nonlimited types. (Is_Build_In_Place_Function): Tidy up and remove redundant test on Debug_Flag_Dot_L. --- gcc/ada/debug.adb | 5 +-- gcc/ada/exp_ch6.adb | 99 +++++++++-------------------------------------------- 2 files changed, 17 insertions(+), 87 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb index a03c88d..d0bcdb0 100644 --- a/gcc/ada/debug.adb +++ b/gcc/ada/debug.adb @@ -211,7 +211,7 @@ package body Debug is -- d.6 Do not avoid declaring unreferenced types in C code -- d.7 Disable unsound heuristics in gnat2scil (for CP as SPARK prover) -- d.8 Disable unconditional inlining of expression functions - -- d.9 Disable build-in-place for nonlimited types + -- d.9 -- d_1 -- d_2 @@ -1125,9 +1125,6 @@ package body Debug is -- This debug flag turns off this behavior, making them subject -- to the usual inlining heuristics of the code generator. - -- d.9 Disable build-in-place for function calls returning nonlimited - -- types. - ------------------------------------------ -- Documentation for Binder Debug Flags -- ------------------------------------------ diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 77e20bc..14e0498 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -7252,7 +7252,6 @@ package body Exp_Ch6 is if not Comes_From_Extended_Return_Statement (N) and then Is_Build_In_Place_Function (Scope_Id) - and then not Debug_Flag_Dot_L -- The functionality of interface thunks is simple and it is always -- handled by means of simple return statements. This leaves their @@ -8534,72 +8533,9 @@ package body Exp_Ch6 is -- of a function with a limited interface result, where the function -- may return objects of nonlimited descendants. - if Is_Limited_View (Typ) then - return Ada_Version >= Ada_2005 and then not Debug_Flag_Dot_L; - - else - if Debug_Flag_Dot_9 then - return False; - end if; - - if Has_Interfaces (Typ) then - return False; - end if; - - declare - T : Entity_Id := Typ; - begin - -- For T'Class, return True if it's True for T. This is necessary - -- because a class-wide function might say "return F (...)", where - -- F returns the corresponding specific type. We need a loop in - -- case T is a subtype of a class-wide type. - - while Is_Class_Wide_Type (T) loop - T := Etype (T); - end loop; - - -- If this is a generic formal type in an instance, return True if - -- it's True for the generic actual type. - - if Nkind (Parent (T)) = N_Subtype_Declaration - and then Present (Generic_Parent_Type (Parent (T))) - then - T := Entity (Subtype_Indication (Parent (T))); - - if Present (Full_View (T)) then - T := Full_View (T); - end if; - end if; - - if Present (Underlying_Type (T)) then - T := Underlying_Type (T); - end if; - - declare - Result : Boolean; - -- So we can stop here in the debugger - begin - -- ???For now, enable build-in-place for a very narrow set of - -- controlled types. Change "if True" to "if False" to - -- experiment with more controlled types. Eventually, we might - -- like to enable build-in-place for all tagged types, all - -- types that need finalization, and all caller-unknown-size - -- types. - - if True then - Result := Is_Controlled (T) - and then not Is_Generic_Actual_Type (T) - and then Present (Enclosing_Subprogram (T)) - and then not Is_Compilation_Unit (Enclosing_Subprogram (T)) - and then Ekind (Enclosing_Subprogram (T)) = E_Procedure; - else - Result := Is_Controlled (T); - end if; - - return Result; - end; - end; - end if; + return Is_Limited_View (Typ) + and then Ada_Version >= Ada_2005 + and then not Debug_Flag_Dot_L; end Is_Build_In_Place_Result_Type; ------------------------------ @@ -8635,6 +8571,9 @@ package body Exp_Ch6 is -------------------------------- function Is_Build_In_Place_Function (E : Entity_Id) return Boolean is + Kind : constant Entity_Kind := Ekind (E); + Typ : constant Entity_Id := Etype (E); + begin -- This function is called from Expand_Subtype_From_Expr during -- semantic analysis, even when expansion is off. In those cases @@ -8644,22 +8583,16 @@ package body Exp_Ch6 is return False; end if; - if Ekind (E) in E_Function | E_Generic_Function - or else (Ekind (E) = E_Subprogram_Type - and then Etype (E) /= Standard_Void_Type) - then - -- If the function is imported from a foreign language, we don't do - -- build-in-place. Note that Import (Ada) functions can do - -- build-in-place. Note that it is OK for a build-in-place function - -- to return a type with a foreign convention; the build-in-place - -- machinery will ensure there is no copying. - - return Is_Build_In_Place_Result_Type (Etype (E)) - and then not (Has_Foreign_Convention (E) and then Is_Imported (E)) - and then not Debug_Flag_Dot_L; - else - return False; - end if; + -- If the function is imported from a foreign language, we don't do + -- build-in-place, whereas Import (Ada) functions can do it. Note also + -- that it is OK for a build-in-place function to return a type with a + -- foreign convention because the machinery ensures there is no copying. + + return (Kind in E_Function | E_Generic_Function + or else + (Kind = E_Subprogram_Type and then Typ /= Standard_Void_Type)) + and then Is_Build_In_Place_Result_Type (Typ) + and then not (Is_Imported (E) and then Has_Foreign_Convention (E)); end Is_Build_In_Place_Function; ------------------------------------- -- cgit v1.1 From 3319015b0a498ed1050d6910f75430a6fc401f50 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Wed, 25 May 2022 11:51:52 -0400 Subject: [Ada] Fix missing error on 'Access of constrained array For X'Access, the designated subtype of the access type must statically match the nominal subtype of X. This patch fixes a bug where the error was not detected when there is an unrelated declaration of the form "Y : T := X;", where T is an unconstrained array subtype. gcc/ada/ * exp_util.adb (Expand_Subtype_From_Expr): Generate a new subtype when Is_Constr_Subt_For_UN_Aliased is True, so the Is_Constr_Subt_For_U_Nominal flag will not be set on the preexisting subtype. * sem_attr.adb, sem_ch3.adb: Minor. --- gcc/ada/exp_util.adb | 15 ++++++++++++--- gcc/ada/sem_attr.adb | 4 +--- gcc/ada/sem_ch3.adb | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 0f19318..2a7afd4 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -113,7 +113,7 @@ package body Exp_Util is (Header_Num => Type_Map_Header, Key => Entity_Id, Element => Node_Or_Entity_Id, - No_element => Empty, + No_Element => Empty, Hash => Type_Map_Hash, Equal => "="); @@ -5730,8 +5730,17 @@ package body Exp_Util is or else not Is_Array_Type (Exp_Typ) or else not Aliased_Present (N)) then - if Is_Itype (Exp_Typ) then + if Is_Itype (Exp_Typ) + -- If Exp_Typ was created for a previous declaration whose nominal + -- subtype is unconstrained, and that declaration is aliased, + -- we need to generate a new subtype, because otherwise the + -- Is_Constr_Subt_For_U_Nominal flag will be set on the wrong + -- subtype, causing failure to detect non-statically-matching + -- subtypes on 'Access of the previously-declared object. + + and then not Is_Constr_Subt_For_UN_Aliased (Exp_Typ) + then -- Within an initialization procedure, a selected component -- denotes a component of the enclosing record, and it appears as -- an actual in a call to its own initialization procedure. If @@ -5770,7 +5779,7 @@ package body Exp_Util is -- This type is marked as an itype even though it has an explicit -- declaration since otherwise Is_Generic_Actual_Type can get -- set, resulting in the generation of spurious errors. (See - -- sem_ch8.Analyze_Package_Renaming and sem_type.covers) + -- sem_ch8.Analyze_Package_Renaming and Sem_Type.Covers.) Set_Is_Itype (T); Set_Associated_Node_For_Itype (T, Exp); diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index e6e06f6..ab6c2c6 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -11632,9 +11632,7 @@ package body Sem_Attr is end if; end if; - if (Attr_Id = Attribute_Access - or else - Attr_Id = Attribute_Unchecked_Access) + if Attr_Id in Attribute_Access | Attribute_Unchecked_Access and then (Ekind (Btyp) = E_General_Access_Type or else Ekind (Btyp) = E_Anonymous_Access_Type) then diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 3bbb788..84971e3 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -18276,7 +18276,7 @@ package body Sem_Ch3 is begin -- If the parent is a component_definition node we climb to the - -- component_declaration node + -- component_declaration node. if Nkind (P) = N_Component_Definition then P := Parent (P); -- cgit v1.1 From 1fde86bba55ea61b56f79798c6ac4cc6808e51a1 Mon Sep 17 00:00:00 2001 From: Justin Squirek Date: Thu, 26 May 2022 15:15:46 +0000 Subject: [Ada] Single character argument in call to Quote_Argument raises error This patch corrects an issue in the compiler whereby calling Quote_Argument with an argument that is of size 1 may lead to a CONSTRAINT_ERROR raised at runtime due to an undersized buffer. gcc/ada/ * libgnat/s-os_lib.adb (Quote_Argument): Modify the result buffer size calculation to handle the case where Arg'Length is 1. --- gcc/ada/libgnat/s-os_lib.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ada/libgnat/s-os_lib.adb b/gcc/ada/libgnat/s-os_lib.adb index 5af6586..53dfbf9 100644 --- a/gcc/ada/libgnat/s-os_lib.adb +++ b/gcc/ada/libgnat/s-os_lib.adb @@ -1940,7 +1940,7 @@ package body System.OS_Lib is procedure Quote_Argument (Arg : in out String_Access) is J : Positive := 1; Quote_Needed : Boolean := False; - Res : String (1 .. Arg'Length * 2); + Res : String (1 .. Arg'Length * 2 + 2); begin if Arg (Arg'First) /= '"' or else Arg (Arg'Last) /= '"' then -- cgit v1.1 From 78f13b008ab58794057847a74903ee4569829d80 Mon Sep 17 00:00:00 2001 From: Justin Squirek Date: Thu, 26 May 2022 15:02:01 +0000 Subject: [Ada] Tech debt: Remove code duplication This patch corrects removes some code duplication within the GNAT compiler. gcc/ada/ * exp_util.adb (Remove_Side_Effects): Combine identical branches. * sem_attr.adb (Analyze_Attribute): Combine identical cases Attribute_Has_Same_Storage and Attribute_Overlaps_Storage. * sem_prag.adb (Check_Role): Combine E_Out_Parameter case with general case for parameters. * sem_util.adb (Accessibility_Level): Combine identical branches. * sprint.adb (Sprint_Node_Actual): Combine cases for N_Real_Range_Specification and N_Signed_Integer_Type_Definition. --- gcc/ada/exp_util.adb | 34 +++++++++++++-------------------- gcc/ada/sem_attr.adb | 19 +++--------------- gcc/ada/sem_prag.adb | 37 ++++++++--------------------------- gcc/ada/sem_util.adb | 54 +++++++++++++++++++--------------------------------- gcc/ada/sprint.adb | 10 +++------- 5 files changed, 47 insertions(+), 107 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 2a7afd4..eaf7ebf 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -12017,31 +12017,23 @@ package body Exp_Util is -- renaming is handled by the front end, as the back end may balk at -- the nonstandard representation (see Evaluation_Required in Exp_Ch8). - elsif Nkind (Exp) in N_Indexed_Component | N_Selected_Component - and then Has_Non_Standard_Rep (Etype (Prefix (Exp))) - then - Def_Id := Build_Temporary (Loc, 'R', Exp); - Res := New_Occurrence_Of (Def_Id, Loc); - - Insert_Action (Exp, - Make_Object_Renaming_Declaration (Loc, - Defining_Identifier => Def_Id, - Subtype_Mark => New_Occurrence_Of (Exp_Type, Loc), - Name => Relocate_Node (Exp))); + elsif (Nkind (Exp) in N_Indexed_Component | N_Selected_Component + and then Has_Non_Standard_Rep (Etype (Prefix (Exp)))) - -- For an expression that denotes a name, we can use a renaming scheme. - -- This is needed for correctness in the case of a volatile object of - -- a nonvolatile type because the Make_Reference call of the "default" - -- approach would generate an illegal access value (an access value - -- cannot designate such an object - see Analyze_Reference). + -- For an expression that denotes a name, we can use a renaming + -- scheme. This is needed for correctness in the case of a volatile + -- object of a nonvolatile type because the Make_Reference call of the + -- "default" approach would generate an illegal access value (an + -- access value cannot designate such an object - see + -- Analyze_Reference). - elsif Is_Name_Reference (Exp) + or else (Is_Name_Reference (Exp) - -- We skip using this scheme if we have an object of a volatile - -- type and we do not have Name_Req set true (see comments for - -- Side_Effect_Free). + -- We skip using this scheme if we have an object of a volatile + -- type and we do not have Name_Req set true (see comments for + -- Side_Effect_Free). - and then (Name_Req or else not Treat_As_Volatile (Exp_Type)) + and then (Name_Req or else not Treat_As_Volatile (Exp_Type))) then Def_Id := Build_Temporary (Loc, 'R', Exp); Res := New_Occurrence_Of (Def_Id, Loc); diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index ab6c2c6..c0998a5 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -4451,7 +4451,9 @@ package body Sem_Attr is -- Has_Same_Storage -- ---------------------- - when Attribute_Has_Same_Storage => + when Attribute_Has_Same_Storage + | Attribute_Overlaps_Storage + => Check_E1; -- The arguments must be objects of any type @@ -5563,21 +5565,6 @@ package body Sem_Attr is end if; end Old; - ---------------------- - -- Overlaps_Storage -- - ---------------------- - - when Attribute_Overlaps_Storage => - Check_E1; - - -- Both arguments must be objects of any type - - Analyze_And_Resolve (P); - Analyze_And_Resolve (E1); - Check_Object_Reference (P); - Check_Object_Reference (E1); - Set_Etype (N, Standard_Boolean); - ------------ -- Output -- ------------ diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 4d67841..f1fd9b2 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -1361,36 +1361,15 @@ package body Sem_Prag is when E_Generic_In_Out_Parameter | E_In_Out_Parameter + | E_Out_Parameter | E_Variable => - -- When pragma Global is present it determines the mode of - -- the object. - - if Global_Seen then - - -- A variable has mode IN when its type is unconstrained - -- or tagged because array bounds, discriminants or tags - -- can be read. - - Item_Is_Input := - Appears_In (Subp_Inputs, Item_Id) - or else Is_Unconstrained_Or_Tagged_Item (Item_Id); - - Item_Is_Output := Appears_In (Subp_Outputs, Item_Id); - - -- Otherwise the variable has a default IN OUT mode - - else - Item_Is_Input := True; - Item_Is_Output := True; - end if; - - when E_Out_Parameter => - -- An OUT parameter of the related subprogram; it cannot -- appear in Global. - if Scope (Item_Id) = Spec_Id then + if Adjusted_Kind = E_Out_Parameter + and then Scope (Item_Id) = Spec_Id + then -- The parameter has mode IN if its type is unconstrained -- or tagged because array bounds, discriminants or tags @@ -1401,8 +1380,8 @@ package body Sem_Prag is Item_Is_Output := True; - -- An OUT parameter of an enclosing subprogram; it can - -- appear in Global and behaves as a read-write variable. + -- A parameter of an enclosing subprogram; it can appear + -- in Global and behaves as a read-write variable. else -- When pragma Global is present it determines the mode @@ -1411,8 +1390,8 @@ package body Sem_Prag is if Global_Seen then -- A variable has mode IN when its type is - -- unconstrained or tagged because array - -- bounds, discriminants or tags can be read. + -- unconstrained or tagged because array bounds, + -- discriminants, or tags can be read. Item_Is_Input := Appears_In (Subp_Inputs, Item_Id) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index addad83..1b0b39b 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -798,44 +798,30 @@ package body Sem_Util is -- in effect we treat discriminant components as regular -- components. - elsif Nkind (E) = N_Selected_Component - and then Ekind (Etype (E)) = E_Anonymous_Access_Type - and then Ekind (Etype (Pre)) /= E_Anonymous_Access_Type - and then (not (Nkind (Selector_Name (E)) in N_Has_Entity - and then Ekind (Entity (Selector_Name (E))) - = E_Discriminant) - - -- The alternative accessibility models both treat - -- discriminants as regular components. - - or else (No_Dynamic_Accessibility_Checks_Enabled (E) - and then Allow_Alt_Model)) - then - -- When restriction No_Dynamic_Accessibility_Checks is active - -- and -gnatd_b set, the level is that of the designated type. - - if Allow_Alt_Model - and then No_Dynamic_Accessibility_Checks_Enabled (E) - and then Debug_Flag_Underscore_B - then - return Make_Level_Literal - (Typ_Access_Level (Etype (E))); - end if; + elsif + (Nkind (E) = N_Selected_Component + and then Ekind (Etype (E)) = E_Anonymous_Access_Type + and then Ekind (Etype (Pre)) /= E_Anonymous_Access_Type + and then (not (Nkind (Selector_Name (E)) in N_Has_Entity + and then Ekind (Entity (Selector_Name (E))) + = E_Discriminant) - -- Otherwise proceed normally + -- The alternative accessibility models both treat + -- discriminants as regular components. - return Make_Level_Literal - (Typ_Access_Level (Etype (Prefix (E)))); + or else (No_Dynamic_Accessibility_Checks_Enabled (E) + and then Allow_Alt_Model))) - -- Similar to the previous case - arrays featuring components of - -- anonymous access components get their corresponding level from - -- their containing type's declaration. + -- Arrays featuring components of anonymous access components + -- get their corresponding level from their containing type's + -- declaration. - elsif Nkind (E) = N_Indexed_Component - and then Ekind (Etype (E)) = E_Anonymous_Access_Type - and then Ekind (Etype (Pre)) in Array_Kind - and then Ekind (Component_Type (Base_Type (Etype (Pre)))) - = E_Anonymous_Access_Type + or else + (Nkind (E) = N_Indexed_Component + and then Ekind (Etype (E)) = E_Anonymous_Access_Type + and then Ekind (Etype (Pre)) in Array_Kind + and then Ekind (Component_Type (Base_Type (Etype (Pre)))) + = E_Anonymous_Access_Type) then -- When restriction No_Dynamic_Accessibility_Checks is active -- and -gnatd_b set, the level is that of the designated type. diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index 67861ba..42a6e4f 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -3132,7 +3132,9 @@ package body Sprint is when N_Real_Literal => Write_Ureal_With_Col_Check_Sloc (Realval (Node)); - when N_Real_Range_Specification => + when N_Real_Range_Specification + | N_Signed_Integer_Type_Definition + => Write_Str_With_Col_Check_Sloc ("range "); Sprint_Node (Low_Bound (Node)); Write_Str (" .. "); @@ -3248,12 +3250,6 @@ package body Sprint is Write_Indent_Str ("end select;"); - when N_Signed_Integer_Type_Definition => - Write_Str_With_Col_Check_Sloc ("range "); - Sprint_Node (Low_Bound (Node)); - Write_Str (" .. "); - Sprint_Node (High_Bound (Node)); - when N_Single_Protected_Declaration => Write_Indent_Str_Sloc ("protected "); Write_Id (Defining_Identifier (Node)); -- cgit v1.1 From 4b766285b089ba1bce91a7644b9d97836e80cda3 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Thu, 26 May 2022 10:27:42 -0400 Subject: [Ada] Assertions in Einfo.Utils Add predicates on subtypes E and N. gcc/ada/ * einfo-utils.ads, einfo-utils.adb: Add predicates on subtypes E and N. Change some parameters to use the unpredicated subtypes, because they sometimes return e.g. Empty. Note that N_Entity_Id has a predicate; Entity_Id does not. * exp_tss.adb (Base_Init_Proc): Use Entity_Id instead of E, because otherwise we fail the predicate. We shouldn't be referring to single-letter names from far away anyway. * sem_aux.adb (Is_Derived_Type): Likewise. * sem_res.adb (Is_Definite_Access_Type): Use N_Entity_Id for predicate. * types.ads (Entity_Id): Add comment explaining the difference between Entity_Id and N_Entity_Id. --- gcc/ada/einfo-utils.adb | 61 ++++++++++++++++++++++++------------------------- gcc/ada/einfo-utils.ads | 57 +++++++++++++++++++++++---------------------- gcc/ada/exp_tss.adb | 2 +- gcc/ada/sem_aux.adb | 6 ++--- gcc/ada/sem_res.adb | 6 ++--- gcc/ada/types.ads | 5 ++++ 6 files changed, 71 insertions(+), 66 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/einfo-utils.adb b/gcc/ada/einfo-utils.adb index 5e778b1..27531f4 100644 --- a/gcc/ada/einfo-utils.adb +++ b/gcc/ada/einfo-utils.adb @@ -28,7 +28,6 @@ with Elists; use Elists; with Nlists; use Nlists; with Output; use Output; with Sinfo; use Sinfo; -with Sinfo.Nodes; use Sinfo.Nodes; with Sinfo.Utils; use Sinfo.Utils; package body Einfo.Utils is @@ -307,7 +306,7 @@ package body Einfo.Utils is return Ekind (Id) in Generic_Unit_Kind; end Is_Generic_Unit; - function Is_Ghost_Entity (Id : Entity_Id) return Boolean is + function Is_Ghost_Entity (Id : E) return Boolean is begin return Is_Checked_Ghost_Entity (Id) or else Is_Ignored_Ghost_Entity (Id); end Is_Ghost_Entity; @@ -593,7 +592,7 @@ package body Einfo.Utils is -- Address_Clause -- -------------------- - function Address_Clause (Id : E) return N is + function Address_Clause (Id : E) return Node_Id is begin return Get_Attribute_Definition_Clause (Id, Attribute_Address); end Address_Clause; @@ -618,7 +617,7 @@ package body Einfo.Utils is -- Alignment_Clause -- ---------------------- - function Alignment_Clause (Id : E) return N is + function Alignment_Clause (Id : E) return Node_Id is begin return Get_Attribute_Definition_Clause (Id, Attribute_Alignment); end Alignment_Clause; @@ -672,7 +671,7 @@ package body Einfo.Utils is -- Declaration_Node -- ---------------------- - function Declaration_Node (Id : E) return N is + function Declaration_Node (Id : E) return Node_Id is P : Node_Id; begin @@ -771,7 +770,7 @@ package body Einfo.Utils is -- First_Component -- --------------------- - function First_Component (Id : E) return E is + function First_Component (Id : E) return Entity_Id is Comp_Id : Entity_Id; begin @@ -793,7 +792,7 @@ package body Einfo.Utils is -- First_Component_Or_Discriminant -- ------------------------------------- - function First_Component_Or_Discriminant (Id : E) return E is + function First_Component_Or_Discriminant (Id : E) return Entity_Id is Comp_Id : Entity_Id; begin @@ -816,7 +815,7 @@ package body Einfo.Utils is -- First_Formal -- ------------------ - function First_Formal (Id : E) return E is + function First_Formal (Id : E) return Entity_Id is Formal : Entity_Id; begin @@ -857,7 +856,7 @@ package body Einfo.Utils is -- First_Formal_With_Extras -- ------------------------------ - function First_Formal_With_Extras (Id : E) return E is + function First_Formal_With_Extras (Id : E) return Entity_Id is Formal : Entity_Id; begin @@ -1383,7 +1382,7 @@ package body Einfo.Utils is -- Invariant_Procedure -- ------------------------- - function Invariant_Procedure (Id : E) return E is + function Invariant_Procedure (Id : E) return Entity_Id is Subp_Elmt : Elmt_Id; Subp_Id : Entity_Id; Subps : Elist_Id; @@ -1525,7 +1524,7 @@ package body Einfo.Utils is -- Is_Elaboration_Target -- --------------------------- - function Is_Elaboration_Target (Id : Entity_Id) return Boolean is + function Is_Elaboration_Target (Id : E) return Boolean is begin return Ekind (Id) in E_Constant | E_Package | E_Variable @@ -1768,7 +1767,7 @@ package body Einfo.Utils is -- Last_Formal -- ----------------- - function Last_Formal (Id : E) return E is + function Last_Formal (Id : E) return Entity_Id is Formal : Entity_Id; begin @@ -1911,7 +1910,7 @@ package body Einfo.Utils is -- Next_Component -- -------------------- - function Next_Component (Id : E) return E is + function Next_Component (Id : E) return Entity_Id is Comp_Id : Entity_Id; begin @@ -1928,7 +1927,7 @@ package body Einfo.Utils is -- Next_Component_Or_Discriminant -- ------------------------------------ - function Next_Component_Or_Discriminant (Id : E) return E is + function Next_Component_Or_Discriminant (Id : E) return Entity_Id is Comp_Id : Entity_Id; begin @@ -1949,7 +1948,7 @@ package body Einfo.Utils is -- Next_Stored_Discriminant by making sure that the Discriminant -- returned is of the same variety as Id. - function Next_Discriminant (Id : E) return E is + function Next_Discriminant (Id : E) return Entity_Id is -- Derived Tagged types with private extensions look like this... @@ -1962,7 +1961,7 @@ package body Einfo.Utils is -- so it is critical not to go past the leading discriminants - D : E := Id; + D : Entity_Id := Id; begin pragma Assert (Ekind (Id) = E_Discriminant); @@ -1987,7 +1986,7 @@ package body Einfo.Utils is -- Next_Formal -- ----------------- - function Next_Formal (Id : E) return E is + function Next_Formal (Id : E) return Entity_Id is P : Entity_Id; begin @@ -2012,7 +2011,7 @@ package body Einfo.Utils is -- Next_Formal_With_Extras -- ----------------------------- - function Next_Formal_With_Extras (Id : E) return E is + function Next_Formal_With_Extras (Id : E) return Entity_Id is begin if Present (Extra_Formal (Id)) then return Extra_Formal (Id); @@ -2025,7 +2024,7 @@ package body Einfo.Utils is -- Next_Index -- ---------------- - function Next_Index (Id : Node_Id) return Node_Id is + function Next_Index (Id : N) return Node_Id is begin pragma Assert (Nkind (Id) in N_Is_Index); pragma Assert (No (Next (Id)) or else Nkind (Next (Id)) in N_Is_Index); @@ -2036,7 +2035,7 @@ package body Einfo.Utils is -- Next_Literal -- ------------------ - function Next_Literal (Id : E) return E is + function Next_Literal (Id : E) return Entity_Id is begin pragma Assert (Nkind (Id) in N_Entity); return Next (Id); @@ -2046,7 +2045,7 @@ package body Einfo.Utils is -- Next_Stored_Discriminant -- ------------------------------ - function Next_Stored_Discriminant (Id : E) return E is + function Next_Stored_Discriminant (Id : E) return Entity_Id is begin -- See comment in Next_Discriminant @@ -2124,7 +2123,7 @@ package body Einfo.Utils is -- Object_Size_Clause -- ------------------------ - function Object_Size_Clause (Id : E) return N is + function Object_Size_Clause (Id : E) return Node_Id is begin return Get_Attribute_Definition_Clause (Id, Attribute_Object_Size); end Object_Size_Clause; @@ -2142,7 +2141,7 @@ package body Einfo.Utils is -- DIC_Procedure -- ------------------- - function DIC_Procedure (Id : E) return E is + function DIC_Procedure (Id : E) return Entity_Id is Subp_Elmt : Elmt_Id; Subp_Id : Entity_Id; Subps : Elist_Id; @@ -2174,7 +2173,7 @@ package body Einfo.Utils is return Empty; end DIC_Procedure; - function Partial_DIC_Procedure (Id : E) return E is + function Partial_DIC_Procedure (Id : E) return Entity_Id is Subp_Elmt : Elmt_Id; Subp_Id : Entity_Id; Subps : Elist_Id; @@ -2227,7 +2226,7 @@ package body Einfo.Utils is -- Partial_Invariant_Procedure -- --------------------------------- - function Partial_Invariant_Procedure (Id : E) return E is + function Partial_Invariant_Procedure (Id : E) return Entity_Id is Subp_Elmt : Elmt_Id; Subp_Id : Entity_Id; Subps : Elist_Id; @@ -2340,7 +2339,7 @@ package body Einfo.Utils is -- Predicate_Function -- ------------------------ - function Predicate_Function (Id : E) return E is + function Predicate_Function (Id : E) return Entity_Id is Subp_Elmt : Elmt_Id; Subp_Id : Entity_Id; Subps : Elist_Id; @@ -2835,8 +2834,8 @@ package body Einfo.Utils is -- Size_Clause -- ----------------- - function Size_Clause (Id : E) return N is - Result : N := Get_Attribute_Definition_Clause (Id, Attribute_Size); + function Size_Clause (Id : E) return Node_Id is + Result : Node_Id := Get_Attribute_Definition_Clause (Id, Attribute_Size); begin if No (Result) then Result := Get_Attribute_Definition_Clause (Id, Attribute_Value_Size); @@ -2938,7 +2937,7 @@ package body Einfo.Utils is -- Type_High_Bound -- --------------------- - function Type_High_Bound (Id : E) return Node_Id is + function Type_High_Bound (Id : E) return N is Rng : constant Node_Id := Scalar_Range (Id); begin if Nkind (Rng) = N_Subtype_Indication then @@ -2952,7 +2951,7 @@ package body Einfo.Utils is -- Type_Low_Bound -- -------------------- - function Type_Low_Bound (Id : E) return Node_Id is + function Type_Low_Bound (Id : E) return N is Rng : constant Node_Id := Scalar_Range (Id); begin if Nkind (Rng) = N_Subtype_Indication then @@ -2966,7 +2965,7 @@ package body Einfo.Utils is -- Underlying_Type -- --------------------- - function Underlying_Type (Id : E) return E is + function Underlying_Type (Id : E) return Entity_Id is begin -- For record_with_private the underlying type is always the direct full -- view. Never try to take the full view of the parent it does not make diff --git a/gcc/ada/einfo-utils.ads b/gcc/ada/einfo-utils.ads index d830c8d..beaf1bf 100644 --- a/gcc/ada/einfo-utils.ads +++ b/gcc/ada/einfo-utils.ads @@ -24,6 +24,7 @@ ------------------------------------------------------------------------------ with Einfo.Entities; use Einfo.Entities; +with Sinfo.Nodes; use Sinfo.Nodes; package Einfo.Utils is @@ -73,14 +74,16 @@ package Einfo.Utils is ------------------- -- The following type synonyms are used to tidy up the function and - -- procedure declarations that follow. + -- procedure declarations that follow. Note that E and N have predicates + -- ensuring the correct kind; we use Entity_Id or Node_Id when the + -- predicates can't be satisfied. subtype B is Boolean; subtype C is Component_Alignment_Kind; - subtype E is Entity_Id; + subtype E is N_Entity_Id; subtype F is Float_Rep_Kind; subtype M is Mechanism_Type; - subtype N is Node_Id; + subtype N is Node_Id with Predicate => N /= Empty and then N not in E; subtype U is Uint; subtype R is Ureal; subtype L is Elist_Id; @@ -199,17 +202,17 @@ package Einfo.Utils is -- The functions in this section synthesize attributes from the tree, -- so they do not correspond to defined fields in the entity itself. - function Address_Clause (Id : E) return N; + function Address_Clause (Id : E) return Node_Id; function Aft_Value (Id : E) return U; - function Alignment_Clause (Id : E) return N; + function Alignment_Clause (Id : E) return Node_Id; function Base_Type (Id : E) return E; - function Declaration_Node (Id : E) return N; + function Declaration_Node (Id : E) return Node_Id; function Designated_Type (Id : E) return E; function Entry_Index_Type (Id : E) return E; - function First_Component (Id : E) return E; - function First_Component_Or_Discriminant (Id : E) return E; - function First_Formal (Id : E) return E; - function First_Formal_With_Extras (Id : E) return E; + function First_Component (Id : E) return Entity_Id; + function First_Component_Or_Discriminant (Id : E) return Entity_Id; + function First_Formal (Id : E) return Entity_Id; + function First_Formal_With_Extras (Id : E) return Entity_Id; function Float_Rep (N : Entity_Id) return F with Inline, Pre => @@ -260,7 +263,7 @@ package Einfo.Utils is function Is_Task_Interface (Id : E) return B; function Is_Task_Record_Type (Id : E) return B; function Is_Wrapper_Package (Id : E) return B; - function Last_Formal (Id : E) return E; + function Last_Formal (Id : E) return Entity_Id; function Machine_Emax_Value (Id : E) return U; function Machine_Emin_Value (Id : E) return U; function Machine_Mantissa_Value (Id : E) return U; @@ -269,18 +272,18 @@ package Einfo.Utils is function Model_Epsilon_Value (Id : E) return R; function Model_Mantissa_Value (Id : E) return U; function Model_Small_Value (Id : E) return R; - function Next_Component (Id : E) return E; - function Next_Component_Or_Discriminant (Id : E) return E; - function Next_Discriminant (Id : E) return E; - function Next_Formal (Id : E) return E; - function Next_Formal_With_Extras (Id : E) return E; - function Next_Index (Id : N) return N; - function Next_Literal (Id : E) return E; - function Next_Stored_Discriminant (Id : E) return E; + function Next_Component (Id : E) return Entity_Id; + function Next_Component_Or_Discriminant (Id : E) return Entity_Id; + function Next_Discriminant (Id : E) return Entity_Id; + function Next_Formal (Id : E) return Entity_Id; + function Next_Formal_With_Extras (Id : E) return Entity_Id; + function Next_Index (Id : N) return Node_Id; + function Next_Literal (Id : E) return Entity_Id; + function Next_Stored_Discriminant (Id : E) return Entity_Id; function Number_Dimensions (Id : E) return Pos; function Number_Entries (Id : E) return Nat; function Number_Formals (Id : E) return Pos; - function Object_Size_Clause (Id : E) return N; + function Object_Size_Clause (Id : E) return Node_Id; function Parameter_Mode (Id : E) return Formal_Kind; function Partial_Refinement_Constituents (Id : E) return L; function Primitive_Operations (Id : E) return L; @@ -288,11 +291,11 @@ package Einfo.Utils is function Safe_Emax_Value (Id : E) return U; function Safe_First_Value (Id : E) return R; function Safe_Last_Value (Id : E) return R; - function Size_Clause (Id : E) return N; + function Size_Clause (Id : E) return Node_Id; function Stream_Size_Clause (Id : E) return N; function Type_High_Bound (Id : E) return N; function Type_Low_Bound (Id : E) return N; - function Underlying_Type (Id : E) return E; + function Underlying_Type (Id : E) return Entity_Id; function Scope_Depth (Id : E) return U; function Scope_Depth_Set (Id : E) return B; @@ -432,11 +435,11 @@ package Einfo.Utils is function Is_Partial_DIC_Procedure (Id : E) return B; - function DIC_Procedure (Id : E) return E; - function Partial_DIC_Procedure (Id : E) return E; - function Invariant_Procedure (Id : E) return E; - function Partial_Invariant_Procedure (Id : E) return E; - function Predicate_Function (Id : E) return E; + function DIC_Procedure (Id : E) return Entity_Id; + function Partial_DIC_Procedure (Id : E) return Entity_Id; + function Invariant_Procedure (Id : E) return Entity_Id; + function Partial_Invariant_Procedure (Id : E) return Entity_Id; + function Predicate_Function (Id : E) return Entity_Id; procedure Set_DIC_Procedure (Id : E; V : E); procedure Set_Partial_DIC_Procedure (Id : E; V : E); diff --git a/gcc/ada/exp_tss.adb b/gcc/ada/exp_tss.adb index a5d9460..09bb133 100644 --- a/gcc/ada/exp_tss.adb +++ b/gcc/ada/exp_tss.adb @@ -49,7 +49,7 @@ package body Exp_Tss is (Typ : Entity_Id; Ref : Entity_Id := Empty) return Entity_Id is - Full_Type : E; + Full_Type : Entity_Id; Proc : Entity_Id; begin diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb index 43c33b4..ca74d74 100644 --- a/gcc/ada/sem_aux.adb +++ b/gcc/ada/sem_aux.adb @@ -964,7 +964,7 @@ package body Sem_Aux is -- Is_Derived_Type -- --------------------- - function Is_Derived_Type (Ent : E) return B is + function Is_Derived_Type (Ent : Entity_Id) return B is Par : Node_Id; begin @@ -1130,10 +1130,8 @@ package body Sem_Aux is else declare - C : E; - + C : Entity_Id := First_Component (Btype); begin - C := First_Component (Btype); while Present (C) loop if Is_Limited_Type (Etype (C)) then return True; diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index fd1615d..650b7d5 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -144,7 +144,7 @@ package body Sem_Res is -- returns true if the prefix denotes an atomic object that has an address -- clause (the case in which we may want to issue a warning). - function Is_Definite_Access_Type (E : Entity_Id) return Boolean; + function Is_Definite_Access_Type (E : N_Entity_Id) return Boolean; -- Determine whether E is an access type declared by an access declaration, -- and not an (anonymous) allocator type. @@ -1510,7 +1510,7 @@ package body Sem_Res is -- Is_Definite_Access_Type -- ----------------------------- - function Is_Definite_Access_Type (E : Entity_Id) return Boolean is + function Is_Definite_Access_Type (E : N_Entity_Id) return Boolean is Btyp : constant Entity_Id := Base_Type (E); begin return Ekind (Btyp) = E_Access_Type @@ -1561,7 +1561,7 @@ package body Sem_Res is Orig_Type : Entity_Id := Empty; Pack : Entity_Id; - type Kind_Test is access function (E : Entity_Id) return Boolean; + type Kind_Test is access function (E : N_Entity_Id) return Boolean; function Operand_Type_In_Scope (S : Entity_Id) return Boolean; -- If the operand is not universal, and the operator is given by an diff --git a/gcc/ada/types.ads b/gcc/ada/types.ads index 3b226e1..9ae1797 100644 --- a/gcc/ada/types.ads +++ b/gcc/ada/types.ads @@ -404,6 +404,11 @@ package Types is -- that are entities (i.e. nodes with an Nkind of N_Defining_xxx). All such -- nodes are extended nodes and these are the only extended nodes, so that -- in practice entity and extended nodes are synonymous. + -- + -- Note that Sinfo.Nodes.N_Entity_Id is the same as Entity_Id, except it + -- has a predicate requiring the correct Nkind. Opt_N_Entity_Id is the same + -- as N_Entity_Id, except it allows Empty. (Sinfo.Nodes is generated by the + -- Gen_IL program.) subtype Node_Or_Entity_Id is Node_Id; -- A synonym for node types, used in cases where a given value may be used -- cgit v1.1 From f3451ba8aa3a54c6f09ee049a1a406603ed2ec30 Mon Sep 17 00:00:00 2001 From: Steve Baird Date: Wed, 25 May 2022 17:21:39 -0700 Subject: [Ada] Enforce deferred constant completion rules If a constrained subtype is given when a deferred constant is declared, then the subtype given in the completion is required (at compile time) to be subject to a statically matching constraint. This rule was not properly enforced in some cases and constructs that should have been rejected were incorrectly accepted. gcc/ada/ * sem_ch3.adb (Check_Possible_Deferred_Completion): Delete Prev_Obj_Def formal parameter. Reorganize code so that statically matching check is also performed in the case where the subtype given in the initial declaration is constrained and the subtype given in the completion is not. --- gcc/ada/sem_ch3.adb | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 84971e3..93aa2ca 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -13126,7 +13126,6 @@ package body Sem_Ch3 is procedure Check_Possible_Deferred_Completion (Prev_Id : Entity_Id; - Prev_Obj_Def : Node_Id; Curr_Obj_Def : Node_Id); -- Determine whether the two object definitions describe the partial -- and the full view of a constrained deferred constant. Generate @@ -13146,15 +13145,16 @@ package body Sem_Ch3 is procedure Check_Possible_Deferred_Completion (Prev_Id : Entity_Id; - Prev_Obj_Def : Node_Id; Curr_Obj_Def : Node_Id) is + Curr_Typ : Entity_Id; + Prev_Typ : constant Entity_Id := Etype (Prev_Id); + Anon_Acc : constant Boolean := Is_Anonymous_Access_Type (Prev_Typ); + Mismatch : Boolean := False; begin - if Nkind (Prev_Obj_Def) = N_Subtype_Indication - and then Present (Constraint (Prev_Obj_Def)) - and then Nkind (Curr_Obj_Def) = N_Subtype_Indication - and then Present (Constraint (Curr_Obj_Def)) - then + if Anon_Acc then + null; + elsif Nkind (Curr_Obj_Def) = N_Subtype_Indication then declare Loc : constant Source_Ptr := Sloc (N); Def_Id : constant Entity_Id := Make_Temporary (Loc, 'S'); @@ -13167,13 +13167,32 @@ package body Sem_Ch3 is begin Insert_Before_And_Analyze (N, Decl); Set_Etype (Id, Def_Id); - - if not Subtypes_Statically_Match (Etype (Prev_Id), Def_Id) then - Error_Msg_Sloc := Sloc (Prev_Id); - Error_Msg_N ("subtype does not statically match deferred " - & "declaration #", N); - end if; + Curr_Typ := Def_Id; end; + else + Curr_Typ := Etype (Curr_Obj_Def); + end if; + + if Anon_Acc then + if Nkind (Curr_Obj_Def) /= N_Access_Definition then + Mismatch := True; + elsif Has_Null_Exclusion (Prev_Typ) + and then not Null_Exclusion_Present (Curr_Obj_Def) + then + Mismatch := True; + end if; + -- ??? Another check needed: mismatch if disagreement + -- between designated types/profiles . + else + Mismatch := + Is_Constrained (Prev_Typ) + and then not Subtypes_Statically_Match (Prev_Typ, Curr_Typ); + end if; + + if Mismatch then + Error_Msg_Sloc := Sloc (Prev_Id); + Error_Msg_N ("subtype does not statically match deferred " + & "declaration #", N); end if; end Check_Possible_Deferred_Completion; @@ -13316,7 +13335,6 @@ package body Sem_Ch3 is Check_Possible_Deferred_Completion (Prev_Id => Prev, - Prev_Obj_Def => Object_Definition (Parent (Prev)), Curr_Obj_Def => Obj_Def); Set_Full_View (Prev, Id); -- cgit v1.1 From 2cad8a59a8060b0897d18d4075d96eb7c541e845 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 27 May 2022 15:28:29 +0200 Subject: [Ada] Use static stack allocation for small dynamic string concatenations This changes the expanded code generated for dynamic concatenations to use a static array subtype for the temporary created on the stack if a small upper bound can be computed for the length of the result. Static stack allocation is preferred over dynamic allocation for code generation purposes. gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration.Rewrite_As_Renaming): Be prepared for slices. * exp_ch4.adb (Get_First_Index_Bounds): New procedure. (Expand_Array_Comparison.Length_Less_Than_4): Call it. (Expand_Concatenate): Try to compute a maximum length for operands with variable length and a maximum total length at the end. If the concatenation is dynamic, but a sensible maximum total length has been computed, use this length to create a static array subtype for the temporary and return a slice of it. --- gcc/ada/exp_ch3.adb | 24 ++++- gcc/ada/exp_ch4.adb | 286 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 207 insertions(+), 103 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 12173ae..75d94b0 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -6806,6 +6806,21 @@ package body Exp_Ch3 is ------------------------- function Rewrite_As_Renaming return Boolean is + + function OK_To_Rename_Entity_Name (N : Node_Id) return Boolean; + -- Return True if N denotes an entity with OK_To_Rename set + + ------------------------------ + -- OK_To_Rename_Entity_Name -- + ------------------------------ + + function OK_To_Rename_Entity_Name (N : Node_Id) return Boolean is + begin + return Is_Entity_Name (N) + and then Ekind (Entity (N)) = E_Variable + and then OK_To_Rename (Entity (N)); + end OK_To_Rename_Entity_Name; + Result : constant Boolean := -- If the object declaration appears in the form @@ -6844,10 +6859,11 @@ package body Exp_Ch3 is or else (not Aliased_Present (N) - and then Is_Entity_Name (Expr_Q) - and then Ekind (Entity (Expr_Q)) = E_Variable - and then OK_To_Rename (Entity (Expr_Q)) - and then Is_Entity_Name (Obj_Def)); + and then (OK_To_Rename_Entity_Name (Expr_Q) + or else + (Nkind (Expr_Q) = N_Slice + and then + OK_To_Rename_Entity_Name (Prefix (Expr_Q))))); begin -- ??? Return False if there are any aspect specifications, because -- otherwise we duplicate that corresponding implicit attribute diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 140789a..cf29fb7 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -174,6 +174,10 @@ package body Exp_Ch4 is -- routine is to find the real type by looking up the tree. We also -- determine if the operation must be rounded. + procedure Get_First_Index_Bounds (T : Entity_Id; Lo, Hi : out Uint); + -- T is an array whose index bounds are all known at compile time. Return + -- the value of the low and high bounds of the first index of T. + function Get_Size_For_Range (Lo, Hi : Uint) return Uint; -- Return the size of a small signed integer type covering Lo .. Hi, the -- main goal being to return a size lower than that of standard types. @@ -1328,29 +1332,17 @@ package body Exp_Ch4 is if Ekind (Otyp) = E_String_Literal_Subtype then return String_Literal_Length (Otyp) < 4; - else + elsif Compile_Time_Known_Bounds (Otyp) then declare - Ityp : constant Entity_Id := Etype (First_Index (Otyp)); - Lo : constant Node_Id := Type_Low_Bound (Ityp); - Hi : constant Node_Id := Type_High_Bound (Ityp); - Lov : Uint; - Hiv : Uint; + Lo, Hi : Uint; begin - if Compile_Time_Known_Value (Lo) then - Lov := Expr_Value (Lo); - else - return False; - end if; - - if Compile_Time_Known_Value (Hi) then - Hiv := Expr_Value (Hi); - else - return False; - end if; - - return Hiv < Lov + 3; + Get_First_Index_Bounds (Otyp, Lo, Hi); + return Hi < Lo + 3; end; + + else + return False; end if; end Length_Less_Than_4; @@ -2701,6 +2693,9 @@ package body Exp_Ch4 is -- this loop is complete, always contains the last operand (which is not -- the same as Operands (NN), since null operands are skipped). + Too_Large_Max_Length : constant Unat := UI_From_Int (256); + -- Threshold from which the computation of maximum lengths is useless + -- Arrays describing the operands, only the first NN entries of each -- array are set (NN < N when we exclude known null operands). @@ -2711,10 +2706,15 @@ package body Exp_Ch4 is -- Set to the corresponding entry in the Opnds list (but note that null -- operands are excluded, so not all entries in the list are stored). - Fixed_Length : array (1 .. N) of Uint; + Fixed_Length : array (1 .. N) of Unat; -- Set to length of operand. Entries in this array are set only if the -- corresponding entry in Is_Fixed_Length is True. + Max_Length : array (1 .. N) of Unat; + -- Set to the maximum length of operand, or Too_Large_Max_Length if it + -- is not known. Entries in this array are set only if the corresponding + -- entry in Is_Fixed_Length is False; + Opnd_Low_Bound : array (1 .. N) of Node_Id; -- Set to lower bound of operand. Either an integer literal in the case -- where the bound is known at compile time, else actual lower bound. @@ -2727,17 +2727,24 @@ package body Exp_Ch4 is -- is False. The entity is of type Artyp. Aggr_Length : array (0 .. N) of Node_Id; - -- The J'th entry in an expression node that represents the total length + -- The J'th entry is an expression node that represents the total length -- of operands 1 through J. It is either an integer literal node, or a -- reference to a constant entity with the right value, so it is fine -- to just do a Copy_Node to get an appropriate copy. The extra zeroth -- entry always is set to zero. The length is of type Artyp. + Max_Aggr_Length : Unat := Too_Large_Max_Length; + -- Set to the maximum total length, or at least Too_Large_Max_Length if + -- it is not known. + Low_Bound : Node_Id := Empty; -- A tree node representing the low bound of the result (of type Ityp). -- This is either an integer literal node, or an identifier reference to -- a constant entity initialized to the appropriate value. + High_Bound : Node_Id := Empty; + -- A tree node representing the high bound of the result (of type Ityp) + Last_Opnd_Low_Bound : Node_Id := Empty; -- A tree node representing the low bound of the last operand. This -- need only be set if the result could be null. It is used for the @@ -2750,9 +2757,6 @@ package body Exp_Ch4 is -- special case of setting the right high bound for a null result. -- This is of type Ityp. - High_Bound : Node_Id := Empty; - -- A tree node representing the high bound of the result (of type Ityp) - Result : Node_Id := Empty; -- Result of the concatenation (of type Ityp) @@ -2767,7 +2771,7 @@ package body Exp_Ch4 is -- Return True if the concatenation is within the expression of the -- declaration of a library-level object. - function Make_Artyp_Literal (Val : Nat) return Node_Id; + function Make_Artyp_Literal (Val : Uint) return Node_Id; -- This function makes an N_Integer_Literal node that is returned in -- analyzed form with the type set to Artyp. Importantly this literal -- is not flagged as static, so that if we do computations with it that @@ -2810,7 +2814,7 @@ package body Exp_Ch4 is -- Make_Artyp_Literal -- ------------------------ - function Make_Artyp_Literal (Val : Nat) return Node_Id is + function Make_Artyp_Literal (Val : Uint) return Node_Id is Result : constant Node_Id := Make_Integer_Literal (Loc, Val); begin Set_Etype (Result, Artyp); @@ -2867,9 +2871,10 @@ package body Exp_Ch4 is -- Local Declarations Opnd_Typ : Entity_Id; + Slice_Rng : Entity_Id; Subtyp_Ind : Entity_Id; Ent : Entity_Id; - Len : Uint; + Len : Unat; J : Nat; Clen : Node_Id; Set : Boolean; @@ -2925,7 +2930,7 @@ package body Exp_Ch4 is -- Supply dummy entry at start of length array - Aggr_Length (0) := Make_Artyp_Literal (0); + Aggr_Length (0) := Make_Artyp_Literal (Uint_0); -- Go through operands setting up the above arrays @@ -2969,7 +2974,7 @@ package body Exp_Ch4 is elsif Nkind (Opnd) = N_String_Literal then Len := String_Literal_Length (Opnd_Typ); - if Len /= 0 then + if Len > 0 then Result_May_Be_Null := False; end if; @@ -3010,61 +3015,47 @@ package body Exp_Ch4 is else -- Check constrained case with known bounds - if Is_Constrained (Opnd_Typ) then + if Is_Constrained (Opnd_Typ) + and then Compile_Time_Known_Bounds (Opnd_Typ) + then declare - Index : constant Node_Id := First_Index (Opnd_Typ); - Indx_Typ : constant Entity_Id := Etype (Index); - Lo : constant Node_Id := Type_Low_Bound (Indx_Typ); - Hi : constant Node_Id := Type_High_Bound (Indx_Typ); + Lo, Hi : Uint; begin -- Fixed length constrained array type with known at compile -- time bounds is last case of fixed length operand. - if Compile_Time_Known_Value (Lo) - and then - Compile_Time_Known_Value (Hi) - then - declare - Loval : constant Uint := Expr_Value (Lo); - Hival : constant Uint := Expr_Value (Hi); - Len : constant Uint := - UI_Max (Hival - Loval + 1, Uint_0); + Get_First_Index_Bounds (Opnd_Typ, Lo, Hi); + Len := UI_Max (Hi - Lo + 1, Uint_0); - begin - if Len > 0 then - Result_May_Be_Null := False; - end if; + if Len > 0 then + Result_May_Be_Null := False; + end if; - -- Capture last operand bounds if result could be null + -- Capture last operand bounds if result could be null - if J = N and then Result_May_Be_Null then - Last_Opnd_Low_Bound := - Convert_To (Ityp, - Make_Integer_Literal (Loc, Expr_Value (Lo))); + if J = N and then Result_May_Be_Null then + Last_Opnd_Low_Bound := + To_Ityp (Make_Integer_Literal (Loc, Lo)); - Last_Opnd_High_Bound := - Convert_To (Ityp, - Make_Integer_Literal (Loc, Expr_Value (Hi))); - end if; + Last_Opnd_High_Bound := + To_Ityp (Make_Integer_Literal (Loc, Hi)); + end if; - -- Exclude null length case unless last operand + -- Exclude null length case unless last operand - if J < N and then Len = 0 then - goto Continue; - end if; + if J < N and then Len = 0 then + goto Continue; + end if; - NN := NN + 1; - Operands (NN) := Opnd; - Is_Fixed_Length (NN) := True; - Fixed_Length (NN) := Len; + NN := NN + 1; + Operands (NN) := Opnd; + Is_Fixed_Length (NN) := True; + Fixed_Length (NN) := Len; - Opnd_Low_Bound (NN) := - To_Ityp - (Make_Integer_Literal (Loc, Expr_Value (Lo))); - Set := True; - end; - end if; + Opnd_Low_Bound (NN) := + To_Ityp (Make_Integer_Literal (Loc, Lo)); + Set := True; end; end if; @@ -3108,6 +3099,25 @@ package body Exp_Ch4 is Var_Length (NN) := Make_Temporary (Loc, 'L'); + -- If the operand is a slice, try to compute an upper bound for + -- its length. + + if Nkind (Opnd) = N_Slice + and then Is_Constrained (Etype (Prefix (Opnd))) + and then Compile_Time_Known_Bounds (Etype (Prefix (Opnd))) + then + declare + Lo, Hi : Uint; + + begin + Get_First_Index_Bounds (Etype (Prefix (Opnd)), Lo, Hi); + Max_Length (NN) := UI_Max (Hi - Lo + 1, Uint_0); + end; + + else + Max_Length (NN) := Too_Large_Max_Length; + end if; + Append_To (Actions, Make_Object_Declaration (Loc, Defining_Identifier => Var_Length (NN), @@ -3129,8 +3139,10 @@ package body Exp_Ch4 is if NN = 1 then if Is_Fixed_Length (1) then Aggr_Length (1) := Make_Integer_Literal (Loc, Fixed_Length (1)); + Max_Aggr_Length := Fixed_Length (1); else Aggr_Length (1) := New_Occurrence_Of (Var_Length (1), Loc); + Max_Aggr_Length := Max_Length (1); end if; -- If entry is fixed length and only fixed lengths so far, make @@ -3142,6 +3154,7 @@ package body Exp_Ch4 is Aggr_Length (NN) := Make_Integer_Literal (Loc, Intval => Fixed_Length (NN) + Intval (Aggr_Length (NN - 1))); + Max_Aggr_Length := Intval (Aggr_Length (NN)); -- All other cases, construct an addition node for the length and -- create an entity initialized to this length. @@ -3151,8 +3164,11 @@ package body Exp_Ch4 is if Is_Fixed_Length (NN) then Clen := Make_Integer_Literal (Loc, Fixed_Length (NN)); + Max_Aggr_Length := Max_Aggr_Length + Fixed_Length (NN); + else Clen := New_Occurrence_Of (Var_Length (NN), Loc); + Max_Aggr_Length := Max_Aggr_Length + Max_Length (NN); end if; Append_To (Actions, @@ -3277,29 +3293,38 @@ package body Exp_Ch4 is pragma Assert (Present (Low_Bound)); - -- Now we can safely compute the upper bound, normally - -- Low_Bound + Length - 1. - - High_Bound := - To_Ityp - (Make_Op_Add (Loc, - Left_Opnd => To_Artyp (New_Copy_Tree (Low_Bound)), - Right_Opnd => - Make_Op_Subtract (Loc, - Left_Opnd => New_Copy_Tree (Aggr_Length (NN)), - Right_Opnd => Make_Artyp_Literal (1)))); - - -- Note that calculation of the high bound may cause overflow in some - -- very weird cases, so in the general case we need an overflow check on - -- the high bound. We can avoid this for the common case of string types - -- and other types whose index is Positive, since we chose a wider range - -- for the arithmetic type. If checks are suppressed we do not set the - -- flag, and possibly superfluous warnings will be omitted. + -- Now we can compute the high bound as Low_Bound + Length - 1 - if Istyp /= Standard_Positive - and then not Overflow_Checks_Suppressed (Istyp) + if Compile_Time_Known_Value (Low_Bound) + and then Nkind (Aggr_Length (NN)) = N_Integer_Literal then - Activate_Overflow_Check (High_Bound); + High_Bound := + To_Ityp + (Make_Artyp_Literal + (Expr_Value (Low_Bound) + Intval (Aggr_Length (NN)) - 1)); + + else + High_Bound := + To_Ityp + (Make_Op_Add (Loc, + Left_Opnd => To_Artyp (New_Copy_Tree (Low_Bound)), + Right_Opnd => + Make_Op_Subtract (Loc, + Left_Opnd => New_Copy_Tree (Aggr_Length (NN)), + Right_Opnd => Make_Artyp_Literal (Uint_1)))); + + -- Note that calculation of the high bound may cause overflow in some + -- very weird cases, so in the general case we need an overflow check + -- on the high bound. We can avoid this for the common case of string + -- types and other types whose index is Positive, since we chose a + -- wider range for the arithmetic type. If checks are suppressed, we + -- do not set the flag so superfluous warnings may be omitted. + + if Istyp /= Standard_Positive + and then not Overflow_Checks_Suppressed (Istyp) + then + Activate_Overflow_Check (High_Bound); + end if; end if; -- Handle the exceptional case where the result is null, in which case @@ -3312,7 +3337,7 @@ package body Exp_Ch4 is Expressions => New_List ( Make_Op_Eq (Loc, Left_Opnd => New_Copy_Tree (Aggr_Length (NN)), - Right_Opnd => Make_Artyp_Literal (0)), + Right_Opnd => Make_Artyp_Literal (Uint_0)), Last_Opnd_Low_Bound, Low_Bound)); @@ -3321,7 +3346,7 @@ package body Exp_Ch4 is Expressions => New_List ( Make_Op_Eq (Loc, Left_Opnd => New_Copy_Tree (Aggr_Length (NN)), - Right_Opnd => Make_Artyp_Literal (0)), + Right_Opnd => Make_Artyp_Literal (Uint_0)), Last_Opnd_High_Bound, High_Bound)); end if; @@ -3330,6 +3355,35 @@ package body Exp_Ch4 is Insert_Actions (Cnode, Actions, Suppress => All_Checks); + -- If the low bound is known at compile time and not the high bound, but + -- we have computed a sensible upper bound for the length, then adjust + -- the high bound for the subtype of the array. This will change it into + -- a static subtype and thus help the code generator. + + if Compile_Time_Known_Value (Low_Bound) + and then not Compile_Time_Known_Value (High_Bound) + and then Max_Aggr_Length < Too_Large_Max_Length + then + declare + Known_High_Bound : constant Node_Id := + To_Ityp + (Make_Artyp_Literal + (Expr_Value (Low_Bound) + Max_Aggr_Length - 1)); + + begin + if not Is_Out_Of_Range (Known_High_Bound, Ityp) then + Slice_Rng := Make_Range (Loc, Low_Bound, High_Bound); + High_Bound := Known_High_Bound; + + else + Slice_Rng := Empty; + end if; + end; + + else + Slice_Rng := Empty; + end if; + -- Now we construct an array object with appropriate bounds. We mark -- the target as internal to prevent useless initialization when -- Initialize_Scalars is enabled. Also since this is the actual result @@ -3443,16 +3497,26 @@ package body Exp_Ch4 is -- Catch the static out of range case now - if Raises_Constraint_Error (High_Bound) then + if Raises_Constraint_Error (High_Bound) + or else Is_Out_Of_Range (High_Bound, Ityp) + then -- Kill warning generated for the declaration of the static out of -- range high bound, and instead generate a Constraint_Error with -- an appropriate specific message. - Kill_Dead_Code (Declaration_Node (Entity (High_Bound))); + if Nkind (High_Bound) = N_Integer_Literal then + Kill_Dead_Code (High_Bound); + Rewrite (High_Bound, New_Copy_Tree (Low_Bound)); + + else + Kill_Dead_Code (Declaration_Node (Entity (High_Bound))); + end if; + Apply_Compile_Time_Constraint_Error (N => Cnode, Msg => "concatenation result upper bound out of range??", Reason => CE_Range_Check_Failed); + return; end if; @@ -3529,8 +3593,9 @@ package body Exp_Ch4 is Name => New_Occurrence_Of (RTE (RR (NN)), Loc), Parameter_Associations => Opnds)); - Result := New_Occurrence_Of (Ent, Loc); - goto Done; + -- No assignments left to do below + + NN := 0; end; end if; end; @@ -3553,7 +3618,7 @@ package body Exp_Ch4 is Right_Opnd => Make_Op_Subtract (Loc, Left_Opnd => Aggr_Length (J), - Right_Opnd => Make_Artyp_Literal (1))); + Right_Opnd => Make_Artyp_Literal (Uint_1))); begin -- Singleton case, simple assignment @@ -3614,10 +3679,15 @@ package body Exp_Ch4 is end; end loop; - -- Finally we build the result, which is a reference to the array object + -- Finally we build the result, which is either a direct reference to + -- the array object or a slice of it. Result := New_Occurrence_Of (Ent, Loc); + if Present (Slice_Rng) then + Result := Make_Slice (Loc, Result, Slice_Rng); + end if; + <> pragma Assert (Present (Result)); Rewrite (Cnode, Result); @@ -13318,6 +13388,24 @@ package body Exp_Ch4 is end if; end Fixup_Universal_Fixed_Operation; + ---------------------------- + -- Get_First_Index_Bounds -- + ---------------------------- + + procedure Get_First_Index_Bounds (T : Entity_Id; Lo, Hi : out Uint) is + Typ : Entity_Id; + + begin + pragma Assert (Is_Array_Type (T)); + + -- This follows Sem_Eval.Compile_Time_Known_Bounds + + Typ := Underlying_Type (Etype (First_Index (T))); + + Lo := Expr_Value (Type_Low_Bound (Typ)); + Hi := Expr_Value (Type_High_Bound (Typ)); + end Get_First_Index_Bounds; + ------------------------ -- Get_Size_For_Range -- ------------------------ -- cgit v1.1 From 0896e2b79a3f7864b08f221a157a5c7fe8958116 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 29 May 2022 13:35:57 +0200 Subject: [Ada] Adjust previous change to Rewrite_As_Renaming gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration.Rewrite_As_Renaming): Do not rewrite if the declaration has got constraints. * sinfo.ads (Case Expression Alternative): Fix typo. --- gcc/ada/exp_ch3.adb | 19 +++++++++++++------ gcc/ada/sinfo.ads | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 75d94b0..9759c8d 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -6865,13 +6865,20 @@ package body Exp_Ch3 is and then OK_To_Rename_Entity_Name (Prefix (Expr_Q))))); begin - -- ??? Return False if there are any aspect specifications, because - -- otherwise we duplicate that corresponding implicit attribute - -- definition, and call Insert_Action, which has no place to insert - -- the attribute definition. The attribute definition is stored in - -- Aspect_Rep_Item, which is not a list. + return Result - return Result and then No (Aspect_Specifications (N)); + -- The declaration cannot be rewritten if it has got constraints, + -- in other words the nominal subtype must be unconstrained. + + and then Is_Entity_Name (Original_Node (Obj_Def)) + + -- ??? Return False if there are any aspect specifications, because + -- otherwise we duplicate that corresponding implicit attribute + -- definition, and call Insert_Action, which has no place to insert + -- the attribute definition. The attribute definition is stored in + -- Aspect_Rep_Item, which is not a list. + + and then No (Aspect_Specifications (N)); end Rewrite_As_Renaming; -- Local variables diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index e18a427..57c6438 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -4651,7 +4651,7 @@ package Sinfo is -- Note: The Actions field temporarily holds any actions associated with -- evaluation of the Expression. During expansion of the case expression - -- these actions are wrapped into an N_Expressions_With_Actions node + -- these actions are wrapped into an N_Expression_With_Actions node -- replacing the original expression. -- Note: this node never appears in the tree passed to the back end, -- cgit v1.1 From a521dc37999bed5ec1f529b4c6ba7ded09dca464 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 29 May 2022 18:18:20 +0200 Subject: [Ada] Use static stack allocation for small string if-expressions This changes the expanded code generated for if-expressions of 1-dimensional arrays to create a static temporary on the stack if a small upper bound can be computed for the length of a subtype covering the result. Static stack allocation is preferred over dynamic allocation for code generation purpose. This also contains a couple of enhancements to the support code for checks, so as to avoid generating useless checks during the modified expansion. gcc/ada/ * checks.adb (Apply_Length_Check_On_Assignment): Return early if the Suppress_Assignment_Checks flag is set. (Selected_Range_Checks): Deal with conditional expressions. * exp_ch4.adb (Too_Large_Length_For_Array): New constant. (Expand_Concatenate): Use it in lieu of Too_Large_Max_Length. (Expand_N_If_Expression): If the result has a unidimensional array type but the dependent expressions have constrained subtypes with known bounds, create a static temporary on the stack with a subtype covering the result. (Get_First_Index_Bounds): Deal with string literals. * uintp.ads (Uint_256): New deferred constant. * sinfo.ads (Suppress_Assignment_Checks): Document new usage. --- gcc/ada/checks.adb | 99 ++++++++++++++++-- gcc/ada/exp_ch4.adb | 292 ++++++++++++++++++++++++++++++++++++++++++++++++---- gcc/ada/sinfo.ads | 2 +- gcc/ada/uintp.ads | 2 + 4 files changed, 364 insertions(+), 31 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 204d13e..22577c8 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -2297,6 +2297,15 @@ package body Checks is Assign : constant Node_Id := Parent (Target); begin + -- Do not apply length checks if parent is still an assignment statement + -- with Suppress_Assignment_Checks flag set. + + if Nkind (Assign) = N_Assignment_Statement + and then Suppress_Assignment_Checks (Assign) + then + return; + end if; + -- No check is needed for the initialization of an object whose -- nominal subtype is unconstrained. @@ -6462,7 +6471,7 @@ package body Checks is end if; -- Do not set range check flag if parent is assignment statement or - -- object declaration with Suppress_Assignment_Checks flag set + -- object declaration with Suppress_Assignment_Checks flag set. if Nkind (Parent (N)) in N_Assignment_Statement | N_Object_Declaration and then Suppress_Assignment_Checks (Parent (N)) @@ -10500,6 +10509,11 @@ package body Checks is -- Returns expression to compute: -- N'First or N'Last using Duplicate_Subexpr_No_Checks + function Is_Cond_Expr_Ge (N : Node_Id; V : Node_Id) return Boolean; + function Is_Cond_Expr_Le (N : Node_Id; V : Node_Id) return Boolean; + -- Return True if N is a conditional expression whose dependent + -- expressions are all known and greater/lower than or equal to V. + function Range_E_Cond (Exptyp : Entity_Id; Typ : Entity_Id; @@ -10522,6 +10536,16 @@ package body Checks is -- Return expression to compute: -- Exp'First < Typ'First or else Exp'Last > Typ'Last + function "<" (Left, Right : Node_Id) return Boolean + is (if Is_Floating_Point_Type (S_Typ) + then Expr_Value_R (Left) < Expr_Value_R (Right) + else Expr_Value (Left) < Expr_Value (Right)); + function "<=" (Left, Right : Node_Id) return Boolean + is (if Is_Floating_Point_Type (S_Typ) + then Expr_Value_R (Left) <= Expr_Value_R (Right) + else Expr_Value (Left) <= Expr_Value (Right)); + -- Convenience comparison functions of integer or floating point values + --------------- -- Add_Check -- --------------- @@ -10702,6 +10726,60 @@ package body Checks is Make_Integer_Literal (Loc, Indx))); end Get_N_Last; + --------------------- + -- Is_Cond_Expr_Ge -- + --------------------- + + function Is_Cond_Expr_Ge (N : Node_Id; V : Node_Id) return Boolean is + begin + -- Only if expressions are relevant for the time being + + if Nkind (N) = N_If_Expression then + declare + Cond : constant Node_Id := First (Expressions (N)); + Thenx : constant Node_Id := Next (Cond); + Elsex : constant Node_Id := Next (Thenx); + + begin + return Compile_Time_Known_Value (Thenx) + and then V <= Thenx + and then + ((Compile_Time_Known_Value (Elsex) and then V <= Elsex) + or else Is_Cond_Expr_Ge (Elsex, V)); + end; + + else + return False; + end if; + end Is_Cond_Expr_Ge; + + --------------------- + -- Is_Cond_Expr_Le -- + --------------------- + + function Is_Cond_Expr_Le (N : Node_Id; V : Node_Id) return Boolean is + begin + -- Only if expressions are relevant for the time being + + if Nkind (N) = N_If_Expression then + declare + Cond : constant Node_Id := First (Expressions (N)); + Thenx : constant Node_Id := Next (Cond); + Elsex : constant Node_Id := Next (Thenx); + + begin + return Compile_Time_Known_Value (Thenx) + and then Thenx <= V + and then + ((Compile_Time_Known_Value (Elsex) and then Elsex <= V) + or else Is_Cond_Expr_Le (Elsex, V)); + end; + + else + return False; + end if; + end Is_Cond_Expr_Le; + ------------------ -- Range_E_Cond -- ------------------ @@ -10783,13 +10861,6 @@ package body Checks is Get_E_First_Or_Last (Loc, Typ, Indx, Name_Last))); end Range_N_Cond; - function "<" (Left, Right : Node_Id) return Boolean - is (if Is_Floating_Point_Type (S_Typ) - then Expr_Value_R (Left) < Expr_Value_R (Right) - else Expr_Value (Left) < Expr_Value (Right)); - -- Convenience comparison function of integer or floating point - -- values. - -- Start of processing for Selected_Range_Checks begin @@ -10885,6 +10956,14 @@ package body Checks is then LB := T_LB; Known_LB := True; + + -- Similarly; deal with the case where the low bound is a + -- conditional expression whose result is greater than or + -- equal to the target low bound. + + elsif Is_Cond_Expr_Ge (LB, T_LB) then + LB := T_LB; + Known_LB := True; end if; -- Likewise for the high bound @@ -10897,6 +10976,10 @@ package body Checks is then HB := T_HB; Known_HB := True; + + elsif Is_Cond_Expr_Le (HB, T_HB) then + HB := T_HB; + Known_HB := True; end if; end if; diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index cf29fb7..288ce9a9 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -81,6 +81,10 @@ with Warnsw; use Warnsw; package body Exp_Ch4 is + Too_Large_Length_For_Array : constant Unat := Uint_256; + -- Threshold from which we do not try to create static array temporaries in + -- order to eliminate dynamic stack allocations. + ----------------------- -- Local Subprograms -- ----------------------- @@ -2693,9 +2697,6 @@ package body Exp_Ch4 is -- this loop is complete, always contains the last operand (which is not -- the same as Operands (NN), since null operands are skipped). - Too_Large_Max_Length : constant Unat := UI_From_Int (256); - -- Threshold from which the computation of maximum lengths is useless - -- Arrays describing the operands, only the first NN entries of each -- array are set (NN < N when we exclude known null operands). @@ -2711,9 +2712,9 @@ package body Exp_Ch4 is -- corresponding entry in Is_Fixed_Length is True. Max_Length : array (1 .. N) of Unat; - -- Set to the maximum length of operand, or Too_Large_Max_Length if it - -- is not known. Entries in this array are set only if the corresponding - -- entry in Is_Fixed_Length is False; + -- Set to the maximum length of operand, or Too_Large_Length_For_Array + -- if it is not known. Entries in this array are set only if the + -- corresponding entry in Is_Fixed_Length is False; Opnd_Low_Bound : array (1 .. N) of Node_Id; -- Set to lower bound of operand. Either an integer literal in the case @@ -2733,9 +2734,9 @@ package body Exp_Ch4 is -- to just do a Copy_Node to get an appropriate copy. The extra zeroth -- entry always is set to zero. The length is of type Artyp. - Max_Aggr_Length : Unat := Too_Large_Max_Length; - -- Set to the maximum total length, or at least Too_Large_Max_Length if - -- it is not known. + Max_Aggr_Length : Unat := Too_Large_Length_For_Array; + -- Set to the maximum total length, or Too_Large_Length_For_Array at + -- least if it is not known. Low_Bound : Node_Id := Empty; -- A tree node representing the low bound of the result (of type Ityp). @@ -3115,7 +3116,7 @@ package body Exp_Ch4 is end; else - Max_Length (NN) := Too_Large_Max_Length; + Max_Length (NN) := Too_Large_Length_For_Array; end if; Append_To (Actions, @@ -3362,7 +3363,7 @@ package body Exp_Ch4 is if Compile_Time_Known_Value (Low_Bound) and then not Compile_Time_Known_Value (High_Bound) - and then Max_Aggr_Length < Too_Large_Max_Length + and then Max_Aggr_Length < Too_Large_Length_For_Array then declare Known_High_Bound : constant Node_Id := @@ -5860,19 +5861,43 @@ package body Exp_Ch4 is Elsex : constant Node_Id := Next (Thenx); Typ : constant Entity_Id := Etype (N); - Actions : List_Id; - Decl : Node_Id; - Expr : Node_Id; - New_If : Node_Id; - New_N : Node_Id; - + Force_Expand : constant Boolean := Is_Anonymous_Access_Actual (N); -- Determine if we are dealing with a special case of a conditional -- expression used as an actual for an anonymous access type which -- forces us to transform the if expression into an expression with -- actions in order to create a temporary to capture the level of the -- expression in each branch. - Force_Expand : constant Boolean := Is_Anonymous_Access_Actual (N); + function OK_For_Single_Subtype (T1, T2 : Entity_Id) return Boolean; + -- Return true if it is acceptable to use a single subtype for two + -- dependent expressions of subtype T1 and T2 respectively, which are + -- unidimensional arrays whose index bounds are known at compile time. + + --------------------------- + -- OK_For_Single_Subtype -- + --------------------------- + + function OK_For_Single_Subtype (T1, T2 : Entity_Id) return Boolean is + Lo1, Hi1 : Uint; + Lo2, Hi2 : Uint; + + begin + Get_First_Index_Bounds (T1, Lo1, Hi1); + Get_First_Index_Bounds (T2, Lo2, Hi2); + + -- Return true if the length of the covering subtype is not too large + + return + UI_Max (Hi1, Hi2) - UI_Min (Lo1, Lo2) < Too_Large_Length_For_Array; + end OK_For_Single_Subtype; + + -- Local variables + + Actions : List_Id; + Decl : Node_Id; + Expr : Node_Id; + New_If : Node_Id; + New_N : Node_Id; -- Start of processing for Expand_N_If_Expression @@ -6049,6 +6074,223 @@ package body Exp_Ch4 is Prefix => New_Occurrence_Of (Cnn, Loc)); end; + -- If the result is a unidimensional unconstrained array but the two + -- dependent expressions have constrained subtypes with known bounds, + -- then we expand as follows: + + -- subtype Txx is Typ ( .. ); + -- Cnn : Txx; + -- if cond then + -- <> + -- Cnn () := then-expr; + -- else + -- <> + -- Cnn () := else-expr; + -- end if; + + -- and replace the if expression by a slice of Cnn, provided that Txx + -- is not too large. This will create a static temporary instead of the + -- dynamic one of the next case and thus help the code generator. + + -- Note that we need to deal with the case where the else expression is + -- itself such a slice, in order to catch if expressions with more than + -- two dependent expressions in the source code. + + elsif Is_Array_Type (Typ) + and then Number_Dimensions (Typ) = 1 + and then not Is_Constrained (Typ) + and then Is_Constrained (Etype (Thenx)) + and then Compile_Time_Known_Bounds (Etype (Thenx)) + and then + ((Is_Constrained (Etype (Elsex)) + and then Compile_Time_Known_Bounds (Etype (Elsex)) + and then OK_For_Single_Subtype (Etype (Thenx), Etype (Elsex))) + or else + (Nkind (Elsex) = N_Slice + and then Is_Constrained (Etype (Prefix (Elsex))) + and then Compile_Time_Known_Bounds (Etype (Prefix (Elsex))) + and then + OK_For_Single_Subtype (Etype (Thenx), Etype (Prefix (Elsex))))) + and then not Generate_C_Code + then + declare + Ityp : constant Entity_Id := Base_Type (Etype (First_Index (Typ))); + + function Build_New_Bound + (Then_Bnd : Uint; + Else_Bnd : Uint; + Slice_Bnd : Node_Id) return Node_Id; + -- Build a new bound from the bounds of the if expression + + function To_Ityp (V : Uint) return Node_Id; + -- Convert V to an index value in Ityp + + --------------------- + -- Build_New_Bound -- + --------------------- + + function Build_New_Bound + (Then_Bnd : Uint; + Else_Bnd : Uint; + Slice_Bnd : Node_Id) return Node_Id is + + begin + if Nkind (Elsex) = N_Slice then + if Compile_Time_Known_Value (Slice_Bnd) + and then Expr_Value (Slice_Bnd) = Then_Bnd + then + return To_Ityp (Then_Bnd); + + else + return Make_If_Expression (Loc, + Expressions => New_List ( + Duplicate_Subexpr (Cond), + To_Ityp (Then_Bnd), + New_Copy_Tree (Slice_Bnd))); + end if; + + elsif Then_Bnd = Else_Bnd then + return To_Ityp (Then_Bnd); + + else + return Make_If_Expression (Loc, + Expressions => New_List ( + Duplicate_Subexpr (Cond), + To_Ityp (Then_Bnd), + To_Ityp (Else_Bnd))); + end if; + end Build_New_Bound; + + ------------- + -- To_Ityp -- + ------------- + + function To_Ityp (V : Uint) return Node_Id is + Result : constant Node_Id := Make_Integer_Literal (Loc, V); + + begin + if Is_Enumeration_Type (Ityp) then + return + Make_Attribute_Reference (Loc, + Prefix => New_Occurrence_Of (Ityp, Loc), + Attribute_Name => Name_Val, + Expressions => New_List (Result)); + else + return Result; + end if; + end To_Ityp; + + Ent : Node_Id; + Slice_Lo, Slice_Hi : Node_Id; + Subtyp_Ind : Node_Id; + Else_Lo, Else_Hi : Uint; + Min_Lo, Max_Hi : Uint; + Then_Lo, Then_Hi : Uint; + Then_List, Else_List : List_Id; + + begin + Get_First_Index_Bounds (Etype (Thenx), Then_Lo, Then_Hi); + + if Nkind (Elsex) = N_Slice then + Slice_Lo := Low_Bound (Discrete_Range (Elsex)); + Slice_Hi := High_Bound (Discrete_Range (Elsex)); + Get_First_Index_Bounds + (Etype (Prefix (Elsex)), Else_Lo, Else_Hi); + + else + Slice_Lo := Empty; + Slice_Hi := Empty; + Get_First_Index_Bounds (Etype (Elsex), Else_Lo, Else_Hi); + end if; + + Min_Lo := UI_Min (Then_Lo, Else_Lo); + Max_Hi := UI_Max (Then_Hi, Else_Hi); + + -- Now we construct an array object with appropriate bounds and + -- mark it as internal to prevent useless initialization when + -- Initialize_Scalars is enabled. Also since this is the actual + -- result entity, we make sure we have debug information for it. + + Subtyp_Ind := + Make_Subtype_Indication (Loc, + Subtype_Mark => New_Occurrence_Of (Typ, Loc), + Constraint => + Make_Index_Or_Discriminant_Constraint (Loc, + Constraints => New_List ( + Make_Range (Loc, + Low_Bound => To_Ityp (Min_Lo), + High_Bound => To_Ityp (Max_Hi))))); + + Ent := Make_Temporary (Loc, 'C'); + Set_Is_Internal (Ent); + Set_Debug_Info_Needed (Ent); + + Decl := + Make_Object_Declaration (Loc, + Defining_Identifier => Ent, + Object_Definition => Subtyp_Ind); + + -- If the result of the expression appears as the initializing + -- expression of an object declaration, we can just rename the + -- result, rather than copying it. + + Mutate_Ekind (Ent, E_Variable); + Set_OK_To_Rename (Ent); + + Then_List := New_List ( + Make_Assignment_Statement (Loc, + Name => + Make_Slice (Loc, + Prefix => New_Occurrence_Of (Ent, Loc), + Discrete_Range => + Make_Range (Loc, + Low_Bound => To_Ityp (Then_Lo), + High_Bound => To_Ityp (Then_Hi))), + Expression => Relocate_Node (Thenx))); + + Set_Suppress_Assignment_Checks (Last (Then_List)); + + if Nkind (Elsex) = N_Slice then + Else_List := New_List ( + Make_Assignment_Statement (Loc, + Name => + Make_Slice (Loc, + Prefix => New_Occurrence_Of (Ent, Loc), + Discrete_Range => + Make_Range (Loc, + Low_Bound => New_Copy_Tree (Slice_Lo), + High_Bound => New_Copy_Tree (Slice_Hi))), + Expression => Relocate_Node (Elsex))); + + else + Else_List := New_List ( + Make_Assignment_Statement (Loc, + Name => + Make_Slice (Loc, + Prefix => New_Occurrence_Of (Ent, Loc), + Discrete_Range => + Make_Range (Loc, + Low_Bound => To_Ityp (Else_Lo), + High_Bound => To_Ityp (Else_Hi))), + Expression => Relocate_Node (Elsex))); + end if; + + Set_Suppress_Assignment_Checks (Last (Else_List)); + + New_If := + Make_Implicit_If_Statement (N, + Condition => Duplicate_Subexpr (Cond), + Then_Statements => Then_List, + Else_Statements => Else_List); + + New_N := + Make_Slice (Loc, + Prefix => New_Occurrence_Of (Ent, Loc), + Discrete_Range => Make_Range (Loc, + Low_Bound => Build_New_Bound (Then_Lo, Else_Lo, Slice_Lo), + High_Bound => Build_New_Bound (Then_Hi, Else_Hi, Slice_Hi))); + end; + -- If the result is an unconstrained array and the if expression is in a -- context other than the initializing expression of the declaration of -- an object, then we pull out the if expression as follows: @@ -6223,7 +6465,7 @@ package body Exp_Ch4 is end if; -- For the sake of GNATcoverage, generate an intermediate temporary in - -- the case where the if-expression is a condition in an outer decision, + -- the case where the if expression is a condition in an outer decision, -- in order to make sure that no branch is shared between the decisions. elsif Opt.Suppress_Control_Flow_Optimizations @@ -13400,10 +13642,16 @@ package body Exp_Ch4 is -- This follows Sem_Eval.Compile_Time_Known_Bounds - Typ := Underlying_Type (Etype (First_Index (T))); + if Ekind (T) = E_String_Literal_Subtype then + Lo := Expr_Value (String_Literal_Low_Bound (T)); + Hi := Lo + String_Literal_Length (T) - 1; - Lo := Expr_Value (Type_Low_Bound (Typ)); - Hi := Expr_Value (Type_High_Bound (Typ)); + else + Typ := Underlying_Type (Etype (First_Index (T))); + + Lo := Expr_Value (Type_Low_Bound (Typ)); + Hi := Expr_Value (Type_High_Bound (Typ)); + end if; end Get_First_Index_Bounds; ------------------------ diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 57c6438..a9099e3 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -2299,7 +2299,7 @@ package Sinfo is -- can be set in N_Object_Declaration nodes, to similarly suppress any -- checks on the initializing value. In assignment statements it also -- suppresses access checks in the generated code for out- and in-out - -- parameters in entry calls. + -- parameters in entry calls, as well as length checks. -- Suppress_Loop_Warnings -- Used in N_Loop_Statement node to indicate that warnings within the diff --git a/gcc/ada/uintp.ads b/gcc/ada/uintp.ads index 55f5b97..1b408fc 100644 --- a/gcc/ada/uintp.ads +++ b/gcc/ada/uintp.ads @@ -70,6 +70,7 @@ package Uintp is Uint_80 : constant Uint; Uint_127 : constant Uint; Uint_128 : constant Uint; + Uint_256 : constant Uint; Uint_Minus_1 : constant Uint; Uint_Minus_2 : constant Uint; @@ -507,6 +508,7 @@ private Uint_80 : constant Uint := Uint (Uint_Direct_Bias + 80); Uint_127 : constant Uint := Uint (Uint_Direct_Bias + 127); Uint_128 : constant Uint := Uint (Uint_Direct_Bias + 128); + Uint_256 : constant Uint := Uint (Uint_Direct_Bias + 256); Uint_Minus_1 : constant Uint := Uint (Uint_Direct_Bias - 1); Uint_Minus_2 : constant Uint := Uint (Uint_Direct_Bias - 2); -- cgit v1.1 From e0cd23986ed4fcfbb71ab44959ca18299412e706 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Tue, 31 May 2022 12:22:21 +0200 Subject: [Ada] Refactor duplicated resolution of Count and Index attributes Attribute Index, which was added to Ada 2022 by AI12-0143, is resolved just like attribute Count. However, code duplication rightly triggered a CodePeer warning. gcc/ada/ * sem_attr.adb (Resolve_Attribute): Refactor duplicated code for Count and Index attributes. --- gcc/ada/sem_attr.adb | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index c0998a5..20849bf 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -12300,7 +12300,9 @@ package body Sem_Attr is -- if it is an element of an entry family, the index itself may -- have to be resolved because it can be a general expression. - when Attribute_Count => + when Attribute_Count + | Attribute_Index + => if Nkind (P) = N_Indexed_Component and then Is_Entity_Name (Prefix (P)) then @@ -12338,19 +12340,7 @@ package body Sem_Attr is -- Index -- ----------- - when Attribute_Index => - if Nkind (P) = N_Indexed_Component - and then Is_Entity_Name (Prefix (P)) - then - declare - Indx : constant Node_Id := First (Expressions (P)); - Fam : constant Entity_Id := Entity (Prefix (P)); - - begin - Resolve (Indx, Entry_Index_Type (Fam)); - Apply_Scalar_Range_Check (Indx, Entry_Index_Type (Fam)); - end; - end if; + -- Processing is shared with Count ---------------- -- Loop_Entry -- -- cgit v1.1 From 2f94aea27c0bbc2f174176bff9fece9626a5ee0a Mon Sep 17 00:00:00 2001 From: Doug Rupp Date: Thu, 19 May 2022 13:41:27 -0700 Subject: [Ada] Makefile.rtl: remove references t oVxworks RTP Cert .spec files gcc/ada/ * Makefile.rtl (GCC_SPEC_FILES): Remove vxworks cert files. --- gcc/ada/Makefile.rtl | 7 ------- 1 file changed, 7 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 09395d3..03429f6 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -1205,10 +1205,8 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworksspe vxworks7% vxworks7spe else GCC_SPEC_FILES+=vxworks7-rtp-base-link.spec endif - GCC_SPEC_FILES+=vxworks7-cert-rtp-link__ppcXX.spec else GCC_SPEC_FILES+=vxworks-$(ARCH_STR)-link.spec - GCC_SPEC_FILES+=vxworks-cert-$(ARCH_STR)-link.spec GCC_SPEC_FILES+=vxworks-smp-$(ARCH_STR)-link.spec endif endif @@ -1349,10 +1347,8 @@ ifeq ($(strip $(filter-out %86 x86_64 wrs vxworks vxworks7%,$(target_cpu) $(targ ifeq ($(strip $(filter-out vxworks7%, $(target_os))),) GCC_SPEC_FILES+=vxworks7-$(X86CPU)-rtp-base-link.spec - GCC_SPEC_FILES+=vxworks7-cert-rtp-link.spec else GCC_SPEC_FILES+=vxworks-x86-link.spec - GCC_SPEC_FILES+=vxworks-cert-x86-link.spec GCC_SPEC_FILES+=vxworks-smp-x86-link.spec endif endif @@ -1476,9 +1472,6 @@ ifeq ($(strip $(filter-out aarch64 arm% coff wrs vx%,$(target_cpu) $(target_vend GCC_SPEC_FILES+=vxworks-smp-arm-link.spec endif endif - ifeq ($(strip $(filter-out vxworks7%, $(target_os))),) - GCC_SPEC_FILES+=vxworks7-cert-rtp-link.spec - endif endif # ARM android -- cgit v1.1 From aa683f5c03673210edc89d1057868f59583570ea Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 31 May 2022 13:20:46 +0200 Subject: [Ada] Small housekeeping work in Expand_N_Object_Declaration The local function Rewrite_As_Renaming can be called twice in certain circumstances, which is both not quite safe and unnecessary, so this replaces it with a local variable whose value is computed only once. No functional changes. gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration) : New local function. : Change to a local variable whose value is computed once and generate a call to Finalize after this is done. Simplify the code creating the renaming at the end. --- gcc/ada/exp_ch3.adb | 256 ++++++++++++++++++++++++---------------------------- 1 file changed, 119 insertions(+), 137 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 9759c8d..143e330 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -6173,7 +6173,7 @@ package body Exp_Ch3 is Obj_Def : constant Node_Id := Object_Definition (N); Typ : constant Entity_Id := Etype (Def_Id); Base_Typ : constant Entity_Id := Base_Type (Typ); - Expr_Q : Node_Id; + Next_N : constant Node_Id := Next (N); function Build_Equivalent_Aggregate return Boolean; -- If the object has a constrained discriminated type and no initial @@ -6193,9 +6193,8 @@ package body Exp_Ch3 is -- Generate all default initialization actions for object Def_Id. Any -- new code is inserted after node After. - function Rewrite_As_Renaming return Boolean; - -- Indicate whether to rewrite a declaration with initialization into an - -- object renaming declaration (see below). + function OK_To_Rename_Ref (N : Node_Id) return Boolean; + -- Return True if N denotes an entity with OK_To_Rename set -------------------------------- -- Build_Equivalent_Aggregate -- @@ -6801,91 +6800,21 @@ package body Exp_Ch3 is end if; end Default_Initialize_Object; - ------------------------- - -- Rewrite_As_Renaming -- - ------------------------- - - function Rewrite_As_Renaming return Boolean is - - function OK_To_Rename_Entity_Name (N : Node_Id) return Boolean; - -- Return True if N denotes an entity with OK_To_Rename set - - ------------------------------ - -- OK_To_Rename_Entity_Name -- - ------------------------------ - - function OK_To_Rename_Entity_Name (N : Node_Id) return Boolean is - begin - return Is_Entity_Name (N) - and then Ekind (Entity (N)) = E_Variable - and then OK_To_Rename (Entity (N)); - end OK_To_Rename_Entity_Name; - - Result : constant Boolean := - - -- If the object declaration appears in the form - - -- Obj : Typ := Func (...); - - -- where Typ both needs finalization and is returned on the secondary - -- stack, the object declaration can be rewritten into a dereference - -- of the reference to the result built on the secondary stack (see - -- Expand_Ctrl_Function_Call for this expansion of the call): - - -- type Axx is access all Typ; - -- Rxx : constant Axx := Func (...)'reference; - -- Obj : Typ renames Rxx.all; - - -- This avoids an extra copy and the pair of Adjust/Finalize calls. - - (not Is_Library_Level_Entity (Def_Id) - and then Nkind (Expr_Q) = N_Explicit_Dereference - and then not Comes_From_Source (Expr_Q) - and then Nkind (Original_Node (Expr_Q)) = N_Function_Call - and then Needs_Finalization (Typ) - and then not Is_Class_Wide_Type (Typ)) - - -- If the initializing expression is for a variable with attribute - -- OK_To_Rename set, then transform: - - -- Obj : Typ := Expr; - - -- into - - -- Obj : Typ renames Expr; - - -- provided that Obj is not aliased. The aliased case has to be - -- excluded in general because Expr will not be aliased in general. + ---------------------- + -- OK_To_Rename_Ref -- + ---------------------- - or else - (not Aliased_Present (N) - and then (OK_To_Rename_Entity_Name (Expr_Q) - or else - (Nkind (Expr_Q) = N_Slice - and then - OK_To_Rename_Entity_Name (Prefix (Expr_Q))))); + function OK_To_Rename_Ref (N : Node_Id) return Boolean is begin - return Result - - -- The declaration cannot be rewritten if it has got constraints, - -- in other words the nominal subtype must be unconstrained. - - and then Is_Entity_Name (Original_Node (Obj_Def)) - - -- ??? Return False if there are any aspect specifications, because - -- otherwise we duplicate that corresponding implicit attribute - -- definition, and call Insert_Action, which has no place to insert - -- the attribute definition. The attribute definition is stored in - -- Aspect_Rep_Item, which is not a list. - - and then No (Aspect_Specifications (N)); - end Rewrite_As_Renaming; + return Is_Entity_Name (N) + and then Ekind (Entity (N)) = E_Variable + and then OK_To_Rename (Entity (N)); + end OK_To_Rename_Ref; -- Local variables - Next_N : constant Node_Id := Next (N); - Adj_Call : Node_Id; + Expr_Q : Node_Id; Id_Ref : Node_Id; Tag_Assign : Node_Id; @@ -6895,6 +6824,9 @@ package body Exp_Ch3 is -- which case the init proc call must be inserted only after the bodies -- of the shared variable procedures have been seen. + Rewrite_As_Renaming : Boolean := False; + -- Whether to turn the declaration into a renaming at the end + -- Start of processing for Expand_N_Object_Declaration begin @@ -7442,33 +7374,6 @@ package body Exp_Ch3 is end if; end if; - -- If the type needs finalization and is not inherently limited, - -- then the target is adjusted after the copy and attached to the - -- finalization list. However, no adjustment is needed in the case - -- where the object has been initialized by a call to a function - -- returning on the primary stack (see Expand_Ctrl_Function_Call) - -- since no copy occurred, given that the type is by-reference. - -- Similarly, no adjustment is needed if we are going to rewrite - -- the object declaration into a renaming declaration. - - if Needs_Finalization (Typ) - and then not Is_Limited_View (Typ) - and then Nkind (Expr_Q) /= N_Function_Call - and then not Rewrite_As_Renaming - then - Adj_Call := - Make_Adjust_Call ( - Obj_Ref => New_Occurrence_Of (Def_Id, Loc), - Typ => Base_Typ); - - -- Guard against a missing [Deep_]Adjust when the base type - -- was not properly frozen. - - if Present (Adj_Call) then - Insert_Action_After (Init_After, Adj_Call); - end if; - end if; - -- For tagged types, when an init value is given, the tag has to -- be re-initialized separately in order to avoid the propagation -- of a wrong tag coming from a view conversion unless the type @@ -7587,6 +7492,91 @@ package body Exp_Ch3 is Set_Is_Known_Valid (Def_Id); end if; end if; + + -- Now determine whether we will use a renaming + + Rewrite_As_Renaming := + + -- If the object declaration appears in the form + + -- Obj : Typ := Func (...); + + -- where Typ needs finalization and is returned on the secondary + -- stack, the declaration can be rewritten into a dereference of + -- the reference to the result built on the secondary stack (see + -- Expand_Ctrl_Function_Call for this expansion of the call): + + -- type Axx is access all Typ; + -- Rxx : constant Axx := Func (...)'reference; + -- Obj : Typ renames Rxx.all; + + -- This avoids an extra copy and a pair of Adjust/Finalize calls + + ((not Is_Library_Level_Entity (Def_Id) + and then Nkind (Expr_Q) = N_Explicit_Dereference + and then not Comes_From_Source (Expr_Q) + and then Nkind (Original_Node (Expr_Q)) = N_Function_Call + and then Needs_Finalization (Typ) + and then not Is_Class_Wide_Type (Typ)) + + -- If the initializing expression is for a variable with flag + -- OK_To_Rename set, then transform: + + -- Obj : Typ := Expr; + + -- into + + -- Obj : Typ renames Expr; + + -- provided that Obj is not aliased. The aliased case has to + -- be excluded because Expr will not be aliased in general. + + or else (not Aliased_Present (N) + and then (OK_To_Rename_Ref (Expr_Q) + or else + (Nkind (Expr_Q) = N_Slice + and then + OK_To_Rename_Ref (Prefix (Expr_Q)))))) + + -- The declaration cannot be rewritten if it has got constraints + -- in other words the nominal subtype must be unconstrained. + + and then Is_Entity_Name (Original_Node (Obj_Def)) + + -- ??? Likewise if there are any aspect specifications, because + -- otherwise we duplicate that corresponding implicit attribute + -- definition and call Insert_Action, which has no place for the + -- attribute definition. The attribute definition is stored in + -- Aspect_Rep_Item, which is not a list. + + and then No (Aspect_Specifications (N)); + + -- If the type needs finalization and is not inherently limited, + -- then the target is adjusted after the copy and attached to the + -- finalization list. However, no adjustment is needed in the case + -- where the object has been initialized by a call to a function + -- returning on the primary stack (see Expand_Ctrl_Function_Call) + -- since no copy occurred, given that the type is by-reference. + -- Similarly, no adjustment is needed if we are going to rewrite + -- the object declaration into a renaming declaration. + + if Needs_Finalization (Typ) + and then not Is_Limited_View (Typ) + and then Nkind (Expr_Q) /= N_Function_Call + and then not Rewrite_As_Renaming + then + Adj_Call := + Make_Adjust_Call ( + Obj_Ref => New_Occurrence_Of (Def_Id, Loc), + Typ => Base_Typ); + + -- Guard against a missing [Deep_]Adjust when the base type + -- was not properly frozen. + + if Present (Adj_Call) then + Insert_Action_After (Init_After, Adj_Call); + end if; + end if; end if; -- Cases where the back end cannot handle the initialization @@ -7714,40 +7704,32 @@ package body Exp_Ch3 is -- declaration, then this transformation generates what would be -- illegal code if written by hand, but that's OK. - if Present (Expr) then - if Rewrite_As_Renaming then - Rewrite (N, - Make_Object_Renaming_Declaration (Loc, - Defining_Identifier => Defining_Identifier (N), - Subtype_Mark => Obj_Def, - Name => Expr_Q)); + if Rewrite_As_Renaming then + Rewrite (N, + Make_Object_Renaming_Declaration (Loc, + Defining_Identifier => Defining_Identifier (N), + Subtype_Mark => Obj_Def, + Name => Expr_Q)); - -- We do not analyze this renaming declaration, because all its - -- components have already been analyzed, and if we were to go - -- ahead and analyze it, we would in effect be trying to generate - -- another declaration of X, which won't do. + -- We do not analyze this renaming declaration, because all its + -- components have already been analyzed, and if we were to go + -- ahead and analyze it, we would in effect be trying to generate + -- another declaration of X, which won't do. - Set_Renamed_Object (Defining_Identifier (N), Expr_Q); - Set_Analyzed (N); + Set_Renamed_Object (Defining_Identifier (N), Expr_Q); + Set_Analyzed (N); - -- We do need to deal with debug issues for this renaming + -- We do need to deal with debug issues for this renaming - -- First, if entity comes from source, then mark it as needing - -- debug information, even though it is defined by a generated - -- renaming that does not come from source. + -- First, if entity comes from source, then mark it as needing + -- debug information, even though it is defined by a generated + -- renaming that does not come from source. - Set_Debug_Info_Defining_Id (N); + Set_Debug_Info_Defining_Id (N); - -- Now call the routine to generate debug info for the renaming + -- Now call the routine to generate debug info for the renaming - declare - Decl : constant Node_Id := Debug_Renaming_Declaration (N); - begin - if Present (Decl) then - Insert_Action (N, Decl); - end if; - end; - end if; + Insert_Action (N, Debug_Renaming_Declaration (N)); end if; -- Exception on library entity not available -- cgit v1.1 From 4dab9bed7bd173e55fa44b9d8f4a01dfd8566553 Mon Sep 17 00:00:00 2001 From: Doug Rupp Date: Tue, 31 May 2022 10:28:54 -0700 Subject: [Ada] vx7r2: do not include s-qnx.ads in the kernel and rtp runtimes Target specific runtime files must be added to a the exclude list so the files don't automatically get copied to other runtimes. gcc/ada/ * Makefile.rtl (ADA_EXCLUDE_SRCS): Add s-qnx.ads. --- gcc/ada/Makefile.rtl | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc') diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 03429f6..fc1aac9 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -2937,6 +2937,7 @@ ADA_EXCLUDE_SRCS =\ s-linux.ads s-vxwext.adb s-vxwext.ads s-win32.ads s-winext.ads \ s-stchop.ads s-stchop.adb \ s-strcom.adb s-strcom.ads s-thread.ads \ + s-qnx.ads \ # ADA_EXCLUDE_SRCS without the sources used by the target ADA_EXCLUDE_FILES=$(filter-out \ -- cgit v1.1 From 1f03b43fc7552fe105d33612b3b89b4f0b222798 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 2 Jun 2022 00:45:14 +0200 Subject: [Ada] Fix dispatching call to primitive function with controlling tagged result When a dispatching call is made to a primitive function with a controlling tagged result, the call is dispatching on result and thus must return the class-wide type of the tagged type to accommodate all possible results. This was ensured by Expand_Dispatching_Call only in the common case where the result type is the type of the controlling argument, which does not cover the case of a primitive function inherited from an ancestor type. gcc/ada/ * exp_disp.adb (Expand_Dispatching_Call): Fix detection of calls that are dispatching on tagged result. --- gcc/ada/exp_disp.adb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb index 17043d1..3ac4b3b 100644 --- a/gcc/ada/exp_disp.adb +++ b/gcc/ada/exp_disp.adb @@ -896,8 +896,14 @@ package body Exp_Disp is Copy_Strub_Mode (Subp_Typ, Subp); Set_Convention (Subp_Typ, Convention (Subp)); - if Etype (Subp) = Typ then - Set_Etype (Subp_Typ, CW_Typ); + -- If this is a function and it has a controlling tagged result, then + -- the call is dispatching on result and returns the class-wide type. + + if Ekind (Subp) = E_Function + and then Has_Controlling_Result (Subp) + and then Is_Tagged_Type (Etype (Subp)) + then + Set_Etype (Subp_Typ, Class_Wide_Type (Etype (Subp))); Set_Returns_By_Ref (Subp_Typ, True); else Set_Etype (Subp_Typ, Etype (Subp)); -- cgit v1.1 From 8c6bef0a33e32e6a95dca7d50cd5be37e7262775 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 2 Jun 2022 01:00:48 +0200 Subject: [Ada] Do not make procedure call with only tag-indeternminate actuals dispatching The RM 3.9.2(19) clause says that the controlling tag value is statically determined to be the tag of the tagged type involved. As a matter of fact, the call would be made dispatching only as a by-product of the propagation of the controlling tag value to the tag-indeternminate actuals, but that's unnecessary and not done in the equivalent case of a procedure call with both statically tagged and tag-indeternminate actuals. gcc/ada/ * sem_disp.adb (Check_Dispatching_Call): Merge the two special cases where there are no controlling actuals but tag-indeternminate ones. --- gcc/ada/sem_disp.adb | 77 ++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 42 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb index 226142f..ee1d96e 100644 --- a/gcc/ada/sem_disp.adb +++ b/gcc/ada/sem_disp.adb @@ -540,8 +540,10 @@ package body Sem_Disp is Control : Node_Id := Empty; Func : Entity_Id; Subp_Entity : Entity_Id; - Indeterm_Ancestor_Call : Boolean := False; - Indeterm_Ctrl_Type : Entity_Id := Empty; -- init to avoid warning + + Indeterm_Ctrl_Type : Entity_Id := Empty; + -- Type of a controlling formal whose actual is a tag-indeterminate call + -- whose result type is different from, but is an ancestor of, the type. Static_Tag : Node_Id := Empty; -- If a controlling formal has a statically tagged actual, the tag of @@ -935,8 +937,7 @@ package body Sem_Disp is and then Base_Type (Etype (Actual)) /= Base_Type (Etype (Formal)) and then Is_Ancestor (Etype (Actual), Etype (Formal)) then - Indeterm_Ancestor_Call := True; - Indeterm_Ctrl_Type := Etype (Formal); + Indeterm_Ctrl_Type := Etype (Formal); -- If the formal is controlling but the actual is not, the type -- of the actual is statically known, and may be used as the @@ -946,39 +947,13 @@ package body Sem_Disp is and then Is_Entity_Name (Actual) and then Is_Tagged_Type (Etype (Actual)) then - Static_Tag := Actual; + Static_Tag := Etype (Actual); end if; Next_Actual (Actual); Next_Formal (Formal); end loop; - -- If the call doesn't have a controlling actual but does have an - -- indeterminate actual that requires dispatching treatment, then an - -- object is needed that will serve as the controlling argument for - -- a dispatching call on the indeterminate actual. This can occur - -- in the unusual situation of a default actual given by a tag- - -- indeterminate call and where the type of the call is an ancestor - -- of the type associated with a containing call to an inherited - -- operation (see AI-239). - - -- Rather than create an object of the tagged type, which would - -- be problematic for various reasons (default initialization, - -- discriminants), the tag of the containing call's associated - -- tagged type is directly used to control the dispatching. - - if No (Control) - and then Indeterm_Ancestor_Call - and then No (Static_Tag) - then - Control := - Make_Attribute_Reference (Loc, - Prefix => New_Occurrence_Of (Indeterm_Ctrl_Type, Loc), - Attribute_Name => Name_Tag); - - Analyze (Control); - end if; - if Present (Control) then -- Verify that no controlling arguments are statically tagged @@ -1030,17 +1005,35 @@ package body Sem_Disp is Check_Direct_Call; - -- If there is a statically tagged actual and a tag-indeterminate - -- call to a function of the ancestor (such as that provided by a - -- default), then treat this as a dispatching call and propagate - -- the tag to the tag-indeterminate call(s). - - elsif Present (Static_Tag) and then Indeterm_Ancestor_Call then - Control := - Make_Attribute_Reference (Loc, - Prefix => - New_Occurrence_Of (Etype (Static_Tag), Loc), - Attribute_Name => Name_Tag); + -- If the call doesn't have a controlling actual but does have an + -- indeterminate actual that requires dispatching treatment, then an + -- object is needed that will serve as the controlling argument for + -- a dispatching call on the indeterminate actual. This can occur + -- in the unusual situation of a default actual given by a tag- + -- indeterminate call and where the type of the call is an ancestor + -- of the type associated with a containing call to an inherited + -- operation (see AI-239). + + -- Rather than create an object of the tagged type, which would + -- be problematic for various reasons (default initialization, + -- discriminants), the tag of the containing call's associated + -- tagged type is directly used to control the dispatching. + + elsif Present (Indeterm_Ctrl_Type) then + if Present (Static_Tag) then + Control := + Make_Attribute_Reference (Loc, + Prefix => + New_Occurrence_Of (Static_Tag, Loc), + Attribute_Name => Name_Tag); + + else + Control := + Make_Attribute_Reference (Loc, + Prefix => + New_Occurrence_Of (Indeterm_Ctrl_Type, Loc), + Attribute_Name => Name_Tag); + end if; Analyze (Control); -- cgit v1.1 From d2a898666609452ef79a14feae1cadc3538e4b45 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 21 Jun 2022 16:17:58 +0200 Subject: Put virtual operands into loop-closed SSA When attempting to manually update SSA form after high-level loop transforms such as loop versioning it is helpful when the loop-closed SSA form includes virtual operands. While we have the special rewrite_virtuals_into_loop_closed_ssa function that doesn't presently scale, invoking update_ssa by itself. So the following makes the regular loop-closed SSA form also cover virtual operands. For users of loop_version this allows to use cheaper TODO_update_ssa_no_phi, skipping dominance frontier compute (for the whole function) and iterated dominance frontiers for each copied def. * tree-ssa-loop-manip.h (rewrite_virtuals_into_loop_closed_ssa): Remove. (rewrite_into_loop_closed_ssa_1): Likewise. * tree-ssa-loop-manip.cc (rewrite_into_loop_closed_ssa_1): Make static. (rewrite_into_loop_closed_ssa): Remove loop overload, always rewrite virtuals into LC SSA. (check_loop_closed_ssa_bb): Also check virtuals. * tree-ssa-dce.cc (remove_dead_phis): Preserve virtual LC PHIs when in LC SSA. * gimple-loop-jam.cc (fuse_loops): Do not rewrite into loop-closed SSA here, but ... (tree_loop_unroll_and_jam): ... here once. * tree-if-conv.cc (version_loop_for_if_conversion): Use the cheaper TODO_update_ssa_no_phi. * tree-loop-distribution.cc (version_loop_by_alias_check): Likewise. * tree-ssa-loop-unswitch.cc (tree_unswitch_single_loop): Likewise. * tree-vect-loop-manip.cc (vect_loop_versioning): Likewise. (tree_unswitch_outer_loop): Do not rewrite virtuals into LC ssa. * tree-parloops.cc (transform_to_exit_first_loop_alt): Likewise. (pass_parallelize_loops::execute): After finishing rewrite into LC SSA again because we do not maintain it properly. --- gcc/gimple-loop-jam.cc | 2 +- gcc/tree-if-conv.cc | 2 +- gcc/tree-loop-distribution.cc | 2 +- gcc/tree-parloops.cc | 10 +++------- gcc/tree-ssa-dce.cc | 3 ++- gcc/tree-ssa-loop-manip.cc | 23 +++++++---------------- gcc/tree-ssa-loop-manip.h | 3 --- gcc/tree-ssa-loop-unswitch.cc | 4 +--- gcc/tree-vect-loop-manip.cc | 2 +- 9 files changed, 17 insertions(+), 34 deletions(-) (limited to 'gcc') diff --git a/gcc/gimple-loop-jam.cc b/gcc/gimple-loop-jam.cc index 9b18b52..8cde6c7 100644 --- a/gcc/gimple-loop-jam.cc +++ b/gcc/gimple-loop-jam.cc @@ -363,7 +363,6 @@ fuse_loops (class loop *loop) delete_loop (next); next = ln; } - rewrite_into_loop_closed_ssa_1 (NULL, 0, SSA_OP_USE, loop); } /* Return true if any of the access functions for dataref A @@ -610,6 +609,7 @@ tree_loop_unroll_and_jam (void) if (todo) { + rewrite_into_loop_closed_ssa (NULL, 0); scev_reset (); free_dominance_info (CDI_DOMINATORS); } diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc index 3c659f6..1c8e1a4 100644 --- a/gcc/tree-if-conv.cc +++ b/gcc/tree-if-conv.cc @@ -2934,7 +2934,7 @@ version_loop_for_if_conversion (class loop *loop, vec *preds) if (preds) preds->safe_push (g); gsi_insert_before (&gsi, g, GSI_SAME_STMT); - update_ssa (TODO_update_ssa); + update_ssa (TODO_update_ssa_no_phi); return new_loop; } diff --git a/gcc/tree-loop-distribution.cc b/gcc/tree-loop-distribution.cc index 18b97fc..ed7f432 100644 --- a/gcc/tree-loop-distribution.cc +++ b/gcc/tree-loop-distribution.cc @@ -2751,7 +2751,7 @@ version_loop_by_alias_check (vec *partitions, gimple_stmt_iterator cond_gsi = gsi_last_bb (cond_bb); gsi_insert_seq_before (&cond_gsi, cond_stmts, GSI_SAME_STMT); } - update_ssa (TODO_update_ssa); + update_ssa (TODO_update_ssa_no_phi); } /* Return true if loop versioning is needed to distrubute PARTITIONS. diff --git a/gcc/tree-parloops.cc b/gcc/tree-parloops.cc index 2c3ef43..2d3aa78 100644 --- a/gcc/tree-parloops.cc +++ b/gcc/tree-parloops.cc @@ -2355,12 +2355,6 @@ transform_to_exit_first_loop_alt (class loop *loop, tree control = gimple_cond_lhs (cond_stmt); edge e; - /* Rewriting virtuals into loop-closed ssa normal form makes this - transformation simpler. It also ensures that the virtuals are in - loop-closed ssa normal from after the transformation, which is required by - create_parallel_loop. */ - rewrite_virtuals_into_loop_closed_ssa (loop); - /* Create the new_header block. */ basic_block new_header = split_block_before_cond_jump (exit->src); edge edge_at_split = single_pred_edge (new_header); @@ -4223,7 +4217,9 @@ pass_parallelize_loops::execute (function *fun) checking_verify_loop_structure (); - todo |= TODO_update_ssa; + update_ssa (TODO_update_ssa); + if (in_loop_pipeline) + rewrite_into_loop_closed_ssa (NULL, 0); } if (!in_loop_pipeline) diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc index 5df6492..bc53358 100644 --- a/gcc/tree-ssa-dce.cc +++ b/gcc/tree-ssa-dce.cc @@ -1026,7 +1026,8 @@ remove_dead_phis (basic_block bb) { /* Virtual PHI nodes with one or identical arguments can be removed. */ - if (degenerate_phi_p (phi)) + if (!loops_state_satisfies_p (LOOP_CLOSED_SSA) + && degenerate_phi_p (phi)) { tree vdef = gimple_phi_result (phi); tree vuse = gimple_phi_arg_def (phi, 0); diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc index 5d43563..623d03b 100644 --- a/gcc/tree-ssa-loop-manip.cc +++ b/gcc/tree-ssa-loop-manip.cc @@ -625,7 +625,7 @@ find_uses_to_rename_in_loop (class loop *loop, bitmap *use_blocks, UPDATE_FLAG is used in the call to update_ssa. See TODO_update_ssa* for documentation. */ -void +static void rewrite_into_loop_closed_ssa_1 (bitmap changed_bbs, unsigned update_flag, int use_flags, class loop *loop) { @@ -686,24 +686,16 @@ rewrite_into_loop_closed_ssa_1 (bitmap changed_bbs, unsigned update_flag, free (use_blocks); } -/* Rewrites the non-virtual defs and uses into a loop closed ssa form. If - CHANGED_BBS is not NULL, we look for uses outside loops only in the basic +/* Rewrites the defs and uses into a loop closed ssa form. + If CHANGED_BBS is not NULL, we look for uses outside loops only in the basic blocks in this set. UPDATE_FLAG is used in the call to update_ssa. See TODO_update_ssa* for documentation. */ void rewrite_into_loop_closed_ssa (bitmap changed_bbs, unsigned update_flag) { - rewrite_into_loop_closed_ssa_1 (changed_bbs, update_flag, SSA_OP_USE, NULL); -} - -/* Rewrites virtual defs and uses with def in LOOP into loop closed ssa - form. */ - -void -rewrite_virtuals_into_loop_closed_ssa (class loop *loop) -{ - rewrite_into_loop_closed_ssa_1 (NULL, 0, SSA_OP_VIRTUAL_USES, loop); + rewrite_into_loop_closed_ssa_1 (changed_bbs, update_flag, + SSA_OP_ALL_USES, NULL); } /* Check invariants of the loop closed ssa form for the def in DEF_BB. */ @@ -736,8 +728,7 @@ check_loop_closed_ssa_bb (basic_block bb) { gphi *phi = bsi.phi (); - if (!virtual_operand_p (PHI_RESULT (phi))) - check_loop_closed_ssa_def (bb, PHI_RESULT (phi)); + check_loop_closed_ssa_def (bb, PHI_RESULT (phi)); } for (gimple_stmt_iterator bsi = gsi_start_nondebug_bb (bb); !gsi_end_p (bsi); @@ -747,7 +738,7 @@ check_loop_closed_ssa_bb (basic_block bb) tree var; gimple *stmt = gsi_stmt (bsi); - FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_DEF) + FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_ALL_DEFS) check_loop_closed_ssa_def (bb, var); } } diff --git a/gcc/tree-ssa-loop-manip.h b/gcc/tree-ssa-loop-manip.h index 0029319..924cac0 100644 --- a/gcc/tree-ssa-loop-manip.h +++ b/gcc/tree-ssa-loop-manip.h @@ -24,10 +24,7 @@ typedef void (*transform_callback)(class loop *, void *); extern void create_iv (tree, tree, tree, class loop *, gimple_stmt_iterator *, bool, tree *, tree *); -extern void rewrite_into_loop_closed_ssa_1 (bitmap, unsigned, int, - class loop *); extern void rewrite_into_loop_closed_ssa (bitmap, unsigned); -extern void rewrite_virtuals_into_loop_closed_ssa (class loop *); extern void verify_loop_closed_ssa (bool, class loop * = NULL); static inline void diff --git a/gcc/tree-ssa-loop-unswitch.cc b/gcc/tree-ssa-loop-unswitch.cc index 3a827f2..7d6781d 100644 --- a/gcc/tree-ssa-loop-unswitch.cc +++ b/gcc/tree-ssa-loop-unswitch.cc @@ -980,7 +980,7 @@ tree_unswitch_single_loop (class loop *loop, dump_user_location_t loc, free_original_copy_tables (); /* Update the SSA form after unswitching. */ - update_ssa (TODO_update_ssa); + update_ssa (TODO_update_ssa_no_phi); /* Invoke itself on modified loops. */ bitmap handled_copy = BITMAP_ALLOC (NULL); @@ -1068,8 +1068,6 @@ tree_unswitch_outer_loop (class loop *loop) auto_vec dbg_to_reset; while ((guard = find_loop_guard (loop, dbg_to_reset))) { - if (! changed) - rewrite_virtuals_into_loop_closed_ssa (loop); hoist_guard (loop, guard); for (gimple *debug_stmt : dbg_to_reset) { diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index e81de45..47c4fe8 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -3696,7 +3696,7 @@ vect_loop_versioning (loop_vec_info loop_vinfo, } } - update_ssa (TODO_update_ssa); + update_ssa (TODO_update_ssa_no_phi); } /* Split the cost model check off to a separate BB. Costing assumes -- cgit v1.1 From 4e82205b68024f5c1a9006fe2b62e1a0fa7f1245 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Fri, 1 Jul 2022 13:20:42 +0200 Subject: Integrate nonzero bits with irange. The nonzero bits and integer ranges compliment each other quite well, and it only makes sense to make the mask a first class citizen in the irange. We do a half assed job of keeping ranges and nonzero bits somewhat in sync in SSA_NAME_RANGE_INFO, and the goal has always been to integrate them properly. This patch does that, in preparation for streaming out full-resolution iranges between passes (think SSA_NAME_RANGE_INFO). Having nonzero bits in the irange allows us to get better results from things like irange::contains_p() and keeping them in the irange allows us to propagate the bits throughout with the ranger. This patch provides the bare infrastructure, without any optimizations to range-ops, etc. Those will come as follow-ups. A few notes: Legacy SSA_NAME_RANGE_INFO updates the nonzero bits every time a range is set. Here instead, we don't update the nonzero bits on a new range, but calculate it on the fly when irange::get_nonzero_bits() is called. The goal is to only store nonzero bits that provide meaningful information that can't be gleaned from the range itself. But you can always call get_nonzero_bits() and get the full information. Nonzero bits are not supported in legacy mode. The mask may be set as a consequence of propagation or reading global ranges, but no one from legacy land should be querying irange::get_nonzero_bits. There is an assert enforcing this. However, legacy/global set_nonzero_bits() continue to work as before. There is no change to legacy behavior. There is virtually no performance change with this patch, as there are no consumers. The next patch I post will be the SSA_NAME_RANGE_INFO conversion to the new world, in which I will discuss performance proper. Hint: I'll be chewing up the time budget we gained with the vrange conversion. Tested and benchmarked on x86-64 Linux. gcc/ChangeLog: * value-range-storage.cc (irange_storage_slot::set_irange): Set nonzero bits in irange. (irange_storage_slot::get_irange): Get nonzero bits from irange. * value-range.cc (irange::operator=): Set nonzero bits. (irange::irange_set): Same. (irange::irange_set_anti_range): Same. (irange::set): Same. (irange::verify_range): Same. (irange::legacy_equal_p): Check nonzero bits. (irange::equal_p): Same. (irange::contains_p): Handle nonzero bits. (irange::irange_union): Same. (irange::irange_intersect): Same. (irange::dump): Same. (irange::set_nonzero_bits): New. (irange::get_nonzero_bits): New. (irange::intersect_nonzero_bits): New. (irange::union_nonzero_bits): New. (irange::dump_bitmasks): New. * value-range.h (class irange): Add m_nonzero_mask. (gt_ggc_mx): Handle nonzero bits. (gt_pch_nx): Same. (irange::set_undefined): Set nonzero bits. (irange::set_varying): Same. (irange::normalize_kind): Call set_undefined. --- gcc/value-range-storage.cc | 9 ++- gcc/value-range.cc | 177 ++++++++++++++++++++++++++++++++++++++++++--- gcc/value-range.h | 20 ++++- 3 files changed, 193 insertions(+), 13 deletions(-) (limited to 'gcc') diff --git a/gcc/value-range-storage.cc b/gcc/value-range-storage.cc index ea9b18f..ac62bfa 100644 --- a/gcc/value-range-storage.cc +++ b/gcc/value-range-storage.cc @@ -131,7 +131,12 @@ irange_storage_slot::set_irange (const irange &r) { gcc_checking_assert (fits_p (r)); - //m_ints[0] = r.get_nonzero_bits (); + // Avoid calling unsupported get_nonzero_bits on legacy. + if (r.legacy_mode_p ()) + m_ints[0] = -1; + else + m_ints[0] = r.get_nonzero_bits (); + unsigned pairs = r.num_pairs (); for (unsigned i = 0; i < pairs; ++i) { @@ -154,7 +159,7 @@ irange_storage_slot::get_irange (irange &r, tree type) const int_range<2> tmp (type, m_ints[i], m_ints[i + 1]); r.union_ (tmp); } - //r.set_nonzero_bits (get_nonzero_bits ()); + r.set_nonzero_bits (get_nonzero_bits ()); } // Return the size in bytes to allocate a slot that can hold R. diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 574c510..25f1acf 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -274,6 +274,7 @@ irange::operator= (const irange &src) m_num_ranges = lim; m_kind = src.m_kind; + m_nonzero_mask = src.m_nonzero_mask; return *this; } @@ -393,6 +394,7 @@ irange::irange_set (tree min, tree max) m_num_ranges = 1; m_kind = VR_RANGE; normalize_kind (); + m_nonzero_mask = NULL; if (flag_checking) verify_range (); @@ -466,6 +468,7 @@ irange::irange_set_anti_range (tree min, tree max) m_kind = VR_RANGE; normalize_kind (); + m_nonzero_mask = NULL; if (flag_checking) verify_range (); @@ -524,6 +527,7 @@ irange::set (tree min, tree max, value_range_kind kind) m_base[0] = min; m_base[1] = max; m_num_ranges = 1; + m_nonzero_mask = NULL; return; } @@ -574,6 +578,7 @@ irange::set (tree min, tree max, value_range_kind kind) m_base[1] = max; m_num_ranges = 1; normalize_kind (); + m_nonzero_mask = NULL; if (flag_checking) verify_range (); } @@ -587,8 +592,11 @@ irange::verify_range () if (m_kind == VR_UNDEFINED) { gcc_checking_assert (m_num_ranges == 0); + gcc_checking_assert (!m_nonzero_mask); return; } + if (m_nonzero_mask) + gcc_checking_assert (wi::to_wide (m_nonzero_mask) != -1); if (m_kind == VR_VARYING) { gcc_checking_assert (m_num_ranges == 1); @@ -680,11 +688,15 @@ irange::legacy_equal_p (const irange &other) const if (m_kind == VR_UNDEFINED) return true; if (m_kind == VR_VARYING) - return range_compatible_p (type (), other.type ()); + { + return (range_compatible_p (type (), other.type ()) + && vrp_operand_equal_p (m_nonzero_mask, other.m_nonzero_mask)); + } return (vrp_operand_equal_p (tree_lower_bound (0), other.tree_lower_bound (0)) && vrp_operand_equal_p (tree_upper_bound (0), - other.tree_upper_bound (0))); + other.tree_upper_bound (0)) + && vrp_operand_equal_p (m_nonzero_mask, other.m_nonzero_mask)); } bool @@ -716,7 +728,7 @@ irange::operator== (const irange &other) const || !operand_equal_p (ub, ub_other, 0)) return false; } - return true; + return vrp_operand_equal_p (m_nonzero_mask, other.m_nonzero_mask); } /* Return TRUE if this is a symbolic range. */ @@ -858,6 +870,14 @@ irange::contains_p (tree cst) const } gcc_checking_assert (TREE_CODE (cst) == INTEGER_CST); + + if (m_nonzero_mask) + { + wide_int cstw = wi::to_wide (cst); + if (cstw != 0 && wi::bit_and (wi::to_wide (m_nonzero_mask), cstw) == 0) + return false; + } + signop sign = TYPE_SIGN (TREE_TYPE (cst)); wide_int v = wi::to_wide (cst); for (unsigned r = 0; r < m_num_ranges; ++r) @@ -1809,22 +1829,40 @@ irange::irange_union (const irange &r) { gcc_checking_assert (!legacy_mode_p () && !r.legacy_mode_p ()); - if (r.undefined_p () || varying_p ()) + if (r.undefined_p ()) return false; - if (undefined_p () || r.varying_p ()) + if (undefined_p ()) { operator= (r); return true; } + // Save the nonzero mask in case the set operations below clobber it. + bool ret_nz = union_nonzero_bits (r); + tree saved_nz = m_nonzero_mask; + + if (varying_p ()) + return ret_nz; + + if (r.varying_p ()) + { + set_varying (r.type ()); + set_nonzero_bits (saved_nz); + return true; + } + // Special case one range union one range. if (m_num_ranges == 1 && r.m_num_ranges == 1) - return irange_single_pair_union (r); + { + bool ret = irange_single_pair_union (r); + set_nonzero_bits (saved_nz); + return ret || ret_nz; + } // If this ranges fully contains R, then we need do nothing. if (irange_contains_p (r)) - return false; + return ret_nz; // Do not worry about merging and such by reserving twice as many // pairs as needed, and then simply sort the 2 ranges into this @@ -1913,6 +1951,7 @@ irange::irange_union (const irange &r) m_kind = VR_RANGE; normalize_kind (); + set_nonzero_bits (saved_nz); if (flag_checking) verify_range (); @@ -1974,25 +2013,38 @@ irange::irange_intersect (const irange &r) gcc_checking_assert (undefined_p () || r.undefined_p () || range_compatible_p (type (), r.type ())); - if (undefined_p () || r.varying_p ()) + if (undefined_p ()) return false; if (r.undefined_p ()) { set_undefined (); return true; } + + // Save the nonzero mask in case the set operations below clobber it. + bool ret_nz = intersect_nonzero_bits (r); + tree saved_nz = m_nonzero_mask; + + if (r.varying_p ()) + return ret_nz; + if (varying_p ()) { operator= (r); + set_nonzero_bits (saved_nz); return true; } if (r.num_pairs () == 1) - return intersect (r.lower_bound (), r.upper_bound ()); + { + bool res = intersect (r.lower_bound (), r.upper_bound ()); + set_nonzero_bits (saved_nz); + return res || saved_nz; + } // If R fully contains this, then intersection will change nothing. if (r.irange_contains_p (*this)) - return false; + return ret_nz; signop sign = TYPE_SIGN (TREE_TYPE(m_base[0])); unsigned bld_pair = 0; @@ -2064,6 +2116,8 @@ irange::irange_intersect (const irange &r) m_kind = VR_RANGE; normalize_kind (); + if (!undefined_p ()) + set_nonzero_bits (saved_nz); if (flag_checking) verify_range (); @@ -2074,6 +2128,8 @@ irange::irange_intersect (const irange &r) // Multirange intersect for a specified wide_int [lb, ub] range. // Return TRUE if intersect changed anything. +// +// NOTE: It is the caller's responsibility to intersect the nonzero masks. bool irange::intersect (const wide_int& lb, const wide_int& ub) @@ -2277,6 +2333,90 @@ irange::invert () verify_range (); } +void +irange::set_nonzero_bits (const wide_int_ref &bits) +{ + gcc_checking_assert (!undefined_p ()); + + if (bits == -1) + { + m_nonzero_mask = NULL; + return; + } + m_nonzero_mask = wide_int_to_tree (type (), bits); +} + +wide_int +irange::get_nonzero_bits () const +{ + gcc_checking_assert (!undefined_p ()); + // Nonzero bits are unsupported in legacy mode. The mask may be set + // as a consequence of propagation or reading global ranges, but no + // one from legacy land should be querying this. + gcc_checking_assert (!legacy_mode_p ()); + + // Calculate the nonzero bits inherent in the range. + wide_int min = lower_bound (); + wide_int max = upper_bound (); + wide_int xorv = min ^ max; + if (xorv != 0) + { + unsigned prec = TYPE_PRECISION (type ()); + xorv = wi::mask (prec - wi::clz (xorv), false, prec); + } + wide_int mask = min | xorv; + + // Return the nonzero bits augmented by the range. + if (m_nonzero_mask) + return mask & wi::to_wide (m_nonzero_mask); + + return mask; +} + +// Intersect the nonzero bits in R into THIS. + +bool +irange::intersect_nonzero_bits (const irange &r) +{ + gcc_checking_assert (!undefined_p () && !r.undefined_p ()); + + if (!r.m_nonzero_mask) + return false; + if (!m_nonzero_mask) + { + m_nonzero_mask = r.m_nonzero_mask; + return true; + } + wide_int i = wi::bit_and (wi::to_wide (m_nonzero_mask), + wi::to_wide (r.m_nonzero_mask)); + set_nonzero_bits (i); + return true; +} + +// Union the nonzero bits in R into THIS. + +bool +irange::union_nonzero_bits (const irange &r) +{ + gcc_checking_assert (!undefined_p () && !r.undefined_p ()); + + if (!m_nonzero_mask) + return false; + if (!r.m_nonzero_mask) + { + if (m_nonzero_mask) + { + m_nonzero_mask = NULL; + return true; + } + return false; + } + wide_int i = wi::bit_or (wi::to_wide (m_nonzero_mask), + wi::to_wide (r.m_nonzero_mask)); + set_nonzero_bits (i); + return true; +} + static void dump_bound_with_infinite_markers (FILE *file, tree bound) { @@ -2312,6 +2452,7 @@ irange::dump (FILE *file) const if (varying_p ()) { fprintf (file, "VARYING"); + dump_bitmasks (file); return; } if (legacy_mode_p ()) @@ -2321,6 +2462,7 @@ irange::dump (FILE *file) const fprintf (file, ", "); dump_bound_with_infinite_markers (file, max ()); fprintf (file, "]"); + dump_bitmasks (file); return; } for (unsigned i = 0; i < m_num_ranges; ++i) @@ -2333,6 +2475,21 @@ irange::dump (FILE *file) const dump_bound_with_infinite_markers (file, ub); fprintf (file, "]"); } + dump_bitmasks (file); +} + +void +irange::dump_bitmasks (FILE *file) const +{ + if (m_nonzero_mask && !legacy_mode_p ()) + { + wide_int nz = get_nonzero_bits (); + if (nz != -1) + { + fprintf (file, " NONZERO "); + print_hex (nz, file); + } + } } void diff --git a/gcc/value-range.h b/gcc/value-range.h index fd67031..2e48d92 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -109,6 +109,7 @@ protected: class GTY((user)) irange : public vrange { friend class vrange_allocator; + friend class irange_storage_slot; // For legacy_mode_p checks. public: // In-place setters. virtual void set (tree, tree, value_range_kind = VR_RANGE) override; @@ -149,6 +150,10 @@ public: virtual bool fits_p (const vrange &r) const override; virtual void dump (FILE * = stderr) const override; + // Nonzero masks. + wide_int get_nonzero_bits () const; + void set_nonzero_bits (const wide_int_ref &bits); + // Deprecated legacy public methods. tree min () const; // DEPRECATED tree max () const; // DEPRECATED @@ -196,10 +201,15 @@ private: void irange_set_1bit_anti_range (tree, tree); bool varying_compatible_p () const; + void set_nonzero_bits (tree bits) { m_nonzero_mask = bits; } + bool intersect_nonzero_bits (const irange &r); + bool union_nonzero_bits (const irange &r); + void dump_bitmasks (FILE *) const; bool intersect (const wide_int& lb, const wide_int& ub); unsigned char m_num_ranges; unsigned char m_max_ranges; + tree m_nonzero_mask; tree *m_base; }; @@ -608,6 +618,8 @@ gt_ggc_mx (irange *x) gt_ggc_mx (x->m_base[i * 2]); gt_ggc_mx (x->m_base[i * 2 + 1]); } + if (x->m_nonzero_mask) + gt_ggc_mx (x->m_nonzero_mask); } inline void @@ -618,6 +630,8 @@ gt_pch_nx (irange *x) gt_pch_nx (x->m_base[i * 2]); gt_pch_nx (x->m_base[i * 2 + 1]); } + if (x->m_nonzero_mask) + gt_pch_nx (x->m_nonzero_mask); } inline void @@ -628,6 +642,8 @@ gt_pch_nx (irange *x, gt_pointer_operator op, void *cookie) op (&x->m_base[i * 2], NULL, cookie); op (&x->m_base[i * 2 + 1], NULL, cookie); } + if (x->m_nonzero_mask) + op (&x->m_nonzero_mask, NULL, cookie); } template @@ -722,6 +738,7 @@ irange::set_undefined () { m_kind = VR_UNDEFINED; m_num_ranges = 0; + m_nonzero_mask = NULL; } inline void @@ -729,6 +746,7 @@ irange::set_varying (tree type) { m_kind = VR_VARYING; m_num_ranges = 1; + m_nonzero_mask = NULL; if (INTEGRAL_TYPE_P (type)) { @@ -843,7 +861,7 @@ inline void irange::normalize_kind () { if (m_num_ranges == 0) - m_kind = VR_UNDEFINED; + set_undefined (); else if (varying_compatible_p ()) { if (m_kind == VR_RANGE) -- cgit v1.1 From 483bd9a02831d9cb615179e5758946f41622d6c9 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 4 Jul 2022 12:14:03 +0200 Subject: Use default lower bound for vector types in debug info Vector types are represented as array types with DW_AT_GNU_vector attribute in the debug info and a range [0 .. TYPE_VECTOR_SUBPARTS - 1]. Now that's obviously skewed toward the C family of languages, therefore the attached patch changes the lower bound to the default for the language of the CU. gcc/ * dwarf2out.cc (gen_array_type_die): Use the default lower bound of the language for vector types. --- gcc/dwarf2out.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index b468a4b..e3920c8 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -22539,11 +22539,14 @@ gen_array_type_die (tree type, dw_die_ref context_die) if (TREE_CODE (type) == VECTOR_TYPE) { - /* For VECTOR_TYPEs we use an array die with appropriate bounds. */ + /* For VECTOR_TYPEs we use an array DIE with appropriate bounds. */ dw_die_ref subrange_die = new_die (DW_TAG_subrange_type, array_die, NULL); - add_bound_info (subrange_die, DW_AT_lower_bound, size_zero_node, NULL); + int lb = lower_bound_default (); + if (lb == -1) + lb = 0; + add_bound_info (subrange_die, DW_AT_lower_bound, size_int (lb), NULL); add_bound_info (subrange_die, DW_AT_upper_bound, - size_int (TYPE_VECTOR_SUBPARTS (type) - 1), NULL); + size_int (lb + TYPE_VECTOR_SUBPARTS (type) - 1), NULL); } else add_subscript_info (array_die, type, collapse_nested_arrays); -- cgit v1.1 From 104b9875c7850c0587f1e96ee706da65ea1625be Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 4 Jul 2022 12:16:38 +0200 Subject: Fix crash on circular array types with -fdump switches Such questionable arrays types can occur in Ada. gcc/ * tree-pretty-print.cc (dump_generic_node) : Add guard for direct circularity. --- gcc/tree-pretty-print.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/tree-pretty-print.cc b/gcc/tree-pretty-print.cc index bfabe9e..47371d8 100644 --- a/gcc/tree-pretty-print.cc +++ b/gcc/tree-pretty-print.cc @@ -2077,7 +2077,11 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags, for (tmp = TREE_TYPE (node); TREE_CODE (tmp) == ARRAY_TYPE; tmp = TREE_TYPE (tmp)) ; - dump_generic_node (pp, tmp, spc, flags, false); + + /* Avoid to print recursively the array. */ + /* FIXME : Not implemented correctly, see print_struct_decl. */ + if (TREE_CODE (tmp) != POINTER_TYPE || TREE_TYPE (tmp) != node) + dump_generic_node (pp, tmp, spc, flags, false); /* Print the dimensions. */ for (tmp = node; TREE_CODE (tmp) == ARRAY_TYPE; tmp = TREE_TYPE (tmp)) -- cgit v1.1 From 10b502fb78351a4073b6682c026a92c82d3da6c5 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 4 Jul 2022 12:36:05 +0200 Subject: Keep virtual SSA up-to-date in vectorizer The following removes a FIXME where we fail(ed) to keep virtual SSA up-to-date, patching up the remaining two cases I managed to trigger. I've left an assert so that we pick up cases arising for the cases I wasn't able to trigger. 2022-07-04 Richard Biener * tree-vect-loop-manip.cc (vect_do_peeling): Assert that no SSA update is needed instead of updating virtual SSA form. * tree-vect-stmts.cc (vectorizable_load): For hoisted invariant load use the loop entry virtual use. For emulated gather loads use the virtual use of the original stmt like vect_finish_stmt_generation would do. --- gcc/tree-vect-loop-manip.cc | 11 ++++------- gcc/tree-vect-stmts.cc | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index 47c4fe8..7b7af94 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -2683,14 +2683,11 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, class loop *first_loop = loop; bool irred_flag = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP; - /* We might have a queued need to update virtual SSA form. As we - delete the update SSA machinery below after doing a regular + /* Historically we might have a queued need to update virtual SSA form. + As we delete the update SSA machinery below after doing a regular incremental SSA update during loop copying make sure we don't - lose that fact. - ??? Needing to update virtual SSA form by renaming is unfortunate - but not all of the vectorizer code inserting new loads / stores - properly assigns virtual operands to those statements. */ - update_ssa (TODO_update_ssa_only_virtuals); + lose that fact. */ + gcc_assert (!need_ssa_update_p (cfun)); create_lcssa_for_virtual_phi (loop); diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 346d8ce..d6a6fe3 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -9024,9 +9024,16 @@ vectorizable_load (vec_info *vinfo, "hoisting out of the vectorized loop: %G", stmt); scalar_dest = copy_ssa_name (scalar_dest); tree rhs = unshare_expr (gimple_assign_rhs1 (stmt)); - gsi_insert_on_edge_immediate - (loop_preheader_edge (loop), - gimple_build_assign (scalar_dest, rhs)); + edge pe = loop_preheader_edge (loop); + gphi *vphi = get_virtual_phi (loop->header); + tree vuse; + if (vphi) + vuse = PHI_ARG_DEF_FROM_EDGE (vphi, pe); + else + vuse = gimple_vuse (gsi_stmt (*gsi)); + gimple *new_stmt = gimple_build_assign (scalar_dest, rhs); + gimple_set_vuse (new_stmt, vuse); + gsi_insert_on_edge_immediate (pe, new_stmt); } /* These copies are all equivalent, but currently the representation requires a separate STMT_VINFO_VEC_STMT for each one. */ @@ -9769,6 +9776,8 @@ vectorizable_load (vec_info *vinfo, tree ref = build2 (MEM_REF, ltype, ptr, build_int_cst (ref_type, 0)); new_stmt = gimple_build_assign (elt, ref); + gimple_set_vuse (new_stmt, + gimple_vuse (gsi_stmt (*gsi))); gimple_seq_add_stmt (&stmts, new_stmt); CONSTRUCTOR_APPEND_ELT (ctor_elts, NULL_TREE, elt); } -- cgit v1.1 From 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Mon, 4 Jul 2022 13:51:02 +0200 Subject: OpenMP: Move omp requires checks to libgomp Handle reverse_offload, unified_address, and unified_shared_memory requirements in libgomp by saving them alongside the offload table. When the device lto1 runs, it extracts the data for mkoffload. The latter than passes the value on to GOMP_offload_register_ver. lto1 (either the host one, with -flto [+ ENABLE_OFFLOADING], or in the offload-device lto1) also does the the consistency check is done, erroring out when the 'omp requires' clause use is inconsistent. For all in-principle supported devices, if a requirement cannot be fulfilled, the device is excluded from the (supported) devices list. Currently, none of those requirements are marked as supported for any of the non-host devices. gcc/c/ChangeLog: * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update, c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set OMP_REQUIRES_TARGET_USED. (c_parser_omp_requires): Remove sorry. gcc/ChangeLog: * config/gcn/mkoffload.cc (process_asm): Write '#include '. (process_obj): Pass omp_requires_mask to GOMP_offload_register_ver. (main): Ask lto1 to obtain omp_requires_mask and pass it on. * config/nvptx/mkoffload.cc (process, main): Likewise. * lto-cgraph.cc (omp_requires_to_name): New. (input_offload_tables): Save omp_requires_mask. (output_offload_tables): Read it, check for consistency, save value for mkoffload. * omp-low.cc (lower_omp_target): Force output_offloadtables call for OMP_REQUIRES_TARGET_USED. gcc/cp/ChangeLog: * parser.cc (cp_parser_omp_target_data, cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data, cp_parser_omp_target_update): Set OMP_REQUIRES_TARGET_USED. (cp_parser_omp_requires): Remove sorry. gcc/fortran/ChangeLog: * openmp.cc (gfc_match_omp_requires): Remove sorry. * parse.cc (decode_omp_directive): Don't regard 'declare target' as target usage for 'omp requires'; add more flags to omp_requires_mask. include/ChangeLog: * gomp-constants.h (GOMP_VERSION): Bump to 2. (GOMP_REQUIRES_UNIFIED_ADDRESS, GOMP_REQUIRES_UNIFIED_SHARED_MEMORY, GOMP_REQUIRES_REVERSE_OFFLOAD, GOMP_REQUIRES_TARGET_USED): New defines. libgomp/ChangeLog: * libgomp-plugin.h (GOMP_OFFLOAD_get_num_devices): Add omp_requires_mask arg. * plugin/plugin-gcn.c (GOMP_OFFLOAD_get_num_devices): Likewise; return -1 when device available but omp_requires_mask != 0. * plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_num_devices): Likewise. * oacc-host.c (host_get_num_devices, host_openacc_get_property): Update call. * oacc-init.c (resolve_device, acc_init_1, acc_shutdown_1, goacc_attach_host_thread_to_device, acc_get_num_devices, acc_set_device_num, get_property_any): Likewise. * target.c (omp_requires_mask): New global var. (gomp_requires_to_name): New. (GOMP_offload_register_ver): Handle passed omp_requires_mask. (gomp_target_init): Handle omp_requires_mask. * libgomp.texi (OpenMP 5.0): Update requires impl. status. (OpenMP 5.1): Add a missed item. (OpenMP 5.2): Mark linear-clause change as supported in C/C++. * testsuite/libgomp.c-c++-common/requires-1-aux.c: New test. * testsuite/libgomp.c-c++-common/requires-1.c: New test. * testsuite/libgomp.c-c++-common/requires-2-aux.c: New test. * testsuite/libgomp.c-c++-common/requires-2.c: New test. * testsuite/libgomp.c-c++-common/requires-3-aux.c: New test. * testsuite/libgomp.c-c++-common/requires-3.c: New test. * testsuite/libgomp.c-c++-common/requires-4-aux.c: New test. * testsuite/libgomp.c-c++-common/requires-4.c: New test. * testsuite/libgomp.c-c++-common/requires-5-aux.c: New test. * testsuite/libgomp.c-c++-common/requires-5.c: New test. * testsuite/libgomp.c-c++-common/requires-6.c: New test. * testsuite/libgomp.c-c++-common/requires-7-aux.c: New test. * testsuite/libgomp.c-c++-common/requires-7.c: New test. * testsuite/libgomp.fortran/requires-1-aux.f90: New test. * testsuite/libgomp.fortran/requires-1.f90: New test. liboffloadmic/ChangeLog: * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_get_num_devices): Return -1 when device available but omp_requires_mask != 0. gcc/testsuite/ChangeLog: * c-c++-common/gomp/requires-4.c: Update dg-*. * c-c++-common/gomp/reverse-offload-1.c: Likewise. * c-c++-common/gomp/target-device-ancestor-2.c: Likewise. * c-c++-common/gomp/target-device-ancestor-3.c: Likewise. * c-c++-common/gomp/target-device-ancestor-4.c: Likewise. * c-c++-common/gomp/target-device-ancestor-5.c: Likewise. * gfortran.dg/gomp/target-device-ancestor-3.f90: Likewise. * gfortran.dg/gomp/target-device-ancestor-4.f90: Likewise. * gfortran.dg/gomp/target-device-ancestor-5.f90: Likewise. * gfortran.dg/gomp/target-device-ancestor-2.f90: Likewise. Move post-FE checks to ... * gfortran.dg/gomp/target-device-ancestor-2a.f90: ... this new file. * gfortran.dg/gomp/requires-8.f90: Update as we don't regard 'declare target' for the 'requires' usage requirement. Co-authored-by: Chung-Lin Tang Co-authored-by: Thomas Schwinge --- gcc/c/c-parser.cc | 19 +++- gcc/config/gcn/mkoffload.cc | 27 ++++- gcc/config/nvptx/mkoffload.cc | 29 ++++- gcc/cp/parser.cc | 19 +++- gcc/fortran/openmp.cc | 4 - gcc/fortran/parse.cc | 22 +++- gcc/lto-cgraph.cc | 117 ++++++++++++++++++++- gcc/omp-low.cc | 5 + gcc/testsuite/c-c++-common/gomp/requires-4.c | 2 - .../c-c++-common/gomp/reverse-offload-1.c | 2 +- .../c-c++-common/gomp/target-device-ancestor-2.c | 10 +- .../c-c++-common/gomp/target-device-ancestor-3.c | 2 +- .../c-c++-common/gomp/target-device-ancestor-4.c | 4 +- .../c-c++-common/gomp/target-device-ancestor-5.c | 2 +- gcc/testsuite/gfortran.dg/gomp/requires-8.f90 | 14 ++- .../gfortran.dg/gomp/target-device-ancestor-2.f90 | 70 +----------- .../gfortran.dg/gomp/target-device-ancestor-2a.f90 | 80 ++++++++++++++ .../gfortran.dg/gomp/target-device-ancestor-3.f90 | 6 +- .../gfortran.dg/gomp/target-device-ancestor-4.f90 | 6 +- .../gfortran.dg/gomp/target-device-ancestor-5.f90 | 8 +- 20 files changed, 338 insertions(+), 110 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-2a.f90 (limited to 'gcc') diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc index 97e3b23..9c02141 100644 --- a/gcc/c/c-parser.cc +++ b/gcc/c/c-parser.cc @@ -20915,6 +20915,10 @@ c_parser_omp_teams (location_t loc, c_parser *parser, static tree c_parser_omp_target_data (location_t loc, c_parser *parser, bool *if_p) { + if (flag_openmp) + omp_requires_mask + = (enum omp_requires) (omp_requires_mask | OMP_REQUIRES_TARGET_USED); + tree clauses = c_parser_omp_all_clauses (parser, OMP_TARGET_DATA_CLAUSE_MASK, "#pragma omp target data"); @@ -21010,6 +21014,10 @@ c_parser_omp_target_update (location_t loc, c_parser *parser, return false; } + if (flag_openmp) + omp_requires_mask + = (enum omp_requires) (omp_requires_mask | OMP_REQUIRES_TARGET_USED); + tree stmt = make_node (OMP_TARGET_UPDATE); TREE_TYPE (stmt) = void_type_node; OMP_TARGET_UPDATE_CLAUSES (stmt) = clauses; @@ -21057,6 +21065,10 @@ c_parser_omp_target_enter_data (location_t loc, c_parser *parser, return true; } + if (flag_openmp) + omp_requires_mask + = (enum omp_requires) (omp_requires_mask | OMP_REQUIRES_TARGET_USED); + tree clauses = c_parser_omp_all_clauses (parser, OMP_TARGET_ENTER_DATA_CLAUSE_MASK, "#pragma omp target enter data"); @@ -21151,6 +21163,10 @@ c_parser_omp_target_exit_data (location_t loc, c_parser *parser, return true; } + if (flag_openmp) + omp_requires_mask + = (enum omp_requires) (omp_requires_mask | OMP_REQUIRES_TARGET_USED); + tree clauses = c_parser_omp_all_clauses (parser, OMP_TARGET_EXIT_DATA_CLAUSE_MASK, "#pragma omp target exit data"); @@ -22779,9 +22795,6 @@ c_parser_omp_requires (c_parser *parser) c_parser_skip_to_pragma_eol (parser, false); return; } - if (p && this_req != OMP_REQUIRES_DYNAMIC_ALLOCATORS) - sorry_at (cloc, "%qs clause on % directive not " - "supported yet", p); if (p) c_parser_consume_token (parser); if (this_req) diff --git a/gcc/config/gcn/mkoffload.cc b/gcc/config/gcn/mkoffload.cc index ed93ae8..b8b3fec 100644 --- a/gcc/config/gcn/mkoffload.cc +++ b/gcc/config/gcn/mkoffload.cc @@ -611,6 +611,7 @@ process_asm (FILE *in, FILE *out, FILE *cfile) struct regcount *regcounts = XOBFINISH (®counts_os, struct regcount *); fprintf (cfile, "#include \n"); + fprintf (cfile, "#include \n"); fprintf (cfile, "#include \n\n"); fprintf (cfile, "static const int gcn_num_vars = %d;\n\n", var_count); @@ -664,7 +665,7 @@ process_asm (FILE *in, FILE *out, FILE *cfile) /* Embed an object file into a C source file. */ static void -process_obj (FILE *in, FILE *cfile) +process_obj (FILE *in, FILE *cfile, uint32_t omp_requires) { size_t len = 0; const char *input = read_file (in, &len); @@ -692,16 +693,18 @@ process_obj (FILE *in, FILE *cfile) fprintf (cfile, "static const struct gcn_image_desc {\n" + " uintptr_t omp_requires_mask;\n" " const struct gcn_image *gcn_image;\n" " unsigned kernel_count;\n" " const struct hsa_kernel_description *kernel_infos;\n" " unsigned global_variable_count;\n" "} target_data = {\n" + " %d,\n" " &gcn_image,\n" " sizeof (gcn_kernels) / sizeof (gcn_kernels[0]),\n" " gcn_kernels,\n" " gcn_num_vars\n" - "};\n\n"); + "};\n\n", omp_requires); fprintf (cfile, "#ifdef __cplusplus\n" @@ -1077,9 +1080,27 @@ main (int argc, char **argv) unsetenv ("COMPILER_PATH"); unsetenv ("LIBRARY_PATH"); + char *omp_requires_file; + if (save_temps) + omp_requires_file = concat (dumppfx, ".mkoffload.omp_requires", NULL); + else + omp_requires_file = make_temp_file (".mkoffload.omp_requires"); + /* Run the compiler pass. */ + xputenv (concat ("GCC_OFFLOAD_OMP_REQUIRES_FILE=", omp_requires_file, NULL)); fork_execute (cc_argv[0], CONST_CAST (char **, cc_argv), true, ".gcc_args"); obstack_free (&cc_argv_obstack, NULL); + unsetenv("GCC_OFFLOAD_OMP_REQUIRES_FILE"); + + in = fopen (omp_requires_file, "rb"); + if (!in) + fatal_error (input_location, "cannot open omp_requires file %qs", + omp_requires_file); + uint32_t omp_requires; + if (fread (&omp_requires, sizeof (omp_requires), 1, in) != 1) + fatal_error (input_location, "cannot read omp_requires file %qs", + omp_requires_file); + fclose (in); in = fopen (gcn_s1_name, "r"); if (!in) @@ -1102,7 +1123,7 @@ main (int argc, char **argv) if (!in) fatal_error (input_location, "cannot open intermediate gcn obj file"); - process_obj (in, cfile); + process_obj (in, cfile, omp_requires); fclose (in); diff --git a/gcc/config/nvptx/mkoffload.cc b/gcc/config/nvptx/mkoffload.cc index b28c1a3..d8c81eb 100644 --- a/gcc/config/nvptx/mkoffload.cc +++ b/gcc/config/nvptx/mkoffload.cc @@ -231,7 +231,7 @@ access_check (const char *name, int mode) } static void -process (FILE *in, FILE *out) +process (FILE *in, FILE *out, uint32_t omp_requires) { size_t len = 0; const char *input = read_file (in, &len); @@ -240,6 +240,8 @@ process (FILE *in, FILE *out) unsigned obj_count = 0; unsigned ix; + fprintf (out, "#include \n\n"); + /* Dump out char arrays for each PTX object file. These are terminated by a NUL. */ for (size_t i = 0; i != len;) @@ -309,6 +311,7 @@ process (FILE *in, FILE *out) fprintf (out, "static const struct nvptx_tdata {\n" + " uintptr_t omp_requires_mask;\n" " const struct ptx_obj *ptx_objs;\n" " unsigned ptx_num;\n" " const char *const *var_names;\n" @@ -316,12 +319,12 @@ process (FILE *in, FILE *out) " const struct nvptx_fn *fn_names;\n" " unsigned fn_num;\n" "} target_data = {\n" - " ptx_objs, sizeof (ptx_objs) / sizeof (ptx_objs[0]),\n" + " %d, ptx_objs, sizeof (ptx_objs) / sizeof (ptx_objs[0]),\n" " var_mappings," " sizeof (var_mappings) / sizeof (var_mappings[0]),\n" " func_mappings," " sizeof (func_mappings) / sizeof (func_mappings[0])\n" - "};\n\n"); + "};\n\n", omp_requires); fprintf (out, "#ifdef __cplusplus\n" "extern \"C\" {\n" @@ -583,19 +586,37 @@ main (int argc, char **argv) unsetenv ("COMPILER_PATH"); unsetenv ("LIBRARY_PATH"); + char *omp_requires_file; + if (save_temps) + omp_requires_file = concat (dumppfx, ".mkoffload.omp_requires", NULL); + else + omp_requires_file = make_temp_file (".mkoffload.omp_requires"); + + xputenv (concat ("GCC_OFFLOAD_OMP_REQUIRES_FILE=", omp_requires_file, NULL)); fork_execute (new_argv[0], CONST_CAST (char **, new_argv), true, ".gcc_args"); obstack_free (&argv_obstack, NULL); + unsetenv("GCC_OFFLOAD_OMP_REQUIRES_FILE"); xputenv (concat ("GCC_EXEC_PREFIX=", execpath, NULL)); xputenv (concat ("COMPILER_PATH=", cpath, NULL)); xputenv (concat ("LIBRARY_PATH=", lpath, NULL)); + in = fopen (omp_requires_file, "rb"); + if (!in) + fatal_error (input_location, "cannot open omp_requires file %qs", + omp_requires_file); + uint32_t omp_requires; + if (fread (&omp_requires, sizeof (omp_requires), 1, in) != 1) + fatal_error (input_location, "cannot read omp_requires file %qs", + omp_requires_file); + fclose (in); + in = fopen (ptx_name, "r"); if (!in) fatal_error (input_location, "cannot open intermediate ptx file"); - process (in, out); + process (in, out, omp_requires); fclose (in); } diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index 6b3763b..df657a3 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -44329,6 +44329,10 @@ cp_parser_omp_teams (cp_parser *parser, cp_token *pragma_tok, static tree cp_parser_omp_target_data (cp_parser *parser, cp_token *pragma_tok, bool *if_p) { + if (flag_openmp) + omp_requires_mask + = (enum omp_requires) (omp_requires_mask | OMP_REQUIRES_TARGET_USED); + tree clauses = cp_parser_omp_all_clauses (parser, OMP_TARGET_DATA_CLAUSE_MASK, "#pragma omp target data", pragma_tok); @@ -44432,6 +44436,10 @@ cp_parser_omp_target_enter_data (cp_parser *parser, cp_token *pragma_tok, return true; } + if (flag_openmp) + omp_requires_mask + = (enum omp_requires) (omp_requires_mask | OMP_REQUIRES_TARGET_USED); + tree clauses = cp_parser_omp_all_clauses (parser, OMP_TARGET_ENTER_DATA_CLAUSE_MASK, "#pragma omp target enter data", pragma_tok); @@ -44531,6 +44539,10 @@ cp_parser_omp_target_exit_data (cp_parser *parser, cp_token *pragma_tok, return true; } + if (flag_openmp) + omp_requires_mask + = (enum omp_requires) (omp_requires_mask | OMP_REQUIRES_TARGET_USED); + tree clauses = cp_parser_omp_all_clauses (parser, OMP_TARGET_EXIT_DATA_CLAUSE_MASK, "#pragma omp target exit data", pragma_tok); @@ -44625,6 +44637,10 @@ cp_parser_omp_target_update (cp_parser *parser, cp_token *pragma_tok, return true; } + if (flag_openmp) + omp_requires_mask + = (enum omp_requires) (omp_requires_mask | OMP_REQUIRES_TARGET_USED); + tree stmt = make_node (OMP_TARGET_UPDATE); TREE_TYPE (stmt) = void_type_node; OMP_TARGET_UPDATE_CLAUSES (stmt) = clauses; @@ -46919,9 +46935,6 @@ cp_parser_omp_requires (cp_parser *parser, cp_token *pragma_tok) cp_parser_skip_to_pragma_eol (parser, pragma_tok); return false; } - if (p && this_req != OMP_REQUIRES_DYNAMIC_ALLOCATORS) - sorry_at (cloc, "%qs clause on % directive not " - "supported yet", p); if (p) cp_lexer_consume_token (parser->lexer); if (this_req) diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index 93e40f2..51b429a 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -5488,10 +5488,6 @@ gfc_match_omp_requires (void) else goto error; - if (requires_clause & ~(OMP_REQ_ATOMIC_MEM_ORDER_MASK - | OMP_REQ_DYNAMIC_ALLOCATORS)) - gfc_error_now ("Sorry, %qs clause at %L on REQUIRES directive is not " - "yet supported", clause, &old_loc); if (!gfc_omp_requires_add_clause (requires_clause, clause, &old_loc, NULL)) goto error; requires_clauses |= requires_clause; diff --git a/gcc/fortran/parse.cc b/gcc/fortran/parse.cc index 7356d1b..0b4c596 100644 --- a/gcc/fortran/parse.cc +++ b/gcc/fortran/parse.cc @@ -1168,7 +1168,8 @@ decode_omp_directive (void) } switch (ret) { - case ST_OMP_DECLARE_TARGET: + /* Set omp_target_seen; exclude ST_OMP_DECLARE_TARGET. + FIXME: Get clarification, cf. OpenMP Spec Issue #3240. */ case ST_OMP_TARGET: case ST_OMP_TARGET_DATA: case ST_OMP_TARGET_ENTER_DATA: @@ -6879,11 +6880,14 @@ done: /* Fixup for external procedures and resolve 'omp requires'. */ int omp_requires; + bool omp_target_seen; omp_requires = 0; + omp_target_seen = false; for (gfc_current_ns = gfc_global_ns_list; gfc_current_ns; gfc_current_ns = gfc_current_ns->sibling) { omp_requires |= gfc_current_ns->omp_requires; + omp_target_seen |= gfc_current_ns->omp_target_seen; gfc_check_externals (gfc_current_ns); } for (gfc_current_ns = gfc_global_ns_list; gfc_current_ns; @@ -6908,6 +6912,22 @@ done: break; } + if (omp_target_seen) + omp_requires_mask = (enum omp_requires) (omp_requires_mask + | OMP_REQUIRES_TARGET_USED); + if (omp_requires & OMP_REQ_REVERSE_OFFLOAD) + omp_requires_mask = (enum omp_requires) (omp_requires_mask + | OMP_REQUIRES_REVERSE_OFFLOAD); + if (omp_requires & OMP_REQ_UNIFIED_ADDRESS) + omp_requires_mask = (enum omp_requires) (omp_requires_mask + | OMP_REQUIRES_UNIFIED_ADDRESS); + if (omp_requires & OMP_REQ_UNIFIED_SHARED_MEMORY) + omp_requires_mask + = (enum omp_requires) (omp_requires_mask + | OMP_REQUIRES_UNIFIED_SHARED_MEMORY); + if (omp_requires & OMP_REQ_DYNAMIC_ALLOCATORS) + omp_requires_mask = (enum omp_requires) (omp_requires_mask + | OMP_REQUIRES_DYNAMIC_ALLOCATORS); /* Do the parse tree dump. */ gfc_current_ns = flag_dump_fortran_original ? gfc_global_ns_list : NULL; diff --git a/gcc/lto-cgraph.cc b/gcc/lto-cgraph.cc index 237743e..4862965 100644 --- a/gcc/lto-cgraph.cc +++ b/gcc/lto-cgraph.cc @@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see #include "pass_manager.h" #include "ipa-utils.h" #include "omp-offload.h" +#include "omp-general.h" #include "stringpool.h" #include "attribs.h" #include "alloc-pool.h" @@ -1068,7 +1069,10 @@ read_string (class lto_input_block *ib) void output_offload_tables (void) { - if (vec_safe_is_empty (offload_funcs) && vec_safe_is_empty (offload_vars)) + bool output_requires = (flag_openmp + && (omp_requires_mask & OMP_REQUIRES_TARGET_USED) != 0); + if (vec_safe_is_empty (offload_funcs) && vec_safe_is_empty (offload_vars) + && !output_requires) return; struct lto_simple_output_block *ob @@ -1098,6 +1102,19 @@ output_offload_tables (void) (*offload_vars)[i]); } + if (output_requires) + { + HOST_WIDE_INT val = ((HOST_WIDE_INT) omp_requires_mask + & (OMP_REQUIRES_UNIFIED_ADDRESS + | OMP_REQUIRES_UNIFIED_SHARED_MEMORY + | OMP_REQUIRES_REVERSE_OFFLOAD + | OMP_REQUIRES_TARGET_USED)); + /* (Mis)use LTO_symtab_edge for this variable. */ + streamer_write_enum (ob->main_stream, LTO_symtab_tags, + LTO_symtab_last_tag, LTO_symtab_edge); + streamer_write_hwi_stream (ob->main_stream, val); + } + streamer_write_uhwi_stream (ob->main_stream, 0); lto_destroy_simple_output_block (ob); @@ -1764,6 +1781,20 @@ input_symtab (void) } } +static void +omp_requires_to_name (char *buf, size_t size, HOST_WIDE_INT requires_mask) +{ + char *end = buf + size, *p = buf; + if (requires_mask & GOMP_REQUIRES_UNIFIED_ADDRESS) + p += snprintf (p, end - p, "unified_address"); + if (requires_mask & GOMP_REQUIRES_UNIFIED_SHARED_MEMORY) + p += snprintf (p, end - p, "%sunified_shared_memory", + (p == buf ? "" : ", ")); + if (requires_mask & GOMP_REQUIRES_REVERSE_OFFLOAD) + p += snprintf (p, end - p, "%sreverse_offload", + (p == buf ? "" : ", ")); +} + /* Input function/variable tables that will allow libgomp to look up offload target code, and store them into OFFLOAD_FUNCS and OFFLOAD_VARS. */ @@ -1773,6 +1804,10 @@ input_offload_tables (bool do_force_output) struct lto_file_decl_data **file_data_vec = lto_get_file_decl_data (); struct lto_file_decl_data *file_data; unsigned int j = 0; + const char *requires_fn = NULL; + tree requires_decl = NULL_TREE; + + omp_requires_mask = (omp_requires) 0; while ((file_data = file_data_vec[j++])) { @@ -1784,6 +1819,7 @@ input_offload_tables (bool do_force_output) if (!ib) continue; + tree tmp_decl = NULL_TREE; enum LTO_symtab_tags tag = streamer_read_enum (ib, LTO_symtab_tags, LTO_symtab_last_tag); while (tag) @@ -1799,6 +1835,7 @@ input_offload_tables (bool do_force_output) LTO mode. */ if (do_force_output) cgraph_node::get (fn_decl)->mark_force_output (); + tmp_decl = fn_decl; } else if (tag == LTO_symtab_variable) { @@ -1810,6 +1847,72 @@ input_offload_tables (bool do_force_output) may be no refs to var_decl in offload LTO mode. */ if (do_force_output) varpool_node::get (var_decl)->force_output = 1; + tmp_decl = var_decl; + } + else if (tag == LTO_symtab_edge) + { + static bool error_emitted = false; + HOST_WIDE_INT val = streamer_read_hwi (ib); + + if (omp_requires_mask == 0) + { + omp_requires_mask = (omp_requires) val; + requires_decl = tmp_decl; + requires_fn = file_data->file_name; + } + else if (omp_requires_mask != val && !error_emitted) + { + const char *fn1 = requires_fn; + if (requires_decl != NULL_TREE) + { + while (DECL_CONTEXT (requires_decl) != NULL_TREE + && TREE_CODE (requires_decl) != TRANSLATION_UNIT_DECL) + requires_decl = DECL_CONTEXT (requires_decl); + if (requires_decl != NULL_TREE) + fn1 = IDENTIFIER_POINTER (DECL_NAME (requires_decl)); + } + + const char *fn2 = file_data->file_name; + if (tmp_decl != NULL_TREE) + { + while (DECL_CONTEXT (tmp_decl) != NULL_TREE + && TREE_CODE (tmp_decl) != TRANSLATION_UNIT_DECL) + tmp_decl = DECL_CONTEXT (tmp_decl); + if (tmp_decl != NULL_TREE) + fn2 = IDENTIFIER_POINTER (DECL_NAME (requires_decl)); + } + + char buf1[sizeof ("unified_address, unified_shared_memory, " + "reverse_offload")]; + char buf2[sizeof ("unified_address, unified_shared_memory, " + "reverse_offload")]; + omp_requires_to_name (buf2, sizeof (buf2), + val != OMP_REQUIRES_TARGET_USED + ? val + : (HOST_WIDE_INT) omp_requires_mask); + if (val != OMP_REQUIRES_TARGET_USED + && omp_requires_mask != OMP_REQUIRES_TARGET_USED) + { + omp_requires_to_name (buf1, sizeof (buf1), + omp_requires_mask); + error ("OpenMP % directive with non-identical " + "clauses in multiple compilation units: %qs vs. " + "%qs", buf1, buf2); + inform (UNKNOWN_LOCATION, "%qs has %qs", fn1, buf1); + inform (UNKNOWN_LOCATION, "%qs has %qs", fn2, buf2); + } + else + { + error ("OpenMP % directive with %qs specified " + "only in some compilation units", buf2); + inform (UNKNOWN_LOCATION, "%qs has %qs", + val != OMP_REQUIRES_TARGET_USED ? fn2 : fn1, + buf2); + inform (UNKNOWN_LOCATION, "but %qs has not", + val != OMP_REQUIRES_TARGET_USED ? fn1 : fn2); + } + error_emitted = true; + } } else fatal_error (input_location, @@ -1821,6 +1924,18 @@ input_offload_tables (bool do_force_output) lto_destroy_simple_input_block (file_data, LTO_section_offload_table, ib, data, len); } +#ifdef ACCEL_COMPILER + char *omp_requires_file = getenv ("GCC_OFFLOAD_OMP_REQUIRES_FILE"); + if (omp_requires_file == NULL || omp_requires_file[0] == '\0') + fatal_error (input_location, "GCC_OFFLOAD_OMP_REQUIRES_FILE unset"); + FILE *f = fopen (omp_requires_file, "wb"); + if (!f) + fatal_error (input_location, "Cannot open omp_requires file %qs", + omp_requires_file); + uint32_t req_mask = omp_requires_mask; + fwrite (&req_mask, sizeof (req_mask), 1, f); + fclose (f); +#endif } /* True when we need optimization summary for NODE. */ diff --git a/gcc/omp-low.cc b/gcc/omp-low.cc index b9d5529..d73c165 100644 --- a/gcc/omp-low.cc +++ b/gcc/omp-low.cc @@ -12701,6 +12701,11 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx) gcc_unreachable (); } + /* Ensure that requires map is written via output_offload_tables, even if only + 'target (enter/exit) data' is used in the translation unit. */ + if (ENABLE_OFFLOADING && (omp_requires_mask & OMP_REQUIRES_TARGET_USED)) + g->have_offload = true; + clauses = gimple_omp_target_clauses (stmt); gimple_seq dep_ilist = NULL; diff --git a/gcc/testsuite/c-c++-common/gomp/requires-4.c b/gcc/testsuite/c-c++-common/gomp/requires-4.c index 88ba774..8f45d83 100644 --- a/gcc/testsuite/c-c++-common/gomp/requires-4.c +++ b/gcc/testsuite/c-c++-common/gomp/requires-4.c @@ -9,5 +9,3 @@ foo (void) #pragma omp requires unified_shared_memory /* { dg-error "'unified_shared_memory' clause used lexically after first target construct or offloading API" } */ #pragma omp requires unified_address /* { dg-error "'unified_address' clause used lexically after first target construct or offloading API" } */ #pragma omp requires reverse_offload /* { dg-error "'reverse_offload' clause used lexically after first target construct or offloading API" } */ - -/* { dg-prune-output "not supported yet" } */ diff --git a/gcc/testsuite/c-c++-common/gomp/reverse-offload-1.c b/gcc/testsuite/c-c++-common/gomp/reverse-offload-1.c index 9a3fa52..3452156 100644 --- a/gcc/testsuite/c-c++-common/gomp/reverse-offload-1.c +++ b/gcc/testsuite/c-c++-common/gomp/reverse-offload-1.c @@ -43,7 +43,7 @@ tg_fn (int *x, int *y) x2 = x2 + 2 + called_in_target1 (); y2 = y2 + 7; - #pragma omp target device(ancestor : 1) map(tofrom: x2) + #pragma omp target device(ancestor : 1) map(tofrom: x2) /* { dg-message "sorry, unimplemented: 'ancestor' not yet supported" } */ check_offload(&x2, &y2); if (x2 != 2+2+3+42 || y2 != 3 + 7) diff --git a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-2.c b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-2.c index cf05c50..b16e701 100644 --- a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-2.c +++ b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-2.c @@ -1,13 +1,11 @@ /* { dg-do compile } */ -#pragma omp requires reverse_offload /* { dg-message "sorry, unimplemented: 'reverse_offload' clause on 'requires' directive not supported yet" } */ +#pragma omp requires reverse_offload void foo (int n) { - /* The following test is marked with 'xfail' because a previous 'sorry' from - 'reverse_offload' suppresses the 'sorry' for 'ancestor'. */ - #pragma omp target device (ancestor: 1) /* { dg-message "" "sorry, unimplemented: 'ancestor' not yet supported" { xfail *-*-* } } */ + #pragma omp target device (ancestor: 1) ; @@ -19,9 +17,9 @@ foo (int n) #pragma omp target device (ancestor : 42) /* { dg-error "the 'device' clause expression must evaluate to '1'" } */ ; - #pragma omp target device (ancestor : n) /* { dg-message "" "sorry, unimplemented: 'ancestor' not yet supported" { xfail *-*-* } } */ + #pragma omp target device (ancestor : n) ; - #pragma omp target device (ancestor : n + 1) /* { dg-message "" "sorry, unimplemented: 'ancestor' not yet supported" { xfail *-*-* } } */ + #pragma omp target device (ancestor : n + 1) ; diff --git a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-3.c b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-3.c index ea6e5a0..d165901 100644 --- a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-3.c +++ b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-3.c @@ -11,7 +11,7 @@ int bar (void); /* { dg-do compile } */ -#pragma omp requires reverse_offload /* { dg-message "sorry, unimplemented: 'reverse_offload' clause on 'requires' directive not supported yet" } */ +#pragma omp requires reverse_offload void foo (void) diff --git a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-4.c b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-4.c index b4b5620..241234f 100644 --- a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-4.c +++ b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-4.c @@ -4,12 +4,12 @@ /* Test to ensure that device-modifier 'ancestor' is parsed correctly in device clauses. */ -#pragma omp requires reverse_offload /* { dg-message "sorry, unimplemented: 'reverse_offload' clause on 'requires' directive not supported yet" } */ +#pragma omp requires reverse_offload void foo (void) { - #pragma omp target device (ancestor: 1) /* { dg-message "" "sorry, unimplemented: 'ancestor' not yet supported" { xfail *-*-* } } */ + #pragma omp target device (ancestor: 1) /* { dg-message "sorry, unimplemented: 'ancestor' not yet supported" } */ ; } diff --git a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-5.c b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-5.c index b6ff84b..b1520ff 100644 --- a/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-5.c +++ b/gcc/testsuite/c-c++-common/gomp/target-device-ancestor-5.c @@ -1,4 +1,4 @@ -#pragma omp requires reverse_offload /* { dg-message "sorry, unimplemented: 'reverse_offload' clause on 'requires' directive not supported yet" } */ +#pragma omp requires reverse_offload void foo () diff --git a/gcc/testsuite/gfortran.dg/gomp/requires-8.f90 b/gcc/testsuite/gfortran.dg/gomp/requires-8.f90 index e84d609..583c5a5 100644 --- a/gcc/testsuite/gfortran.dg/gomp/requires-8.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/requires-8.f90 @@ -1,3 +1,7 @@ +module m0 + integer :: x +end module m0 + module m ! { dg-error "has OpenMP device constructs/routines but does not set !.OMP REQUIRES UNIFIED_SHARED_MEMORY but other program units do" } !$omp requires reverse_offload contains @@ -13,10 +17,14 @@ contains end subroutine foo end module m -subroutine bar ! { dg-error "has OpenMP device constructs/routines but does not set !.OMP REQUIRES REVERSE_OFFLOAD but other program units do" } +subroutine bar !use m - !$omp requires unified_shared_memory + !$omp requires unified_shared_memory ! Possibly OK - needs OpenMP Lang Spec clarification (-> #3240) !$omp declare target end subroutine bar -! { dg-prune-output "not yet supported" } +subroutine foobar ! { dg-error "has OpenMP device constructs/routines but does not set !.OMP REQUIRES REVERSE_OFFLOAD but other program units do" } + use m0 + !$omp requires unified_shared_memory + !$omp target enter data map(to:x) +end subroutine foobar diff --git a/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-2.f90 b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-2.f90 index 117a1d0..230c690 100644 --- a/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-2.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-2.f90 @@ -4,19 +4,16 @@ implicit none integer :: a, b, c -!$omp requires reverse_offload ! { dg-error "Sorry, 'reverse_offload' clause at \\(1\\) on REQUIRES directive is not yet supported" } +!$omp requires reverse_offload -! The following test case is marked with 'xfail' because a previous 'sorry' from -! 'reverse_offload' suppresses the 'sorry' for 'ancestor'. - -!$omp target device (ancestor: 1) ! { dg-message "" "sorry, unimplemented: 'ancestor' not yet supported" { xfail *-*-* } } +!$omp target device (ancestor: 1) !$omp end target -!$omp target device (ancestor : a) ! { dg-message "" "sorry, unimplemented: 'ancestor' not yet supported" { xfail *-*-* } } +!$omp target device (ancestor : a) !$omp end target -!$omp target device (ancestor : a + 1) ! { dg-message "" "sorry, unimplemented: 'ancestor' not yet supported" { xfail *-*-* } } +!$omp target device (ancestor : a + 1) !$omp end target @@ -32,61 +29,4 @@ integer :: a, b, c !$omp target device (42) !$omp end target - -! Ensure that no OpenMP constructs appear inside target regions with 'ancestor'. -! The following test case is marked with 'xfail' because a previous 'sorry' from -! 'reverse_offload' suppresses the 'sorry' for 'ancestor'. - -!$omp target device (ancestor: 1) - !$omp teams ! { dg-error "" "OpenMP constructs are not allowed in target region with 'ancestor'" { xfail *-*-* } } - !$omp end teams -!$omp end target - -!$omp target device (device_num: 1) - !$omp teams - !$omp end teams -!$omp end target - -!$omp target device (1) - !$omp teams - !$omp end teams -!$omp end target - - -! Ensure that with 'ancestor' only the 'device', 'firstprivate', 'private', -! 'defaultmap', and 'map' clauses appear on the construct. -! The following test case is marked with 'xfail' because a previous 'sorry' from -! 'reverse_offload' suppresses the 'sorry' for 'ancestor'. - -!$omp target nowait device (ancestor: 1) ! { dg-error "" "with 'ancestor', only the 'device', 'firstprivate', 'private', 'defaultmap', and 'map' clauses may appear on the construct" { xfail *-*-* } } -!$omp end target - -!$omp target device (ancestor: 1) nowait ! { dg-error "" "with 'ancestor', only the 'device', 'firstprivate', 'private', 'defaultmap', and 'map' clauses may appear on the construct" { xfail *-*-* } } -!$omp end target - -!$omp target nowait device (device_num: 1) -!$omp end target - -!$omp target nowait device (1) -!$omp end target - -!$omp target device (ancestor: 1) firstprivate (a) private (b) defaultmap (none) map (c) -!$omp end target - - -! Ensure that 'ancestor' is only used with 'target' constructs (not with -! 'target data', 'target update' etc.). -! The following test case is marked with 'xfail' because a previous 'sorry' from -! 'reverse_offload' suppresses the 'sorry' for 'ancestor'. - -!$omp target data map (a) device (ancestor: 1) ! { dg-error "" "'device' clause with 'ancestor' is only allowed on 'target' construct" { xfail *-*-* } } -!$omp end target data - -!$omp target enter data map (to: a) device (ancestor: 1) ! { dg-error "" "'device' clause with 'ancestor' is only allowed on 'target' construct" { xfail *-*-* } } -!$omp target exit data map (from: a) device (ancestor: 1) ! { dg-error "" "'device' clause with 'ancestor' is only allowed on 'target' construct" { xfail *-*-* } } - -!$omp target update to (a) device (ancestor: 1) ! { dg-error "'device' clause with 'ancestor' is only allowed on 'target' construct" "" { xfail *-*-* } } -! { dg-error "with 'ancestor', only the 'device', 'firstprivate', 'private', 'defaultmap', and 'map' clauses may appear on the construct" "" { xfail *-*-* } .-1 } - - -end \ No newline at end of file +end diff --git a/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-2a.f90 b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-2a.f90 new file mode 100644 index 0000000..feb76fe --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-2a.f90 @@ -0,0 +1,80 @@ +! { dg-do compile } + +implicit none + +integer :: a, b, c + +!$omp requires reverse_offload + +!$omp target device (ancestor: 1) +!$omp end target + +!$omp target device (ancestor : a) +!$omp end target + +!$omp target device (ancestor : a + 1) +!$omp end target + + +!$omp target device (device_num:42) +!$omp end target + +!$omp target device (42) +!$omp end target + + +! Ensure that no OpenMP constructs appear inside target regions with 'ancestor'. + +!$omp target device (ancestor: 1) + !$omp teams ! { dg-error "OpenMP constructs are not allowed in target region with 'ancestor'" } + !$omp end teams +!$omp end target + +!$omp target device (device_num: 1) + !$omp teams + !$omp end teams +!$omp end target + +!$omp target device (1) + !$omp teams + !$omp end teams +!$omp end target + + +! Ensure that with 'ancestor' only the 'device', 'firstprivate', 'private', +! 'defaultmap', and 'map' clauses appear on the construct. + +!$omp target nowait device (ancestor: 1) ! { dg-error "with 'ancestor', only the 'device', 'firstprivate', 'private', 'defaultmap', and 'map' clauses may appear on the construct" } +!$omp end target + +!$omp target device (ancestor: 1) nowait ! { dg-error "with 'ancestor', only the 'device', 'firstprivate', 'private', 'defaultmap', and 'map' clauses may appear on the construct" } +!$omp end target + +!$omp target nowait device (device_num: 1) +!$omp end target + +!$omp target nowait device (1) +!$omp end target + +!$omp target device (ancestor: 1) firstprivate (a) private (b) defaultmap (none) map (c) +!$omp end target + + +! Ensure that 'ancestor' is only used with 'target' constructs (not with +! 'target data', 'target update' etc.). +! The following test case is marked with 'xfail' because a previous 'sorry' from +! 'reverse_offload' suppresses the 'sorry' for 'ancestor'. + +!$omp target data map (a) device (ancestor: 1) ! { dg-error "'device' clause with 'ancestor' is only allowed on 'target' construct" } +!$omp end target data + +!$omp target enter data map (to: a) device (ancestor: 1) ! { dg-error "'device' clause with 'ancestor' is only allowed on 'target' construct" } +!$omp target exit data map (from: a) device (ancestor: 1) ! { dg-error "'device' clause with 'ancestor' is only allowed on 'target' construct" } + +!$omp target update to (a) device (ancestor: 1) ! { dg-error "'device' clause with 'ancestor' is only allowed on 'target' construct" } + +!$omp target device (ancestor: 1) if(.false.) +! { dg-error "with 'ancestor', only the 'device', 'firstprivate', 'private', 'defaultmap', and 'map' clauses may appear on the construct" "" { target *-*-* } .-1 } +!$omp end target + +end diff --git a/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-3.f90 b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-3.f90 index f1145bd..e8975e6 100644 --- a/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-3.f90 @@ -16,10 +16,10 @@ subroutine f1 () implicit none integer :: n - !$omp requires reverse_offload ! { dg-error "Sorry, 'reverse_offload' clause at \\(1\\) on REQUIRES directive is not yet supported" } + !$omp requires reverse_offload !$omp target device (ancestor : 1) - n = omp_get_thread_num () ! { dg-error "" "OpenMP runtime API call 'omp_get_thread_num' in a region with 'device\\(ancestor\\)' clause" { xfail *-*-* } } + n = omp_get_thread_num () ! { dg-error "OpenMP runtime API call 'omp_get_thread_num' in a region with 'device\\(ancestor\\)' clause" } !$omp end target !$omp target device (device_num : 1) @@ -30,4 +30,4 @@ subroutine f1 () n = omp_get_thread_num () !$omp end target -end \ No newline at end of file +end diff --git a/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-4.f90 b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-4.f90 index 63872fa..ab56e2d 100644 --- a/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-4.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-4.f90 @@ -4,11 +4,11 @@ ! Test to ensure that device-modifier 'ancestor' is parsed correctly in ! device clauses. -!$omp requires reverse_offload ! { dg-error "Sorry, 'reverse_offload' clause at \\(1\\) on REQUIRES directive is not yet supported" } +!$omp requires reverse_offload -!$omp target device (ancestor : 1) ! { dg-message "" "sorry, unimplemented: 'ancestor' not yet supported" { xfail *-*-* } } +!$omp target device (ancestor : 1) ! { dg-message "sorry, unimplemented: 'ancestor' not yet supported" } !$omp end target end -! TODO: dg-final { scan-tree-dump-times "pragma omp target \[^\n\r)]*device\\(ancestor:1\\)" 1 "original" } } +! { dg-final { scan-tree-dump-times "pragma omp target \[^\n\r)]*device\\(ancestor:1\\)" 1 "original" } } diff --git a/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-5.f90 b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-5.f90 index 06a11eb..ca8d4b2 100644 --- a/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-5.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-5.f90 @@ -6,7 +6,7 @@ ! module m - !$omp requires reverse_offload ! { dg-error "REQUIRES directive is not yet supported" } + !$omp requires reverse_offload contains subroutine foo() !$omp target device(ancestor:1) @@ -17,7 +17,7 @@ contains block block block - !$omp target device(ancestor:1) + !$omp target device(ancestor:1) ! { dg-message "sorry, unimplemented: 'ancestor' not yet supported" } !$omp end target end block end block @@ -26,7 +26,7 @@ contains end module m subroutine foo() - !$omp requires reverse_offload ! { dg-error "REQUIRES directive is not yet supported" } + !$omp requires reverse_offload block block block @@ -49,7 +49,7 @@ contains end subroutine foo program main - !$omp requires reverse_offload ! { dg-error "REQUIRES directive is not yet supported" } + !$omp requires reverse_offload contains subroutine foo() !$omp target device(ancestor:1) -- cgit v1.1 From 3769ad4ccea9589b3f7edaef901cb542aa10f49a Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 4 Jul 2022 13:53:24 +0200 Subject: Revert update-ssa assert in vectorizer The following reverts the just added assert that virtual SSA does not need updating. It instead goes for a select whitelist of transforms known to be prone to difficulties with virtual SSA update. * tree-vect-loop-manip.cc (vect_do_peeling): Revert assert and update virtual SSA form again. Assert we do so for a known set of transforms only. * tree-vectorizer.h (vec_info::any_known_not_updated_vssa): New. * tree-vect-stmts.cc (vectorizable_load): When vectorizing using load-lanes allow virtual SSA update. --- gcc/tree-vect-loop-manip.cc | 11 ++++++----- gcc/tree-vect-stmts.cc | 3 +++ gcc/tree-vectorizer.h | 4 ++++ 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index 7b7af94..5c31f0a 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -2683,11 +2683,12 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, class loop *first_loop = loop; bool irred_flag = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP; - /* Historically we might have a queued need to update virtual SSA form. - As we delete the update SSA machinery below after doing a regular - incremental SSA update during loop copying make sure we don't - lose that fact. */ - gcc_assert (!need_ssa_update_p (cfun)); + /* We should not have to update virtual SSA form here but some + transforms involve creating new virtual definitions which makes + updating difficult. */ + gcc_assert (!need_ssa_update_p (cfun) + || loop_vinfo->any_known_not_updated_vssa); + update_ssa (TODO_update_ssa_only_virtuals); create_lcssa_for_virtual_phi (loop); diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index d6a6fe3..72107af 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -8979,6 +8979,9 @@ vectorizable_load (vec_info *vinfo, dump_printf_loc (MSG_NOTE, vect_location, "Vectorizing an unaligned access.\n"); + if (memory_access_type == VMAT_LOAD_STORE_LANES) + vinfo->any_known_not_updated_vssa = true; + STMT_VINFO_TYPE (stmt_info) = load_vec_info_type; vect_model_load_cost (vinfo, stmt_info, ncopies, vf, memory_access_type, alignment_support_scheme, misalignment, diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 642eb0a..e5fdc9e 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -444,6 +444,10 @@ public: /* Whether the above mapping is complete. */ bool stmt_vec_info_ro; + /* Whether we've done a transform we think OK to not update virtual + SSA form. */ + bool any_known_not_updated_vssa; + /* The SLP graph. */ auto_vec slp_instances; -- cgit v1.1 From b110e5283e368b5377e04766e4ff82cd52634208 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 1 Jul 2022 20:57:18 +0200 Subject: tree-sra: Fix union handling in build_reconstructed_reference As the testcase in PR 105860 shows, the code that tries to re-use the handled_component chains in SRA can be horribly confused by unions, where it thinks it has found a compatible structure under which it can chain the references, but in fact it found the type it was looking for elsewhere in a union and generated a write to a completely wrong part of an aggregate. I don't remember whether the plan was to support unions at all in build_reconstructed_reference but it can work, to an extent, if we make sure that we start the search only outside the outermost union, which is what the patch does (and the extra testcase verifies). gcc/ChangeLog: 2022-07-01 Martin Jambor PR tree-optimization/105860 * tree-sra.cc (build_reconstructed_reference): Start expr traversal only just below the outermost union. gcc/testsuite/ChangeLog: 2022-07-01 Martin Jambor PR tree-optimization/105860 * gcc.dg/tree-ssa/alias-access-path-13.c: New test. * gcc.dg/tree-ssa/pr105860.c: Likewise. --- .../gcc.dg/tree-ssa/alias-access-path-13.c | 31 +++++++++++ gcc/testsuite/gcc.dg/tree-ssa/pr105860.c | 63 ++++++++++++++++++++++ gcc/tree-sra.cc | 13 ++++- 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr105860.c (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c new file mode 100644 index 0000000..e502a97 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c @@ -0,0 +1,31 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-fre1" } */ + +struct inn +{ + int val; +}; + +union foo +{ + struct inn inn; + long int baz; +} *fooptr; + +struct bar +{ + union foo foo; + int val2; +} *barptr; + +int +test () +{ + union foo foo; + foo.inn.val = 0; + barptr->val2 = 123; + *fooptr = foo; + return barptr->val2; +} + +/* { dg-final { scan-tree-dump-times "return 123" 1 "fre1"} } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c b/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c new file mode 100644 index 0000000..77bcb4a --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr105860.c @@ -0,0 +1,63 @@ +/* { dg-do run } */ +/* { dg-options "-O1" } */ + +struct S1 { + unsigned int _0; + unsigned int _1; +} ; +struct S2 { + struct S1 _s1; + unsigned long _x2; +} ; + +struct ufld_type1 { + unsigned int _u1t; + struct S2 _s2; +} ; + +struct ufld_type2 { + unsigned int _u2t; + struct S1 _s1; +} ; +struct parm_type { + union { + struct ufld_type1 var_1; + struct ufld_type2 var_2; + } U; +}; + +struct parm_type bad_function( struct parm_type arg0 ) +{ + struct parm_type rv; + struct S2 var4; + switch( arg0.U.var_2._u2t ) { + case 4294967041: + var4._s1 = arg0.U.var_1._s2._s1; + rv.U.var_1._u1t = 4294967041; + rv.U.var_1._s2 = var4; + break; + case 4294967043: + rv.U.var_2._u2t = 4294967043; + rv.U.var_2._s1 = arg0.U.var_2._s1; + break; + default: + break; + } + return rv; +} + +int main() { + struct parm_type val; + struct parm_type out; + val.U.var_2._u2t = 4294967043; + val.U.var_2._s1._0 = 0x01010101; + val.U.var_2._s1._1 = 0x02020202; + out = bad_function(val); + if (val.U.var_2._u2t != 4294967043) + __builtin_abort (); + if (out.U.var_2._s1._0 != 0x01010101) + __builtin_abort (); + if (val.U.var_2._s1._1 != 0x02020202 ) + __builtin_abort (); + return 0; +} diff --git a/gcc/tree-sra.cc b/gcc/tree-sra.cc index 461c8e0..1a3e12f 100644 --- a/gcc/tree-sra.cc +++ b/gcc/tree-sra.cc @@ -1667,7 +1667,18 @@ build_ref_for_offset (location_t loc, tree base, poly_int64 offset, static tree build_reconstructed_reference (location_t, tree base, struct access *model) { - tree expr = model->expr, prev_expr = NULL; + tree expr = model->expr; + /* We have to make sure to start just below the outermost union. */ + tree start_expr = expr; + while (handled_component_p (expr)) + { + if (TREE_CODE (TREE_TYPE (TREE_OPERAND (expr, 0))) == UNION_TYPE) + start_expr = expr; + expr = TREE_OPERAND (expr, 0); + } + + expr = start_expr; + tree prev_expr = NULL_TREE; while (!types_compatible_p (TREE_TYPE (expr), TREE_TYPE (base))) { if (!handled_component_p (expr)) -- cgit v1.1 From ac4c8f53b0f735be17aa020796602de2299da1c5 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Mon, 4 Jul 2022 16:45:47 +0100 Subject: middle-end: Support ABIs that pass FP values as wider integers. Sorry for the long delay getting back to this, but after deeper investigation, it turns out that Jeff Law's tingling spider senses that the original patch wasn't updating everywhere that was required were spot on. Although my nvptx testing showed no problems with -O2, compiling the same tests with -O0 found several additional assertion ICEs (exactly where he'd predicted they'd be). Here's a revised patch that updates five locations (up from the previous two). Finding any remaining locations (if any) might be easier once folks are able to test things on their targets. This also implements Jeff's suggestion to factor the common code into helper routines. 2022-07-04 Roger Sayle gcc/ChangeLog PR target/104489 * calls.cc (precompute_register_parameters): Allow promotion of floating point values to be passed in wider integer modes by calling new convert_float_to_wider_int. (expand_call): Allow floating point results to be returned in wider integer modes by calling new convert wider_int_to_float. * cfgexpand.cc (expand_value_return): Allow backends to promote a scalar floating point return value to a wider integer mode by calling new convert_float_to_wider_int. * expr.cc (convert_float_to_wider_int): New function. (convert_wider_int_to_float): Likewise. (expand_expr_real_1) : Allow backends to promote scalar FP PARM_DECLs to wider integer modes, by calling new convert_wider_int_to_float. * expr.h (convert_modes): Name arguments for improved documentation. (convert_float_to_wider_int): Prototype new function here. (convert_wider_int_to_float): Likewise. * function.cc (assign_parm_setup_stack): Allow floating point values to be passed on the stack as wider integer modes by calling new convert_wider_int_to_float. --- gcc/calls.cc | 38 +++++++++++++++++++++++++++----------- gcc/cfgexpand.cc | 13 ++++++++++++- gcc/expr.cc | 35 +++++++++++++++++++++++++++++++++++ gcc/expr.h | 11 ++++++++++- gcc/function.cc | 11 +++++++++++ 5 files changed, 95 insertions(+), 13 deletions(-) (limited to 'gcc') diff --git a/gcc/calls.cc b/gcc/calls.cc index f4e1299..7f3cf5f 100644 --- a/gcc/calls.cc +++ b/gcc/calls.cc @@ -992,11 +992,21 @@ precompute_register_parameters (int num_actuals, struct arg_data *args, /* If we are to promote the function arg to a wider mode, do it now. */ - if (args[i].mode != TYPE_MODE (TREE_TYPE (args[i].tree_value))) - args[i].value - = convert_modes (args[i].mode, - TYPE_MODE (TREE_TYPE (args[i].tree_value)), - args[i].value, args[i].unsignedp); + machine_mode old_mode = TYPE_MODE (TREE_TYPE (args[i].tree_value)); + + /* Some ABIs require scalar floating point modes to be returned + in a wider scalar integer mode. We need to explicitly + reinterpret to an integer mode of the correct precision + before extending to the desired result. */ + if (SCALAR_INT_MODE_P (args[i].mode) + && SCALAR_FLOAT_MODE_P (old_mode) + && known_gt (GET_MODE_SIZE (args[i].mode), + GET_MODE_SIZE (old_mode))) + args[i].value = convert_float_to_wider_int (args[i].mode, old_mode, + args[i].value); + else if (args[i].mode != old_mode) + args[i].value = convert_modes (args[i].mode, old_mode, + args[i].value, args[i].unsignedp); /* If the value is a non-legitimate constant, force it into a pseudo now. TLS symbols sometimes need a call to resolve. */ @@ -3825,18 +3835,24 @@ expand_call (tree exp, rtx target, int ignore) { tree type = rettype; int unsignedp = TYPE_UNSIGNED (type); + machine_mode ret_mode = TYPE_MODE (type); machine_mode pmode; /* Ensure we promote as expected, and get the new unsignedness. */ - pmode = promote_function_mode (type, TYPE_MODE (type), &unsignedp, + pmode = promote_function_mode (type, ret_mode, &unsignedp, funtype, 1); gcc_assert (GET_MODE (target) == pmode); - poly_uint64 offset = subreg_lowpart_offset (TYPE_MODE (type), - GET_MODE (target)); - target = gen_rtx_SUBREG (TYPE_MODE (type), target, offset); - SUBREG_PROMOTED_VAR_P (target) = 1; - SUBREG_PROMOTED_SET (target, unsignedp); + if (SCALAR_INT_MODE_P (pmode) + && SCALAR_FLOAT_MODE_P (ret_mode) + && known_gt (GET_MODE_SIZE (pmode), GET_MODE_SIZE (ret_mode))) + target = convert_wider_int_to_float (ret_mode, pmode, target); + else + { + target = gen_lowpart_SUBREG (ret_mode, target); + SUBREG_PROMOTED_VAR_P (target) = 1; + SUBREG_PROMOTED_SET (target, unsignedp); + } } /* If size of args is variable or this was a constructor call for a stack diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc index 1d7f6b2..dd29fff 100644 --- a/gcc/cfgexpand.cc +++ b/gcc/cfgexpand.cc @@ -3720,7 +3720,18 @@ expand_value_return (rtx val) mode = promote_function_mode (type, old_mode, &unsignedp, funtype, 1); if (mode != old_mode) - val = convert_modes (mode, old_mode, val, unsignedp); + { + /* Some ABIs require scalar floating point modes to be returned + in a wider scalar integer mode. We need to explicitly + reinterpret to an integer mode of the correct precision + before extending to the desired result. */ + if (SCALAR_INT_MODE_P (mode) + && SCALAR_FLOAT_MODE_P (old_mode) + && known_gt (GET_MODE_SIZE (mode), GET_MODE_SIZE (old_mode))) + val = convert_float_to_wider_int (mode, old_mode, val); + else + val = convert_modes (mode, old_mode, val, unsignedp); + } if (GET_CODE (return_reg) == PARALLEL) emit_group_load (return_reg, val, type, int_size_in_bytes (type)); diff --git a/gcc/expr.cc b/gcc/expr.cc index 53af027..6229737 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -776,6 +776,32 @@ convert_modes (machine_mode mode, machine_mode oldmode, rtx x, int unsignedp) convert_move (temp, x, unsignedp); return temp; } + +/* Variant of convert_modes for ABI parameter passing/return. + Return an rtx for a value that would result from converting X from + a floating point mode FMODE to wider integer mode MODE. */ + +rtx +convert_float_to_wider_int (machine_mode mode, machine_mode fmode, rtx x) +{ + gcc_assert (SCALAR_INT_MODE_P (mode) && SCALAR_FLOAT_MODE_P (fmode)); + scalar_int_mode tmp_mode = int_mode_for_mode (fmode).require (); + rtx tmp = force_reg (tmp_mode, gen_lowpart (tmp_mode, x)); + return convert_modes (mode, tmp_mode, tmp, 1); +} + +/* Variant of convert_modes for ABI parameter passing/return. + Return an rtx for a value that would result from converting X from + an integer mode IMODE to a narrower floating point mode MODE. */ + +rtx +convert_wider_int_to_float (machine_mode mode, machine_mode imode, rtx x) +{ + gcc_assert (SCALAR_FLOAT_MODE_P (mode) && SCALAR_INT_MODE_P (imode)); + scalar_int_mode tmp_mode = int_mode_for_mode (mode).require (); + rtx tmp = force_reg (tmp_mode, gen_lowpart (tmp_mode, x)); + return gen_lowpart_SUBREG (mode, tmp); +} /* Return the largest alignment we can use for doing a move (or store) of MAX_PIECES. ALIGN is the largest alignment we could use. */ @@ -10771,6 +10797,15 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode, pmode = promote_ssa_mode (ssa_name, &unsignedp); gcc_assert (GET_MODE (decl_rtl) == pmode); + /* Some ABIs require scalar floating point modes to be passed + in a wider scalar integer mode. We need to explicitly + truncate to an integer mode of the correct precision before + using a SUBREG to reinterpret as a floating point value. */ + if (SCALAR_FLOAT_MODE_P (mode) + && SCALAR_INT_MODE_P (pmode) + && known_lt (GET_MODE_SIZE (mode), GET_MODE_SIZE (pmode))) + return convert_wider_int_to_float (mode, pmode, decl_rtl); + temp = gen_lowpart_SUBREG (mode, decl_rtl); SUBREG_PROMOTED_VAR_P (temp) = 1; SUBREG_PROMOTED_SET (temp, unsignedp); diff --git a/gcc/expr.h b/gcc/expr.h index 0351183..b00c068 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -69,7 +69,16 @@ extern void convert_move (rtx, rtx, int); extern rtx convert_to_mode (machine_mode, rtx, int); /* Convert an rtx to MODE from OLDMODE and return the result. */ -extern rtx convert_modes (machine_mode, machine_mode, rtx, int); +extern rtx convert_modes (machine_mode mode, machine_mode oldmode, + rtx x, int unsignedp); + +/* Variant of convert_modes for ABI parameter passing/return. */ +extern rtx convert_float_to_wider_int (machine_mode mode, machine_mode fmode, + rtx x); + +/* Variant of convert_modes for ABI parameter passing/return. */ +extern rtx convert_wider_int_to_float (machine_mode mode, machine_mode imode, + rtx x); /* Expand a call to memcpy or memmove or memcmp, and return the result. */ extern rtx emit_block_op_via_libcall (enum built_in_function, rtx, rtx, rtx, diff --git a/gcc/function.cc b/gcc/function.cc index 0c3e4ff..31256b5 100644 --- a/gcc/function.cc +++ b/gcc/function.cc @@ -3472,6 +3472,17 @@ assign_parm_setup_stack (struct assign_parm_data_all *all, tree parm, emit_move_insn (tempreg, validize_mem (copy_rtx (data->entry_parm))); + /* Some ABIs require scalar floating point modes to be passed + in a wider scalar integer mode. We need to explicitly + truncate to an integer mode of the correct precision before + using a SUBREG to reinterpret as a floating point value. */ + if (SCALAR_FLOAT_MODE_P (data->nominal_mode) + && SCALAR_INT_MODE_P (data->arg.mode) + && known_lt (GET_MODE_SIZE (data->nominal_mode), + GET_MODE_SIZE (data->arg.mode))) + tempreg = convert_wider_int_to_float (data->nominal_mode, + data->arg.mode, tempreg); + push_to_sequence2 (all->first_conversion_insn, all->last_conversion_insn); to_conversion = true; -- cgit v1.1 From ce8dbe7d834b9264d7a5cd74d3ce6c750d28b3af Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 4 Jul 2022 17:32:07 +0200 Subject: Misc conversions to vrange. The following converts a handful of places that were irange centric. Tested on x86-64 Linux. gcc/ChangeLog: * gimple-range-fold.cc (fold_using_range::range_of_ssa_name_with_loop_info): Restrict the call to SCEV for irange supported types. (fold_using_range::range_of_builtin_int_call): Convert to vrange. * gimple-range.cc (gimple_ranger::prefill_stmt_dependencies): Same. * tree-ssa-dom.cc (cprop_operand): Same. --- gcc/gimple-range-fold.cc | 32 ++++++++++++++++++-------------- gcc/gimple-range.cc | 11 ++++++++--- gcc/tree-ssa-dom.cc | 2 +- 3 files changed, 27 insertions(+), 18 deletions(-) (limited to 'gcc') diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc index 0f815b5..6f907df 100644 --- a/gcc/gimple-range-fold.cc +++ b/gcc/gimple-range-fold.cc @@ -1006,19 +1006,21 @@ fold_using_range::range_of_builtin_int_call (irange &r, gcall *call, switch (func) { case CFN_BUILT_IN_CONSTANT_P: - arg = gimple_call_arg (call, 0); - if (src.get_operand (r, arg) && r.singleton_p ()) - { - r.set (build_one_cst (type), build_one_cst (type)); - return true; - } - if (cfun->after_inlining) - { - r.set_zero (type); - // r.equiv_clear (); - return true; - } - break; + { + arg = gimple_call_arg (call, 0); + Value_Range tmp (TREE_TYPE (arg)); + if (src.get_operand (tmp, arg) && tmp.singleton_p ()) + { + r.set (build_one_cst (type), build_one_cst (type)); + return true; + } + if (cfun->after_inlining) + { + r.set_zero (type); + return true; + } + break; + } case CFN_BUILT_IN_TOUPPER: { @@ -1335,7 +1337,9 @@ fold_using_range::range_of_ssa_name_with_loop_info (irange &r, tree name, { gcc_checking_assert (TREE_CODE (name) == SSA_NAME); tree min, max, type = TREE_TYPE (name); - if (bounds_of_var_in_loop (&min, &max, src.query (), l, phi, name)) + // FIXME: Remove the supports_p() once all this can handle floats, etc. + if (irange::supports_p (type) + && bounds_of_var_in_loop (&min, &max, src.query (), l, phi, name)) { if (TREE_CODE (min) != INTEGER_CST) { diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc index f3a4655..3a9f0b0 100644 --- a/gcc/gimple-range.cc +++ b/gcc/gimple-range.cc @@ -422,12 +422,17 @@ gimple_ranger::prefill_stmt_dependencies (tree ssa) { gcc_checking_assert (range_op_handler (stmt)); tree op = gimple_range_operand2 (stmt); - Value_Range r (TREE_TYPE (name)); if (op) - prefill_name (r, op); + { + Value_Range r (TREE_TYPE (op)); + prefill_name (r, op); + } op = gimple_range_operand1 (stmt); if (op) - prefill_name (r, op); + { + Value_Range r (TREE_TYPE (op)); + prefill_name (r, op); + } } } if (idx) diff --git a/gcc/tree-ssa-dom.cc b/gcc/tree-ssa-dom.cc index 9b6520f..2bc2c3d 100644 --- a/gcc/tree-ssa-dom.cc +++ b/gcc/tree-ssa-dom.cc @@ -1837,7 +1837,7 @@ cprop_operand (gimple *stmt, use_operand_p op_p, range_query *query) val = SSA_NAME_VALUE (op); if (!val) { - int_range<2> r; + Value_Range r (TREE_TYPE (op)); tree single; if (query->range_of_expr (r, op, stmt) && r.singleton_p (&single)) val = single; -- cgit v1.1 From c3297044f0055880dd23ffbf641aa3a5860197e1 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Mon, 4 Jul 2022 21:50:23 +0200 Subject: OpenMP/Fortran: Add support for OpenMP 5.2 linear clause syntax Fortran part to C/C++ commit r13-1002-g03b71406323ddc065b1d7837d8b43b17e4b048b5 gcc/fortran/ChangeLog: * gfortran.h (gfc_omp_namelist): Update by creating 'linear' struct, move 'linear_op' as 'op' to id and add 'old_modifier' to it. * dump-parse-tree.cc (show_omp_namelist): Update accordingly. * module.cc (mio_omp_declare_simd): Likewise. * trans-openmp.cc (gfc_trans_omp_clauses): Likewise. * openmp.cc (resolve_omp_clauses): Likewise; accept new-style 'val' modifier with do/simd. (gfc_match_omp_clauses): Handle OpenMP 5.2 linear clause syntax. libgomp/ChangeLog: * libgomp.texi (OpenMP 5.2): Mark linear-clause change as 'Y'. gcc/testsuite/ChangeLog: * c-c++-common/gomp/linear-4.c: New test. * gfortran.dg/gomp/linear-2.f90: New test. * gfortran.dg/gomp/linear-3.f90: New test. * gfortran.dg/gomp/linear-4.f90: New test. * gfortran.dg/gomp/linear-5.f90: New test. * gfortran.dg/gomp/linear-6.f90: New test. * gfortran.dg/gomp/linear-7.f90: New test. * gfortran.dg/gomp/linear-8.f90: New test. Co-authored-by: Jakub Jelinek --- gcc/fortran/dump-parse-tree.cc | 6 +- gcc/fortran/gfortran.h | 6 +- gcc/fortran/module.cc | 6 +- gcc/fortran/openmp.cc | 163 ++++++++++++++++++++++++---- gcc/fortran/trans-openmp.cc | 5 +- gcc/testsuite/c-c++-common/gomp/linear-4.c | 34 ++++++ gcc/testsuite/gfortran.dg/gomp/linear-2.f90 | 112 +++++++++++++++++++ gcc/testsuite/gfortran.dg/gomp/linear-3.f90 | 39 +++++++ gcc/testsuite/gfortran.dg/gomp/linear-4.f90 | 102 +++++++++++++++++ gcc/testsuite/gfortran.dg/gomp/linear-5.f90 | 43 ++++++++ gcc/testsuite/gfortran.dg/gomp/linear-6.f90 | 54 +++++++++ gcc/testsuite/gfortran.dg/gomp/linear-7.f90 | 27 +++++ gcc/testsuite/gfortran.dg/gomp/linear-8.f90 | 44 ++++++++ 13 files changed, 612 insertions(+), 29 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/gomp/linear-4.c create mode 100644 gcc/testsuite/gfortran.dg/gomp/linear-2.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/linear-3.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/linear-4.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/linear-5.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/linear-6.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/linear-7.f90 create mode 100644 gcc/testsuite/gfortran.dg/gomp/linear-8.f90 (limited to 'gcc') diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc index 85c0b98..5352008 100644 --- a/gcc/fortran/dump-parse-tree.cc +++ b/gcc/fortran/dump-parse-tree.cc @@ -1421,8 +1421,8 @@ show_omp_namelist (int list_type, gfc_omp_namelist *n) case OMP_MAP_RELEASE: fputs ("release:", dumpfile); break; default: break; } - else if (list_type == OMP_LIST_LINEAR) - switch (n->u.linear_op) + else if (list_type == OMP_LIST_LINEAR && n->u.linear.old_modifier) + switch (n->u.linear.op) { case OMP_LINEAR_REF: fputs ("ref(", dumpfile); break; case OMP_LINEAR_VAL: fputs ("val(", dumpfile); break; @@ -1430,7 +1430,7 @@ show_omp_namelist (int list_type, gfc_omp_namelist *n) default: break; } fprintf (dumpfile, "%s", n->sym ? n->sym->name : "omp_all_memory"); - if (list_type == OMP_LIST_LINEAR && n->u.linear_op != OMP_LINEAR_DEFAULT) + if (list_type == OMP_LIST_LINEAR && n->u.linear.op != OMP_LINEAR_DEFAULT) fputc (')', dumpfile); if (n->expr) { diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 463d969..696aadd 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -1345,7 +1345,11 @@ typedef struct gfc_omp_namelist gfc_omp_reduction_op reduction_op; gfc_omp_depend_op depend_op; gfc_omp_map_op map_op; - gfc_omp_linear_op linear_op; + struct + { + ENUM_BITFIELD (gfc_omp_linear_op) op:4; + bool old_modifier; + } linear; struct gfc_common_head *common; bool lastprivate_conditional; } u; diff --git a/gcc/fortran/module.cc b/gcc/fortran/module.cc index 85aa153..5ddabdc 100644 --- a/gcc/fortran/module.cc +++ b/gcc/fortran/module.cc @@ -4383,10 +4383,10 @@ mio_omp_declare_simd (gfc_namespace *ns, gfc_omp_declare_simd **odsp) } for (n = ods->clauses->lists[OMP_LIST_LINEAR]; n; n = n->next) { - if (n->u.linear_op == OMP_LINEAR_DEFAULT) + if (n->u.linear.op == OMP_LINEAR_DEFAULT) mio_name (4, omp_declare_simd_clauses); else - mio_name (32 + n->u.linear_op, omp_declare_simd_clauses); + mio_name (32 + n->u.linear.op, omp_declare_simd_clauses); mio_symbol_ref (&n->sym); mio_expr (&n->expr); } @@ -4438,7 +4438,7 @@ mio_omp_declare_simd (gfc_namespace *ns, gfc_omp_declare_simd **odsp) case 34: case 35: *ptrs[1] = n = gfc_get_omp_namelist (); - n->u.linear_op = (enum gfc_omp_linear_op) (t - 32); + n->u.linear.op = (enum gfc_omp_linear_op) (t - 32); t = 4; goto finish_namelist; } diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index 51b429a..bd4ff25 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -2324,6 +2324,7 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask, if ((mask & OMP_CLAUSE_LINEAR) && gfc_match ("linear (") == MATCH_YES) { + bool old_linear_modifier = false; gfc_omp_linear_op linear_op = OMP_LINEAR_DEFAULT; gfc_expr *step = NULL; @@ -2331,17 +2332,26 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask, &c->lists[OMP_LIST_LINEAR], false, NULL, &head) == MATCH_YES) - linear_op = OMP_LINEAR_REF; + { + linear_op = OMP_LINEAR_REF; + old_linear_modifier = true; + } else if (gfc_match_omp_variable_list (" val (", &c->lists[OMP_LIST_LINEAR], false, NULL, &head) == MATCH_YES) - linear_op = OMP_LINEAR_VAL; + { + linear_op = OMP_LINEAR_VAL; + old_linear_modifier = true; + } else if (gfc_match_omp_variable_list (" uval (", &c->lists[OMP_LIST_LINEAR], false, NULL, &head) == MATCH_YES) - linear_op = OMP_LINEAR_UVAL; + { + linear_op = OMP_LINEAR_UVAL; + old_linear_modifier = true; + } else if (gfc_match_omp_variable_list ("", &c->lists[OMP_LIST_LINEAR], false, &end_colon, &head) @@ -2364,14 +2374,114 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask, break; } } - if (end_colon && gfc_match (" %e )", &step) != MATCH_YES) + gfc_gobble_whitespace (); + if (old_linear_modifier && end_colon) { - gfc_free_omp_namelist (*head, false); - gfc_current_locus = old_loc; - *head = NULL; - break; + if (gfc_match (" %e )", &step) != MATCH_YES) + { + gfc_free_omp_namelist (*head, false); + gfc_current_locus = old_loc; + *head = NULL; + goto error; + } } - else if (!end_colon) + else if (end_colon) + { + bool has_error = false; + bool has_modifiers = false; + bool has_step = false; + bool duplicate_step = false; + bool duplicate_mod = false; + while (true) + { + old_loc = gfc_current_locus; + bool close_paren = gfc_match ("val )") == MATCH_YES; + if (close_paren || gfc_match ("val , ") == MATCH_YES) + { + if (linear_op != OMP_LINEAR_DEFAULT) + { + duplicate_mod = true; + break; + } + linear_op = OMP_LINEAR_VAL; + has_modifiers = true; + if (close_paren) + break; + continue; + } + close_paren = gfc_match ("uval )") == MATCH_YES; + if (close_paren || gfc_match ("uval , ") == MATCH_YES) + { + if (linear_op != OMP_LINEAR_DEFAULT) + { + duplicate_mod = true; + break; + } + linear_op = OMP_LINEAR_UVAL; + has_modifiers = true; + if (close_paren) + break; + continue; + } + close_paren = gfc_match ("ref )") == MATCH_YES; + if (close_paren || gfc_match ("ref , ") == MATCH_YES) + { + if (linear_op != OMP_LINEAR_DEFAULT) + { + duplicate_mod = true; + break; + } + linear_op = OMP_LINEAR_REF; + has_modifiers = true; + if (close_paren) + break; + continue; + } + close_paren = (gfc_match ("step ( %e ) )", &step) + == MATCH_YES); + if (close_paren + || gfc_match ("step ( %e ) , ", &step) == MATCH_YES) + { + if (has_step) + { + duplicate_step = true; + break; + } + has_modifiers = has_step = true; + if (close_paren) + break; + continue; + } + if (!has_modifiers + && gfc_match ("%e )", &step) == MATCH_YES) + { + if ((step->expr_type == EXPR_FUNCTION + || step->expr_type == EXPR_VARIABLE) + && strcmp (step->symtree->name, "step") == 0) + { + gfc_current_locus = old_loc; + gfc_match ("step ("); + has_error = true; + } + break; + } + has_error = true; + break; + } + if (duplicate_mod || duplicate_step) + { + gfc_error ("Multiple %qs modifiers specified at %C", + duplicate_mod ? "linear" : "step"); + has_error = true; + } + if (has_error) + { + gfc_free_omp_namelist (*head, false); + *head = NULL; + goto error; + } + } + else { step = gfc_get_constant_expr (BT_INTEGER, gfc_default_integer_kind, @@ -2379,9 +2489,12 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask, mpz_set_si (step->value.integer, 1); } (*head)->expr = step; - if (linear_op != OMP_LINEAR_DEFAULT) + if (linear_op != OMP_LINEAR_DEFAULT || old_linear_modifier) for (gfc_omp_namelist *n = *head; n; n = n->next) - n->u.linear_op = linear_op; + { + n->u.linear.op = linear_op; + n->u.linear.old_modifier = old_linear_modifier; + } continue; } if ((mask & OMP_CLAUSE_LINK) @@ -7439,28 +7552,38 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_clauses *omp_clauses, break; case OMP_LIST_LINEAR: if (code - && n->u.linear_op != OMP_LINEAR_DEFAULT - && n->u.linear_op != linear_op) + && n->u.linear.op != OMP_LINEAR_DEFAULT + && n->u.linear.op != linear_op) { - gfc_error ("LINEAR clause modifier used on DO or SIMD" - " construct at %L", &n->where); - linear_op = n->u.linear_op; + if (n->u.linear.old_modifier) + { + gfc_error ("LINEAR clause modifier used on DO or " + "SIMD construct at %L", &n->where); + linear_op = n->u.linear.op; + } + else if (n->u.linear.op != OMP_LINEAR_VAL) + { + gfc_error ("LINEAR clause modifier other than VAL " + "used on DO or SIMD construct at %L", + &n->where); + linear_op = n->u.linear.op; + } } else if (omp_clauses->orderedc) gfc_error ("LINEAR clause specified together with " "ORDERED clause with argument at %L", &n->where); - else if (n->u.linear_op != OMP_LINEAR_REF + else if (n->u.linear.op != OMP_LINEAR_REF && n->sym->ts.type != BT_INTEGER) gfc_error ("LINEAR variable %qs must be INTEGER " "at %L", n->sym->name, &n->where); - else if ((n->u.linear_op == OMP_LINEAR_REF - || n->u.linear_op == OMP_LINEAR_UVAL) + else if ((n->u.linear.op == OMP_LINEAR_REF + || n->u.linear.op == OMP_LINEAR_UVAL) && n->sym->attr.value) gfc_error ("LINEAR dummy argument %qs with VALUE " "attribute with %s modifier at %L", n->sym->name, - n->u.linear_op == OMP_LINEAR_REF + n->u.linear.op == OMP_LINEAR_REF ? "REF" : "UVAL", &n->where); else if (n->expr) { diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc index c6a584d..de27ed5 100644 --- a/gcc/fortran/trans-openmp.cc +++ b/gcc/fortran/trans-openmp.cc @@ -2751,7 +2751,7 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses, OMP_CLAUSE_LINEAR); OMP_CLAUSE_DECL (node) = t; omp_clause_linear_kind kind; - switch (n->u.linear_op) + switch (n->u.linear.op) { case OMP_LINEAR_DEFAULT: kind = OMP_CLAUSE_LINEAR_DEFAULT; @@ -2769,7 +2769,8 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses, gcc_unreachable (); } OMP_CLAUSE_LINEAR_KIND (node) = kind; - OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER (node) = 1; + OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER (node) + = n->u.linear.old_modifier; if (last_step_expr && last_step == NULL_TREE) { if (!declare_simd) diff --git a/gcc/testsuite/c-c++-common/gomp/linear-4.c b/gcc/testsuite/c-c++-common/gomp/linear-4.c new file mode 100644 index 0000000..59c22b8 --- /dev/null +++ b/gcc/testsuite/c-c++-common/gomp/linear-4.c @@ -0,0 +1,34 @@ +/* { dg-do compile } */ +/* { dg-options "-fopenmp" } */ + +int step (int x, int y, int z) { return x + y + z; } + +int +foo (int x) +{ + int i; + #pragma omp parallel for linear (x : step (step (1, 2, 3))) + for (i = 0; i < 64; i++) + x += 6; + return x; +} + +int +bar (int x) +{ + int i; + #pragma omp parallel for linear (x : step (1, 2, 3)) /* { dg-error "expected" } */ + for (i = 0; i < 64; i++) + x += 6; + return x; +} + +int +bar2 (int x) +{ + int i; + #pragma omp parallel for linear (x : step (1, 2, 3) * 1) + for (i = 0; i < 64; i++) + x += 6; + return x; +} diff --git a/gcc/testsuite/gfortran.dg/gomp/linear-2.f90 b/gcc/testsuite/gfortran.dg/gomp/linear-2.f90 new file mode 100644 index 0000000..05f007f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/linear-2.f90 @@ -0,0 +1,112 @@ +! { dg-do compile } +! { dg-options "-fopenmp -fdump-tree-original" } + +module m + implicit none (type, external) + + integer i + + interface + integer function bar (x, y, z) + integer, value :: x, y, z + !$omp declare simd linear (x : val, step (1)) linear (y : step (2)) + end + + integer function baz (x, y, z) + integer, value :: x, y, z + !$omp declare simd linear (x : step (1), val) + end + + integer function qux (x, val) + integer, value :: x, val + !$omp declare simd linear (val (x) : val) uniform (val) + end + + integer function corge (x, val) + integer, value :: x, val + !$omp declare simd linear (x : val, step (val)) uniform (val) + end + + integer function grault (x) + integer, value :: x + !$omp declare simd linear (x : val) + end + + integer function step (x) + integer, value :: x + end + end interface + +contains + +subroutine foo (x,y) + integer :: x, y + integer :: val + + val = 1 + + !$omp simd linear (i: step (3)) + do i = 0, 32, 3 + end do + + !$omp simd linear (i: val, step (3)) + do i = 0, 32, 3 + end do + + !$omp simd linear (x: step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp simd linear (x: step (y + 1), val) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do linear (x: step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do linear (x: val, step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do simd linear (i: step (3)) + do i = 0, 32, 3 + end do + + !$omp parallel do simd linear (i: step (3), val) + do i = 0, 32, 3 + end do + + !$omp parallel do simd linear (x: step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do simd linear (x: val, step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do simd linear (i: val + 0) + do i = 0, 9 + end do + + !$omp parallel do simd linear (i: step (1) * 1) + do i = 0, 9 + end do +end +end module + +! { dg-final { scan-tree-dump-times "#pragma omp parallel" 8 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp for nowait" 6 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp for linear\\(x:D\\.\[0-9\]+\\) nowait" 1 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp for linear\\(x:val,step\\(D\\.\[0-9\]+\\)\\) nowait" 1 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp simd linear\\(count\\.\[0-9\]:1\\) linear\\(i:3\\)" 2 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp simd linear\\(count\\.\[0-9\]:1\\) linear\\(i:val,step\\(3\\)\\)" 2 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp simd linear\\(i:1\\) linear\\(x:D\\.\[0-9\]+\\)" 2 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp simd linear\\(i:1\\) linear\\(x:val,step\\(D\\.\[0-9\]+\\)\\)" 2 "original" } } +! { dg-final { scan-tree-dump-times "#pragma omp simd linear\\(i:D\\.\[0-9\]+\\)" 2 "original" } } diff --git a/gcc/testsuite/gfortran.dg/gomp/linear-3.f90 b/gcc/testsuite/gfortran.dg/gomp/linear-3.f90 new file mode 100644 index 0000000..dee87b1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/linear-3.f90 @@ -0,0 +1,39 @@ +! { dg-do compile } +! { dg-options "-fopenmp" } + +module m2 + implicit none (type, external) + + integer :: val + +contains +integer function step (x) + integer, value :: x +end +subroutine foo(x) + integer, value :: x + !$omp declare simd linear (val (x) : step (1)) ! { dg-error "requires a constant integer linear-step expression or dummy argument" } +end +end module m2 + + +module m + implicit none (type, external) + + integer :: val + +contains +integer function step (x) + integer, value :: x + !$omp declare simd linear (val (x) : step (1)) ! { dg-error "Failed to match clause" } +end + +integer function bar (x, y, z) + integer, value :: x, y, z + !$omp declare simd linear (val (x) : val) ! { dg-error "requires a constant integer linear-step expression or dummy argument" } +end + +integer function baz (x, y, z) + integer, value :: x, y, z +end +end module m diff --git a/gcc/testsuite/gfortran.dg/gomp/linear-4.f90 b/gcc/testsuite/gfortran.dg/gomp/linear-4.f90 new file mode 100644 index 0000000..ac532f8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/linear-4.f90 @@ -0,0 +1,102 @@ +! { dg-do compile } +! { dg-options "-fopenmp" } + +module m +implicit none + +integer :: i + +interface + integer function bar (x, y, z) + integer :: x, y + integer, value :: z + !$omp declare simd linear (x : ref, step (1)) linear (y : step (2), uval) + end + + integer function baz (x, y, z) + integer :: x + integer, value :: y, z + !$omp declare simd linear (x : step (1), uval) + end + + integer function qux (x, ref) + integer :: x + integer, value :: ref + !$omp declare simd linear (ref (x) : ref) uniform (ref) + end + + integer function corge (x, ref) + integer :: x + integer, value :: ref + !$omp declare simd linear (x : ref, step (ref)) uniform (ref) + end + + integer function grault (x) + integer :: x + !$omp declare simd linear (x : ref) + end + + integer function waldo (x) + integer :: x + !$omp declare simd linear (x : uval) + end +end interface + +contains + +integer function step (x) + integer, value :: x + step = x +end + +subroutine foo (x, y) + integer :: x, y + !$omp simd linear (x: step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp simd linear (x: val, step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do linear (x: step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do linear (x: step (y + 1), val) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do simd linear (x: step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do simd linear (x: val, step (y + 1)) + do i = 0, 9 + x = x + y + 1 + end do + + !$omp parallel do simd linear (x: step (1) + 0) + do i = 0, 9 + x = x + step (1) + 0 + end do + + block + integer, parameter :: ref = 1, uval = 2 + !$omp parallel do simd linear (x: ref + 0) + do i = 0, 9 + x = x + ref + 0 + end do + + !$omp parallel do simd linear (x: uval * 1) + do i = 0, 9 + x = x + uval + end do + end block +end +end diff --git a/gcc/testsuite/gfortran.dg/gomp/linear-5.f90 b/gcc/testsuite/gfortran.dg/gomp/linear-5.f90 new file mode 100644 index 0000000..b00492d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/linear-5.f90 @@ -0,0 +1,43 @@ +! { dg-do compile } +! { dg-options "-fopenmp" } + +module m +implicit none +integer :: i + +contains + +subroutine foo (x, y) + integer :: x, y + + !$omp simd linear (x: step (y + 1), ref) ! { dg-error "LINEAR clause modifier other than VAL used on DO or SIMD construct" } + do i = 0, 10 + x = x + y + 1 + end do + + !$omp simd linear (x: uval, step (y + 1)) ! { dg-error "LINEAR clause modifier other than VAL used on DO or SIMD construct" } + do i = 0, 10 + x = x + y + 1 + end do + + !$omp parallel do linear (x: ref, step (y + 1)) ! { dg-error "LINEAR clause modifier other than VAL used on DO or SIMD construct" } + do i = 0, 10 + x = x + y + 1 + end do + + !$omp parallel do linear (x: step (y + 1), uval) ! { dg-error "LINEAR clause modifier other than VAL used on DO or SIMD construct" } + do i = 0, 10 + x = x + y + 1 + end do + + !$omp parallel do simd linear (x: step (y + 1), ref) ! { dg-error "LINEAR clause modifier other than VAL used on DO or SIMD construct" } + do i = 0, 10 + x = x + y + 1 + end do + + !$omp parallel do simd linear (x: uval, step (y + 1)) ! { dg-error "LINEAR clause modifier other than VAL used on DO or SIMD construct" } + do i = 0, 10 + x = x + y + 1 + end do +end +end diff --git a/gcc/testsuite/gfortran.dg/gomp/linear-6.f90 b/gcc/testsuite/gfortran.dg/gomp/linear-6.f90 new file mode 100644 index 0000000..57693ba --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/linear-6.f90 @@ -0,0 +1,54 @@ +! { dg-do compile } +! { dg-options "-fopenmp" } + +module m +implicit none +integer, parameter :: val = 1 +integer, parameter :: ref = 2 +integer, parameter :: uval = 3 + +interface + integer function foo (x, y, z) + import + implicit none + integer, value :: x + integer :: y, z + !$omp declare simd linear (val (x) : step (1)) linear (ref (y) : step (2)) linear (uval (z) : step (3)) + +! STEP is a function - thus: +! { dg-error "'x' in LINEAR clause at .1. requires a constant integer linear-step expression or dummy argument specified in UNIFORM clause" "" { target *-*-* } .-3 } +! { dg-error "'y' in LINEAR clause at .1. requires a constant integer linear-step expression or dummy argument specified in UNIFORM clause" "" { target *-*-* } .-4 } +! { dg-error "'z' in LINEAR clause at .1. requires a constant integer linear-step expression or dummy argument specified in UNIFORM clause" "" { target *-*-* } .-5 } + + end + + integer function bar (x, y, z) + import + implicit none + integer, value :: x + integer :: y, z + !$omp declare simd linear (val (x) : val) linear (ref (y) : ref) linear (uval (z) : uval) + end + + integer function baz (x, y, z) + import + implicit none + integer, value :: x + integer :: y, z + !$omp declare simd linear (val (x) : ref) linear (ref (y) : uval) linear (uval (z) : val) + end + + integer function qux (x, y, z) + import + implicit none + integer, value :: x + integer :: y, z + !$omp declare simd linear (val (x) : uval) linear (ref (y) : val) linear (uval (z) : ref) + end +end interface +contains + integer function step (x) + integer, value :: x + step = x + end +end module diff --git a/gcc/testsuite/gfortran.dg/gomp/linear-7.f90 b/gcc/testsuite/gfortran.dg/gomp/linear-7.f90 new file mode 100644 index 0000000..5e763a9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/linear-7.f90 @@ -0,0 +1,27 @@ +! { dg-do compile } +! { dg-options "-fopenmp" } + +module m + implicit none (type, external) + + integer i + + interface + integer function s1 (x, y, z) + integer, value :: x, y, z + !$omp declare simd linear (x : val, step (1), val) ! { dg-error "Multiple 'linear' modifiers specified" } + end + + integer function s2 (x, y, z) + integer, value :: x, y, z + !$omp declare simd linear (x : val, step (1), step(2)) ! { dg-error "Multiple 'step' modifiers specified" } + end + + integer function s3 (x, y, z) + integer, value :: x, y, z + !$omp declare simd linear (x : val, ref, step(2)) ! { dg-error "Multiple 'linear' modifiers specified" } + end + + end interface + +end module diff --git a/gcc/testsuite/gfortran.dg/gomp/linear-8.f90 b/gcc/testsuite/gfortran.dg/gomp/linear-8.f90 new file mode 100644 index 0000000..d23dd84 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/linear-8.f90 @@ -0,0 +1,44 @@ +! { dg-do compile } +! { dg-options "-fopenmp" } + +module m + implicit none (type, external) + + interface + integer function step (x, y, z) + integer :: x, y, z + end function step + end interface + +contains + +integer function foo (x) + integer, value :: x + integer :: i + !$omp parallel do linear (x : step (step (1, 2, 3))) + do i = 0, 63 + x = x + 6 + end do + foo = x +end + +integer function bar (x) + integer, value :: x + integer :: i + !$omp parallel do linear (x : step (1, 2, 3)) ! { dg-error "40: Invalid character in name" } + do i = 0, 63 + x = x + 6 + end do + bar = x +end + +integer function bar2 (x) + integer, value :: x + integer :: i + !$omp parallel do linear (x : step (1, 2, 3) * 1) + do i = 0, 63 + x = x + 6 + end do + bar2 = x +end +end module -- cgit v1.1 From 5beddee9f43b70c178ba7c10f795cb0546b0de93 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 4 Jul 2022 19:22:17 +0200 Subject: gcc.dg/analyzer/allocation-size-1..5.c: Fix for 32-bit newlib targets See gcc/config/newlib-stdint.h, where targets that have LONG_TYPE_SIZE == 32, get INT32_TYPE defined to "long int". INT32_TYPE ends up in the target int32_t. Thus the tests failed for 32-bit newlib targets due to related warning messages being matched to "aka int" where the emitted message for these targets have "aka long int". Tested cris-elf, committed as obvious. gcc/testsuite: * gcc.dg/analyzer/allocation-size-1.c, gcc.dg/analyzer/allocation-size-2.c, gcc.dg/analyzer/allocation-size-3.c, gcc.dg/analyzer/allocation-size-4.c, gcc.dg/analyzer/allocation-size-5.c: Handle int32_t being "long int". --- gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c | 8 ++++---- gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c | 8 ++++---- gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c | 6 +++--- gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c | 2 +- gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c index 4a78a81..b5bed53 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-1.c @@ -17,7 +17,7 @@ void test_2 (void) /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ /* { dg-message "42 bytes" "note" { target *-*-* } malloc2 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } malloc2 } */ } void test_3 (void) @@ -34,7 +34,7 @@ void test_4 (void) free (iptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign4 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign4 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } assign4 } */ } void test_5 (void) @@ -67,7 +67,7 @@ void test_6 (void) free (iptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign6 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign6 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } assign6 } */ } void test_7 (void) @@ -114,4 +114,4 @@ void test_10 (int32_t n) { char *ptr = malloc (7 * n); free (ptr); -} \ No newline at end of file +} diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c index d541d5e..42c39e2 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-2.c @@ -17,7 +17,7 @@ void test_2 (int32_t n) /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ /* { dg-message "'\[a-z0-9\\*\\(\\)\\s\]*' bytes" "note" { target *-*-* } malloc2 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4" "note" { target *-*-* } malloc2 } */ } void test_3 (int32_t n) @@ -34,7 +34,7 @@ void test_4 (int32_t n) free (iptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign4 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign4 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } assign4 } */ } void test_5 (void) @@ -101,7 +101,7 @@ void test_9 (void) free (iptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign9 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign9 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } assign9 } */ } void test_11 (void) @@ -135,7 +135,7 @@ void test_12 (void) else free (ptr); /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign12 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign12 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } assign12 } */ } void test_13 (void) diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c index 012dbbe..0c86f09 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-3.c @@ -16,7 +16,7 @@ void test_1 (void) /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc1 } */ /* { dg-message "3 bytes" "note" { target *-*-* } malloc1 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc1 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } malloc1 } */ } void test_2 (void) @@ -26,7 +26,7 @@ void test_2 (void) /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ /* { dg-message "14 bytes" "note" { target *-*-* } malloc2 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } malloc2 } */ } void test_3 (int32_t n) @@ -36,7 +36,7 @@ void test_3 (int32_t n) /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc3 } */ /* { dg-message "'\[a-z0-9\\+\\(\\)\\s\]*' bytes" "note" { target *-*-* } malloc3 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc3 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } malloc3 } */ } void test_4 (int32_t n, int32_t m) diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c index 90df687..235c156 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-4.c @@ -31,7 +31,7 @@ void test_2 (void) /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } malloc2 } */ /* { dg-message "\\d+ bytes" "note" { target *-*-* } malloc2 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } malloc2 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } malloc2 } */ } void test_3 (void) diff --git a/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c b/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c index 5b92f19..a15e18d 100644 --- a/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c +++ b/gcc/testsuite/gcc.dg/analyzer/allocation-size-5.c @@ -16,7 +16,7 @@ int32_t *test_1 (void) return ptr; /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign1 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign1 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } assign1 } */ } int32_t *test2 (void) @@ -33,5 +33,5 @@ int32_t *test3 (void) return ptr; /* { dg-warning "allocated buffer size is not a multiple of the pointee's size \\\[CWE-131\\\]" "warning" { target *-*-* } assign3 } */ - /* { dg-message "'int32_t \\*' (\\\{aka 'int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka int\\\})?\\)' is '4'" "note" { target *-*-* } assign3 } */ + /* { dg-message "'int32_t \\*' (\\\{aka '(long )?int \\*'\\\})? here; 'sizeof \\(int32_t (\\\{aka (long )?int\\\})?\\)' is '4'" "note" { target *-*-* } assign3 } */ } -- cgit v1.1 From 8467574d8daac47e0cf5b694f6c012aad8d630a6 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Tue, 5 Jul 2022 00:16:36 +0000 Subject: Daily bump. --- gcc/ChangeLog | 171 +++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/ada/ChangeLog | 248 ++++++++++++++++++++++++++++++++++++++++++++++++ gcc/c/ChangeLog | 9 ++ gcc/cp/ChangeLog | 9 ++ gcc/fortran/ChangeLog | 21 ++++ gcc/testsuite/ChangeLog | 55 +++++++++++ 7 files changed, 514 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a7bf96a..879f9e5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,174 @@ +2022-07-04 Aldy Hernandez + + * gimple-range-fold.cc + (fold_using_range::range_of_ssa_name_with_loop_info): Restrict the + call to SCEV for irange supported types. + (fold_using_range::range_of_builtin_int_call): Convert to vrange. + * gimple-range.cc (gimple_ranger::prefill_stmt_dependencies): Same. + * tree-ssa-dom.cc (cprop_operand): Same. + +2022-07-04 Roger Sayle + + PR target/104489 + * calls.cc (precompute_register_parameters): Allow promotion + of floating point values to be passed in wider integer modes + by calling new convert_float_to_wider_int. + (expand_call): Allow floating point results to be returned in + wider integer modes by calling new convert wider_int_to_float. + * cfgexpand.cc (expand_value_return): Allow backends to promote + a scalar floating point return value to a wider integer mode + by calling new convert_float_to_wider_int. + * expr.cc (convert_float_to_wider_int): New function. + (convert_wider_int_to_float): Likewise. + (expand_expr_real_1) : Allow backends to promote + scalar FP PARM_DECLs to wider integer modes, by calling new + convert_wider_int_to_float. + * expr.h (convert_modes): Name arguments for improved documentation. + (convert_float_to_wider_int): Prototype new function here. + (convert_wider_int_to_float): Likewise. + * function.cc (assign_parm_setup_stack): Allow floating point + values to be passed on the stack as wider integer modes by + calling new convert_wider_int_to_float. + +2022-07-04 Martin Jambor + + PR tree-optimization/105860 + * tree-sra.cc (build_reconstructed_reference): Start expr + traversal only just below the outermost union. + +2022-07-04 Richard Biener + + * tree-vect-loop-manip.cc (vect_do_peeling): Revert assert + and update virtual SSA form again. Assert we do so for + a known set of transforms only. + * tree-vectorizer.h (vec_info::any_known_not_updated_vssa): New. + * tree-vect-stmts.cc (vectorizable_load): When vectorizing + using load-lanes allow virtual SSA update. + +2022-07-04 Tobias Burnus + Chung-Lin Tang + Thomas Schwinge + + * config/gcn/mkoffload.cc (process_asm): Write '#include '. + (process_obj): Pass omp_requires_mask to GOMP_offload_register_ver. + (main): Ask lto1 to obtain omp_requires_mask and pass it on. + * config/nvptx/mkoffload.cc (process, main): Likewise. + * lto-cgraph.cc (omp_requires_to_name): New. + (input_offload_tables): Save omp_requires_mask. + (output_offload_tables): Read it, check for consistency, + save value for mkoffload. + * omp-low.cc (lower_omp_target): Force output_offloadtables + call for OMP_REQUIRES_TARGET_USED. + +2022-07-04 Richard Biener + + * tree-vect-loop-manip.cc (vect_do_peeling): Assert that + no SSA update is needed instead of updating virtual SSA + form. + * tree-vect-stmts.cc (vectorizable_load): For hoisted + invariant load use the loop entry virtual use. + For emulated gather loads use the virtual use of the + original stmt like vect_finish_stmt_generation would do. + +2022-07-04 Eric Botcazou + + * tree-pretty-print.cc (dump_generic_node) : Add guard + for direct circularity. + +2022-07-04 Eric Botcazou + + * dwarf2out.cc (gen_array_type_die): Use the default lower bound of + the language for vector types. + +2022-07-04 Aldy Hernandez + + * value-range-storage.cc (irange_storage_slot::set_irange): Set + nonzero bits in irange. + (irange_storage_slot::get_irange): Get nonzero bits from irange. + * value-range.cc (irange::operator=): Set nonzero bits. + (irange::irange_set): Same. + (irange::irange_set_anti_range): Same. + (irange::set): Same. + (irange::verify_range): Same. + (irange::legacy_equal_p): Check nonzero bits. + (irange::equal_p): Same. + (irange::contains_p): Handle nonzero bits. + (irange::irange_union): Same. + (irange::irange_intersect): Same. + (irange::dump): Same. + (irange::set_nonzero_bits): New. + (irange::get_nonzero_bits): New. + (irange::intersect_nonzero_bits): New. + (irange::union_nonzero_bits): New. + (irange::dump_bitmasks): New. + * value-range.h (class irange): Add m_nonzero_mask. + (gt_ggc_mx): Handle nonzero bits. + (gt_pch_nx): Same. + (irange::set_undefined): Set nonzero bits. + (irange::set_varying): Same. + (irange::normalize_kind): Call set_undefined. + +2022-07-04 Richard Biener + + * tree-ssa-loop-manip.h + (rewrite_virtuals_into_loop_closed_ssa): Remove. + (rewrite_into_loop_closed_ssa_1): Likewise. + * tree-ssa-loop-manip.cc (rewrite_into_loop_closed_ssa_1): + Make static. + (rewrite_into_loop_closed_ssa): Remove loop overload, + always rewrite virtuals into LC SSA. + (check_loop_closed_ssa_bb): Also check virtuals. + * tree-ssa-dce.cc (remove_dead_phis): Preserve virtual + LC PHIs when in LC SSA. + * gimple-loop-jam.cc (fuse_loops): Do not rewrite into + loop-closed SSA here, but ... + (tree_loop_unroll_and_jam): ... here once. + * tree-if-conv.cc (version_loop_for_if_conversion): Use + the cheaper TODO_update_ssa_no_phi. + * tree-loop-distribution.cc (version_loop_by_alias_check): + Likewise. + * tree-ssa-loop-unswitch.cc (tree_unswitch_single_loop): + Likewise. + * tree-vect-loop-manip.cc (vect_loop_versioning): Likewise. + (tree_unswitch_outer_loop): Do not rewrite virtuals into + LC ssa. + * tree-parloops.cc (transform_to_exit_first_loop_alt): + Likewise. + (pass_parallelize_loops::execute): After finishing rewrite + into LC SSA again because we do not maintain it properly. + +2022-07-04 Richard Biener + + PR tree-optimization/106055 + * graphite.cc (canonicalize_loop_closed_ssa): Check whether + we can propagate. + +2022-07-04 Haochen Jiang + + PR target/43618 + * config/i386/sse.md (extendv2sfv2df2): New define_expand. + (sse2_cvtps2pd_): Change constraint of operands[1]. + (*sse2_cvtps2pd__1): Rename from extendvsdfv2df2. + +2022-07-04 Aldy Hernandez + + * ipa-cp.cc (ipcp_vr_lattice::meet_with_1): Use operator!=. + * ipa-prop.cc (struct ipa_vr_ggc_hash_traits): Same. + * tree-ssa-loop-unswitch.cc (struct unswitch_predicate): Use set + with two arguments. + (find_unswitching_predicates_for_bb): Same. + * tree-vrp.cc (range_fold_unary_symbolics_p): Same. + * value-range-equiv.cc (value_range_equiv::equal_p): Use operator==. + * value-range.cc (irange::equal_p): Rename to... + (irange::operator==): ...this. + * value-range.h (irange::set): Remove. + (irange::operator==): Remove. + (irange::set_zero): Use set with two arguments. + * vr-values.cc (vr_values::extract_range_from_binary_expr): Same. + (vr_values::extract_range_from_unary_expr): Same. + (check_for_binary_op_overflow): Same. + (bounds_of_var_in_loop): Same. + 2022-07-03 H.J. Lu PR target/106022 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index d929766..7111af0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220704 +20220705 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1434ebe..570579b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,251 @@ +2022-07-04 Eric Botcazou + + * sem_disp.adb (Check_Dispatching_Call): Merge the two special cases + where there are no controlling actuals but tag-indeternminate ones. + +2022-07-04 Eric Botcazou + + * exp_disp.adb (Expand_Dispatching_Call): Fix detection of calls + that are dispatching on tagged result. + +2022-07-04 Doug Rupp + + * Makefile.rtl (ADA_EXCLUDE_SRCS): Add s-qnx.ads. + +2022-07-04 Eric Botcazou + + * exp_ch3.adb (Expand_N_Object_Declaration) : New + local function. + : Change to a local variable whose value is + computed once and generate a call to Finalize after this is done. + Simplify the code creating the renaming at the end. + +2022-07-04 Doug Rupp + + * Makefile.rtl (GCC_SPEC_FILES): Remove vxworks cert files. + +2022-07-04 Piotr Trojanek + + * sem_attr.adb (Resolve_Attribute): Refactor duplicated code for + Count and Index attributes. + +2022-07-04 Eric Botcazou + + * checks.adb (Apply_Length_Check_On_Assignment): Return early if + the Suppress_Assignment_Checks flag is set. + (Selected_Range_Checks): Deal with conditional expressions. + * exp_ch4.adb (Too_Large_Length_For_Array): New constant. + (Expand_Concatenate): Use it in lieu of Too_Large_Max_Length. + (Expand_N_If_Expression): If the result has a unidimensional array + type but the dependent expressions have constrained subtypes with + known bounds, create a static temporary on the stack with a subtype + covering the result. + (Get_First_Index_Bounds): Deal with string literals. + * uintp.ads (Uint_256): New deferred constant. + * sinfo.ads (Suppress_Assignment_Checks): Document new usage. + +2022-07-04 Eric Botcazou + + * exp_ch3.adb (Expand_N_Object_Declaration.Rewrite_As_Renaming): + Do not rewrite if the declaration has got constraints. + * sinfo.ads (Case Expression Alternative): Fix typo. + +2022-07-04 Eric Botcazou + + * exp_ch3.adb (Expand_N_Object_Declaration.Rewrite_As_Renaming): + Be prepared for slices. + * exp_ch4.adb (Get_First_Index_Bounds): New procedure. + (Expand_Array_Comparison.Length_Less_Than_4): Call it. + (Expand_Concatenate): Try to compute a maximum length for + operands with variable length and a maximum total length at the + end. If the concatenation is dynamic, but a sensible maximum + total length has been computed, use this length to create a + static array subtype for the temporary and return a slice of it. + +2022-07-04 Steve Baird + + * sem_ch3.adb (Check_Possible_Deferred_Completion): Delete + Prev_Obj_Def formal parameter. Reorganize code so that + statically matching check is also performed in the case where + the subtype given in the initial declaration is constrained and + the subtype given in the completion is not. + +2022-07-04 Bob Duff + + * einfo-utils.ads, einfo-utils.adb: Add predicates on subtypes E + and N. Change some parameters to use the unpredicated subtypes, + because they sometimes return e.g. Empty. Note that N_Entity_Id + has a predicate; Entity_Id does not. + * exp_tss.adb (Base_Init_Proc): Use Entity_Id instead of E, + because otherwise we fail the predicate. We shouldn't be + referring to single-letter names from far away anyway. + * sem_aux.adb (Is_Derived_Type): Likewise. + * sem_res.adb (Is_Definite_Access_Type): Use N_Entity_Id for + predicate. + * types.ads (Entity_Id): Add comment explaining the difference + between Entity_Id and N_Entity_Id. + +2022-07-04 Justin Squirek + + * exp_util.adb (Remove_Side_Effects): Combine identical + branches. + * sem_attr.adb (Analyze_Attribute): Combine identical cases + Attribute_Has_Same_Storage and Attribute_Overlaps_Storage. + * sem_prag.adb (Check_Role): Combine E_Out_Parameter case with + general case for parameters. + * sem_util.adb (Accessibility_Level): Combine identical + branches. + * sprint.adb (Sprint_Node_Actual): Combine cases for + N_Real_Range_Specification and N_Signed_Integer_Type_Definition. + +2022-07-04 Justin Squirek + + * libgnat/s-os_lib.adb (Quote_Argument): Modify the result + buffer size calculation to handle the case where Arg'Length is + 1. + +2022-07-04 Bob Duff + + * exp_util.adb (Expand_Subtype_From_Expr): Generate a new + subtype when Is_Constr_Subt_For_UN_Aliased is True, so the + Is_Constr_Subt_For_U_Nominal flag will not be set on the + preexisting subtype. + * sem_attr.adb, sem_ch3.adb: Minor. + +2022-07-04 Eric Botcazou + + * debug.adb (d.9): Remove usage. + * exp_ch6.adb (Expand_Simple_Function_Return): Remove redundant + test on Debug_Flag_Dot_L. + (Is_Build_In_Place_Result_Type): Return false for nonlimited types. + (Is_Build_In_Place_Function): Tidy up and remove redundant test on + Debug_Flag_Dot_L. + +2022-07-04 Eric Botcazou + + * exp_ch3.adb (Expand_N_Object_Declaration): Don't adjust the object + if the expression is a function call. + : Return true if the object needs finalization + and is initialized with the result of a function call returned on + the secondary stack. + * exp_ch6.adb (Expand_Ctrl_Function_Call): Add Use_Sec_Stack boolean + parameter. Early return if the parent is an object declaration and + Use_Sec_Stack is false. + (Expand_Call_Helper): Adjust call to Expand_Ctrl_Function_Call. + * exp_ch7.adb (Find_Last_Init): Be prepared for initialization still + present in the object declaration. + * sem_ch3.adb (Analyze_Object_Declaration): Call the predicates + Needs_Secondary_Stack and Needs_Finalization to guard the renaming + optimization. + +2022-07-04 Bob Duff + + * libgnat/a-cbhase.ads, libgnat/a-cborse.ads, + libgnat/a-cihase.ads, libgnat/a-ciorse.ads, + libgnat/a-cohase.ads, libgnat/a-coorse.ads (Key): New function + that takes a Container parameter, implemented as an expression + function, so it is self explanatory (doesn't need a comment). + +2022-07-04 Vasiliy Fofanov + + * doc/gnat_rm/the_gnat_library.rst: Fix length of title + underlines. + +2022-07-04 Steve Baird + + * sem_ch4.adb (Analyze_Allocator): After calling Insert_Action + to insert a subtype declaration associated with an allocator, + the subtype declaration will usually be analyzed. But not + always. Add an explicit call to Preanalyze to cope with the + unusual case. The subtype declaration must be at least + preanalyzed before the call to Sem_Ch3.Process_Subtype a little + while later, during which we analyze an identifier that refers + to the subtype. + +2022-07-04 Steve Baird + + * sem_warn.adb (Warn_On_Constant_Valid_Condition): Do not + generate a warning if the expression in question is an assertion + expression, or a subexpression thereof. But do call + Test_Comparison so that it can generate warnings for the cases + that it generates warnings for. + * sem_prag.ads: Modify Assertion_Expression_Pragma constant so + that the predicate Sem_Util.In_Assertion_Expression_Pragma + returns True for the expression of a Compile_Time_Error pragma. + +2022-07-04 Julien Bortolussi + + * doc/gnat_rm/the_gnat_library.rst: Add the new entry. + * gnat_rm.texi: Regenerate. + +2022-07-04 Eric Botcazou + + * sem_res.adb (Resolve_Comparison_Op): Deal with ambiguous operands + in all cases. + (Resolve_Equality_Op): Likewise, except for the case of the implicit + inequality operator created for a user-defined operator that is not + an intrinsic subprogram. + +2022-07-04 Bob Duff + + * libgnat/a-cbhase.adb, libgnat/a-cbhase.ads, + libgnat/a-cborse.adb, libgnat/a-cborse.ads, + libgnat/a-cihase.adb, libgnat/a-cihase.ads, + libgnat/a-ciorse.adb, libgnat/a-ciorse.ads, + libgnat/a-cohase.adb, libgnat/a-cohase.ads, + libgnat/a-conhel.adb, libgnat/a-conhel.ads, + libgnat/a-coorse.adb, libgnat/a-coorse.ads: Add Has_Element, + Element, Query_Element, and Next subprograms that take a Set + parameter. Add Tampering_With_Cursors_Prohibited function. These + are all new in Ada 2022. + +2022-07-04 Claire Dross + + * doc/gnat_rm/the_gnat_library.rst: Functional vectors, sets, + and maps are now controlled. + * gnat_rm.texi: Regenerate. + +2022-07-04 Claire Dross + + * doc/gnat_ugn/building_executable_programs_with_gnat.rst + (Debugging and Assertion Control): Add GNAT specific assertion + pragmas to the equivalent Assertion_Policy for the -gnata + option. + * gnat_ugn.texi: Regenerate. + +2022-07-04 Justin Squirek + + * sem_disp.adb (Most_Descendant_Use_Clause): Remove call to + deprecated Is_Internal. + * sem_util.adb (Innermost_Master_Scope_Depth): Use + Find_Enclosing_Scope instead of Nearest_Dynamic_Scope to avoid + cases where relevant scopes get skipped leading to an incorrect + scope depth calculation. + +2022-07-04 Eric Botcazou + + * exp_ch6.adb (Build_In_Place_Formal): Also compute Returns_By_Ref + for the function if the extra formals were not built initially. + +2022-07-04 Piotr Trojanek + + * sem_ch13.adb (Resolve_Iterable_Operation): Add guard to + prevent crash when the examined function has no formal + parameters and Etype is called on Empty entity. + +2022-07-04 Julien Bortolussi + + * libgnat/a-cfinse.adb, libgnat/a-cfinse.ads: Implementation + files of the sequence. + * Makefile.rtl, impunit.adb: Take into account the add of the + new files + +2022-07-04 Eric Botcazou + + * doc/gnat_rm/implementation_defined_pragmas.rst (Pure_Function): + Fix ambiguous wording about context dependence. + * gnat_rm.texi: Regenerate. + 2022-06-02 David Malcolm * gcc-interface/misc.cc (gnat_get_sarif_source_language): New. diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 8a0b71a..989f293 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,12 @@ +2022-07-04 Tobias Burnus + Chung-Lin Tang + Thomas Schwinge + + * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update, + c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set + OMP_REQUIRES_TARGET_USED. + (c_parser_omp_requires): Remove sorry. + 2022-07-01 Tobias Burnus * c-parser.cc (c_parser_omp_target_enter_data, diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 28e030f..b0bd3b4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2022-07-04 Tobias Burnus + Chung-Lin Tang + Thomas Schwinge + + * parser.cc (cp_parser_omp_target_data, + cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data, + cp_parser_omp_target_update): Set OMP_REQUIRES_TARGET_USED. + (cp_parser_omp_requires): Remove sorry. + 2022-07-01 Lewis Hyatt * parser.cc (cp_token_is_module_directive): New function diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ea9354c..9bde368 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,24 @@ +2022-07-04 Tobias Burnus + Jakub Jelinek + + * gfortran.h (gfc_omp_namelist): Update by creating 'linear' struct, + move 'linear_op' as 'op' to id and add 'old_modifier' to it. + * dump-parse-tree.cc (show_omp_namelist): Update accordingly. + * module.cc (mio_omp_declare_simd): Likewise. + * trans-openmp.cc (gfc_trans_omp_clauses): Likewise. + * openmp.cc (resolve_omp_clauses): Likewise; accept new-style + 'val' modifier with do/simd. + (gfc_match_omp_clauses): Handle OpenMP 5.2 linear clause syntax. + +2022-07-04 Tobias Burnus + Chung-Lin Tang + Thomas Schwinge + + * openmp.cc (gfc_match_omp_requires): Remove sorry. + * parse.cc (decode_omp_directive): Don't regard 'declare target' + as target usage for 'omp requires'; add more flags to + omp_requires_mask. + 2022-07-01 Tobias Burnus * dump-parse-tree.cc (show_omp_namelist): For the map-type, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c5772c7..0a1e58e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,58 @@ +2022-07-05 Hans-Peter Nilsson + + * gcc.dg/analyzer/allocation-size-1.c, + gcc.dg/analyzer/allocation-size-2.c, + gcc.dg/analyzer/allocation-size-3.c, + gcc.dg/analyzer/allocation-size-4.c, + gcc.dg/analyzer/allocation-size-5.c: Handle int32_t being "long int". + +2022-07-04 Tobias Burnus + Jakub Jelinek + + * c-c++-common/gomp/linear-4.c: New test. + * gfortran.dg/gomp/linear-2.f90: New test. + * gfortran.dg/gomp/linear-3.f90: New test. + * gfortran.dg/gomp/linear-4.f90: New test. + * gfortran.dg/gomp/linear-5.f90: New test. + * gfortran.dg/gomp/linear-6.f90: New test. + * gfortran.dg/gomp/linear-7.f90: New test. + * gfortran.dg/gomp/linear-8.f90: New test. + +2022-07-04 Martin Jambor + + PR tree-optimization/105860 + * gcc.dg/tree-ssa/alias-access-path-13.c: New test. + * gcc.dg/tree-ssa/pr105860.c: Likewise. + +2022-07-04 Tobias Burnus + Chung-Lin Tang + Thomas Schwinge + + * c-c++-common/gomp/requires-4.c: Update dg-*. + * c-c++-common/gomp/reverse-offload-1.c: Likewise. + * c-c++-common/gomp/target-device-ancestor-2.c: Likewise. + * c-c++-common/gomp/target-device-ancestor-3.c: Likewise. + * c-c++-common/gomp/target-device-ancestor-4.c: Likewise. + * c-c++-common/gomp/target-device-ancestor-5.c: Likewise. + * gfortran.dg/gomp/target-device-ancestor-3.f90: Likewise. + * gfortran.dg/gomp/target-device-ancestor-4.f90: Likewise. + * gfortran.dg/gomp/target-device-ancestor-5.f90: Likewise. + * gfortran.dg/gomp/target-device-ancestor-2.f90: Likewise. Move + post-FE checks to ... + * gfortran.dg/gomp/target-device-ancestor-2a.f90: ... this new file. + * gfortran.dg/gomp/requires-8.f90: Update as we don't regard + 'declare target' for the 'requires' usage requirement. + +2022-07-04 Richard Biener + + PR tree-optimization/106055 + * gcc.dg/graphite/pr106055.c: New testcase. + +2022-07-04 Haochen Jiang + + PR target/43618 + * gcc.target/i386/pr43618-1.c: New test. + 2022-07-03 H.J. Lu PR target/106022 -- cgit v1.1 From b55284f4a1235fccd8254f539ddc6b869580462b Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 4 Jul 2022 15:03:33 +0200 Subject: tree-optimization/106182 - LC SSA after CFG cleanup The testcase shows that when cleaning up the CFG we can end up with broken LC SSA (for virtual operands with the testcase). The case here involves deleting a loop after which it is not enough to scan the blocks with changed loop depth for SSA uses that need to be rewritten. So make fix_loop_sturcture return the sum of the number of new loops and the number of deleted loops. PR tree-optimization/106182 * loop-init.cc (fix_loop_structure): Return the number of newly discovered plus the number of deleted loops. * tree-cfgcleanup.cc (repair_loop_structures): Adjust variable name. * gcc.dg/torture/pr106182.c: New testcase. --- gcc/loop-init.cc | 10 +++++----- gcc/testsuite/gcc.dg/torture/pr106182.c | 18 ++++++++++++++++++ gcc/tree-cfgcleanup.cc | 6 +++--- 3 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr106182.c (limited to 'gcc') diff --git a/gcc/loop-init.cc b/gcc/loop-init.cc index 648aa29..b9e0797 100644 --- a/gcc/loop-init.cc +++ b/gcc/loop-init.cc @@ -194,7 +194,7 @@ loop_fini_done: If CHANGED_BBS is not NULL, basic blocks whose loop depth has changed are marked in it. - Returns the number of new discovered loops. */ + Returns the number of new discovered plus the number of removed loops. */ unsigned fix_loop_structure (bitmap changed_bbs) @@ -277,7 +277,7 @@ fix_loop_structure (bitmap changed_bbs) } /* Finally free deleted loops. */ - bool any_deleted = false; + unsigned n_deleted = 0; class loop *loop; FOR_EACH_VEC_ELT (*get_loops (cfun), i, loop) if (loop && loop->header == NULL) @@ -311,12 +311,12 @@ fix_loop_structure (bitmap changed_bbs) } (*get_loops (cfun))[i] = NULL; flow_loop_free (loop); - any_deleted = true; + n_deleted++; } /* If we deleted loops then the cached scalar evolutions refering to those loops become invalid. */ - if (any_deleted && scev_initialized_p ()) + if (n_deleted > 0 && scev_initialized_p ()) scev_reset_htab (); loops_state_clear (LOOPS_NEED_FIXUP); @@ -328,7 +328,7 @@ fix_loop_structure (bitmap changed_bbs) timevar_pop (TV_LOOP_INIT); - return number_of_loops (cfun) - old_nloops; + return number_of_loops (cfun) - old_nloops + n_deleted; } /* The RTL loop superpass. The actual passes are subpasses. See passes.cc for diff --git a/gcc/testsuite/gcc.dg/torture/pr106182.c b/gcc/testsuite/gcc.dg/torture/pr106182.c new file mode 100644 index 0000000..6b5c249 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr106182.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-funswitch-loops" } */ + +short var_32; +int test_var_0; +unsigned char test_var_6; +char test_var_13; +void test(int var_2) +{ + for (;;) + for (short i_7; i_7 < test_var_13; i_7 += 1) + for (; test_var_0;) { + for (; var_2;) + var_32 = 0; + for (char i_19; i_19 < test_var_6 + 135; i_19 += 200) + ; + } +} diff --git a/gcc/tree-cfgcleanup.cc b/gcc/tree-cfgcleanup.cc index a6d0bf2..3b24e02 100644 --- a/gcc/tree-cfgcleanup.cc +++ b/gcc/tree-cfgcleanup.cc @@ -1170,13 +1170,13 @@ static void repair_loop_structures (void) { bitmap changed_bbs; - unsigned n_new_loops; + unsigned n_new_or_deleted_loops; calculate_dominance_info (CDI_DOMINATORS); timevar_push (TV_REPAIR_LOOPS); changed_bbs = BITMAP_ALLOC (NULL); - n_new_loops = fix_loop_structure (changed_bbs); + n_new_or_deleted_loops = fix_loop_structure (changed_bbs); /* This usually does nothing. But sometimes parts of cfg that originally were inside a loop get out of it due to edge removal (since they @@ -1184,7 +1184,7 @@ repair_loop_structures (void) irreducible loop can become reducible - in this case force a full rewrite into loop-closed SSA form. */ if (loops_state_satisfies_p (LOOP_CLOSED_SSA)) - rewrite_into_loop_closed_ssa (n_new_loops ? NULL : changed_bbs, + rewrite_into_loop_closed_ssa (n_new_or_deleted_loops ? NULL : changed_bbs, TODO_update_ssa); BITMAP_FREE (changed_bbs); -- cgit v1.1 From 76c3041b856cb0495d8f71110cd76f6fe64a0038 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 5 Jul 2022 08:53:10 +0100 Subject: vect: Use sdot for a fallback implementation of usdot Following a suggestion from Tamar, this patch adds a fallback implementation of usdot using sdot. Specifically, for 8-bit input types: acc_2 = DOT_PROD_EXPR ; becomes: tmp_1 = DOT_PROD_EXPR <64, b_signed, acc_1>; tmp_2 = DOT_PROD_EXPR <64, b_signed, tmp_1>; acc_2 = DOT_PROD_EXPR ; on the basis that (x-128)*y + 64*y + 64*y. Doing the two 64*y operations first should give more time for x to be calculated, on the off chance that that's useful. gcc/ * tree-vect-patterns.cc (vect_convert_input): Expect the input type to be signed for optab_vector_mixed_sign. Update the vectype at the same time as type. (vect_recog_dot_prod_pattern): Update accordingly. If usdot isn't available, try sdot instead. * tree-vect-loop.cc (vect_is_emulated_mixed_dot_prod): New function. (vect_model_reduction_cost): Model the cost of implementing usdot using sdot. (vectorizable_reduction): Likewise. Skip target support test for lane reductions. (vect_emulate_mixed_dot_prod): New function. (vect_transform_reduction): Use it to emulate usdot via sdot. gcc/testsuite/ * gcc.dg/vect/vect-reduc-dot-9.c: Reduce target requirements from i8mm to dotprod. * gcc.dg/vect/vect-reduc-dot-10.c: Likewise. * gcc.dg/vect/vect-reduc-dot-11.c: Likewise. * gcc.dg/vect/vect-reduc-dot-12.c: Likewise. * gcc.dg/vect/vect-reduc-dot-13.c: Likewise. * gcc.dg/vect/vect-reduc-dot-14.c: Likewise. * gcc.dg/vect/vect-reduc-dot-15.c: Likewise. * gcc.dg/vect/vect-reduc-dot-16.c: Likewise. * gcc.dg/vect/vect-reduc-dot-17.c: Likewise. * gcc.dg/vect/vect-reduc-dot-18.c: Likewise. * gcc.dg/vect/vect-reduc-dot-19.c: Likewise. * gcc.dg/vect/vect-reduc-dot-20.c: Likewise. * gcc.dg/vect/vect-reduc-dot-21.c: Likewise. * gcc.dg/vect/vect-reduc-dot-22.c: Likewise. --- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-10.c | 6 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-11.c | 6 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-12.c | 6 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-13.c | 6 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-14.c | 6 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-15.c | 6 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-16.c | 6 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-17.c | 6 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-18.c | 6 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c | 4 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c | 4 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c | 4 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c | 4 +- gcc/testsuite/gcc.dg/vect/vect-reduc-dot-9.c | 6 +- gcc/tree-vect-loop.cc | 160 +++++++++++++++++++++++--- gcc/tree-vect-patterns.cc | 38 ++++-- 16 files changed, 213 insertions(+), 61 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-10.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-10.c index 7ce8696..34e25ab 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-10.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-10.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #define SIGNEDNESS_1 unsigned #define SIGNEDNESS_2 unsigned @@ -10,4 +10,4 @@ #include "vect-reduc-dot-9.c" /* { dg-final { scan-tree-dump-not "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-11.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-11.c index 0f7cbbb..3af8df5 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-11.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-11.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #define SIGNEDNESS_1 unsigned #define SIGNEDNESS_2 signed @@ -10,4 +10,4 @@ #include "vect-reduc-dot-9.c" /* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-12.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-12.c index 0841261..77ceef3 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-12.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-12.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #define SIGNEDNESS_1 unsigned #define SIGNEDNESS_2 signed @@ -10,4 +10,4 @@ #include "vect-reduc-dot-9.c" /* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-13.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-13.c index 7ee0f45..d3c0c86 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-13.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-13.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #define SIGNEDNESS_1 signed #define SIGNEDNESS_2 unsigned @@ -10,4 +10,4 @@ #include "vect-reduc-dot-9.c" /* { dg-final { scan-tree-dump-not "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-14.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-14.c index 2de1434..86a5c85 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-14.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-14.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #define SIGNEDNESS_1 signed #define SIGNEDNESS_2 unsigned @@ -10,4 +10,4 @@ #include "vect-reduc-dot-9.c" /* { dg-final { scan-tree-dump-not "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-15.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-15.c index dc48f95..25de094 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-15.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-15.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #define SIGNEDNESS_1 signed #define SIGNEDNESS_2 signed @@ -10,4 +10,4 @@ #include "vect-reduc-dot-9.c" /* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-16.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-16.c index aec6287..4a1dec0 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-16.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-16.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #define SIGNEDNESS_1 signed #define SIGNEDNESS_2 signed @@ -10,4 +10,4 @@ #include "vect-reduc-dot-9.c" /* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-17.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-17.c index 38f86fe..90d2118 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-17.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-17.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #include "tree-vect.h" @@ -50,4 +50,4 @@ main (void) } /* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-18.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-18.c index 2e86ebe..81ecb15 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-18.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-18.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #include "tree-vect.h" @@ -50,4 +50,4 @@ main (void) } /* { dg-final { scan-tree-dump "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c index d00f24a..cbcd4f12 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-19.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c index 17adbca8..e81ed1d 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-20.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c index 6cc6a4f..81ce5cd 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-21.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c index e13d3d5..b8c9d3c 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-22.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-9.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-9.c index d1049c9..e0b132f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-9.c +++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-9.c @@ -1,6 +1,6 @@ /* { dg-require-effective-target vect_int } */ -/* { dg-require-effective-target arm_v8_2a_i8mm_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ -/* { dg-add-options arm_v8_2a_i8mm } */ +/* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */ +/* { dg-add-options arm_v8_2a_dotprod_neon } */ #include "tree-vect.h" @@ -50,4 +50,4 @@ main (void) } /* { dg-final { scan-tree-dump-not "vect_recog_dot_prod_pattern: detected" "vect" } } */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_usdot_qi } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" { target vect_sdot_qi } } } */ diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 78dfe85..3a70c15 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -4566,6 +4566,31 @@ have_whole_vector_shift (machine_mode mode) return true; } +/* Return true if (a) STMT_INFO is a DOT_PROD_EXPR reduction whose + multiplication operands have differing signs and (b) we intend + to emulate the operation using a series of signed DOT_PROD_EXPRs. + See vect_emulate_mixed_dot_prod for the actual sequence used. */ + +static bool +vect_is_emulated_mixed_dot_prod (loop_vec_info loop_vinfo, + stmt_vec_info stmt_info) +{ + gassign *assign = dyn_cast (stmt_info->stmt); + if (!assign || gimple_assign_rhs_code (assign) != DOT_PROD_EXPR) + return false; + + tree rhs1 = gimple_assign_rhs1 (assign); + tree rhs2 = gimple_assign_rhs2 (assign); + if (TYPE_SIGN (TREE_TYPE (rhs1)) == TYPE_SIGN (TREE_TYPE (rhs2))) + return false; + + stmt_vec_info reduc_info = info_for_reduction (loop_vinfo, stmt_info); + gcc_assert (reduc_info->is_reduc_info); + return !directly_supported_p (DOT_PROD_EXPR, + STMT_VINFO_REDUC_VECTYPE_IN (reduc_info), + optab_vector_mixed_sign); +} + /* TODO: Close dependency between vect_model_*_cost and vectorizable_* functions. Design better to avoid maintenance issues. */ @@ -4601,6 +4626,8 @@ vect_model_reduction_cost (loop_vec_info loop_vinfo, if (!gimple_extract_op (orig_stmt_info->stmt, &op)) gcc_unreachable (); + bool emulated_mixed_dot_prod + = vect_is_emulated_mixed_dot_prod (loop_vinfo, stmt_info); if (reduction_type == EXTRACT_LAST_REDUCTION) /* No extra instructions are needed in the prologue. The loop body operations are costed in vectorizable_condition. */ @@ -4628,11 +4655,20 @@ vect_model_reduction_cost (loop_vec_info loop_vinfo, } else { - /* Add in cost for initial definition. - For cond reduction we have four vectors: initial index, step, - initial result of the data reduction, initial value of the index - reduction. */ - int prologue_stmts = reduction_type == COND_REDUCTION ? 4 : 1; + /* Add in the cost of the initial definitions. */ + int prologue_stmts; + if (reduction_type == COND_REDUCTION) + /* For cond reductions we have four vectors: initial index, step, + initial result of the data reduction, initial value of the index + reduction. */ + prologue_stmts = 4; + else if (emulated_mixed_dot_prod) + /* We need the initial reduction value and two invariants: + one that contains the minimum signed value and one that + contains half of its negative. */ + prologue_stmts = 3; + else + prologue_stmts = 1; prologue_cost += record_stmt_cost (cost_vec, prologue_stmts, scalar_to_vec, stmt_info, 0, vect_prologue); @@ -6797,11 +6833,6 @@ vectorizable_reduction (loop_vec_info loop_vinfo, bool lane_reduc_code_p = (op.code == DOT_PROD_EXPR || op.code == WIDEN_SUM_EXPR || op.code == SAD_EXPR); - enum optab_subtype optab_query_kind = optab_vector; - if (op.code == DOT_PROD_EXPR - && (TYPE_SIGN (TREE_TYPE (op.ops[0])) - != TYPE_SIGN (TREE_TYPE (op.ops[1])))) - optab_query_kind = optab_vector_mixed_sign; if (!POINTER_TYPE_P (op.type) && !INTEGRAL_TYPE_P (op.type) && !SCALAR_FLOAT_TYPE_P (op.type)) @@ -7328,9 +7359,17 @@ vectorizable_reduction (loop_vec_info loop_vinfo, /* 4. Supportable by target? */ bool ok = true; - /* 4.1. check support for the operation in the loop */ + /* 4.1. check support for the operation in the loop + + This isn't necessary for the lane reduction codes, since they + can only be produced by pattern matching, and it's up to the + pattern matcher to test for support. The main reason for + specifically skipping this step is to avoid rechecking whether + mixed-sign dot-products can be implemented using signed + dot-products. */ machine_mode vec_mode = TYPE_MODE (vectype_in); - if (!directly_supported_p (op.code, vectype_in, optab_query_kind)) + if (!lane_reduc_code_p + && !directly_supported_p (op.code, vectype_in)) { if (dump_enabled_p ()) dump_printf (MSG_NOTE, "op not supported by target.\n"); @@ -7398,7 +7437,14 @@ vectorizable_reduction (loop_vec_info loop_vinfo, vect_transform_reduction. Otherwise this is costed by the separate vectorizable_* routines. */ if (single_defuse_cycle || lane_reduc_code_p) - record_stmt_cost (cost_vec, ncopies, vector_stmt, stmt_info, 0, vect_body); + { + int factor = 1; + if (vect_is_emulated_mixed_dot_prod (loop_vinfo, stmt_info)) + /* Three dot-products and a subtraction. */ + factor = 4; + record_stmt_cost (cost_vec, ncopies * factor, vector_stmt, + stmt_info, 0, vect_body); + } if (dump_enabled_p () && reduction_type == FOLD_LEFT_REDUCTION) @@ -7457,6 +7503,81 @@ vectorizable_reduction (loop_vec_info loop_vinfo, return true; } +/* STMT_INFO is a dot-product reduction whose multiplication operands + have different signs. Emit a sequence to emulate the operation + using a series of signed DOT_PROD_EXPRs and return the last + statement generated. VEC_DEST is the result of the vector operation + and VOP lists its inputs. */ + +static gassign * +vect_emulate_mixed_dot_prod (loop_vec_info loop_vinfo, stmt_vec_info stmt_info, + gimple_stmt_iterator *gsi, tree vec_dest, + tree vop[3]) +{ + tree wide_vectype = signed_type_for (TREE_TYPE (vec_dest)); + tree narrow_vectype = signed_type_for (TREE_TYPE (vop[0])); + tree narrow_elttype = TREE_TYPE (narrow_vectype); + gimple *new_stmt; + + /* Make VOP[0] the unsigned operand VOP[1] the signed operand. */ + if (!TYPE_UNSIGNED (TREE_TYPE (vop[0]))) + std::swap (vop[0], vop[1]); + + /* Convert all inputs to signed types. */ + for (int i = 0; i < 3; ++i) + if (TYPE_UNSIGNED (TREE_TYPE (vop[i]))) + { + tree tmp = make_ssa_name (signed_type_for (TREE_TYPE (vop[i]))); + new_stmt = gimple_build_assign (tmp, NOP_EXPR, vop[i]); + vect_finish_stmt_generation (loop_vinfo, stmt_info, new_stmt, gsi); + vop[i] = tmp; + } + + /* In the comments below we assume 8-bit inputs for simplicity, + but the approach works for any full integer type. */ + + /* Create a vector of -128. */ + tree min_narrow_elttype = TYPE_MIN_VALUE (narrow_elttype); + tree min_narrow = build_vector_from_val (narrow_vectype, + min_narrow_elttype); + + /* Create a vector of 64. */ + auto half_wi = wi::lrshift (wi::to_wide (min_narrow_elttype), 1); + tree half_narrow = wide_int_to_tree (narrow_elttype, half_wi); + half_narrow = build_vector_from_val (narrow_vectype, half_narrow); + + /* Emit: SUB_RES = VOP[0] - 128. */ + tree sub_res = make_ssa_name (narrow_vectype); + new_stmt = gimple_build_assign (sub_res, PLUS_EXPR, vop[0], min_narrow); + vect_finish_stmt_generation (loop_vinfo, stmt_info, new_stmt, gsi); + + /* Emit: + + STAGE1 = DOT_PROD_EXPR ; + STAGE2 = DOT_PROD_EXPR ; + STAGE3 = DOT_PROD_EXPR ; + + on the basis that x * y == (x - 128) * y + 64 * y + 64 * y + Doing the two 64 * y steps first allows more time to compute x. */ + tree stage1 = make_ssa_name (wide_vectype); + new_stmt = gimple_build_assign (stage1, DOT_PROD_EXPR, + vop[1], half_narrow, vop[2]); + vect_finish_stmt_generation (loop_vinfo, stmt_info, new_stmt, gsi); + + tree stage2 = make_ssa_name (wide_vectype); + new_stmt = gimple_build_assign (stage2, DOT_PROD_EXPR, + vop[1], half_narrow, stage1); + vect_finish_stmt_generation (loop_vinfo, stmt_info, new_stmt, gsi); + + tree stage3 = make_ssa_name (wide_vectype); + new_stmt = gimple_build_assign (stage3, DOT_PROD_EXPR, + sub_res, vop[1], stage2); + vect_finish_stmt_generation (loop_vinfo, stmt_info, new_stmt, gsi); + + /* Convert STAGE3 to the reduction type. */ + return gimple_build_assign (vec_dest, CONVERT_EXPR, stage3); +} + /* Transform the definition stmt STMT_INFO of a reduction PHI backedge value. */ @@ -7563,12 +7684,17 @@ vect_transform_reduction (loop_vec_info loop_vinfo, : &vec_oprnds2)); } + bool emulated_mixed_dot_prod + = vect_is_emulated_mixed_dot_prod (loop_vinfo, stmt_info); FOR_EACH_VEC_ELT (vec_oprnds0, i, def0) { gimple *new_stmt; tree vop[3] = { def0, vec_oprnds1[i], NULL_TREE }; if (masked_loop_p && !mask_by_cond_expr) { + /* No conditional ifns have been defined for dot-product yet. */ + gcc_assert (code != DOT_PROD_EXPR); + /* Make sure that the reduction accumulator is vop[0]. */ if (reduc_index == 1) { @@ -7597,8 +7723,12 @@ vect_transform_reduction (loop_vec_info loop_vinfo, build_vect_cond_expr (code, vop, mask, gsi); } - new_stmt = gimple_build_assign (vec_dest, code, - vop[0], vop[1], vop[2]); + if (emulated_mixed_dot_prod) + new_stmt = vect_emulate_mixed_dot_prod (loop_vinfo, stmt_info, gsi, + vec_dest, vop); + else + new_stmt = gimple_build_assign (vec_dest, code, + vop[0], vop[1], vop[2]); new_temp = make_ssa_name (vec_dest, new_stmt); gimple_assign_set_lhs (new_stmt, new_temp); vect_finish_stmt_generation (loop_vinfo, stmt_info, new_stmt, gsi); diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc index 8f62486..dfbfb71 100644 --- a/gcc/tree-vect-patterns.cc +++ b/gcc/tree-vect-patterns.cc @@ -760,12 +760,16 @@ vect_convert_input (vec_info *vinfo, stmt_vec_info stmt_info, tree type, vect_unpromoted_value *unprom, tree vectype, enum optab_subtype subtype = optab_default) { - /* Update the type if the signs differ. */ - if (subtype == optab_vector_mixed_sign - && TYPE_SIGN (type) != TYPE_SIGN (TREE_TYPE (unprom->op))) - type = build_nonstandard_integer_type (TYPE_PRECISION (type), - TYPE_SIGN (unprom->type)); + if (subtype == optab_vector_mixed_sign) + { + gcc_assert (!TYPE_UNSIGNED (type)); + if (TYPE_UNSIGNED (TREE_TYPE (unprom->op))) + { + type = unsigned_type_for (type); + vectype = unsigned_type_for (vectype); + } + } /* Check for a no-op conversion. */ if (types_compatible_p (type, TREE_TYPE (unprom->op))) @@ -1139,16 +1143,34 @@ vect_recog_dot_prod_pattern (vec_info *vinfo, is signed; otherwise, the result has the same sign as the operands. */ if (TYPE_PRECISION (unprom_mult.type) != TYPE_PRECISION (type) && (subtype == optab_vector_mixed_sign - ? TYPE_UNSIGNED (unprom_mult.type) - : TYPE_SIGN (unprom_mult.type) != TYPE_SIGN (half_type))) + ? TYPE_UNSIGNED (unprom_mult.type) + : TYPE_SIGN (unprom_mult.type) != TYPE_SIGN (half_type))) return NULL; vect_pattern_detected ("vect_recog_dot_prod_pattern", last_stmt); + /* If the inputs have mixed signs, canonicalize on using the signed + input type for analysis. This also helps when emulating mixed-sign + operations using signed operations. */ + if (subtype == optab_vector_mixed_sign) + half_type = signed_type_for (half_type); + tree half_vectype; if (!vect_supportable_direct_optab_p (vinfo, type, DOT_PROD_EXPR, half_type, type_out, &half_vectype, subtype)) - return NULL; + { + /* We can emulate a mixed-sign dot-product using a sequence of + signed dot-products; see vect_emulate_mixed_dot_prod for details. */ + if (subtype != optab_vector_mixed_sign + || !vect_supportable_direct_optab_p (vinfo, signed_type_for (type), + DOT_PROD_EXPR, half_type, + type_out, &half_vectype, + optab_vector)) + return NULL; + + *type_out = signed_or_unsigned_type_for (TYPE_UNSIGNED (type), + *type_out); + } /* Get the inputs in the appropriate types. */ tree mult_oprnd[2]; -- cgit v1.1 From 4c1baa02893bea62bb9b87df5600be48760f6bb1 Mon Sep 17 00:00:00 2001 From: Doug Rupp Date: Thu, 12 May 2022 12:35:37 -0700 Subject: [Ada] Remove old vxworks6 from Makefile.rtl Pre vxworks7 code excepting legacy vxworks6 code is removed from Makefile.rtl and unused files are deleted. gcc/ada/ * Makefile.rtl (*vxworks*): Remove most pre-vxworks7 code. * vxworks-arm-link.spec: Remove. * vxworks-e500-link.spec: Likewise. * vxworks-smp-arm-link.spec: Likewise. * vxworks-smp-e500-link.spec: Likewise. * vxworks-smp-x86-link.spec: Likewise. * libgnat/system-vxworks-arm-rtp-smp.ads: Likewise. * libgnat/system-vxworks-arm-rtp.ads: Likewise. * libgnat/system-vxworks-arm.ads: Likewise. * libgnat/system-vxworks-e500-kernel.ads: Likewise. * libgnat/system-vxworks-e500-rtp-smp.ads: Likewise. * libgnat/system-vxworks-e500-rtp.ads: Likewise. * libgnat/system-vxworks-x86-kernel.ads: Likewise. * libgnat/system-vxworks-x86-rtp-smp.ads: Likewise. * libgnat/system-vxworks-x86-rtp.ads: Likewise. --- gcc/ada/Makefile.rtl | 140 ++++++-------------- gcc/ada/libgnat/system-vxworks-arm-rtp-smp.ads | 165 ----------------------- gcc/ada/libgnat/system-vxworks-arm-rtp.ads | 164 ----------------------- gcc/ada/libgnat/system-vxworks-arm.ads | 159 ----------------------- gcc/ada/libgnat/system-vxworks-e500-kernel.ads | 160 ----------------------- gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads | 166 ------------------------ gcc/ada/libgnat/system-vxworks-e500-rtp.ads | 164 ----------------------- gcc/ada/libgnat/system-vxworks-x86-kernel.ads | 163 ----------------------- gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads | 164 ----------------------- gcc/ada/libgnat/system-vxworks-x86-rtp.ads | 163 ----------------------- gcc/ada/vxworks-arm-link.spec | 4 - gcc/ada/vxworks-e500-link.spec | 6 - gcc/ada/vxworks-smp-arm-link.spec | 4 - gcc/ada/vxworks-smp-e500-link.spec | 4 - gcc/ada/vxworks-smp-x86-link.spec | 9 -- 15 files changed, 37 insertions(+), 1598 deletions(-) delete mode 100644 gcc/ada/libgnat/system-vxworks-arm-rtp-smp.ads delete mode 100644 gcc/ada/libgnat/system-vxworks-arm-rtp.ads delete mode 100644 gcc/ada/libgnat/system-vxworks-arm.ads delete mode 100644 gcc/ada/libgnat/system-vxworks-e500-kernel.ads delete mode 100644 gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads delete mode 100644 gcc/ada/libgnat/system-vxworks-e500-rtp.ads delete mode 100644 gcc/ada/libgnat/system-vxworks-x86-kernel.ads delete mode 100644 gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads delete mode 100644 gcc/ada/libgnat/system-vxworks-x86-rtp.ads delete mode 100644 gcc/ada/vxworks-arm-link.spec delete mode 100644 gcc/ada/vxworks-e500-link.spec delete mode 100644 gcc/ada/vxworks-smp-arm-link.spec delete mode 100644 gcc/ada/vxworks-smp-e500-link.spec delete mode 100644 gcc/ada/vxworks-smp-x86-link.spec (limited to 'gcc') diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index fc1aac9..002d425 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -1078,21 +1078,13 @@ GCC_SPEC_FILES= # $(strip STRING) removes leading and trailing spaces from STRING. # If what's left is null then it's a match. -# PowerPC and e500v2 VxWorks -ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworksspe vxworks7% vxworks7spe,$(target_cpu) $(target_vendor) $(target_os))),) - - ifeq ($(strip $(filter-out e500%, $(target_alias))),) - ARCH_STR=e500 - # gcc config translates the target e500v2-wrs-vxworks to - # powerpc-wrs-vxworksspe. Let's keep the original alias here when - # generating s-oscons.ads. - target=$(target_alias) +# PowerPC VxWorks6 and VxWorks7 +ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7%, $(target_cpu) $(target_vendor) $(target_os))),) + + ifeq ($(strip $(filter-out powerpc64, $(target_cpu))),) + ARCH_STR=ppc64 else - ifeq ($(strip $(filter-out powerpc64, $(target_cpu))),) - ARCH_STR=ppc64 - else - ARCH_STR=ppc - endif + ARCH_STR=ppc endif VX=$(strip $(if $(filter vxworks7%, $(target_os)), vxworks7, vxworks)) @@ -1123,20 +1115,6 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworksspe vxworks7% vxworks7spe $(ATOMICS_TARGET_PAIRS) \ $(ATOMICS_BUILTINS_TARGET_PAIRS) - # VxWorks 5 and 6 both use the same target triplet making them - # indistinguishable in the context of this make file. Package - # System.Stack_Checking.Operations is not needed on VxWorks 6 as it leads to - # an undefined symbol when building a dynamic shared library. To alleviate - # this problem and distinguish this case, we use the THREAD_KIND and include - # the package only in default mode. - - ifeq ($(strip $(filter-out default,$(THREAD_KIND))),) - LIBGNAT_TARGET_PAIRS += \ - s-stchop.ads" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := Low_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - pragma Linker_Options ("--specs=vxworks-smp-arm-link.spec"); - pragma Linker_Options ("--specs=vxworks-arm-link.spec"); - -- Setup proper set of -L's for this configuration - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := True; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - Signed_Zeros : constant Boolean := True; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := False; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".vxe"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks-arm-rtp.ads b/gcc/ada/libgnat/system-vxworks-arm-rtp.ads deleted file mode 100644 index aa8515a..0000000 --- a/gcc/ada/libgnat/system-vxworks-arm-rtp.ads +++ /dev/null @@ -1,164 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks 6.x ARM RTP) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- In particular, you can freely distribute your programs built with the -- --- GNAT Pro compiler, including any required library run-time units, using -- --- any licensing terms of your choosing. See the AdaCore Software License -- --- for full details. -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the VxWorks version of this package for RTPs - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := Low_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - pragma Linker_Options ("--specs=vxworks-arm-link.spec"); - -- Setup proper set of -L's for this configuration - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := True; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - Signed_Zeros : constant Boolean := True; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := False; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".vxe"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks-arm.ads b/gcc/ada/libgnat/system-vxworks-arm.ads deleted file mode 100644 index ae09b78..0000000 --- a/gcc/ada/libgnat/system-vxworks-arm.ads +++ /dev/null @@ -1,159 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks Version ARM) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := Low_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - Signed_Zeros : constant Boolean := True; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := True; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".out"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks-e500-kernel.ads b/gcc/ada/libgnat/system-vxworks-e500-kernel.ads deleted file mode 100644 index 4b091ae..0000000 --- a/gcc/ada/libgnat/system-vxworks-e500-kernel.ads +++ /dev/null @@ -1,160 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks 6 Kernel Version E500) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := High_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - -- MPC8548ECE Chip Errata Rev 8: signed zero not reliable - Signed_Zeros : constant Boolean := False; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := True; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".out"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads deleted file mode 100644 index a5d4d87..0000000 --- a/gcc/ada/libgnat/system-vxworks-e500-rtp-smp.ads +++ /dev/null @@ -1,166 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks 6.x SMP E500 RTP) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the VxWorks SMP version of this package for RTPs - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := High_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - pragma Linker_Options ("--specs=vxworks-smp-e500-link.spec"); - pragma Linker_Options ("--specs=vxworks-e500-link.spec"); - -- Setup proper set of -L's for this configuration - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := True; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - -- MPC8548ECE Chip Errata Rev 8: signed zero not reliable - Signed_Zeros : constant Boolean := False; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := False; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".vxe"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks-e500-rtp.ads b/gcc/ada/libgnat/system-vxworks-e500-rtp.ads deleted file mode 100644 index 4f96385..0000000 --- a/gcc/ada/libgnat/system-vxworks-e500-rtp.ads +++ /dev/null @@ -1,164 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks 6.x E500 RTP) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the VxWorks version of this package for RTPs - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := High_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - pragma Linker_Options ("--specs=vxworks-e500-link.spec"); - -- Setup proper set of -L's for this configuration - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := True; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - Signed_Zeros : constant Boolean := True; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := False; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".vxe"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks-x86-kernel.ads b/gcc/ada/libgnat/system-vxworks-x86-kernel.ads deleted file mode 100644 index 4c912b8..0000000 --- a/gcc/ada/libgnat/system-vxworks-x86-kernel.ads +++ /dev/null @@ -1,163 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks 6 Kernel Version x86) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := Low_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - pragma Linker_Options ("--specs=vxworks-x86-link.spec"); - -- Setup proper set of -L's for this configuration - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - Signed_Zeros : constant Boolean := True; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Atomic_Primitives : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := True; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".out"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads deleted file mode 100644 index f8115a5..0000000 --- a/gcc/ada/libgnat/system-vxworks-x86-rtp-smp.ads +++ /dev/null @@ -1,164 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks Version x86 for SMP RTPs) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := Low_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - pragma Linker_Options ("--specs=vxworks-smp-x86-link.spec"); - pragma Linker_Options ("--specs=vxworks-x86-link.spec"); - -- Setup proper set of -L's for this configuration - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := True; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - Signed_Zeros : constant Boolean := True; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Atomic_Primitives : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := False; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".vxe"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks-x86-rtp.ads b/gcc/ada/libgnat/system-vxworks-x86-rtp.ads deleted file mode 100644 index 8894abb..0000000 --- a/gcc/ada/libgnat/system-vxworks-x86-rtp.ads +++ /dev/null @@ -1,163 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks Version x86 for RTPs) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := Low_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - pragma Linker_Options ("--specs=vxworks-x86-link.spec"); - -- Setup proper set of -L's for this configuration - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := True; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - Signed_Zeros : constant Boolean := True; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Atomic_Primitives : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := False; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".vxe"; - -end System; diff --git a/gcc/ada/vxworks-arm-link.spec b/gcc/ada/vxworks-arm-link.spec deleted file mode 100644 index 71c9832..0000000 --- a/gcc/ada/vxworks-arm-link.spec +++ /dev/null @@ -1,4 +0,0 @@ -*lib: -+ %{mrtp:%{!shared: \ - -L%:getenv(WIND_BASE /target/lib/usr/lib/arm/ARMARCH7/common) \ - }} diff --git a/gcc/ada/vxworks-e500-link.spec b/gcc/ada/vxworks-e500-link.spec deleted file mode 100644 index befeba1..0000000 --- a/gcc/ada/vxworks-e500-link.spec +++ /dev/null @@ -1,6 +0,0 @@ -*lib: -+ %{mrtp:%{!shared: \ - -L%:if-exists-else( \ - %:getenv(WIND_BASE /target/lib/usr/lib/ppc/PPC32/e500v2common) \ - %:getenv(WIND_BASE /target/usr/lib/ppc/PPC32/e500v2common)) \ - }} diff --git a/gcc/ada/vxworks-smp-arm-link.spec b/gcc/ada/vxworks-smp-arm-link.spec deleted file mode 100644 index 0370716..0000000 --- a/gcc/ada/vxworks-smp-arm-link.spec +++ /dev/null @@ -1,4 +0,0 @@ -*lib: -+ %{mrtp:%{!shared: \ - -L%:getenv(WIND_BASE /target/lib_smp/usr/lib/arm/ARMARCH7/common) \ - }} diff --git a/gcc/ada/vxworks-smp-e500-link.spec b/gcc/ada/vxworks-smp-e500-link.spec deleted file mode 100644 index 799bd190..0000000 --- a/gcc/ada/vxworks-smp-e500-link.spec +++ /dev/null @@ -1,4 +0,0 @@ -*lib: -+ %{mrtp:%{!shared: \ - -L%:getenv(WIND_BASE /target/lib_smp/usr/lib/ppc/PPC32/e500v2common) \ - }} diff --git a/gcc/ada/vxworks-smp-x86-link.spec b/gcc/ada/vxworks-smp-x86-link.spec deleted file mode 100644 index 98a60c1..0000000 --- a/gcc/ada/vxworks-smp-x86-link.spec +++ /dev/null @@ -1,9 +0,0 @@ -*lib: -+ %{mrtp:%{!shared: \ - %{vxsim: \ - -L%:getenv(WIND_BASE /target/lib_smp/usr/lib/simpentium/SIMPENTIUM/common) \ - } \ - %{!vxsim: \ - -L%:getenv(WIND_BASE /target/lib_smp/usr/lib/pentium/PENTIUM4/common) \ - } \ - }} -- cgit v1.1 From fee24d5cae0661a8e165b752b4d890a3fd02205c Mon Sep 17 00:00:00 2001 From: Dmitriy Anisimkov Date: Thu, 2 Jun 2022 12:50:07 +0600 Subject: [Ada] Remove unimplemented convert_addresses declaration convert_addresses is declared in adaint.h but is never referenced, so remove it. gcc/ada/ * adaint.h (convert_addresses): Remove function declaration. --- gcc/ada/adaint.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h index 2631be5..26daf26 100644 --- a/gcc/ada/adaint.h +++ b/gcc/ada/adaint.h @@ -254,8 +254,6 @@ extern char *__gnat_to_host_dir_spec (char *, int); extern char *__gnat_to_host_file_spec (char *); extern char *__gnat_to_canonical_path_spec (char *); extern void __gnat_adjust_os_resource_limits (void); -extern void convert_addresses (const char *, void *, int, - void *, int *); extern int __gnat_copy_attribs (char *, char *, int); extern int __gnat_feof (FILE *); extern int __gnat_ferror (FILE *); -- cgit v1.1 From 5b560170323869f7d8406da6c985b0d21b2f7ef3 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 2 Jun 2022 15:10:46 +0200 Subject: [Ada] Remove comment about a long gone formal verification mode Remove outdated a comment about the very first SPARK experiments in GNAT. gcc/ada/ * sem_ch6.adb (Check_Missing_Return): Remove outdated comment. --- gcc/ada/sem_ch6.adb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 848c234..5a4ba7a 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -2987,9 +2987,7 @@ package body Sem_Ch6 is procedure Check_Missing_Return; -- Checks for a function with a no return statements, and also performs - -- the warning checks implemented by Check_Returns. In formal mode, also - -- verify that a function ends with a RETURN and that a procedure does - -- not contain any RETURN. + -- the warning checks implemented by Check_Returns. function Disambiguate_Spec return Entity_Id; -- When a primitive is declared between the private view and the full -- cgit v1.1 From 70bb3298c2b4eaec19490ada47dbc3d7307002af Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 2 Jun 2022 15:16:44 +0200 Subject: [Ada] Add RM reference to check for functions without a return statement Add comment to explain why we have an error and not just a warning. gcc/ada/ * sem_ch6.adb (Check_Missing_Return): Add reference to an RM rule. --- gcc/ada/sem_ch6.adb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc') diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 5a4ba7a..05db793 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -3568,6 +3568,10 @@ package body Sem_Ch6 is Id := Body_Id; end if; + -- A function body shall contain at least one return statement + -- that applies to the function body, unless the function contains + -- code_statements; RM 6.5(5). + if Return_Present (Id) then Check_Returns (HSS, 'F', Missing_Ret); -- cgit v1.1 From 948f4bc2dd05a55d53076ec72cd558302c1fc50c Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Sun, 29 May 2022 18:06:22 +0200 Subject: [Ada] Remove redundant guard for call to List_Length with a No_List Code cleanup related to a new detection of uninitialised local scalar objects; semantics is unaffected. gcc/ada/ * sem_ch5.adb (Analyze_Block_Statement): Call to List_Length with No_List is safe and will return zero. --- gcc/ada/sem_ch5.adb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index c5c8a7c..1f3ea55 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -1376,11 +1376,7 @@ package body Sem_Ch5 is -- Initialize unblocked exit count for statements of begin block -- plus one for each exception handler that is present. - Unblocked_Exit_Count := 1; - - if Present (EH) then - Unblocked_Exit_Count := Unblocked_Exit_Count + List_Length (EH); - end if; + Unblocked_Exit_Count := 1 + List_Length (EH); -- If a label is present analyze it and mark it as referenced -- cgit v1.1 From 21d6ec4579056c97953cb22e99056e6e9a5450c4 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Tue, 31 May 2022 00:29:28 +0200 Subject: [Ada] Remove redundant guards in detection of unreachable code Routine Check_Unreachable_Code is only called on nodes belonging to a list of statements (and it wouldn't make sense to call it on anything else). gcc/ada/ * sem_ch5.adb (Check_Unreachable_Code): Remove redundant guard; the call to Present wasn't needed either. --- gcc/ada/sem_ch5.adb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 1f3ea55..bb1e7b9 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -4398,7 +4398,7 @@ package body Sem_Ch5 is P : Node_Id; begin - if Is_List_Member (N) and then Comes_From_Source (N) then + if Comes_From_Source (N) then Nxt := Original_Node (Next (N)); -- Skip past pragmas @@ -4415,8 +4415,7 @@ package body Sem_Ch5 is -- Otherwise see if we have a real statement following us - elsif Present (Nxt) - and then Comes_From_Source (Nxt) + elsif Comes_From_Source (Nxt) and then Is_Statement (Nxt) then -- Special very annoying exception. If we have a return that -- cgit v1.1 From 4ba48342a3d1b37c651df566543708dae0599b71 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Tue, 31 May 2022 00:29:43 +0200 Subject: [Ada] Cleanup in error about unreachable code Cleanup only; behaviour is unaffected. gcc/ada/ * sem_ch5.adb (Check_Unreachable_Code): Avoid explicit use of Sloc; this should also help when we finally use Source_Span for prettier error messages. --- gcc/ada/sem_ch5.adb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index bb1e7b9..891c57a 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -4468,8 +4468,7 @@ package body Sem_Ch5 is end loop; end if; - Error_Msg - ("??unreachable code!", Sloc (Error_Node), Error_Node); + Error_Msg_N ("??unreachable code!", Error_Node); end if; -- If the unconditional transfer of control instruction is the -- cgit v1.1 From 7b9ae8e806d6afcf23f970fa18ce261024eb4414 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 2 Jun 2022 17:15:22 +0200 Subject: [Ada] Fix clearly unintentional dead analysis of attribute Code_Address A new warning about unreachable code that follows calls to procedures with No_Return would flag a clearly unintentional dead call to Set_Address_Taken in analysis of Code_Address attribute. This patch resurrects the dead code, which is worth fixing regardless of the new warning. gcc/ada/ * sem_attr.adb (Analyze_Attribute): Move call to Set_Address_Taken so that it is executed when the prefix attribute is legal. --- gcc/ada/sem_attr.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 20849bf..5bf13d1 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -3746,11 +3746,11 @@ package body Sem_Attr is Ekind (Entity (P)) /= E_Procedure) then Error_Attr ("invalid prefix for % attribute", P); - Set_Address_Taken (Entity (P)); -- Issue an error if the prefix denotes an eliminated subprogram else + Set_Address_Taken (Entity (P)); Check_For_Eliminated_Subprogram (P, Entity (P)); end if; -- cgit v1.1 From f608cf03b1c96878d559820ccb4037fee5575876 Mon Sep 17 00:00:00 2001 From: Doug Rupp Date: Thu, 2 Jun 2022 13:39:02 -0700 Subject: [Ada] Combine system.ads files - vxworks6 constants. Systemitize Word_Size and Memory_Size declarations rather than hard code with numerical values or OS specific Long_Integer size. gcc/ada/ * libgnat/system-vxworks-ppc-kernel.ads (Word_Size): Compute based on Standard'Word_Size. (Memory_Size): Compute based on Word_Size. * libgnat/system-vxworks-ppc-rtp-smp.ads: Likewise. * libgnat/system-vxworks-ppc-rtp.ads: Likewise. --- gcc/ada/libgnat/system-vxworks-ppc-kernel.ads | 4 ++-- gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads | 4 ++-- gcc/ada/libgnat/system-vxworks-ppc-rtp.ads | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads b/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads index b8a0ba1..640150a 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-kernel.ads @@ -69,8 +69,8 @@ package System is Null_Address : constant Address; Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; + Word_Size : constant := Standard'Word_Size; + Memory_Size : constant := 2 ** Word_Size; -- Address comparison diff --git a/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads index ecfd7e6..0855721 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-rtp-smp.ads @@ -71,8 +71,8 @@ package System is Null_Address : constant Address; Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; + Word_Size : constant := Standard'Word_Size; + Memory_Size : constant := 2 ** Word_Size; -- Address comparison diff --git a/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads b/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads index 72fb963..f72177f 100644 --- a/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads +++ b/gcc/ada/libgnat/system-vxworks-ppc-rtp.ads @@ -71,8 +71,8 @@ package System is Null_Address : constant Address; Storage_Unit : constant := 8; - Word_Size : constant := 32; - Memory_Size : constant := 2 ** 32; + Word_Size : constant := Standard'Word_Size; + Memory_Size : constant := 2 ** Word_Size; -- Address comparison -- cgit v1.1 From 684194f4a45e00e56687289386eea7105a762cf7 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 2 Jun 2022 17:22:42 +0200 Subject: [Ada] Remove return statements after procedure calls that don't return A new warning about unreachable code that follows calls to procedures with No_Return would flag many unnecessary return statements. Those returns statements were applied inconsistently, so this patch is actually more a style cleanup. gcc/ada/ * sem_attr.adb, sem_prag.adb: Remove dead return statements after calls to Error_Attr, Error_Pragma, Error_Pragma_Arg and Placement_Error. All these calls raise exceptions that are handled to gently recover from errors. --- gcc/ada/sem_attr.adb | 10 ---------- gcc/ada/sem_prag.adb | 53 ---------------------------------------------------- 2 files changed, 63 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 5bf13d1..be60087 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -1090,7 +1090,6 @@ package body Sem_Attr is else Error_Attr ("% attribute cannot be applied to type", P); - return; end if; end if; end if; @@ -1429,7 +1428,6 @@ package body Sem_Attr is else Placement_Error; - return; end if; -- 'Old attribute reference ok in a _Postconditions procedure @@ -1445,7 +1443,6 @@ package body Sem_Attr is else Placement_Error; - return; end if; -- Find the related subprogram subject to the aspect or pragma @@ -1715,14 +1712,12 @@ package body Sem_Attr is else Placement_Error; - return; end if; -- Otherwise the placement of the attribute is illegal else Placement_Error; - return; end if; -- Find the related subprogram subject to the aspect or pragma @@ -3666,7 +3661,6 @@ package body Sem_Attr is else Error_Attr ("invalid entry name", N); - return; end if; for J in reverse 0 .. Scope_Stack.Last loop @@ -3945,7 +3939,6 @@ package body Sem_Attr is else Error_Attr ("invalid entry family name", P); end if; - return; else Ent := Entity (Prefix (P)); @@ -3960,7 +3953,6 @@ package body Sem_Attr is else Error_Attr ("invalid entry name", N); - return; end if; for J in reverse 0 .. Scope_Stack.Last loop @@ -4479,7 +4471,6 @@ package body Sem_Attr is if not Legal or else No (Spec_Id) then Error_Attr ("attribute % must apply to entry family", P); - return; end if; -- Legality checks @@ -5898,7 +5889,6 @@ package body Sem_Attr is elsif not Legal then Error_Attr ("prefix of % attribute must be a function", P); - return; end if; -- Attribute 'Result is part of a _Postconditions procedure. There is diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index f1fd9b2..89c45da 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -4585,7 +4585,6 @@ package body Sem_Prag is else Pragma_Misplaced; - return; end if; -- If we get here, then the pragma is legal @@ -4600,7 +4599,6 @@ package body Sem_Prag is and then Ekind (Scope (Spec_Id)) /= E_Protected_Type then Pragma_Misplaced; - return; -- When the related context is an anonymous object created for a -- simple concurrent type, the type must be a task @@ -4610,7 +4608,6 @@ package body Sem_Prag is and then Ekind (Etype (Spec_Id)) /= E_Task_Type then Pragma_Misplaced; - return; end if; -- A pragma that applies to a Ghost entity becomes Ghost for the @@ -4926,7 +4923,6 @@ package body Sem_Prag is else Pragma_Misplaced; - return; end if; Subp_Id := Defining_Entity (Subp_Decl); @@ -4991,7 +4987,6 @@ package body Sem_Prag is N_Task_Body | N_Task_Body_Stub then Pragma_Misplaced; - return; end if; Body_Id := Defining_Entity (Body_Decl); @@ -5002,14 +4997,12 @@ package body Sem_Prag is if No (Spec_Id) then Error_Pragma ("pragma % cannot apply to a stand alone body"); - return; -- Catch the case where the subprogram body is a subunit and acts as -- the third declaration of the subprogram. elsif Nkind (Parent (Body_Decl)) = N_Subunit then Error_Pragma ("pragma % cannot apply to a subunit"); - return; end if; -- A refined pragma can only apply to the body [stub] of a subprogram @@ -5034,7 +5027,6 @@ package body Sem_Prag is Error_Pragma (Fix_Msg (Spec_Id, "pragma % must apply to the body of " & "subprogram declared in a package specification")); - return; end if; -- If we get here, then the pragma is legal @@ -6376,7 +6368,6 @@ package body Sem_Prag is Statements (Handled_Statement_Sequence (Stmt)) then Placement_Error (Prev); - return; -- Keep inspecting the parents because we are now within a -- chain of nested blocks. @@ -6411,7 +6402,6 @@ package body Sem_Prag is else Placement_Error (Prev); - return; end if; end loop; @@ -7475,7 +7465,6 @@ package body Sem_Prag is Error_Pragma ("cannot have Full_Access_Only without Volatile/Atomic " & "(RM C.6(8.2))"); - return; end if; -- Check all the subcomponents of the type recursively, if any @@ -7983,7 +7972,6 @@ package body Sem_Prag is Error_Msg_Sloc := Sloc (Decl); Error_Pragma_Arg ("convention differs from that given#", Arg1); - return; end if; end if; end if; @@ -9988,7 +9976,6 @@ package body Sem_Prag is then Error_Pragma_Arg ("argument of% must be entity in current scope", Assoc); - return; end if; -- Processing for procedure, operator or function. If subprogram @@ -12461,7 +12448,6 @@ package body Sem_Prag is N_Generic_Package_Declaration | N_Package_Declaration then Pragma_Misplaced; - return; end if; Pack_Id := Defining_Entity (Pack_Decl); @@ -13488,7 +13474,6 @@ package body Sem_Prag is N_Protected_Type_Declaration then Pragma_Misplaced; - return; end if; end if; @@ -14498,7 +14483,6 @@ package body Sem_Prag is if Nkind (Obj_Decl) /= N_Object_Declaration then Pragma_Misplaced; - return; end if; Obj_Id := Defining_Entity (Obj_Decl); @@ -14511,14 +14495,12 @@ package body Sem_Prag is if not Is_Library_Level_Entity (Obj_Id) then Error_Pragma ("pragma % must apply to a library level variable"); - return; end if; -- Otherwise the pragma applies to a constant, which is illegal else Error_Pragma ("pragma % must apply to a variable declaration"); - return; end if; -- A pragma that applies to a Ghost entity becomes Ghost for the @@ -14641,7 +14623,6 @@ package body Sem_Prag is else Pragma_Misplaced; - return; end if; Spec_Id := Unique_Defining_Entity (Subp_Decl); @@ -15391,7 +15372,6 @@ package body Sem_Prag is else Pragma_Misplaced; - return; end if; Stmt := Prev (Stmt); @@ -15402,7 +15382,6 @@ package body Sem_Prag is if No (Typ) then Pragma_Misplaced; - return; end if; -- A pragma that applies to a Ghost entity becomes Ghost for the @@ -16700,7 +16679,6 @@ package body Sem_Prag is else Error_Pragma ("pragma % must apply to a subprogram"); - return; end if; -- Mark the pragma as Ghost if the related subprogram is also @@ -16979,7 +16957,6 @@ package body Sem_Prag is N_Single_Task_Declaration | N_Task_Type_Declaration then Error_Pragma ("pragma % cannot apply to a task type"); - return; -- Skip internally generated code @@ -17043,7 +17020,6 @@ package body Sem_Prag is Error_Pragma ("pragma % must apply to an object, package, subprogram " & "or type"); - return; end if; Stmt := Prev (Stmt); @@ -17063,11 +17039,9 @@ package body Sem_Prag is if Nkind (Context) in N_Protected_Body | N_Protected_Definition then Error_Pragma ("pragma % cannot apply to a protected type"); - return; elsif Nkind (Context) in N_Task_Body | N_Task_Definition then Error_Pragma ("pragma % cannot apply to a task type"); - return; end if; if No (Id) then @@ -17105,7 +17079,6 @@ package body Sem_Prag is Error_Pragma ("pragma % must apply to an object, package, subprogram or " & "type"); - return; end if; -- Handle completions of types and constants that are subject to @@ -17153,11 +17126,9 @@ package body Sem_Prag is elsif Ekind (Id) = E_Variable then if Is_Protected_Type (Etype (Id)) then Error_Pragma ("pragma % cannot apply to a protected object"); - return; elsif Is_Task_Type (Etype (Id)) then Error_Pragma ("pragma % cannot apply to a task object"); - return; end if; end if; @@ -17179,7 +17150,6 @@ package body Sem_Prag is Error_Pragma ("pragma % with value False cannot appear in enabled " & "ghost region"); - return; end if; -- Otherwise the expression is not static @@ -17187,7 +17157,6 @@ package body Sem_Prag is else Error_Pragma_Arg ("expression of pragma % must be static", Expr); - return; end if; end if; @@ -17470,7 +17439,6 @@ package body Sem_Prag is Error_Pragma_Arg ("controlling formal must be of synchronized tagged type", Arg1); - return; end if; -- Ada 2012 (AI05-0030): Cannot apply the implementation_kind @@ -17484,7 +17452,6 @@ package body Sem_Prag is Error_Pragma_Arg ("implementation kind By_Protected_Procedure cannot be " & "applied to a task interface primitive", Arg2); - return; end if; -- Procedures declared inside a protected type must be accepted @@ -17499,7 +17466,6 @@ package body Sem_Prag is else Error_Pragma_Arg ("pragma % must be applied to a primitive procedure", Arg1); - return; end if; -- Ada 2012 (AI12-0279): Cannot apply the implementation_kind @@ -17511,7 +17477,6 @@ package body Sem_Prag is Error_Pragma_Arg ("implementation kind By_Protected_Procedure cannot be " & "applied to entities with aspect 'Yield", Arg2); - return; end if; Record_Rep_Item (Proc_Id, N); @@ -17922,7 +17887,6 @@ package body Sem_Prag is N_Generic_Package_Declaration | N_Package_Declaration then Pragma_Misplaced; - return; end if; Pack_Id := Defining_Entity (Pack_Decl); @@ -18203,7 +18167,6 @@ package body Sem_Prag is N_Generic_Package_Declaration | N_Package_Declaration then Pragma_Misplaced; - return; end if; Pack_Id := Defining_Entity (Pack_Decl); @@ -18539,7 +18502,6 @@ package body Sem_Prag is if Nkind (P) not in N_Task_Definition | N_Protected_Definition then Pragma_Misplaced; - return; else Ent := Defining_Identifier (Parent (P)); @@ -18755,7 +18717,6 @@ package body Sem_Prag is elsif Class_Present (N) then Error_Pragma_Arg ("pragma % only allowed for private type", Arg1); - return; -- A regular invariant may appear on both views @@ -18763,7 +18724,6 @@ package body Sem_Prag is Error_Pragma_Arg ("pragma % only allowed for private type or corresponding " & "full view", Arg1); - return; end if; -- An invariant associated with an abstract type (this includes @@ -18772,7 +18732,6 @@ package body Sem_Prag is if Is_Abstract_Type (Typ) and then not Class_Present (N) then Error_Pragma_Arg ("pragma % not allowed for abstract type", Arg1); - return; end if; -- A pragma that applies to a Ghost entity becomes Ghost for the @@ -19685,7 +19644,6 @@ package body Sem_Prag is if Nkind (Parent (N)) = N_Task_Definition then Error_Pragma ("pragma % cannot apply to task entries"); - return; end if; Entry_Id := Defining_Entity (Entry_Decl); @@ -19695,7 +19653,6 @@ package body Sem_Prag is else Error_Pragma ("pragma % must apply to a protected entry declaration"); - return; end if; -- Mark the pragma as Ghost if the related subprogram is also @@ -20999,7 +20956,6 @@ package body Sem_Prag is else Pragma_Misplaced; - return; end if; -- Extract the entity of the related object declaration or package @@ -22612,7 +22568,6 @@ package body Sem_Prag is if Nkind (Pack_Decl) /= N_Package_Body then Pragma_Misplaced; - return; end if; Spec_Id := Corresponding_Spec (Pack_Decl); @@ -23944,7 +23899,6 @@ package body Sem_Prag is if Nkind (P) /= N_Task_Definition then Pragma_Misplaced; - return; else if Has_Storage_Size_Pragma (P) then @@ -24310,7 +24264,6 @@ package body Sem_Prag is else Pragma_Misplaced; - return; end if; Spec_Id := Unique_Defining_Entity (Subp_Decl); @@ -24798,7 +24751,6 @@ package body Sem_Prag is else Error_Pragma ("pragma % must be specified within a package declaration"); - return; end if; Subp_Decl := Find_Related_Declaration_Or_Body (N); @@ -24816,11 +24768,9 @@ package body Sem_Prag is if Nkind (Subp_Decl) = N_Abstract_Subprogram_Declaration then Error_Pragma ("pragma % cannot be applied to abstract subprogram"); - return; elsif Nkind (Subp_Decl) = N_Entry_Declaration then Error_Pragma ("pragma % cannot be applied to entry"); - return; -- The context is a [generic] subprogram declared at the top level -- of the [generic] package unit. @@ -24839,7 +24789,6 @@ package body Sem_Prag is Error_Pragma ("pragma % must be applied to a library-level subprogram " & "declaration"); - return; end if; Subp_Id := Defining_Entity (Subp_Decl); @@ -25530,14 +25479,12 @@ package body Sem_Prag is else Pragma_Misplaced; - return; end if; Spec_Id := Unique_Defining_Entity (Subp_Decl); if Ekind (Spec_Id) not in E_Function | E_Generic_Function then Pragma_Misplaced; - return; end if; -- A pragma that applies to a Ghost entity becomes Ghost for the -- cgit v1.1 From 9fde6c7114f079b38ebee420a541e14387bcc928 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 2 Jun 2022 17:32:15 +0200 Subject: [Ada] Remove unnecessary dead code after calls to nonreturning procedures A new warning about unreachable code that follows calls to procedures with No_Return would flag some dead defensive code. Comments next to this code suggest that it was added to please some ancient version of the compiler, but recent releases of GNAT do not require such a code. gcc/ada/ * gnatls.adb (Corresponding_Sdep_Entry): Remove dead return statement in defensive path; there is another return statement for a normal execution of this routine, so rule Ada RM 6.5(5), which requires function to have at least one return statement is still satisfied. (Gnatls): Remove dead, call to nonreturning Exit_Program after Output_License_Information which itself does not return. * libgnat/a-exstat.adb (Bad_EO): Remove raise statement that was meant to please some ancient version of GNAT. * libgnat/g-awk.adb (Raise_With_Info): Likewise. * sem_attr.adb (Check_Reference): Remove dead return statement; rule Ada RM 6.5(5), which requires function to have at least one return statement is still satisfied. (Analyze_Attribute): Remove dead exit statement. (Check_Reference): Same as above. * sem_ch12.adb (Instantiate_Formal_Package): Remove dead raise statement; it was inconsistent with other calls to Abandon_Instantiation, which are not followed by a raise statement. * sem_prag.adb (Process_Convention): Remove dead defensive assignment. (Interrupt_State): Remove dead defensive exit statement. (Do_SPARK_Mode): Likewise. * sfn_scan.adb (Scan_String): Remove dead defensive assignment. --- gcc/ada/gnatls.adb | 2 -- gcc/ada/libgnat/a-exstat.adb | 7 ------- gcc/ada/libgnat/g-awk.adb | 1 - gcc/ada/sem_attr.adb | 3 --- gcc/ada/sem_ch12.adb | 1 - gcc/ada/sem_prag.adb | 3 --- gcc/ada/sfn_scan.adb | 1 - 7 files changed, 18 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb index 9b62f71..7244526 100644 --- a/gcc/ada/gnatls.adb +++ b/gcc/ada/gnatls.adb @@ -319,7 +319,6 @@ procedure Gnatls is Write_Eol; Error_Msg ("wrong ALI format, can't find dependency line for $ in {"); Exit_Program (E_Fatal); - return No_Sdep_Id; end Corresponding_Sdep_Entry; ------------------------- @@ -2051,7 +2050,6 @@ begin if License then if Arg_Count = 2 then Output_License_Information; - Exit_Program (E_Success); else Set_Standard_Error; diff --git a/gcc/ada/libgnat/a-exstat.adb b/gcc/ada/libgnat/a-exstat.adb index a3f808e..acc2516 100644 --- a/gcc/ada/libgnat/a-exstat.adb +++ b/gcc/ada/libgnat/a-exstat.adb @@ -109,13 +109,6 @@ package body Stream_Attributes is Raise_Exception (Program_Error'Identity, "bad exception occurrence in stream input"); - - -- The following junk raise of Program_Error is required because - -- this is a No_Return procedure, and unfortunately Raise_Exception - -- can return (this particular call can't, but the back end is not - -- clever enough to know that). - - raise Program_Error; end Bad_EO; procedure Next_String is diff --git a/gcc/ada/libgnat/g-awk.adb b/gcc/ada/libgnat/g-awk.adb index 1c88785..9b2e127 100644 --- a/gcc/ada/libgnat/g-awk.adb +++ b/gcc/ada/libgnat/g-awk.adb @@ -1211,7 +1211,6 @@ package body GNAT.AWK is Exceptions.Raise_Exception (E, '[' & Filename & ':' & Line & "] " & Message); - raise Constraint_Error; -- to please GNAT as this is a No_Return proc end Raise_With_Info; --------------- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index be60087..6a35358 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -4747,7 +4747,6 @@ package body Sem_Attr is Error_Attr ("prefix of attribute % cannot reference local entities", Nod); - return Abandon; else return OK; end if; @@ -4989,7 +4988,6 @@ package body Sem_Attr is else Error_Attr ("attribute % cannot appear in body or accept statement", N); - exit; end if; end loop; @@ -5383,7 +5381,6 @@ package body Sem_Attr is Error_Attr ("prefix of attribute % cannot reference local entities", Nod); - return Abandon; -- Otherwise keep inspecting the prefix diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index c5f2eed..dcc0dac 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -10572,7 +10572,6 @@ package body Sem_Ch12 is Error_Msg_N ("expect package instance to instantiate formal", Actual); Abandon_Instantiation (Actual); - raise Program_Error; else Actual_Pack := Entity (Actual); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 89c45da..3660c75 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -8336,7 +8336,6 @@ package body Sem_Prag is Error_Pragma_Arg ("argument of pragma% must be subprogram or access type", Arg2); - Subp := Empty; end if; -- ISO C requires a named parameter before the ellipsis, so a @@ -18641,7 +18640,6 @@ package body Sem_Prag is Interrupt_States.Table (IST_Num).Pragma_Loc; Error_Pragma_Arg ("state conflicts with that given #", Arg2); - exit; end if; IST_Num := IST_Num + 1; @@ -23762,7 +23760,6 @@ package body Sem_Prag is else Pragma_Misplaced; - exit; end if; Prev (Stmt); diff --git a/gcc/ada/sfn_scan.adb b/gcc/ada/sfn_scan.adb index b6ab92f..b428ed7 100644 --- a/gcc/ada/sfn_scan.adb +++ b/gcc/ada/sfn_scan.adb @@ -622,7 +622,6 @@ package body SFN_Scan is Q := '%'; else Error ("bad string"); - Q := '"'; end if; -- Scan out the string, B points to first char -- cgit v1.1 From 4844a259b41b4f31940b478216d6dc9faa2bcbca Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 3 Jun 2022 10:27:33 +0200 Subject: [Ada] Fix dangling bounds for array result of BIP functions The implementation of the build-in-place return protocol for functions whose result type is an unconstrained array type generates dangling references to local bounds built on the stack for the result as soon as these bounds are not static. The reason is that the implementation treats the return object, either explicitly present in the source or synthesized by the compiler, as a regular constrained object until very late in the game, although it needs to be ultimately rewritten as the renaming of the dereference of an allocator with unconstrained designated type in order for the bounds to be part of the allocation. Recently a partial fix was implemented for the case where the result is an aggregate, by preventing the return object from being expanded after it has been analyzed. However, it does not work for the general case of extended return statements, because the statements therein are still analyzed with the constrained version of the return object so, after it is changed into the unconstrained renaming, this yields (sub)type mismatches. Therefore this change goes the other way around: it rolls back the partial fix and instead performs the transformation of the return object into the unconstrained renaming during the expansion of its declaration, in other words before statements referencing it, if any, are analyzed, thus ensuring that they see the final version of the object. gcc/ada/ * exp_aggr.adb (Expand_Array_Aggregate): Remove obsolete code. Delay the expansion of aggregates initializing return objects of build-in-place functions. * exp_ch3.ads (Ensure_Activation_Chain_And_Master): Delete. * exp_ch3.adb (Ensure_Activation_Chain_And_Master): Fold back to... (Expand_N_Object_Declaration): ...here. Perform the expansion of return objects of build-in-place functions here instead of... * exp_ch6.ads (Is_Build_In_Place_Return_Object): Declare. * exp_ch6.adb (Expand_N_Extended_Return_Statement): ...here. (Is_Build_In_Place_Result_Type): Alphabetize. (Is_Build_In_Place_Return_Object): New predicate. * exp_ch7.adb (Enclosing_Function): Delete. (Process_Object_Declaration): Tidy up handling of return objects. * sem_ch3.adb (Analyze_Object_Declaration): Do not decorate and freeze the actual type if it is the same as the nominal type. * sem_ch6.adb: Remove use and with clauses for Exp_Ch3. (Analyze_Function_Return): Analyze again all return objects. (Create_Extra_Formals): Do not force the definition of an Itype if the subprogram is a compilation unit. --- gcc/ada/exp_aggr.adb | 19 +- gcc/ada/exp_ch3.adb | 836 +++++++++++++++++++++++++++++++++++++++++++++---- gcc/ada/exp_ch3.ads | 7 - gcc/ada/exp_ch6.adb | 857 +++------------------------------------------------ gcc/ada/exp_ch6.ads | 28 +- gcc/ada/exp_ch7.adb | 28 +- gcc/ada/sem_ch3.adb | 35 ++- gcc/ada/sem_ch6.adb | 33 +- 8 files changed, 867 insertions(+), 976 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 4828406..027a647 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -6603,21 +6603,6 @@ package body Exp_Aggr is then return; - -- Do not expand an aggregate for an array type which contains tasks if - -- the aggregate is associated with an unexpanded return statement of a - -- build-in-place function. The aggregate is expanded when the related - -- return statement (rewritten into an extended return) is processed. - -- This delay ensures that any temporaries and initialization code - -- generated for the aggregate appear in the proper return block and - -- use the correct _chain and _master. - - elsif Has_Task (Base_Type (Etype (N))) - and then Nkind (Parent (N)) = N_Simple_Return_Statement - and then Is_Build_In_Place_Function - (Return_Applies_To (Return_Statement_Entity (Parent (N)))) - then - return; - elsif Present (Component_Associations (N)) and then Nkind (First (Component_Associations (N))) = N_Iterated_Component_Association @@ -6837,7 +6822,9 @@ package body Exp_Aggr is or else Parent_Kind = N_Extension_Aggregate or else Parent_Kind = N_Component_Association or else (Parent_Kind = N_Object_Declaration - and then Needs_Finalization (Typ)) + and then (Needs_Finalization (Typ) + or else Is_Build_In_Place_Return_Object + (Defining_Identifier (Parent_Node)))) or else (Parent_Kind = N_Assignment_Statement and then Inside_Init_Proc) then diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 143e330..7e4c423 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -4895,47 +4895,6 @@ package body Exp_Ch3 is end loop; end Copy_Discr_Checking_Funcs; - ---------------------------------------- - -- Ensure_Activation_Chain_And_Master -- - ---------------------------------------- - - procedure Ensure_Activation_Chain_And_Master (Obj_Decl : Node_Id) is - Def_Id : constant Entity_Id := Defining_Identifier (Obj_Decl); - Expr : constant Node_Id := Expression (Obj_Decl); - Expr_Q : Node_Id; - Typ : constant Entity_Id := Etype (Def_Id); - - begin - pragma Assert (Nkind (Obj_Decl) = N_Object_Declaration); - - if Might_Have_Tasks (Typ) then - Build_Activation_Chain_Entity (Obj_Decl); - - if Has_Task (Typ) then - Build_Master_Entity (Def_Id); - - -- Handle objects initialized with BIP function calls - - elsif Present (Expr) then - if Nkind (Expr) = N_Qualified_Expression then - Expr_Q := Expression (Expr); - else - Expr_Q := Expr; - end if; - - if Is_Build_In_Place_Function_Call (Expr_Q) - or else Present (Unqual_BIP_Iface_Function_Call (Expr_Q)) - or else - (Nkind (Expr_Q) = N_Reference - and then - Is_Build_In_Place_Function_Call (Prefix (Expr_Q))) - then - Build_Master_Entity (Def_Id); - end if; - end if; - end if; - end Ensure_Activation_Chain_And_Master; - ------------------------------ -- Expand_Freeze_Array_Type -- ------------------------------ @@ -6180,6 +6139,47 @@ package body Exp_Ch3 is -- value, it may be possible to build an equivalent aggregate instead, -- and prevent an actual call to the initialization procedure. + function Build_Heap_Or_Pool_Allocator + (Temp_Id : Entity_Id; + Temp_Typ : Entity_Id; + Func_Id : Entity_Id; + Ret_Typ : Entity_Id; + Alloc_Expr : Node_Id) return Node_Id; + -- Create the statements necessary to allocate a return object on the + -- heap or user-defined storage pool. The object may need finalization + -- actions depending on the return type. + -- + -- * Controlled case + -- + -- if BIPfinalizationmaster = null then + -- Temp_Id := ; + -- else + -- declare + -- type Ptr_Typ is access Ret_Typ; + -- for Ptr_Typ'Storage_Pool use + -- Base_Pool (BIPfinalizationmaster.all).all; + -- Local : Ptr_Typ; + -- + -- begin + -- procedure Allocate (...) is + -- begin + -- System.Storage_Pools.Subpools.Allocate_Any (...); + -- end Allocate; + -- + -- Local := ; + -- Temp_Id := Temp_Typ (Local); + -- end; + -- end if; + -- + -- * Non-controlled case + -- + -- Temp_Id := ; + -- + -- Temp_Id is the temporary which is used to reference the internally + -- created object in all allocation forms. Temp_Typ is the type of the + -- temporary. Func_Id is the enclosing function. Ret_Typ is the return + -- type of Func_Id. Alloc_Expr is the actual allocator. + procedure Count_Default_Sized_Task_Stacks (Typ : Entity_Id; Pri_Stacks : out Int; @@ -6322,6 +6322,157 @@ package body Exp_Ch3 is end if; end Build_Equivalent_Aggregate; + ---------------------------------- + -- Build_Heap_Or_Pool_Allocator -- + ---------------------------------- + + function Build_Heap_Or_Pool_Allocator + (Temp_Id : Entity_Id; + Temp_Typ : Entity_Id; + Func_Id : Entity_Id; + Ret_Typ : Entity_Id; + Alloc_Expr : Node_Id) return Node_Id + is + begin + pragma Assert (Is_Build_In_Place_Function (Func_Id)); + + -- Processing for objects that require finalization actions + + if Needs_Finalization (Ret_Typ) then + declare + Decls : constant List_Id := New_List; + Fin_Mas_Id : constant Entity_Id := + Build_In_Place_Formal (Func_Id, BIP_Finalization_Master); + Orig_Expr : constant Node_Id := New_Copy_Tree (Alloc_Expr); + Stmts : constant List_Id := New_List; + Local_Id : Entity_Id; + Pool_Id : Entity_Id; + Ptr_Typ : Entity_Id; + + begin + -- Generate: + -- Pool_Id renames Base_Pool (BIPfinalizationmaster.all).all; + + Pool_Id := Make_Temporary (Loc, 'P'); + + Append_To (Decls, + Make_Object_Renaming_Declaration (Loc, + Defining_Identifier => Pool_Id, + Subtype_Mark => + New_Occurrence_Of (RTE (RE_Root_Storage_Pool), Loc), + Name => + Make_Explicit_Dereference (Loc, + Prefix => + Make_Function_Call (Loc, + Name => + New_Occurrence_Of (RTE (RE_Base_Pool), Loc), + Parameter_Associations => New_List ( + Make_Explicit_Dereference (Loc, + Prefix => + New_Occurrence_Of (Fin_Mas_Id, Loc))))))); + + -- Create an access type which uses the storage pool of the + -- caller's master. This additional type is necessary because + -- the finalization master cannot be associated with the type + -- of the temporary. Otherwise the secondary stack allocation + -- will fail. + + -- Generate: + -- type Ptr_Typ is access Ret_Typ; + + Ptr_Typ := Make_Temporary (Loc, 'P'); + + Append_To (Decls, + Make_Full_Type_Declaration (Loc, + Defining_Identifier => Ptr_Typ, + Type_Definition => + Make_Access_To_Object_Definition (Loc, + Subtype_Indication => + New_Occurrence_Of (Ret_Typ, Loc)))); + + -- Perform minor decoration in order to set the master and the + -- storage pool attributes. + + Mutate_Ekind (Ptr_Typ, E_Access_Type); + Set_Finalization_Master (Ptr_Typ, Fin_Mas_Id); + Set_Associated_Storage_Pool (Ptr_Typ, Pool_Id); + + -- Create the temporary, generate: + -- Local_Id : Ptr_Typ; + + Local_Id := Make_Temporary (Loc, 'T'); + + Append_To (Decls, + Make_Object_Declaration (Loc, + Defining_Identifier => Local_Id, + Object_Definition => + New_Occurrence_Of (Ptr_Typ, Loc))); + + -- Allocate the object, generate: + -- Local_Id := ; + + Append_To (Stmts, + Make_Assignment_Statement (Loc, + Name => New_Occurrence_Of (Local_Id, Loc), + Expression => Alloc_Expr)); + + -- Generate: + -- Temp_Id := Temp_Typ (Local_Id); + + Append_To (Stmts, + Make_Assignment_Statement (Loc, + Name => New_Occurrence_Of (Temp_Id, Loc), + Expression => + Unchecked_Convert_To (Temp_Typ, + New_Occurrence_Of (Local_Id, Loc)))); + + -- Wrap the allocation in a block. This is further conditioned + -- by checking the caller finalization master at runtime. A + -- null value indicates a non-existent master, most likely due + -- to a Finalize_Storage_Only allocation. + + -- Generate: + -- if BIPfinalizationmaster = null then + -- Temp_Id := ; + -- else + -- declare + -- + -- begin + -- + -- end; + -- end if; + + return + Make_If_Statement (Loc, + Condition => + Make_Op_Eq (Loc, + Left_Opnd => New_Occurrence_Of (Fin_Mas_Id, Loc), + Right_Opnd => Make_Null (Loc)), + + Then_Statements => New_List ( + Make_Assignment_Statement (Loc, + Name => New_Occurrence_Of (Temp_Id, Loc), + Expression => Orig_Expr)), + + Else_Statements => New_List ( + Make_Block_Statement (Loc, + Declarations => Decls, + Handled_Statement_Sequence => + Make_Handled_Sequence_Of_Statements (Loc, + Statements => Stmts)))); + end; + + -- For all other cases, generate: + -- Temp_Id := ; + + else + return + Make_Assignment_Statement (Loc, + Name => New_Occurrence_Of (Temp_Id, Loc), + Expression => Alloc_Expr); + end if; + end Build_Heap_Or_Pool_Allocator; + ------------------------------------- -- Count_Default_Sized_Task_Stacks -- ------------------------------------- @@ -6869,7 +7020,27 @@ package body Exp_Ch3 is -- also that a Master variable is established (and that the appropriate -- enclosing construct is established as a task master). - Ensure_Activation_Chain_And_Master (N); + if Has_Task (Typ) or else Might_Have_Tasks (Typ) then + Build_Activation_Chain_Entity (N); + + if Has_Task (Typ) then + Build_Master_Entity (Def_Id); + + -- Handle objects initialized with BIP function calls + + elsif Present (Expr) then + Expr_Q := Unqualify (Expr); + + if Is_Build_In_Place_Function_Call (Expr_Q) + or else Present (Unqual_BIP_Iface_Function_Call (Expr_Q)) + or else (Nkind (Expr_Q) = N_Reference + and then + Is_Build_In_Place_Function_Call (Prefix (Expr_Q))) + then + Build_Master_Entity (Def_Id); + end if; + end if; + end if; -- If No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations -- restrictions are active then default-sized secondary stacks are @@ -6905,6 +7076,7 @@ package body Exp_Ch3 is -- Default initialization required, and no expression present if No (Expr) then + Expr_Q := Expr; -- If we have a type with a variant part, the initialization proc -- will contain implicit tests of the discriminant values, which @@ -6964,7 +7136,9 @@ package body Exp_Ch3 is end if; end if; - Default_Initialize_Object (Init_After); + if not Is_Build_In_Place_Return_Object (Def_Id) then + Default_Initialize_Object (Init_After); + end if; -- Generate attribute for Persistent_BSS if needed @@ -7022,7 +7196,9 @@ package body Exp_Ch3 is Expander_Mode_Restore; end if; - Convert_Aggr_In_Object_Decl (N); + if not Is_Build_In_Place_Return_Object (Def_Id) then + Convert_Aggr_In_Object_Decl (N); + end if; -- Ada 2005 (AI-318-02): If the initialization expression is a call -- to a build-in-place function, then access to the declared object @@ -7091,13 +7267,12 @@ package body Exp_Ch3 is then pragma Assert (Is_Class_Wide_Type (Typ)); - -- If the object is a return object of an inherently limited type, - -- which implies build-in-place treatment, bypass the special + -- If the object is a built-in-place return object, bypass special -- treatment of class-wide interface initialization below. In this -- case, the expansion of the return statement will take care of -- creating the object (via allocator) and initializing it. - if Is_Return_Object (Def_Id) and then Is_Limited_View (Typ) then + if Is_Build_In_Place_Return_Object (Def_Id) then null; elsif Tagged_Type_Expansion then @@ -7323,9 +7498,12 @@ package body Exp_Ch3 is Set_SPARK_Pragma_Inherited (Def_Id, Save_SPI); end; end; - end if; - return; + return; + + else + return; + end if; -- Common case of explicit object initialization @@ -7598,11 +7776,11 @@ package body Exp_Ch3 is Name => New_Occurrence_Of (Def_Id, Loc), Expression => Relocate_Node (Expr)); begin - Set_Expression (N, Empty); - Set_No_Initialization (N); Set_Assignment_OK (Name (Stat)); Set_No_Ctrl_Actions (Stat); - Insert_After_And_Analyze (Init_After, Stat); + Insert_Action_After (Init_After, Stat); + Set_Expression (N, Empty); + Set_No_Initialization (N); end; end if; end if; @@ -7699,6 +7877,554 @@ package body Exp_Ch3 is end; end if; + -- If this is the return object of a build-in-place function, locate the + -- implicit BIPaccess parameter designating the caller-supplied return + -- object and convert the declaration to a renaming of a dereference of + -- this parameter. If the declaration includes an expression, add an + -- assignment statement to ensure the return object gets initialized. + + -- Result : T [:= ]; + + -- is converted to + + -- Result : T renames BIPaccess.all; + -- [Result := ;] + + -- in the constrained case, or to + + -- type Txx is access all ...; + -- Rxx : Txx := null; + + -- if BIPalloc = 1 then + -- Rxx := BIPaccess; + -- elsif BIPalloc = 2 then + -- Rxx := new [storage_pool = + -- system__secondary_stack__ss_pool][procedure_to_call = + -- system__secondary_stack__ss_allocate]; + -- elsif BIPalloc = 3 then + -- Rxx := new + -- elsif BIPalloc = 4 then + -- Pxx : system__storage_pools__root_storage_pool renames + -- BIPstoragepool.all; + -- Rxx := new [storage_pool = + -- Pxx][procedure_to_call = + -- system__storage_pools__allocate_any]; + -- else + -- [program_error "build in place mismatch"] + -- end if; + + -- Result : T renames Rxx.all; + -- Result := ; + + -- in the unconstrained case. + + if Is_Build_In_Place_Return_Object (Def_Id) then + declare + Func_Id : constant Entity_Id := + Return_Applies_To (Scope (Def_Id)); + Ret_Obj_Typ : constant Entity_Id := Etype (Def_Id); + + Init_Stmt : Node_Id; + Obj_Acc_Formal : Entity_Id; + + begin + -- Retrieve the implicit access parameter passed by the caller + + Obj_Acc_Formal := + Build_In_Place_Formal (Func_Id, BIP_Object_Access); + + -- If the return object's declaration includes an expression + -- and the declaration isn't marked as No_Initialization, then + -- we need to generate an assignment to the object and insert + -- it after the declaration before rewriting it as a renaming + -- (otherwise we'll lose the initialization). The case where + -- the result type is an interface (or class-wide interface) + -- is also excluded because the context of the function call + -- must be unconstrained, so the initialization will always + -- be done as part of an allocator evaluation (storage pool + -- or secondary stack), never to a constrained target object + -- passed in by the caller. Besides the assignment being + -- unneeded in this case, it avoids problems with trying to + -- generate a dispatching assignment when the return expression + -- is a nonlimited descendant of a limited interface (the + -- interface has no assignment operation). + + if Present (Expr_Q) + and then not Is_Delayed_Aggregate (Expr_Q) + and then not No_Initialization (N) + and then not Is_Interface (Etype (Def_Id)) + then + if Is_Class_Wide_Type (Etype (Def_Id)) + and then not Is_Class_Wide_Type (Etype (Expr_Q)) + then + Init_Stmt := + Make_Assignment_Statement (Loc, + Name => New_Occurrence_Of (Def_Id, Loc), + Expression => + Make_Type_Conversion (Loc, + Subtype_Mark => + New_Occurrence_Of (Etype (Def_Id), Loc), + Expression => New_Copy_Tree (Expr_Q))); + + else + Init_Stmt := + Make_Assignment_Statement (Loc, + Name => New_Occurrence_Of (Def_Id, Loc), + Expression => New_Copy_Tree (Expr_Q)); + end if; + + Set_Assignment_OK (Name (Init_Stmt)); + Set_No_Ctrl_Actions (Init_Stmt); + + else + Init_Stmt := Empty; + end if; + + -- When the function's subtype is unconstrained, a run-time + -- test may be needed to decide the form of allocation to use + -- for the return object. The function has an implicit formal + -- parameter indicating this. If the BIP_Alloc_Form formal has + -- the value one, then the caller has passed access to an + -- existing object for use as the return object. If the value + -- is two, then the return object must be allocated on the + -- secondary stack. Otherwise, the object must be allocated in + -- a storage pool. We generate an if statement to test the + -- implicit allocation formal and initialize a local access + -- value appropriately, creating allocators in the secondary + -- stack and global heap cases. The special formal also exists + -- and must be tested when the function has a tagged result, + -- even when the result subtype is constrained, because in + -- general such functions can be called in dispatching contexts + -- and must be handled similarly to functions with a class-wide + -- result. + + if Needs_BIP_Alloc_Form (Func_Id) then + declare + Desig_Typ : constant Entity_Id := + (if Ekind (Ret_Obj_Typ) = E_Array_Subtype + then Etype (Func_Id) else Ret_Obj_Typ); + -- Ensure that the we use a fat pointer when allocating + -- an unconstrained array on the heap. In this case the + -- result object type is a constrained array type even + -- though the function type is unconstrained. + Obj_Alloc_Formal : constant Entity_Id := + Build_In_Place_Formal (Func_Id, BIP_Alloc_Form); + Pool_Id : constant Entity_Id := + Make_Temporary (Loc, 'P'); + + Alloc_Obj_Id : Entity_Id; + Alloc_Obj_Decl : Node_Id; + Alloc_Stmt : Node_Id; + Guard_Except : Node_Id; + Heap_Allocator : Node_Id; + Pool_Decl : Node_Id; + Pool_Allocator : Node_Id; + Ptr_Type_Decl : Node_Id; + Ref_Type : Entity_Id; + SS_Allocator : Node_Id; + + begin + -- Create an access type designating the function's + -- result subtype. + + Ref_Type := Make_Temporary (Loc, 'A'); + + Ptr_Type_Decl := + Make_Full_Type_Declaration (Loc, + Defining_Identifier => Ref_Type, + Type_Definition => + Make_Access_To_Object_Definition (Loc, + All_Present => True, + Subtype_Indication => + New_Occurrence_Of (Desig_Typ, Loc))); + + Insert_Action (N, Ptr_Type_Decl); + + -- Create an access object that will be initialized to an + -- access value denoting the return object, either coming + -- from an implicit access value passed in by the caller + -- or from the result of an allocator. + + Alloc_Obj_Id := Make_Temporary (Loc, 'R'); + Set_Etype (Alloc_Obj_Id, Ref_Type); + + Alloc_Obj_Decl := + Make_Object_Declaration (Loc, + Defining_Identifier => Alloc_Obj_Id, + Object_Definition => + New_Occurrence_Of (Ref_Type, Loc)); + + Insert_Action (N, Alloc_Obj_Decl); + + -- Create allocators for both the secondary stack and + -- global heap. If there's an initialization expression, + -- then create these as initialized allocators. + + if Present (Expr_Q) + and then not Is_Delayed_Aggregate (Expr_Q) + and then not No_Initialization (N) + then + -- Always use the type of the expression for the + -- qualified expression, rather than the result type. + -- In general we cannot always use the result type + -- for the allocator, because the expression might be + -- of a specific type, such as in the case of an + -- aggregate or even a nonlimited object when the + -- result type is a limited class-wide interface type. + + Heap_Allocator := + Make_Allocator (Loc, + Expression => + Make_Qualified_Expression (Loc, + Subtype_Mark => + New_Occurrence_Of (Etype (Expr_Q), Loc), + Expression => New_Copy_Tree (Expr_Q))); + + else + -- If the function returns a class-wide type we cannot + -- use the return type for the allocator. Instead we + -- use the type of the expression, which must be an + -- aggregate of a definite type. + + if Is_Class_Wide_Type (Ret_Obj_Typ) then + Heap_Allocator := + Make_Allocator (Loc, + Expression => + New_Occurrence_Of (Etype (Expr_Q), Loc)); + + else + Heap_Allocator := + Make_Allocator (Loc, + Expression => + New_Occurrence_Of (Ret_Obj_Typ, Loc)); + end if; + + -- If the object requires default initialization then + -- that will happen later following the elaboration of + -- the object renaming. If we don't turn it off here + -- then the object will be default initialized twice. + + Set_No_Initialization (Heap_Allocator); + end if; + + -- Set the flag indicating that the allocator came from + -- a build-in-place return statement, so we can avoid + -- adjusting the allocated object. Note that this flag + -- will be inherited by the copies made below. + + Set_Alloc_For_BIP_Return (Heap_Allocator); + + -- The Pool_Allocator is just like the Heap_Allocator, + -- except we set Storage_Pool and Procedure_To_Call so + -- it will use the user-defined storage pool. + + Pool_Allocator := New_Copy_Tree (Heap_Allocator); + + pragma Assert (Alloc_For_BIP_Return (Pool_Allocator)); + + -- Do not generate the renaming of the build-in-place + -- pool parameter on ZFP because the parameter is not + -- created in the first place. + + if RTE_Available (RE_Root_Storage_Pool_Ptr) then + Pool_Decl := + Make_Object_Renaming_Declaration (Loc, + Defining_Identifier => Pool_Id, + Subtype_Mark => + New_Occurrence_Of + (RTE (RE_Root_Storage_Pool), Loc), + Name => + Make_Explicit_Dereference (Loc, + New_Occurrence_Of + (Build_In_Place_Formal + (Func_Id, BIP_Storage_Pool), Loc))); + Set_Storage_Pool (Pool_Allocator, Pool_Id); + Set_Procedure_To_Call + (Pool_Allocator, RTE (RE_Allocate_Any)); + else + Pool_Decl := Make_Null_Statement (Loc); + end if; + + -- If the No_Allocators restriction is active, then only + -- an allocator for secondary stack allocation is needed. + -- It's OK for such allocators to have Comes_From_Source + -- set to False, because gigi knows not to flag them as + -- being a violation of No_Implicit_Heap_Allocations. + + if Restriction_Active (No_Allocators) then + SS_Allocator := Heap_Allocator; + Heap_Allocator := Make_Null (Loc); + Pool_Allocator := Make_Null (Loc); + + -- Otherwise the heap and pool allocators may be needed, + -- so we make another allocator for secondary stack + -- allocation. + + else + SS_Allocator := New_Copy_Tree (Heap_Allocator); + + pragma Assert (Alloc_For_BIP_Return (SS_Allocator)); + + -- The heap and pool allocators are marked as + -- Comes_From_Source since they correspond to an + -- explicit user-written allocator (that is, it will + -- only be executed on behalf of callers that call the + -- function as initialization for such an allocator). + -- Prevents errors when No_Implicit_Heap_Allocations + -- is in force. + + Set_Comes_From_Source (Heap_Allocator, True); + Set_Comes_From_Source (Pool_Allocator, True); + end if; + + -- The allocator is returned on the secondary stack + + Check_Restriction (No_Secondary_Stack, N); + Set_Storage_Pool (SS_Allocator, RTE (RE_SS_Pool)); + Set_Procedure_To_Call + (SS_Allocator, RTE (RE_SS_Allocate)); + + -- The allocator is returned on the secondary stack, + -- so indicate that the function return, as well as + -- all blocks that encloses the allocator, must not + -- release it. The flags must be set now because + -- the decision to use the secondary stack is done + -- very late in the course of expanding the return + -- statement, past the point where these flags are + -- normally set. + + Set_Uses_Sec_Stack (Func_Id); + Set_Uses_Sec_Stack (Scope (Def_Id)); + Set_Sec_Stack_Needed_For_Return (Scope (Def_Id)); + + -- Guard against poor expansion on the caller side by + -- using a raise statement to catch out-of-range values + -- of formal parameter BIP_Alloc_Form. + + if Exceptions_OK then + Guard_Except := + Make_Raise_Program_Error (Loc, + Reason => PE_Build_In_Place_Mismatch); + else + Guard_Except := Make_Null_Statement (Loc); + end if; + + -- Create an if statement to test the BIP_Alloc_Form + -- formal and initialize the access object to either the + -- BIP_Object_Access formal (BIP_Alloc_Form = + -- Caller_Allocation), the result of allocating the + -- object in the secondary stack (BIP_Alloc_Form = + -- Secondary_Stack), or else an allocator to create the + -- return object in the heap or user-defined pool + -- (BIP_Alloc_Form = Global_Heap or User_Storage_Pool). + + -- ??? An unchecked type conversion must be made in the + -- case of assigning the access object formal to the + -- local access object, because a normal conversion would + -- be illegal in some cases (such as converting access- + -- to-unconstrained to access-to-constrained), but the + -- the unchecked conversion will presumably fail to work + -- right in just such cases. It's not clear at all how to + -- handle this. ??? + + Alloc_Stmt := + Make_If_Statement (Loc, + Condition => + Make_Op_Eq (Loc, + Left_Opnd => + New_Occurrence_Of (Obj_Alloc_Formal, Loc), + Right_Opnd => + Make_Integer_Literal (Loc, + UI_From_Int (BIP_Allocation_Form'Pos + (Caller_Allocation)))), + + Then_Statements => New_List ( + Make_Assignment_Statement (Loc, + Name => + New_Occurrence_Of (Alloc_Obj_Id, Loc), + Expression => + Unchecked_Convert_To + (Ref_Type, + New_Occurrence_Of (Obj_Acc_Formal, Loc)))), + + Elsif_Parts => New_List ( + Make_Elsif_Part (Loc, + Condition => + Make_Op_Eq (Loc, + Left_Opnd => + New_Occurrence_Of (Obj_Alloc_Formal, Loc), + Right_Opnd => + Make_Integer_Literal (Loc, + UI_From_Int (BIP_Allocation_Form'Pos + (Secondary_Stack)))), + + Then_Statements => New_List ( + Make_Assignment_Statement (Loc, + Name => + New_Occurrence_Of (Alloc_Obj_Id, Loc), + Expression => SS_Allocator))), + + Make_Elsif_Part (Loc, + Condition => + Make_Op_Eq (Loc, + Left_Opnd => + New_Occurrence_Of (Obj_Alloc_Formal, Loc), + Right_Opnd => + Make_Integer_Literal (Loc, + UI_From_Int (BIP_Allocation_Form'Pos + (Global_Heap)))), + + Then_Statements => New_List ( + Build_Heap_Or_Pool_Allocator + (Temp_Id => Alloc_Obj_Id, + Temp_Typ => Ref_Type, + Func_Id => Func_Id, + Ret_Typ => Desig_Typ, + Alloc_Expr => Heap_Allocator))), + + -- ???If all is well, we can put the following + -- 'elsif' in the 'else', but this is a useful + -- self-check in case caller and callee don't agree + -- on whether BIPAlloc and so on should be passed. + + Make_Elsif_Part (Loc, + Condition => + Make_Op_Eq (Loc, + Left_Opnd => + New_Occurrence_Of (Obj_Alloc_Formal, Loc), + Right_Opnd => + Make_Integer_Literal (Loc, + UI_From_Int (BIP_Allocation_Form'Pos + (User_Storage_Pool)))), + + Then_Statements => New_List ( + Pool_Decl, + Build_Heap_Or_Pool_Allocator + (Temp_Id => Alloc_Obj_Id, + Temp_Typ => Ref_Type, + Func_Id => Func_Id, + Ret_Typ => Desig_Typ, + Alloc_Expr => Pool_Allocator)))), + + -- Raise Program_Error if it's none of the above; + -- this is a compiler bug. + + Else_Statements => New_List (Guard_Except)); + + -- If a separate initialization assignment was created + -- earlier, append that following the assignment of the + -- implicit access formal to the access object, to ensure + -- that the return object is initialized in that case. In + -- this situation, the target of the assignment must be + -- rewritten to denote a dereference of the access to the + -- return object passed in by the caller. + + if Present (Init_Stmt) then + Set_Name (Init_Stmt, + Make_Explicit_Dereference (Loc, + Prefix => New_Occurrence_Of (Alloc_Obj_Id, Loc))); + Set_Assignment_OK (Name (Init_Stmt)); + + Append_To (Then_Statements (Alloc_Stmt), Init_Stmt); + Init_Stmt := Empty; + end if; + + Insert_Action (N, Alloc_Stmt, Suppress => All_Checks); + + -- From now on, the type of the return object is the + -- designated type. + + Set_Etype (Def_Id, Desig_Typ); + + -- Remember the local access object for use in the + -- dereference of the renaming created below. + + Obj_Acc_Formal := Alloc_Obj_Id; + end; + + -- When the function's subtype is unconstrained and a run-time + -- test is not needed, we nevertheless need to build the return + -- using the function's result subtype. + + elsif not Is_Constrained (Underlying_Type (Etype (Func_Id))) then + declare + Alloc_Obj_Id : Entity_Id; + Alloc_Obj_Decl : Node_Id; + Ptr_Type_Decl : Node_Id; + Ref_Type : Entity_Id; + + begin + -- Create an access type designating the function's + -- result subtype. + + Ref_Type := Make_Temporary (Loc, 'A'); + + Ptr_Type_Decl := + Make_Full_Type_Declaration (Loc, + Defining_Identifier => Ref_Type, + Type_Definition => + Make_Access_To_Object_Definition (Loc, + All_Present => True, + Subtype_Indication => + New_Occurrence_Of (Ret_Obj_Typ, Loc))); + + Insert_Action (N, Ptr_Type_Decl); + + -- Create an access object initialized to the conversion + -- of the implicit access value passed in by the caller. + + Alloc_Obj_Id := Make_Temporary (Loc, 'R'); + + -- See the ??? comment a few lines above about the use of + -- an unchecked conversion here. + + Alloc_Obj_Decl := + Make_Object_Declaration (Loc, + Defining_Identifier => Alloc_Obj_Id, + Object_Definition => + New_Occurrence_Of (Ref_Type, Loc), + Expression => + Unchecked_Convert_To + (Ref_Type, + New_Occurrence_Of (Obj_Acc_Formal, Loc))); + + Insert_Action (N, Alloc_Obj_Decl, Suppress => All_Checks); + + -- Remember the local access object for use in the + -- dereference of the renaming created below. + + Obj_Acc_Formal := Alloc_Obj_Id; + end; + end if; + + -- Initialize the object now that it has got its final subtype, + -- but before rewriting it as a renaming. + + if No (Expr_Q) then + Default_Initialize_Object (Init_After); + + elsif Is_Delayed_Aggregate (Expr_Q) + and then not No_Initialization (N) + then + Convert_Aggr_In_Object_Decl (N); + + elsif Present (Init_Stmt) then + Insert_Action_After (Init_After, Init_Stmt); + Set_Expression (N, Empty); + end if; + + -- Replace the return object declaration with a renaming of a + -- dereference of the access value designating the return object. + + Expr_Q := + Make_Explicit_Dereference (Loc, + Prefix => New_Occurrence_Of (Obj_Acc_Formal, Loc)); + Set_Etype (Expr_Q, Etype (Def_Id)); + + Rewrite_As_Renaming := True; + end; + end if; + -- Final transformation - turn the object declaration into a renaming -- if appropriate. If this is the completion of a deferred constant -- declaration, then this transformation generates what would be @@ -7707,8 +8433,8 @@ package body Exp_Ch3 is if Rewrite_As_Renaming then Rewrite (N, Make_Object_Renaming_Declaration (Loc, - Defining_Identifier => Defining_Identifier (N), - Subtype_Mark => Obj_Def, + Defining_Identifier => Def_Id, + Subtype_Mark => New_Occurrence_Of (Etype (Def_Id), Loc), Name => Expr_Q)); -- We do not analyze this renaming declaration, because all its @@ -7716,7 +8442,7 @@ package body Exp_Ch3 is -- ahead and analyze it, we would in effect be trying to generate -- another declaration of X, which won't do. - Set_Renamed_Object (Defining_Identifier (N), Expr_Q); + Set_Renamed_Object (Def_Id, Expr_Q); Set_Analyzed (N); -- We do need to deal with debug issues for this renaming diff --git a/gcc/ada/exp_ch3.ads b/gcc/ada/exp_ch3.ads index ca8a550..f7d43c4 100644 --- a/gcc/ada/exp_ch3.ads +++ b/gcc/ada/exp_ch3.ads @@ -113,13 +113,6 @@ package Exp_Ch3 is -- Build the body of the equality function Body_Id for the untagged variant -- record Typ with the given parameters specification list. - procedure Ensure_Activation_Chain_And_Master (Obj_Decl : Node_Id); - -- If tasks are being declared (or might be declared) by the given object - -- declaration then ensure to have an activation chain defined for the - -- tasks (has no effect if we already have one), and also that a Master - -- variable is established (and that the appropriate enclosing construct - -- is established as a task master). - function Freeze_Type (N : Node_Id) return Boolean; -- This function executes the freezing actions associated with the given -- freeze type node N and returns True if the node is to be deleted. We diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 14e0498..d6d9d00 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -5079,48 +5079,15 @@ package body Exp_Ch6 is -- (in which case default initial values might need to be set)). procedure Expand_N_Extended_Return_Statement (N : Node_Id) is - Loc : constant Source_Ptr := Sloc (N); - - function Build_Heap_Or_Pool_Allocator - (Temp_Id : Entity_Id; - Temp_Typ : Entity_Id; - Func_Id : Entity_Id; - Ret_Typ : Entity_Id; - Alloc_Expr : Node_Id) return Node_Id; - -- Create the statements necessary to allocate a return object on the - -- heap or user-defined storage pool. The object may need finalization - -- actions depending on the return type. - -- - -- * Controlled case - -- - -- if BIPfinalizationmaster = null then - -- Temp_Id := ; - -- else - -- declare - -- type Ptr_Typ is access Ret_Typ; - -- for Ptr_Typ'Storage_Pool use - -- Base_Pool (BIPfinalizationmaster.all).all; - -- Local : Ptr_Typ; - -- - -- begin - -- procedure Allocate (...) is - -- begin - -- System.Storage_Pools.Subpools.Allocate_Any (...); - -- end Allocate; - -- - -- Local := ; - -- Temp_Id := Temp_Typ (Local); - -- end; - -- end if; - -- - -- * Non-controlled case - -- - -- Temp_Id := ; - -- - -- Temp_Id is the temporary which is used to reference the internally - -- created object in all allocation forms. Temp_Typ is the type of the - -- temporary. Func_Id is the enclosing function. Ret_Typ is the return - -- type of Func_Id. Alloc_Expr is the actual allocator. + Loc : constant Source_Ptr := Sloc (N); + Func_Id : constant Entity_Id := + Return_Applies_To (Return_Statement_Entity (N)); + Is_BIP_Func : constant Boolean := + Is_Build_In_Place_Function (Func_Id); + Ret_Obj_Id : constant Entity_Id := + First_Entity (Return_Statement_Entity (N)); + Ret_Obj_Decl : constant Node_Id := Parent (Ret_Obj_Id); + Ret_Typ : constant Entity_Id := Etype (Func_Id); function Move_Activation_Chain (Func_Id : Entity_Id) return Node_Id; -- Construct a call to System.Tasking.Stages.Move_Activation_Chain @@ -5132,173 +5099,6 @@ package body Exp_Ch6 is -- Func_Id is the entity of the function where the extended return -- statement appears. - ---------------------------------- - -- Build_Heap_Or_Pool_Allocator -- - ---------------------------------- - - function Build_Heap_Or_Pool_Allocator - (Temp_Id : Entity_Id; - Temp_Typ : Entity_Id; - Func_Id : Entity_Id; - Ret_Typ : Entity_Id; - Alloc_Expr : Node_Id) return Node_Id - is - begin - pragma Assert (Is_Build_In_Place_Function (Func_Id)); - - -- Processing for objects that require finalization actions - - if Needs_Finalization (Ret_Typ) then - declare - Decls : constant List_Id := New_List; - Fin_Mas_Id : constant Entity_Id := - Build_In_Place_Formal - (Func_Id, BIP_Finalization_Master); - Orig_Expr : constant Node_Id := - New_Copy_Tree - (Source => Alloc_Expr, - Scopes_In_EWA_OK => True); - Stmts : constant List_Id := New_List; - Desig_Typ : Entity_Id; - Local_Id : Entity_Id; - Pool_Id : Entity_Id; - Ptr_Typ : Entity_Id; - - begin - -- Generate: - -- Pool_Id renames Base_Pool (BIPfinalizationmaster.all).all; - - Pool_Id := Make_Temporary (Loc, 'P'); - - Append_To (Decls, - Make_Object_Renaming_Declaration (Loc, - Defining_Identifier => Pool_Id, - Subtype_Mark => - New_Occurrence_Of (RTE (RE_Root_Storage_Pool), Loc), - Name => - Make_Explicit_Dereference (Loc, - Prefix => - Make_Function_Call (Loc, - Name => - New_Occurrence_Of (RTE (RE_Base_Pool), Loc), - Parameter_Associations => New_List ( - Make_Explicit_Dereference (Loc, - Prefix => - New_Occurrence_Of (Fin_Mas_Id, Loc))))))); - - -- Create an access type which uses the storage pool of the - -- caller's master. This additional type is necessary because - -- the finalization master cannot be associated with the type - -- of the temporary. Otherwise the secondary stack allocation - -- will fail. - - Desig_Typ := Ret_Typ; - - -- Ensure that the build-in-place machinery uses a fat pointer - -- when allocating an unconstrained array on the heap. In this - -- case the result object type is a constrained array type even - -- though the function type is unconstrained. - - if Ekind (Desig_Typ) = E_Array_Subtype then - Desig_Typ := Base_Type (Desig_Typ); - end if; - - -- Generate: - -- type Ptr_Typ is access Desig_Typ; - - Ptr_Typ := Make_Temporary (Loc, 'P'); - - Append_To (Decls, - Make_Full_Type_Declaration (Loc, - Defining_Identifier => Ptr_Typ, - Type_Definition => - Make_Access_To_Object_Definition (Loc, - Subtype_Indication => - New_Occurrence_Of (Desig_Typ, Loc)))); - - -- Perform minor decoration in order to set the master and the - -- storage pool attributes. - - Mutate_Ekind (Ptr_Typ, E_Access_Type); - Set_Finalization_Master (Ptr_Typ, Fin_Mas_Id); - Set_Associated_Storage_Pool (Ptr_Typ, Pool_Id); - - -- Create the temporary, generate: - -- Local_Id : Ptr_Typ; - - Local_Id := Make_Temporary (Loc, 'T'); - - Append_To (Decls, - Make_Object_Declaration (Loc, - Defining_Identifier => Local_Id, - Object_Definition => - New_Occurrence_Of (Ptr_Typ, Loc))); - - -- Allocate the object, generate: - -- Local_Id := ; - - Append_To (Stmts, - Make_Assignment_Statement (Loc, - Name => New_Occurrence_Of (Local_Id, Loc), - Expression => Alloc_Expr)); - - -- Generate: - -- Temp_Id := Temp_Typ (Local_Id); - - Append_To (Stmts, - Make_Assignment_Statement (Loc, - Name => New_Occurrence_Of (Temp_Id, Loc), - Expression => - Unchecked_Convert_To (Temp_Typ, - New_Occurrence_Of (Local_Id, Loc)))); - - -- Wrap the allocation in a block. This is further conditioned - -- by checking the caller finalization master at runtime. A - -- null value indicates a non-existent master, most likely due - -- to a Finalize_Storage_Only allocation. - - -- Generate: - -- if BIPfinalizationmaster = null then - -- Temp_Id := ; - -- else - -- declare - -- - -- begin - -- - -- end; - -- end if; - - return - Make_If_Statement (Loc, - Condition => - Make_Op_Eq (Loc, - Left_Opnd => New_Occurrence_Of (Fin_Mas_Id, Loc), - Right_Opnd => Make_Null (Loc)), - - Then_Statements => New_List ( - Make_Assignment_Statement (Loc, - Name => New_Occurrence_Of (Temp_Id, Loc), - Expression => Orig_Expr)), - - Else_Statements => New_List ( - Make_Block_Statement (Loc, - Declarations => Decls, - Handled_Statement_Sequence => - Make_Handled_Sequence_Of_Statements (Loc, - Statements => Stmts)))); - end; - - -- For all other cases, generate: - -- Temp_Id := ; - - else - return - Make_Assignment_Statement (Loc, - Name => New_Occurrence_Of (Temp_Id, Loc), - Expression => Alloc_Expr); - end if; - end Build_Heap_Or_Pool_Allocator; - --------------------------- -- Move_Activation_Chain -- --------------------------- @@ -5331,15 +5131,6 @@ package body Exp_Ch6 is -- Local variables - Func_Id : constant Entity_Id := - Return_Applies_To (Return_Statement_Entity (N)); - Is_BIP_Func : constant Boolean := - Is_Build_In_Place_Function (Func_Id); - Ret_Obj_Id : constant Entity_Id := - First_Entity (Return_Statement_Entity (N)); - Ret_Obj_Decl : constant Node_Id := Parent (Ret_Obj_Id); - Ret_Typ : constant Entity_Id := Etype (Func_Id); - Exp : Node_Id; HSS : Node_Id; Result : Node_Id; @@ -5508,13 +5299,6 @@ package body Exp_Ch6 is end; end if; - -- Build a simple_return_statement that returns the return object - - Return_Stmt := - Make_Simple_Return_Statement (Loc, - Expression => New_Occurrence_Of (Ret_Obj_Id, Loc)); - Append_To (Stmts, Return_Stmt); - HSS := Make_Handled_Sequence_Of_Statements (Loc, Stmts); end if; @@ -5535,571 +5319,12 @@ package body Exp_Ch6 is Set_Identifier (Result, New_Occurrence_Of (Return_Statement_Entity (N), Loc)); - -- If the object decl was already rewritten as a renaming, then we - -- don't want to do the object allocation and transformation of - -- the return object declaration to a renaming. This case occurs - -- when the return object is initialized by a call to another - -- build-in-place function, and that function is responsible for - -- the allocation of the return object. - - if Is_BIP_Func - and then Nkind (Ret_Obj_Decl) = N_Object_Renaming_Declaration - then - pragma Assert - (Nkind (Original_Node (Ret_Obj_Decl)) = N_Object_Declaration - and then - - -- It is a regular BIP object declaration - - (Is_Build_In_Place_Function_Call - (Expression (Original_Node (Ret_Obj_Decl))) - - -- It is a BIP object declaration that displaces the pointer - -- to the object to reference a converted interface type. - - or else - Present (Unqual_BIP_Iface_Function_Call - (Expression (Original_Node (Ret_Obj_Decl)))))); - - elsif Is_BIP_Func then - - -- Locate the implicit access parameter associated with the - -- caller-supplied return object and convert the return - -- statement's return object declaration to a renaming of a - -- dereference of the access parameter. If the return object's - -- declaration includes an expression that has not already been - -- expanded as separate assignments, then add an assignment - -- statement to ensure the return object gets initialized. - - -- declare - -- Result : T [:= ]; - -- begin - -- ... - - -- is converted to - - -- declare - -- Result : T renames FuncRA.all; - -- [Result := New_Occurrence_Of (Ret_Obj_Id, Loc), - Expression => - New_Copy_Tree - (Source => Ret_Obj_Expr, - Scopes_In_EWA_OK => True)); - - Set_Etype (Name (Init_Assignment), Etype (Ret_Obj_Id)); - Set_Assignment_OK (Name (Init_Assignment)); - Set_No_Ctrl_Actions (Init_Assignment); - - Set_Parent (Name (Init_Assignment), Init_Assignment); - Set_Parent (Expression (Init_Assignment), Init_Assignment); - - Set_Expression (Ret_Obj_Decl, Empty); - - if Is_Class_Wide_Type (Etype (Ret_Obj_Id)) - and then not Is_Class_Wide_Type - (Etype (Expression (Init_Assignment))) - then - Rewrite (Expression (Init_Assignment), - Make_Type_Conversion (Loc, - Subtype_Mark => - New_Occurrence_Of (Etype (Ret_Obj_Id), Loc), - Expression => - Relocate_Node (Expression (Init_Assignment)))); - end if; - - -- In the case of functions where the calling context can - -- determine the form of allocation needed, initialization - -- is done with each part of the if statement that handles - -- the different forms of allocation (this is true for - -- unconstrained, tagged, and controlled result subtypes). - - if not Needs_BIP_Alloc_Form (Func_Id) then - Insert_After (Ret_Obj_Decl, Init_Assignment); - end if; - end if; - - -- When the function's subtype is unconstrained, a run-time - -- test may be needed to decide the form of allocation to use - -- for the return object. The function has an implicit formal - -- parameter indicating this. If the BIP_Alloc_Form formal has - -- the value one, then the caller has passed access to an - -- existing object for use as the return object. If the value - -- is two, then the return object must be allocated on the - -- secondary stack. Otherwise, the object must be allocated in - -- a storage pool. We generate an if statement to test the - -- implicit allocation formal and initialize a local access - -- value appropriately, creating allocators in the secondary - -- stack and global heap cases. The special formal also exists - -- and must be tested when the function has a tagged result, - -- even when the result subtype is constrained, because in - -- general such functions can be called in dispatching contexts - -- and must be handled similarly to functions with a class-wide - -- result. - - if Needs_BIP_Alloc_Form (Func_Id) then - Obj_Alloc_Formal := - Build_In_Place_Formal (Func_Id, BIP_Alloc_Form); - - declare - Pool_Id : constant Entity_Id := - Make_Temporary (Loc, 'P'); - Alloc_Obj_Id : Entity_Id; - Alloc_Obj_Decl : Node_Id; - Alloc_If_Stmt : Node_Id; - Guard_Except : Node_Id; - Heap_Allocator : Node_Id; - Pool_Decl : Node_Id; - Pool_Allocator : Node_Id; - Ptr_Type_Decl : Node_Id; - Ref_Type : Entity_Id; - SS_Allocator : Node_Id; - - begin - -- Create an access type designating the function's - -- result subtype. - - Ref_Type := Make_Temporary (Loc, 'A'); - - Ptr_Type_Decl := - Make_Full_Type_Declaration (Loc, - Defining_Identifier => Ref_Type, - Type_Definition => - Make_Access_To_Object_Definition (Loc, - All_Present => True, - Subtype_Indication => - New_Occurrence_Of (Ret_Obj_Typ, Loc))); - - Insert_Before (Ret_Obj_Decl, Ptr_Type_Decl); - - -- Create an access object that will be initialized to an - -- access value denoting the return object, either coming - -- from an implicit access value passed in by the caller - -- or from the result of an allocator. - - Alloc_Obj_Id := Make_Temporary (Loc, 'R'); - Set_Etype (Alloc_Obj_Id, Ref_Type); - - Alloc_Obj_Decl := - Make_Object_Declaration (Loc, - Defining_Identifier => Alloc_Obj_Id, - Object_Definition => - New_Occurrence_Of (Ref_Type, Loc)); - - Insert_Before (Ret_Obj_Decl, Alloc_Obj_Decl); - - -- Create allocators for both the secondary stack and - -- global heap. If there's an initialization expression, - -- then create these as initialized allocators. - - if Present (Ret_Obj_Expr) - and then not No_Initialization (Ret_Obj_Decl) - then - -- Always use the type of the expression for the - -- qualified expression, rather than the result type. - -- In general we cannot always use the result type - -- for the allocator, because the expression might be - -- of a specific type, such as in the case of an - -- aggregate or even a nonlimited object when the - -- result type is a limited class-wide interface type. - - Heap_Allocator := - Make_Allocator (Loc, - Expression => - Make_Qualified_Expression (Loc, - Subtype_Mark => - New_Occurrence_Of - (Etype (Ret_Obj_Expr), Loc), - Expression => - New_Copy_Tree - (Source => Ret_Obj_Expr, - Scopes_In_EWA_OK => True))); - - else - -- If the function returns a class-wide type we cannot - -- use the return type for the allocator. Instead we - -- use the type of the expression, which must be an - -- aggregate of a definite type. - - if Is_Class_Wide_Type (Ret_Obj_Typ) then - Heap_Allocator := - Make_Allocator (Loc, - Expression => - New_Occurrence_Of - (Etype (Ret_Obj_Expr), Loc)); - else - Heap_Allocator := - Make_Allocator (Loc, - Expression => - New_Occurrence_Of (Ret_Obj_Typ, Loc)); - end if; - - -- If the object requires default initialization then - -- that will happen later following the elaboration of - -- the object renaming. If we don't turn it off here - -- then the object will be default initialized twice. - - Set_No_Initialization (Heap_Allocator); - end if; - - -- Set the flag indicating that the allocator came from - -- a build-in-place return statement, so we can avoid - -- adjusting the allocated object. Note that this flag - -- will be inherited by the copies made below. - - Set_Alloc_For_BIP_Return (Heap_Allocator); - - -- The Pool_Allocator is just like the Heap_Allocator, - -- except we set Storage_Pool and Procedure_To_Call so - -- it will use the user-defined storage pool. - - Pool_Allocator := - New_Copy_Tree - (Source => Heap_Allocator, - Scopes_In_EWA_OK => True); - - pragma Assert (Alloc_For_BIP_Return (Pool_Allocator)); - - -- Do not generate the renaming of the build-in-place - -- pool parameter on ZFP because the parameter is not - -- created in the first place. - - if RTE_Available (RE_Root_Storage_Pool_Ptr) then - Pool_Decl := - Make_Object_Renaming_Declaration (Loc, - Defining_Identifier => Pool_Id, - Subtype_Mark => - New_Occurrence_Of - (RTE (RE_Root_Storage_Pool), Loc), - Name => - Make_Explicit_Dereference (Loc, - New_Occurrence_Of - (Build_In_Place_Formal - (Func_Id, BIP_Storage_Pool), Loc))); - Set_Storage_Pool (Pool_Allocator, Pool_Id); - Set_Procedure_To_Call - (Pool_Allocator, RTE (RE_Allocate_Any)); - else - Pool_Decl := Make_Null_Statement (Loc); - end if; - - -- If the No_Allocators restriction is active, then only - -- an allocator for secondary stack allocation is needed. - -- It's OK for such allocators to have Comes_From_Source - -- set to False, because gigi knows not to flag them as - -- being a violation of No_Implicit_Heap_Allocations. - - if Restriction_Active (No_Allocators) then - SS_Allocator := Heap_Allocator; - Heap_Allocator := Make_Null (Loc); - Pool_Allocator := Make_Null (Loc); - - -- Otherwise the heap and pool allocators may be needed, - -- so we make another allocator for secondary stack - -- allocation. - - else - SS_Allocator := - New_Copy_Tree - (Source => Heap_Allocator, - Scopes_In_EWA_OK => True); - - pragma Assert (Alloc_For_BIP_Return (SS_Allocator)); - - -- The heap and pool allocators are marked as - -- Comes_From_Source since they correspond to an - -- explicit user-written allocator (that is, it will - -- only be executed on behalf of callers that call the - -- function as initialization for such an allocator). - -- Prevents errors when No_Implicit_Heap_Allocations - -- is in force. - - Set_Comes_From_Source (Heap_Allocator, True); - Set_Comes_From_Source (Pool_Allocator, True); - end if; - - -- The allocator is returned on the secondary stack - - Check_Restriction (No_Secondary_Stack, N); - Set_Storage_Pool (SS_Allocator, RTE (RE_SS_Pool)); - Set_Procedure_To_Call - (SS_Allocator, RTE (RE_SS_Allocate)); - - -- The allocator is returned on the secondary stack, - -- so indicate that the function return, as well as - -- all blocks that encloses the allocator, must not - -- release it. The flags must be set now because - -- the decision to use the secondary stack is done - -- very late in the course of expanding the return - -- statement, past the point where these flags are - -- normally set. - - Set_Uses_Sec_Stack (Func_Id); - Set_Uses_Sec_Stack (Return_Statement_Entity (N)); - Set_Sec_Stack_Needed_For_Return - (Return_Statement_Entity (N)); - Set_Enclosing_Sec_Stack_Return (N); - - -- Guard against poor expansion on the caller side by - -- using a raise statement to catch out-of-range values - -- of formal parameter BIP_Alloc_Form. - - if Exceptions_OK then - Guard_Except := - Make_Raise_Program_Error (Loc, - Reason => PE_Build_In_Place_Mismatch); - else - Guard_Except := Make_Null_Statement (Loc); - end if; - - -- Create an if statement to test the BIP_Alloc_Form - -- formal and initialize the access object to either the - -- BIP_Object_Access formal (BIP_Alloc_Form = - -- Caller_Allocation), the result of allocating the - -- object in the secondary stack (BIP_Alloc_Form = - -- Secondary_Stack), or else an allocator to create the - -- return object in the heap or user-defined pool - -- (BIP_Alloc_Form = Global_Heap or User_Storage_Pool). - - -- ??? An unchecked type conversion must be made in the - -- case of assigning the access object formal to the - -- local access object, because a normal conversion would - -- be illegal in some cases (such as converting access- - -- to-unconstrained to access-to-constrained), but the - -- the unchecked conversion will presumably fail to work - -- right in just such cases. It's not clear at all how to - -- handle this. ??? - - Alloc_If_Stmt := - Make_If_Statement (Loc, - Condition => - Make_Op_Eq (Loc, - Left_Opnd => - New_Occurrence_Of (Obj_Alloc_Formal, Loc), - Right_Opnd => - Make_Integer_Literal (Loc, - UI_From_Int (BIP_Allocation_Form'Pos - (Caller_Allocation)))), - - Then_Statements => New_List ( - Make_Assignment_Statement (Loc, - Name => - New_Occurrence_Of (Alloc_Obj_Id, Loc), - Expression => - Unchecked_Convert_To - (Ref_Type, - New_Occurrence_Of (Obj_Acc_Formal, Loc)))), - - Elsif_Parts => New_List ( - Make_Elsif_Part (Loc, - Condition => - Make_Op_Eq (Loc, - Left_Opnd => - New_Occurrence_Of (Obj_Alloc_Formal, Loc), - Right_Opnd => - Make_Integer_Literal (Loc, - UI_From_Int (BIP_Allocation_Form'Pos - (Secondary_Stack)))), - - Then_Statements => New_List ( - Make_Assignment_Statement (Loc, - Name => - New_Occurrence_Of (Alloc_Obj_Id, Loc), - Expression => SS_Allocator))), - - Make_Elsif_Part (Loc, - Condition => - Make_Op_Eq (Loc, - Left_Opnd => - New_Occurrence_Of (Obj_Alloc_Formal, Loc), - Right_Opnd => - Make_Integer_Literal (Loc, - UI_From_Int (BIP_Allocation_Form'Pos - (Global_Heap)))), - - Then_Statements => New_List ( - Build_Heap_Or_Pool_Allocator - (Temp_Id => Alloc_Obj_Id, - Temp_Typ => Ref_Type, - Func_Id => Func_Id, - Ret_Typ => Ret_Obj_Typ, - Alloc_Expr => Heap_Allocator))), - - -- ???If all is well, we can put the following - -- 'elsif' in the 'else', but this is a useful - -- self-check in case caller and callee don't agree - -- on whether BIPAlloc and so on should be passed. - - Make_Elsif_Part (Loc, - Condition => - Make_Op_Eq (Loc, - Left_Opnd => - New_Occurrence_Of (Obj_Alloc_Formal, Loc), - Right_Opnd => - Make_Integer_Literal (Loc, - UI_From_Int (BIP_Allocation_Form'Pos - (User_Storage_Pool)))), - - Then_Statements => New_List ( - Pool_Decl, - Build_Heap_Or_Pool_Allocator - (Temp_Id => Alloc_Obj_Id, - Temp_Typ => Ref_Type, - Func_Id => Func_Id, - Ret_Typ => Ret_Obj_Typ, - Alloc_Expr => Pool_Allocator)))), - - -- Raise Program_Error if it's none of the above; - -- this is a compiler bug. - - Else_Statements => New_List (Guard_Except)); - - -- If a separate initialization assignment was created - -- earlier, append that following the assignment of the - -- implicit access formal to the access object, to ensure - -- that the return object is initialized in that case. In - -- this situation, the target of the assignment must be - -- rewritten to denote a dereference of the access to the - -- return object passed in by the caller. - - if Present (Init_Assignment) then - Rewrite (Name (Init_Assignment), - Make_Explicit_Dereference (Loc, - Prefix => New_Occurrence_Of (Alloc_Obj_Id, Loc))); - pragma Assert - (Assignment_OK - (Original_Node (Name (Init_Assignment)))); - Set_Assignment_OK (Name (Init_Assignment)); - - Set_Etype (Name (Init_Assignment), Etype (Ret_Obj_Id)); - - Append_To - (Then_Statements (Alloc_If_Stmt), Init_Assignment); - end if; - - Insert_Before (Ret_Obj_Decl, Alloc_If_Stmt); - - -- Remember the local access object for use in the - -- dereference of the renaming created below. - - Obj_Acc_Formal := Alloc_Obj_Id; - end; - - -- When the function's subtype is unconstrained and a run-time - -- test is not needed, we nevertheless need to build the return - -- using the function's result subtype. - - elsif not Is_Constrained (Underlying_Type (Etype (Func_Id))) - then - declare - Alloc_Obj_Id : Entity_Id; - Alloc_Obj_Decl : Node_Id; - Ptr_Type_Decl : Node_Id; - Ref_Type : Entity_Id; - - begin - -- Create an access type designating the function's - -- result subtype. - - Ref_Type := Make_Temporary (Loc, 'A'); - - Ptr_Type_Decl := - Make_Full_Type_Declaration (Loc, - Defining_Identifier => Ref_Type, - Type_Definition => - Make_Access_To_Object_Definition (Loc, - All_Present => True, - Subtype_Indication => - New_Occurrence_Of (Ret_Obj_Typ, Loc))); - - Insert_Before (Ret_Obj_Decl, Ptr_Type_Decl); - - -- Create an access object initialized to the conversion - -- of the implicit access value passed in by the caller. - - Alloc_Obj_Id := Make_Temporary (Loc, 'R'); - Set_Etype (Alloc_Obj_Id, Ref_Type); - - -- See the ??? comment a few lines above about the use of - -- an unchecked conversion here. - - Alloc_Obj_Decl := - Make_Object_Declaration (Loc, - Defining_Identifier => Alloc_Obj_Id, - Object_Definition => - New_Occurrence_Of (Ref_Type, Loc), - Expression => - Unchecked_Convert_To - (Ref_Type, - New_Occurrence_Of (Obj_Acc_Formal, Loc))); - - Insert_Before (Ret_Obj_Decl, Alloc_Obj_Decl); - - -- Remember the local access object for use in the - -- dereference of the renaming created below. - - Obj_Acc_Formal := Alloc_Obj_Id; - end; - end if; - - -- Replace the return object declaration with a renaming of a - -- dereference of the access value designating the return - -- object. - - Obj_Acc_Deref := - Make_Explicit_Dereference (Loc, - Prefix => New_Occurrence_Of (Obj_Acc_Formal, Loc)); - - Rewrite (Ret_Obj_Decl, - Make_Object_Renaming_Declaration (Loc, - Defining_Identifier => Ret_Obj_Id, - Access_Definition => Empty, - Subtype_Mark => New_Occurrence_Of (Ret_Obj_Typ, Loc), - Name => Obj_Acc_Deref)); + -- Build a simple_return_statement that returns the return object - Set_Renamed_Object (Ret_Obj_Id, Obj_Acc_Deref); - end; - end if; + Return_Stmt := + Make_Simple_Return_Statement (Loc, + Expression => New_Occurrence_Of (Ret_Obj_Id, Loc)); + Append_To (Stmts, Return_Stmt); -- Case where we do not need to build a block. But we're about to drop -- Return_Object_Declarations on the floor, so assert that it contains @@ -6124,9 +5349,7 @@ package body Exp_Ch6 is -- before an object is returned. A predicate that applies to the return -- subtype is checked immediately before an object is returned. - -- Suppress access checks to avoid generating extra checks for b-i-p. - - Analyze (N, Suppress => Access_Check); + Analyze (N); end Expand_N_Extended_Return_Statement; ---------------------------- @@ -8518,26 +7741,6 @@ package body Exp_Ch6 is end if; end Install_Class_Preconditions_Check; - ----------------------------------- - -- Is_Build_In_Place_Result_Type -- - ----------------------------------- - - function Is_Build_In_Place_Result_Type (Typ : Entity_Id) return Boolean is - begin - if not Expander_Active then - return False; - end if; - - -- In Ada 2005 all functions with an inherently limited return type - -- must be handled using a build-in-place profile, including the case - -- of a function with a limited interface result, where the function - -- may return objects of nonlimited descendants. - - return Is_Limited_View (Typ) - and then Ada_Version >= Ada_2005 - and then not Debug_Flag_Dot_L; - end Is_Build_In_Place_Result_Type; - ------------------------------ -- Is_Build_In_Place_Entity -- ------------------------------ @@ -8655,6 +7858,36 @@ package body Exp_Ch6 is end; end Is_Build_In_Place_Function_Call; + ----------------------------------- + -- Is_Build_In_Place_Result_Type -- + ----------------------------------- + + function Is_Build_In_Place_Result_Type (Typ : Entity_Id) return Boolean is + begin + if not Expander_Active then + return False; + end if; + + -- In Ada 2005 all functions with an inherently limited return type + -- must be handled using a build-in-place profile, including the case + -- of a function with a limited interface result, where the function + -- may return objects of nonlimited descendants. + + return Is_Limited_View (Typ) + and then Ada_Version >= Ada_2005 + and then not Debug_Flag_Dot_L; + end Is_Build_In_Place_Result_Type; + + ------------------------------------- + -- Is_Build_In_Place_Return_Object -- + ------------------------------------- + + function Is_Build_In_Place_Return_Object (E : Entity_Id) return Boolean is + begin + return Is_Return_Object (E) + and then Is_Build_In_Place_Function (Return_Applies_To (Scope (E))); + end Is_Build_In_Place_Return_Object; + ----------------------- -- Is_Null_Procedure -- ----------------------- diff --git a/gcc/ada/exp_ch6.ads b/gcc/ada/exp_ch6.ads index f886eda..19d0bc3 100644 --- a/gcc/ada/exp_ch6.ads +++ b/gcc/ada/exp_ch6.ads @@ -127,22 +127,6 @@ package Exp_Ch6 is function Is_Build_In_Place_Entity (E : Entity_Id) return Boolean; -- Ada 2005 (AI-318-02): Returns True if E is a BIP entity. - function Is_Build_In_Place_Result_Type (Typ : Entity_Id) return Boolean; - -- Ada 2005 (AI-318-02): Returns True if functions returning the type use - -- build-in-place protocols. For inherently limited types, this must be - -- True in >= Ada 2005, and must be False in Ada 95. For other types, it - -- can be True or False, and the decision should be based on efficiency, - -- and should be the same for all language versions, so that mixed-dialect - -- programs will work. - -- - -- For inherently limited types in Ada 2005, True means that calls will - -- actually be build-in-place in all cases. For other types, build-in-place - -- will be used when possible, but we need to make a copy in some - -- cases. For example, for "X := F(...);" if F can see X, or if F can - -- propagate exceptions, we need to store its result in a temp in general, - -- and copy the temp into X. Also, for "return Global_Var;" Global_Var - -- needs to be copied into the function result object. - function Is_Build_In_Place_Function (E : Entity_Id) return Boolean; -- Ada 2005 (AI-318-02): Returns True if E denotes a function, generic -- function, or access-to-function type for which @@ -155,6 +139,15 @@ package Exp_Ch6 is -- that requires handling as a build-in-place call (possibly qualified or -- converted). + function Is_Build_In_Place_Result_Type (Typ : Entity_Id) return Boolean; + -- Ada 2005 (AI-318-02): Returns True if functions returning the type use + -- build-in-place protocols. For inherently limited types, this must be + -- True in >= Ada 2005 and must be False in Ada 95. + + function Is_Build_In_Place_Return_Object (E : Entity_Id) return Boolean; + -- Ada 2005 (AI-318-02): Return True is E is a return object of a function + -- that uses build-in-place protocols. + function Is_Null_Procedure (Subp : Entity_Id) return Boolean; -- Predicate to recognize stubbed procedures and null procedures, which -- can be inlined unconditionally in all cases. @@ -272,4 +265,7 @@ package Exp_Ch6 is -- to reference the secondary dispatch table of an interface; otherwise -- return Empty. +private + pragma Inline (Is_Build_In_Place_Return_Object); + end Exp_Ch6; diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 2be891e..0766482 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -441,10 +441,6 @@ package body Exp_Ch7 is -- of the formal of Proc, or force a conversion to the class-wide type in -- the case where the operation is abstract. - function Enclosing_Function (E : Entity_Id) return Entity_Id; - -- Given an arbitrary entity, traverse the scope chain looking for the - -- first enclosing function. Return Empty if no function was found. - function Make_Call (Loc : Source_Ptr; Proc_Id : Entity_Id; @@ -3431,7 +3427,9 @@ package body Exp_Ch7 is if Is_Return_Object (Obj_Id) then declare - Func_Id : constant Entity_Id := Enclosing_Function (Obj_Id); + Func_Id : constant Entity_Id := + Return_Applies_To (Scope (Obj_Id)); + begin if Is_Build_In_Place_Function (Func_Id) and then Needs_BIP_Finalization_Master (Func_Id) @@ -5084,26 +5082,6 @@ package body Exp_Ch7 is end if; end Convert_View; - ------------------------ - -- Enclosing_Function -- - ------------------------ - - function Enclosing_Function (E : Entity_Id) return Entity_Id is - Func_Id : Entity_Id; - - begin - Func_Id := E; - while Present (Func_Id) and then Func_Id /= Standard_Standard loop - if Ekind (Func_Id) = E_Function then - return Func_Id; - end if; - - Func_Id := Scope (Func_Id); - end loop; - - return Empty; - end Enclosing_Function; - ------------------------------- -- Establish_Transient_Scope -- ------------------------------- diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 93aa2ca..29969b3 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -4043,7 +4043,6 @@ package body Sem_Ch3 is Prev_Entity : Entity_Id := Empty; Related_Id : Entity_Id; - Full_View_Present : Boolean := False; -- Start of processing for Analyze_Object_Declaration @@ -4732,28 +4731,32 @@ package body Sem_Ch3 is Act_T := Find_Type_Of_Object (Object_Definition (N), N); end if; - -- Propagate attributes to full view when needed + if Act_T /= T then + declare + Full_View_Present : constant Boolean := + Is_Private_Type (Act_T) + and then Present (Full_View (Act_T)); + -- Propagate attributes to full view when needed - Set_Is_Constr_Subt_For_U_Nominal (Act_T); + begin + Set_Is_Constr_Subt_For_U_Nominal (Act_T); - if Is_Private_Type (Act_T) and then Present (Full_View (Act_T)) - then - Full_View_Present := True; - end if; + if Full_View_Present then + Set_Is_Constr_Subt_For_U_Nominal (Full_View (Act_T)); + end if; - if Full_View_Present then - Set_Is_Constr_Subt_For_U_Nominal (Full_View (Act_T)); - end if; + if Aliased_Present (N) then + Set_Is_Constr_Subt_For_UN_Aliased (Act_T); - if Aliased_Present (N) then - Set_Is_Constr_Subt_For_UN_Aliased (Act_T); + if Full_View_Present then + Set_Is_Constr_Subt_For_UN_Aliased (Full_View (Act_T)); + end if; + end if; - if Full_View_Present then - Set_Is_Constr_Subt_For_UN_Aliased (Full_View (Act_T)); - end if; + Freeze_Before (N, Act_T); + end; end if; - Freeze_Before (N, Act_T); Freeze_Before (N, T); end if; diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 05db793..e5c13ed 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -34,7 +34,6 @@ with Einfo.Utils; use Einfo.Utils; with Elists; use Elists; with Errout; use Errout; with Expander; use Expander; -with Exp_Ch3; use Exp_Ch3; with Exp_Ch6; use Exp_Ch6; with Exp_Ch9; use Exp_Ch9; with Exp_Dbug; use Exp_Dbug; @@ -1520,33 +1519,7 @@ package body Sem_Ch6 is -- object declaration. Set_Is_Return_Object (Defining_Identifier (Obj_Decl)); - - -- Returning a build-in-place unconstrained array type we defer - -- the full analysis of the returned object to avoid generating - -- the corresponding constrained subtype; otherwise the bounds - -- would be created in the stack and a dangling reference would - -- be returned pointing to the bounds. We perform its preanalysis - -- to report errors on the initializing aggregate now (if any); - -- we also ensure its activation chain and Master variable are - -- defined (if tasks are being declared) since they are generated - -- as part of the analysis and expansion of the object declaration - -- at this stage. - - if Is_Array_Type (R_Type) - and then not Is_Constrained (R_Type) - and then Is_Build_In_Place_Function (Scope_Id) - and then Needs_BIP_Alloc_Form (Scope_Id) - and then Nkind (Expr) in N_Aggregate | N_Extension_Aggregate - then - Preanalyze (Obj_Decl); - - if Expander_Active then - Ensure_Activation_Chain_And_Master (Obj_Decl); - end if; - - else - Analyze (Obj_Decl); - end if; + Analyze (Obj_Decl); Check_Return_Subtype_Indication (Obj_Decl); @@ -9274,7 +9247,9 @@ package body Sem_Ch6 is -- Force the definition of the Itype in case of internal function -- calls within the same or nested scope. - if Is_Subprogram_Or_Generic_Subprogram (E) then + if Is_Subprogram_Or_Generic_Subprogram (E) + and then not Is_Compilation_Unit (E) + then Subp_Decl := Parent (E); -- The insertion point for an Itype reference should be after -- cgit v1.1 From 1d5018955a37fa665acc8dcba8121dd365dbe9be Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Sat, 4 Jun 2022 10:44:13 +0000 Subject: [Ada] Remove exception propagation during bootstrap To help the bootstrap path, we want to keep the compiler free from any exception propagation during bootstrap. This has been broken recently in various places. Also introduce a way to more easily detect such breakage via the -DNO_EXCEPTION_PROPAGATION which can now be used as part of BOOT_CFLAGS. gcc/ada/ * exp_imgv.adb (Build_Enumeration_Image_Tables): Also disable perfect hash in GNAT_Mode. * raise-gcc.c (__gnat_Unwind_RaiseException): Add support for disabling exception propagation. * sem_eval.adb (Compile_Time_Known_Value): Update comment and remove wrong call to Check_Error_Detected. * sem_prag.adb (Check_Loop_Pragma_Grouping, Analyze_Pragma): Remove exception propagation during bootstrap. --- gcc/ada/exp_imgv.adb | 4 +++- gcc/ada/raise-gcc.c | 4 ++++ gcc/ada/sem_eval.adb | 4 ++-- gcc/ada/sem_prag.adb | 42 +++++++++++++++++++++--------------------- 4 files changed, 30 insertions(+), 24 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_imgv.adb b/gcc/ada/exp_imgv.adb index 6ab717c..51f1195 100644 --- a/gcc/ada/exp_imgv.adb +++ b/gcc/ada/exp_imgv.adb @@ -289,12 +289,14 @@ package body Exp_Imgv is -- If the unit where the type is declared is the main unit, and the -- number of literals is greater than Threshold_For_Size when we are -- optimizing for size, and the restriction No_Implicit_Loops is not - -- active, and -gnatd_h is not specified, generate the hash function. + -- active, and -gnatd_h is not specified, and not GNAT_Mode, generate + -- the hash function. if In_Main_Unit and then (Optimize_Size = 0 or else Nlit > Threshold_For_Size) and then not Restriction_Active (No_Implicit_Loops) and then not Debug_Flag_Underscore_H + and then not GNAT_Mode then declare LB : constant Positive := 2 * Positive (Nlit) + 1; diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c index f4c42c0..b03964c 100644 --- a/gcc/ada/raise-gcc.c +++ b/gcc/ada/raise-gcc.c @@ -1377,6 +1377,10 @@ __gnat_cleanupunwind_handler (int version ATTRIBUTE_UNUSED, _Unwind_Reason_Code __gnat_Unwind_RaiseException (_Unwind_Exception *e) { +#ifdef NO_EXCEPTION_PROPAGATION + abort(); +#endif + #ifdef __USING_SJLJ_EXCEPTIONS__ return _Unwind_SjLj_RaiseException (e); #else diff --git a/gcc/ada/sem_eval.adb b/gcc/ada/sem_eval.adb index 114c904..2ba4608 100644 --- a/gcc/ada/sem_eval.adb +++ b/gcc/ada/sem_eval.adb @@ -1816,10 +1816,10 @@ package body Sem_Eval is begin -- Never known at compile time if bad type or raises Constraint_Error - -- or empty (latter case occurs only as a result of a previous error). + -- or empty (which can occur as a result of a previous error or in the + -- case of e.g. an imported constant). if No (Op) then - Check_Error_Detected; return False; elsif Op = Error diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 3660c75..3431e3f 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -6152,15 +6152,11 @@ package body Sem_Prag is -------------------------------- procedure Check_Loop_Pragma_Grouping (Loop_Stmt : Node_Id) is - Stop_Search : exception; - -- This exception is used to terminate the recursive descent of - -- routine Check_Grouping. - - procedure Check_Grouping (L : List_Id); + function Check_Grouping (L : List_Id) return Boolean; -- Find the first group of pragmas in list L and if successful, -- ensure that the current pragma is part of that group. The - -- routine raises Stop_Search once such a check is performed to - -- halt the recursive descent. + -- routine returns True once such a check is performed to + -- stop the analysis. procedure Grouping_Error (Prag : Node_Id); pragma No_Return (Grouping_Error); @@ -6171,7 +6167,7 @@ package body Sem_Prag is -- Check_Grouping -- -------------------- - procedure Check_Grouping (L : List_Id) is + function Check_Grouping (L : List_Id) return Boolean is HSS : Node_Id; Stmt : Node_Id; Prag : Node_Id := Empty; -- init to avoid warning @@ -6219,7 +6215,7 @@ package body Sem_Prag is -- Stop the search as the placement is legal. if Stmt = N then - raise Stop_Search; + return True; -- Skip group members, but keep track of the -- last pragma in the group. @@ -6266,15 +6262,21 @@ package body Sem_Prag is elsif Nkind (Stmt) = N_Block_Statement then HSS := Handled_Statement_Sequence (Stmt); - Check_Grouping (Declarations (Stmt)); + if Check_Grouping (Declarations (Stmt)) then + return True; + end if; if Present (HSS) then - Check_Grouping (Statements (HSS)); + if Check_Grouping (Statements (HSS)) then + return True; + end if; end if; end if; Next (Stmt); end loop; + + return False; end Check_Grouping; -------------------- @@ -6287,6 +6289,8 @@ package body Sem_Prag is Error_Pragma ("pragma% must appear next to pragma#"); end Grouping_Error; + Ignore : Boolean; + -- Start of processing for Check_Loop_Pragma_Grouping begin @@ -6294,10 +6298,7 @@ package body Sem_Prag is -- within to determine whether the current pragma is part of the -- first topmost grouping of Loop_Invariant and Loop_Variant. - Check_Grouping (Statements (Loop_Stmt)); - - exception - when Stop_Search => null; + Ignore := Check_Grouping (Statements (Loop_Stmt)); end Check_Loop_Pragma_Grouping; -------------------- @@ -24617,7 +24618,7 @@ package body Sem_Prag is Check_First_Subtype (Task_Type); if Rep_Item_Too_Late (Ent, N) then - raise Pragma_Exit; + return; end if; end Task_Storage; @@ -24879,7 +24880,7 @@ package body Sem_Prag is or else Rep_Item_Too_Late (E, N) then - raise Pragma_Exit; + return; end if; Set_Has_Pragma_Thread_Local_Storage (E); @@ -25642,16 +25643,15 @@ package body Sem_Prag is if CodePeer_Mode or GNATprove_Mode then Rewrite (N, Make_Null_Statement (Loc)); Analyze (N); - raise Pragma_Exit; + return; end if; elsif Chars (Argx) = Name_Gnatprove then if not GNATprove_Mode then Rewrite (N, Make_Null_Statement (Loc)); Analyze (N); - raise Pragma_Exit; + return; end if; - else raise Program_Error; end if; @@ -25679,7 +25679,7 @@ package body Sem_Prag is Chars => Name_Warnings, Pragma_Argument_Associations => Shifted_Args)); Analyze (N); - raise Pragma_Exit; + return; end if; -- One argument case -- cgit v1.1 From 69a70b0acbf01387ec1d1e85d2c7ed0d588d799e Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 6 Jun 2022 10:50:23 +0200 Subject: [Ada] Perform object rewriting as renaming only in the expander The rewriting as renaming optimization for object declarations is done partly during analysis, guarded with Expander_Active, and partly during expansion, so it makes sense to do it entirely during expansion. This merges the two cases and removes obsolete or unnecessary conditions guarding the transformation in the process. gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite as a renaming for any nonaliased local object with nominal unconstrained subtype originally initialized with the result of a function call that has been rewritten as the dereference of a reference to the result. * sem_ch3.adb (Analyze_Object_Declaration): Do not do it here --- gcc/ada/exp_ch3.adb | 71 +++++++++++++++++++++++++---------------------------- gcc/ada/sem_ch3.adb | 35 -------------------------- 2 files changed, 33 insertions(+), 73 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 7e4c423..eea37dc 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -7675,59 +7675,54 @@ package body Exp_Ch3 is Rewrite_As_Renaming := - -- If the object declaration appears in the form + -- The declaration cannot be rewritten if it has got constraints + -- in other words the nominal subtype must be unconstrained. - -- Obj : Typ := Func (...); + Is_Entity_Name (Original_Node (Obj_Def)) - -- where Typ needs finalization and is returned on the secondary - -- stack, the declaration can be rewritten into a dereference of - -- the reference to the result built on the secondary stack (see - -- Expand_Ctrl_Function_Call for this expansion of the call): + -- The aliased case has to be excluded because the expression + -- will not be aliased in the general case. - -- type Axx is access all Typ; - -- Rxx : constant Axx := Func (...)'reference; - -- Obj : Typ renames Rxx.all; + and then not Aliased_Present (N) - -- This avoids an extra copy and a pair of Adjust/Finalize calls + -- If the object declaration originally appears in the form - ((not Is_Library_Level_Entity (Def_Id) - and then Nkind (Expr_Q) = N_Explicit_Dereference - and then not Comes_From_Source (Expr_Q) - and then Nkind (Original_Node (Expr_Q)) = N_Function_Call - and then Needs_Finalization (Typ) - and then not Is_Class_Wide_Type (Typ)) + -- Obj : Typ := Func (...); - -- If the initializing expression is for a variable with flag - -- OK_To_Rename set, then transform: + -- and has been rewritten as the dereference of a reference + -- to the function result built either on the primary or the + -- secondary stack, then the declaration can be rewritten as + -- the renaming of this dereference: - -- Obj : Typ := Expr; + -- type Axx is access all Typ; + -- Rxx : constant Axx := Func (...)'reference; + -- Obj : Typ renames Rxx.all; - -- into + -- This avoids an extra copy and, in the case where Typ needs + -- finalization, a pair of Adjust/Finalize calls (see below). - -- Obj : Typ renames Expr; + and then + ((not Is_Library_Level_Entity (Def_Id) + and then Nkind (Expr_Q) = N_Explicit_Dereference + and then not Comes_From_Source (Expr_Q) + and then Nkind (Original_Node (Expr_Q)) = N_Function_Call + and then not Is_Class_Wide_Type (Typ)) - -- provided that Obj is not aliased. The aliased case has to - -- be excluded because Expr will not be aliased in general. + -- If the initializing expression is a variable with the + -- flag OK_To_Rename set, then transform: - or else (not Aliased_Present (N) - and then (OK_To_Rename_Ref (Expr_Q) - or else - (Nkind (Expr_Q) = N_Slice - and then - OK_To_Rename_Ref (Prefix (Expr_Q)))))) + -- Obj : Typ := Expr; - -- The declaration cannot be rewritten if it has got constraints - -- in other words the nominal subtype must be unconstrained. + -- into + + -- Obj : Typ renames Expr; - and then Is_Entity_Name (Original_Node (Obj_Def)) + or else OK_To_Rename_Ref (Expr_Q) - -- ??? Likewise if there are any aspect specifications, because - -- otherwise we duplicate that corresponding implicit attribute - -- definition and call Insert_Action, which has no place for the - -- attribute definition. The attribute definition is stored in - -- Aspect_Rep_Item, which is not a list. + -- Likewise if it is a slice of such a variable - and then No (Aspect_Specifications (N)); + or else (Nkind (Expr_Q) = N_Slice + and then OK_To_Rename_Ref (Prefix (Expr_Q)))); -- If the type needs finalization and is not inherently limited, -- then the target is adjusted after the copy and attached to the diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 29969b3..790d1d1 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -5048,41 +5048,6 @@ package body Sem_Ch3 is end; end if; - -- Another optimization: if the nominal subtype is unconstrained and - -- the expression is a function call that returns on the secondary - -- stack, rewrite the declaration as a renaming of the result of the - -- call. The exceptions below are cases where the copy is expected, - -- either by the back end (Aliased case) or by the semantics, as for - -- initializing controlled types or copying tags for class-wide types. - -- ??? To be moved to Expand_N_Object_Declaration.Rewrite_As_Renaming. - - if Present (E) - and then Nkind (E) = N_Explicit_Dereference - and then Nkind (Original_Node (E)) = N_Function_Call - and then not Is_Library_Level_Entity (Id) - and then not Is_Aliased (Id) - and then Needs_Secondary_Stack (T) - and then not Is_Class_Wide_Type (T) - and then not Needs_Finalization (T) - and then Expander_Active - then - Rewrite (N, - Make_Object_Renaming_Declaration (Loc, - Defining_Identifier => Id, - Access_Definition => Empty, - Subtype_Mark => New_Occurrence_Of - (Base_Type (Etype (Id)), Loc), - Name => E)); - - Set_Renamed_Object (Id, E); - - -- Force generation of debugging information for the constant and for - -- the renamed function call. - - Set_Debug_Info_Needed (Id); - Set_Debug_Info_Needed (Entity (Prefix (E))); - end if; - if Present (Prev_Entity) and then Is_Frozen (Prev_Entity) and then not Error_Posted (Id) -- cgit v1.1 From 1f85342b42b4bf9fee3cd23bc38498a3565bc9f1 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Mon, 23 May 2022 14:27:41 +0200 Subject: [Ada] Spurious error on qualified prefix in Pack.Func'Result When using a qualified name such as Pack.Func as the prefix of a 'Result attribute reference, the prefix is not fully resolved and may contain a chain of homonyms. Look for the expected function in the homonym chain instead of issuing an error if the first one is not the expected one. gcc/ada/ * sem_attr.adb (Analyze_Attribute): Take into account the possibility of homonyms. --- gcc/ada/sem_attr.adb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 6a35358..b8d878c 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -5835,6 +5835,12 @@ package body Sem_Attr is elsif Present (Over_Id) and then Pref_Id = Over_Id then return True; + + -- When a qualified name is used for the prefix, homonyms may come + -- before the current function in the homonym chain. + + elsif Has_Homonym (Pref_Id) then + return Denote_Same_Function (Homonym (Pref_Id), Spec_Id); end if; -- Otherwise the prefix does not denote the related subprogram -- cgit v1.1 From 074e8addc5d8e92d9446357b961c003fe06dcc50 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 6 Jun 2022 13:02:28 +0200 Subject: [Ada] Fix comments mentioning ancient flags related to objects references Flag May_Be_Modified under go a series of renamings between 1996 and 2002. It was changed to Not_Assigned, then to Not_Source_Assigned and finally to Never_Set_In_Source. Fix remaining references in comments. gcc/ada/ * sem_util.ads (Note_Possible_Modification): Fix occurrence of May_Be_Modified in comment. * sem_warn.ads (Check_Unset_Reference): Fix occurrence of Not_Assigned in comment. --- gcc/ada/sem_util.ads | 2 +- gcc/ada/sem_warn.ads | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index 4121cf0..de7883c 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -2872,7 +2872,7 @@ package Sem_Util is -- This routine is called if the sub-expression N maybe the target of -- an assignment (e.g. it is the left side of an assignment, used as -- an out parameters, or used as prefixes of access attributes). It - -- sets May_Be_Modified in the associated entity if there is one, + -- sets Never_Set_In_Source in the associated entity if there is one, -- taking into account the rule that in the case of renamed objects, -- it is the flag in the renamed object that must be set. -- diff --git a/gcc/ada/sem_warn.ads b/gcc/ada/sem_warn.ads index bcf74ab..1894f36 100644 --- a/gcc/ada/sem_warn.ads +++ b/gcc/ada/sem_warn.ads @@ -86,15 +86,15 @@ package Sem_Warn is -- N is the node for an expression which occurs in a reference position, -- e.g. as the right side of an assignment. This procedure checks to see -- if the node is a reference to a variable entity where the entity has - -- Not_Assigned set. If so, the Unset_Reference field is set if it is not - -- the first occurrence. No warning is posted, instead warnings will be - -- posted later by Check_References. The reason we do things that - -- way is that if there are no assignments anywhere, we prefer to flag - -- the entity, rather than a reference to it. Note that for the purposes - -- of this routine, a type conversion or qualified expression whose - -- expression is an entity is also processed. The reason that we do not - -- process these at the point of occurrence is that both these constructs - -- can occur in non-reference positions (e.g. as out parameters). + -- Never_Set_In_Source set. If so, the Unset_Reference field is set if it + -- is not the first occurrence. No warning is posted, instead warnings will + -- be posted later by Check_References. The reason we do things that way is + -- that if there are no assignments anywhere, we prefer to flag the entity, + -- rather than a reference to it. Note that for the purposes of this + -- routine, a type conversion or qualified expression whose expression is + -- an entity is also processed. The reason that we do not process these + -- at the point of occurrence is that both these constructs can occur in + -- non-reference positions (e.g. as out parameters). procedure Check_Unused_Withs (Spec_Unit : Unit_Number_Type := No_Unit); -- This routine performs two kinds of checks. It checks that all with'ed -- cgit v1.1 From dd1c3433aa93d70d41d6c6cc1836249396413eab Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 6 Jun 2022 14:01:35 +0200 Subject: [Ada] Cleanup repeated code for aggregate constraints checks Code cleanup related to examining uses of Check_Unset_Reference for improved detection of uninitialised scalar objects. Semantics is unaffected. gcc/ada/ * sem_util.adb (Aggregate_Constraint_Checks): Fix whitespace; refactor repeated code; replace a ??? comment with an explanation based on the comment for the routine spec. --- gcc/ada/sem_util.adb | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 1b0b39b..df9fed1 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -1153,7 +1153,7 @@ package body Sem_Util is (Exp : Node_Id; Check_Typ : Entity_Id) is - Exp_Typ : constant Entity_Id := Etype (Exp); + Exp_Typ : constant Entity_Id := Etype (Exp); begin if Raises_Constraint_Error (Exp) then @@ -1236,12 +1236,12 @@ package body Sem_Util is and then Is_Scalar_Type (Check_Typ) and then Exp_Typ /= Check_Typ then + -- If expression is a constant, it is worthwhile checking whether it + -- is a bound of the type. + if Is_Entity_Name (Exp) and then Ekind (Entity (Exp)) = E_Constant then - -- If expression is a constant, it is worthwhile checking whether - -- it is a bound of the type. - if (Is_Entity_Name (Type_Low_Bound (Check_Typ)) and then Entity (Exp) = Entity (Type_Low_Bound (Check_Typ))) or else @@ -1249,20 +1249,15 @@ package body Sem_Util is and then Entity (Exp) = Entity (Type_High_Bound (Check_Typ))) then return; - - else - Rewrite (Exp, Convert_To (Check_Typ, Relocate_Node (Exp))); - Analyze_And_Resolve (Exp, Check_Typ); - Check_Unset_Reference (Exp); end if; + end if; - -- Could use a comment on this case ??? + -- Change Exp into Check_Typ'(Exp) to ensure that range checks are + -- performed at run time. - else - Rewrite (Exp, Convert_To (Check_Typ, Relocate_Node (Exp))); - Analyze_And_Resolve (Exp, Check_Typ); - Check_Unset_Reference (Exp); - end if; + Rewrite (Exp, Convert_To (Check_Typ, Relocate_Node (Exp))); + Analyze_And_Resolve (Exp, Check_Typ); + Check_Unset_Reference (Exp); end if; end Aggregate_Constraint_Checks; -- cgit v1.1 From 5c0729d2edbc963e5bdea29547aa7b0c751cb491 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 6 Jun 2022 16:41:32 +0200 Subject: [Ada] Annotate GNAT.Sockets with No_Return aspects Opportunity for extra annotations spotted while fixing detection of unreachable code that follows calls to procedures annotated with No_Return. gcc/ada/ * libgnat/g-socket.adb (Raise_Host_Error): Add No_Return aspect. (Raise_GAI_Error): Likewise. * libgnat/g-socket.ads (Raise_Socket_Error): Likewise. --- gcc/ada/libgnat/g-socket.adb | 6 ++++-- gcc/ada/libgnat/g-socket.ads | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/libgnat/g-socket.adb b/gcc/ada/libgnat/g-socket.adb index 12abb68..4267d9f 100644 --- a/gcc/ada/libgnat/g-socket.adb +++ b/gcc/ada/libgnat/g-socket.adb @@ -191,12 +191,14 @@ package body GNAT.Sockets is else Value); -- Removes dot at the end of error message - procedure Raise_Host_Error (H_Error : Integer; Name : String); + procedure Raise_Host_Error (H_Error : Integer; Name : String) + with No_Return; -- Raise Host_Error exception with message describing error code (note -- hstrerror seems to be obsolete) from h_errno. Name is the name -- or address that was being looked up. - procedure Raise_GAI_Error (RC : C.int; Name : String); + procedure Raise_GAI_Error (RC : C.int; Name : String) + with No_Return; -- Raise Host_Error with exception message in case of errors in -- getaddrinfo and getnameinfo. diff --git a/gcc/ada/libgnat/g-socket.ads b/gcc/ada/libgnat/g-socket.ads index 41ede44..cfc47be 100644 --- a/gcc/ada/libgnat/g-socket.ads +++ b/gcc/ada/libgnat/g-socket.ads @@ -1593,7 +1593,7 @@ private Wait_For_A_Full_Reception : constant Request_Flag_Type := 4; Send_End_Of_Record : constant Request_Flag_Type := 8; - procedure Raise_Socket_Error (Error : Integer); + procedure Raise_Socket_Error (Error : Integer) with No_Return; -- Raise Socket_Error with an exception message describing the error code -- from errno. -- cgit v1.1 From 824211e18b96dc56d3a530b31aa16cded2c941eb Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 6 Jun 2022 15:27:38 +0200 Subject: [Ada] Remove repeated analysis for pragma Thread_Local_Storage When analysing pragma Thread_Local_Storage its argument is analysed by the call to Check_Arg_Is_Library_Level_Local_Name. There is no need to reanalyse it. Code cleanup; behaviour is not affected. gcc/ada/ * sem_prag.adb (Analyze_Pragma): Remove unnecessary call to Analyze. --- gcc/ada/sem_prag.adb | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 3431e3f..9ebac41 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -24861,7 +24861,6 @@ package body Sem_Prag is Check_Arg_Is_Library_Level_Local_Name (Arg1); Id := Get_Pragma_Arg (Arg1); - Analyze (Id); if not Is_Entity_Name (Id) or else Ekind (Entity (Id)) /= E_Variable -- cgit v1.1 From dba077902daf195da0e5bbac33a1f34bc6b20367 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Mon, 6 Jun 2022 13:22:39 -0400 Subject: [Ada] Misc cleanup related to finalization This patch cleans up some code issues found while working on finalization, and adds some debugging aids. gcc/ada/ * exp_ch7.adb: Change two constants Is_Protected_Body and Is_Prot_Body to be Is_Protected_Subp_Body; these are not true for protected bodies, but for protected subprogram bodies. (Expand_Cleanup_Actions): No need to search for Activation_Chain_Entity; just use Activation_Chain_Entity. * sem_ch8.adb (Find_Direct_Name): Use Entyp constant. * atree.adb, atree.ads, atree.h, nlists.adb, nlists.ads (Parent): Provide nonoverloaded versions of Parent, so that they can be easily found in the debugger. * debug_a.adb, debug_a.ads: Clarify that we're talking about the -gnatda switch; switches are case sensitive. Print out the Chars field if appropriate, which makes it easier to find things in the output. (Debug_Output_Astring): Simplify. Also fix an off-by-one bug ("for I in Vbars'Length .." should have been "for I in Vbars'Length + 1 .."). Before, it was printing Debug_A_Depth + 1 '|' characters if Debug_A_Depth > Vbars'Length. --- gcc/ada/atree.adb | 8 ++++---- gcc/ada/atree.ads | 12 ++++++++++-- gcc/ada/atree.h | 2 +- gcc/ada/debug_a.adb | 32 +++++++++++++++++-------------- gcc/ada/debug_a.ads | 14 +++++++------- gcc/ada/exp_ch7.adb | 55 +++++++++++++++++++---------------------------------- gcc/ada/nlists.adb | 8 ++++---- gcc/ada/nlists.ads | 12 ++++++++++-- gcc/ada/sem_ch8.adb | 2 +- 9 files changed, 75 insertions(+), 70 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb index 2d7962c..446c796 100644 --- a/gcc/ada/atree.adb +++ b/gcc/ada/atree.adb @@ -1966,7 +1966,7 @@ package body Atree is end if; end Paren_Count; - function Parent (N : Node_Or_Entity_Id) return Node_Or_Entity_Id is + function Node_Parent (N : Node_Or_Entity_Id) return Node_Or_Entity_Id is begin pragma Assert (Present (N)); @@ -1975,7 +1975,7 @@ package body Atree is else return Node_Or_Entity_Id (Link (N)); end if; - end Parent; + end Node_Parent; ------------- -- Present -- @@ -2292,12 +2292,12 @@ package body Atree is -- Set_Parent -- ---------------- - procedure Set_Parent (N : Node_Or_Entity_Id; Val : Node_Or_Entity_Id) is + procedure Set_Node_Parent (N : Node_Or_Entity_Id; Val : Node_Or_Entity_Id) is begin pragma Assert (Present (N)); pragma Assert (not In_List (N)); Set_Link (N, Union_Id (Val)); - end Set_Parent; + end Set_Node_Parent; ------------------------ -- Set_Reporting_Proc -- diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads index 9d01cfc..0c809f5 100644 --- a/gcc/ada/atree.ads +++ b/gcc/ada/atree.ads @@ -446,10 +446,15 @@ package Atree is -- Tests given Id for equality with the Empty node. This allows notations -- like "if No (Variant_Part)" as opposed to "if Variant_Part = Empty". - function Parent (N : Node_Or_Entity_Id) return Node_Or_Entity_Id; + function Node_Parent (N : Node_Or_Entity_Id) return Node_Or_Entity_Id; + pragma Inline (Node_Parent); + function Parent (N : Node_Or_Entity_Id) return Node_Or_Entity_Id + renames Node_Parent; pragma Inline (Parent); -- Returns the parent of a node if the node is not a list member, or else -- the parent of the list containing the node if the node is a list member. + -- Parent has the same name as the one in Nlists; Node_Parent can be used + -- more easily in the debugger. function Paren_Count (N : Node_Id) return Nat; pragma Inline (Paren_Count); @@ -465,7 +470,10 @@ package Atree is -- Note that this routine is used only in very peculiar cases. In normal -- cases, the Original_Node link is set by calls to Rewrite. - procedure Set_Parent (N : Node_Or_Entity_Id; Val : Node_Or_Entity_Id); + procedure Set_Node_Parent (N : Node_Or_Entity_Id; Val : Node_Or_Entity_Id); + pragma Inline (Set_Node_Parent); + procedure Set_Parent (N : Node_Or_Entity_Id; Val : Node_Or_Entity_Id) + renames Set_Node_Parent; pragma Inline (Set_Parent); procedure Set_Paren_Count (N : Node_Id; Val : Nat); diff --git a/gcc/ada/atree.h b/gcc/ada/atree.h index 3b736ca..d35f0ad 100644 --- a/gcc/ada/atree.h +++ b/gcc/ada/atree.h @@ -35,7 +35,7 @@ extern "C" { #endif -#define Parent atree__parent +#define Parent atree__node_parent extern Node_Id Parent (Node_Id); #define Original_Node atree__original_node diff --git a/gcc/ada/debug_a.adb b/gcc/ada/debug_a.adb index 9ed1939..bded8ab 100644 --- a/gcc/ada/debug_a.adb +++ b/gcc/ada/debug_a.adb @@ -25,6 +25,7 @@ with Atree; use Atree; with Debug; use Debug; +with Namet; use Namet; with Sinfo; use Sinfo; with Sinfo.Nodes; use Sinfo.Nodes; with Sinput; use Sinput; @@ -33,7 +34,7 @@ with Output; use Output; package body Debug_A is Debug_A_Depth : Natural := 0; - -- Output for the debug A flag is preceded by a sequence of vertical bar + -- Output for the -gnatda switch is preceded by a sequence of vertical bar -- characters corresponding to the recursion depth of the actions being -- recorded (analysis, expansion, resolution and evaluation of nodes) -- This variable records the depth. @@ -66,7 +67,7 @@ package body Debug_A is procedure Debug_A_Entry (S : String; N : Node_Id) is begin - -- Output debugging information if -gnatda flag set + -- Output debugging information if -gnatda switch set if Debug_Flag_A then Debug_Output_Astring; @@ -77,6 +78,19 @@ package body Debug_A is Write_Location (Sloc (N)); Write_Str (" "); Write_Str (Node_Kind'Image (Nkind (N))); + + -- Print the Chars field, if appropriate + + case Nkind (N) is + when N_Has_Chars => + Write_Str (" """); + if Present (Chars (N)) then + Write_Str (Get_Name_String (Chars (N))); + end if; + Write_Str (""""); + when others => null; + end case; + Write_Eol; end if; @@ -115,7 +129,7 @@ package body Debug_A is end if; end loop; - -- Output debugging information if -gnatda flag set + -- Output debugging information if -gnatda switch set if Debug_Flag_A then Debug_Output_Astring; @@ -132,18 +146,8 @@ package body Debug_A is -------------------------- procedure Debug_Output_Astring is - Vbars : constant String := "|||||||||||||||||||||||||"; begin - if Debug_A_Depth > Vbars'Length then - for I in Vbars'Length .. Debug_A_Depth loop - Write_Char ('|'); - end loop; - - Write_Str (Vbars); - - else - Write_Str (Vbars (1 .. Debug_A_Depth)); - end if; + Write_Str ((1 .. Debug_A_Depth => '|')); end Debug_Output_Astring; end Debug_A; diff --git a/gcc/ada/debug_a.ads b/gcc/ada/debug_a.ads index 427d4a3..bcc1212 100644 --- a/gcc/ada/debug_a.ads +++ b/gcc/ada/debug_a.ads @@ -23,7 +23,7 @@ -- -- ------------------------------------------------------------------------------ --- This package contains data and subprograms to support the A debug switch +-- This package contains data and subprograms to support the -gnatda switch -- that is used to generate output showing what node is being analyzed, -- resolved, evaluated, or expanded. @@ -44,18 +44,18 @@ package Debug_A is -- Generates a message prefixed by a sequence of bars showing the nesting -- depth (depth increases by 1 for a Debug_A_Entry call and is decreased -- by the corresponding Debug_A_Exit call). Then the string is output - -- (analyzing, expanding etc), followed by the node number and its kind. - -- This output is generated only if the debug A flag is set. If the debug - -- A flag is not set, then no output is generated. This call also sets the - -- Node_Id value in Atree.Current_Error_Node in case a bomb occurs. This - -- is done unconditionally, whether or not the debug A flag is set. + -- (analyzing, expanding etc), followed by information about the node. + -- This output is generated only if the -gnatda switch is set. If that + -- switch is not set, then no output is generated. This call also sets the + -- Node_Id value in Atree.Current_Error_Node in case a bomb occurs. This is + -- done unconditionally, whether or not the switch is set. procedure Debug_A_Exit (S : String; N : Node_Id; Comment : String); pragma Inline (Debug_A_Exit); -- Generates the corresponding termination message. The message is preceded -- by a sequence of bars, followed by the string S, the node number, and -- a trailing comment (e.g. " (already evaluated)"). This output is - -- generated only if the debug A flag is set. If the debug A flag is not + -- generated only if the -gnatda switch is set. If that switch is not -- set, then no output is generated. This call also resets the value in -- Atree.Current_Error_Node to what it was before the corresponding call -- to Debug_A_Entry. diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 0766482..7ce39f4 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -867,19 +867,16 @@ package body Exp_Ch7 is Additional_Cleanup : List_Id) return List_Id is Is_Asynchronous_Call : constant Boolean := - Nkind (N) = N_Block_Statement - and then Is_Asynchronous_Call_Block (N); - Is_Master : constant Boolean := - Nkind (N) /= N_Entry_Body - and then Is_Task_Master (N); - Is_Protected_Body : constant Boolean := - Nkind (N) = N_Subprogram_Body - and then Is_Protected_Subprogram_Body (N); - Is_Task_Allocation : constant Boolean := - Nkind (N) = N_Block_Statement - and then Is_Task_Allocation_Block (N); - Is_Task_Body : constant Boolean := - Nkind (Original_Node (N)) = N_Task_Body; + Nkind (N) = N_Block_Statement and then Is_Asynchronous_Call_Block (N); + Is_Master : constant Boolean := + Nkind (N) /= N_Entry_Body and then Is_Task_Master (N); + Is_Protected_Subp_Body : constant Boolean := + Nkind (N) = N_Subprogram_Body + and then Is_Protected_Subprogram_Body (N); + Is_Task_Allocation : constant Boolean := + Nkind (N) = N_Block_Statement and then Is_Task_Allocation_Block (N); + Is_Task_Body : constant Boolean := + Nkind (Original_Node (N)) = N_Task_Body; Loc : constant Source_Ptr := Sloc (N); Stmts : constant List_Id := New_List; @@ -905,7 +902,7 @@ package body Exp_Ch7 is -- NOTE: The generated code references _object, a parameter to the -- procedure. - elsif Is_Protected_Body then + elsif Is_Protected_Subp_Body then declare Spec : constant Node_Id := Parent (Corresponding_Spec (N)); Conc_Typ : Entity_Id := Empty; @@ -3695,9 +3692,9 @@ package body Exp_Ch7 is -------------------------- procedure Build_Finalizer_Call (N : Node_Id; Fin_Id : Entity_Id) is - Is_Prot_Body : constant Boolean := - Nkind (N) = N_Subprogram_Body - and then Is_Protected_Subprogram_Body (N); + Is_Protected_Subp_Body : constant Boolean := + Nkind (N) = N_Subprogram_Body + and then Is_Protected_Subprogram_Body (N); -- Determine whether N denotes the protected version of a subprogram -- which belongs to a protected type. @@ -3733,7 +3730,7 @@ package body Exp_Ch7 is -- end; -- end Prot_SubpP; - if Is_Prot_Body then + if Is_Protected_Subp_Body then HSS := Handled_Statement_Sequence (Last (Statements (HSS))); end if; @@ -5745,24 +5742,12 @@ package body Exp_Ch7 is if Is_Task_Allocation then declare - Chain : constant Entity_Id := Activation_Chain_Entity (N); - Decl : Node_Id; - + Chain_Decl : constant N_Object_Declaration_Id := + Parent (Activation_Chain_Entity (N)); + pragma Assert (List_Containing (Chain_Decl) = Decls); begin - Decl := First (Decls); - while Nkind (Decl) /= N_Object_Declaration - or else Defining_Identifier (Decl) /= Chain - loop - Next (Decl); - - -- A task allocation block should always include a _chain - -- declaration. - - pragma Assert (Present (Decl)); - end loop; - - Remove (Decl); - Prepend_To (New_Decls, Decl); + Remove (Chain_Decl); + Prepend_To (New_Decls, Chain_Decl); end; end if; diff --git a/gcc/ada/nlists.adb b/gcc/ada/nlists.adb index 18702f3..a3bd95b 100644 --- a/gcc/ada/nlists.adb +++ b/gcc/ada/nlists.adb @@ -1013,12 +1013,12 @@ package body Nlists is -- Parent -- ------------ - function Parent (List : List_Id) return Node_Or_Entity_Id is + function List_Parent (List : List_Id) return Node_Or_Entity_Id is begin pragma Assert (Present (List)); pragma Assert (List <= Lists.Last); return Lists.Table (List).Parent; - end Parent; + end List_Parent; ---------- -- Pick -- @@ -1442,12 +1442,12 @@ package body Nlists is -- Set_Parent -- ---------------- - procedure Set_Parent (List : List_Id; Node : Node_Or_Entity_Id) is + procedure Set_List_Parent (List : List_Id; Node : Node_Or_Entity_Id) is begin pragma Assert (not Locked); pragma Assert (List <= Lists.Last); Lists.Table (List).Parent := Node; - end Set_Parent; + end Set_List_Parent; -------------- -- Set_Prev -- diff --git a/gcc/ada/nlists.ads b/gcc/ada/nlists.ads index 2f0585a..3c3d600 100644 --- a/gcc/ada/nlists.ads +++ b/gcc/ada/nlists.ads @@ -348,13 +348,21 @@ package Nlists is -- Called to unlock list contents when assertions are enabled; if -- assertions are not enabled calling this subprogram has no effect. - function Parent (List : List_Id) return Node_Or_Entity_Id; + function List_Parent (List : List_Id) return Node_Or_Entity_Id; + pragma Inline (List_Parent); + function Parent (List : List_Id) return Node_Or_Entity_Id + renames List_Parent; pragma Inline (Parent); -- Node lists may have a parent in the same way as a node. The function -- accesses the Parent value, which is either Empty when a list header -- is first created, or the value that has been set by Set_Parent. + -- Parent has the same name as the one in Atree; List_Parent can be used + -- more easily in the debugger. - procedure Set_Parent (List : List_Id; Node : Node_Or_Entity_Id); + procedure Set_List_Parent (List : List_Id; Node : Node_Or_Entity_Id); + pragma Inline (Set_List_Parent); + procedure Set_Parent (List : List_Id; Node : Node_Or_Entity_Id) + renames Set_List_Parent; pragma Inline (Set_Parent); -- Sets the parent field of the given list to reference the given node diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 0e75bb4..cda7870 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -6082,7 +6082,7 @@ package body Sem_Ch8 is -- If not that special case, then just reset the Etype else - Set_Etype (N, Etype (Entity (N))); + Set_Etype (N, Entyp); end if; end; end if; -- cgit v1.1 From 95e2844ef8fa68f7abd45646bae8b4362614bf9c Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Tue, 7 Jun 2022 11:00:56 +0200 Subject: [Ada] Fix spurious error on object renaming with ghost type Renaming of an object of ghost type leads to a spurious error. Now fixed. gcc/ada/ * ghost.adb (Is_OK_Ghost_Context): Detect ghost type inside object renaming. --- gcc/ada/ghost.adb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb index 25b9a28..8f23cbd 100644 --- a/gcc/ada/ghost.adb +++ b/gcc/ada/ghost.adb @@ -508,7 +508,16 @@ package body Ghost is elsif Nkind (Parent (Par)) in N_Generic_Instantiation | N_Renaming_Declaration | N_Generic_Renaming_Declaration - and then Par = Name (Parent (Par)) + and then Par = Name (Parent (Par)) + then + return True; + + -- In the case of the renaming of a ghost object, the type + -- itself may be ghost. + + elsif Nkind (Parent (Par)) = N_Object_Renaming_Declaration + and then (Par = Subtype_Mark (Parent (Par)) + or else Par = Access_Definition (Parent (Par))) then return True; -- cgit v1.1 From 0aa855e5eb274a7279693879b45b73b28b72aaef Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Tue, 7 Jun 2022 13:19:35 +0200 Subject: [Ada] Reuse Get_Pragma_Arg to handle pragma argument associations Code cleanup related to looking at pragma Thread_Local_Storage. Semantics is unaffected. gcc/ada/ * exp_ch3.adb (Build_Init_Statements): Reuse Get_Pragma_Arg. * exp_prag.adb (Arg_N): Likewise. --- gcc/ada/exp_ch3.adb | 8 +++----- gcc/ada/exp_prag.adb | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index eea37dc..c9f0bfd 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -3319,11 +3319,9 @@ package body Exp_Ch3 is -- Pragma case if Nkind (Ritem) = N_Pragma then - Exp := First (Pragma_Argument_Associations (Ritem)); - - if Nkind (Exp) = N_Pragma_Argument_Association then - Exp := Expression (Exp); - end if; + Exp := + Get_Pragma_Arg + (First (Pragma_Argument_Associations (Ritem))); -- Conversion for Priority expression diff --git a/gcc/ada/exp_prag.adb b/gcc/ada/exp_prag.adb index 5f13087..0631172 100644 --- a/gcc/ada/exp_prag.adb +++ b/gcc/ada/exp_prag.adb @@ -105,12 +105,10 @@ package body Exp_Prag is end if; end loop; - if Present (Arg) - and then Nkind (Arg) = N_Pragma_Argument_Association - then - return Expression (Arg); + if Present (Arg) then + return Get_Pragma_Arg (Arg); else - return Arg; + return Empty; end if; end Arg_N; -- cgit v1.1 From aba3ce53e5dc855172164f51080cd71f05f1d994 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Sat, 26 Mar 2022 00:13:28 +0100 Subject: [Ada] Remove use of a global name buffer when locating a file Code cleanup; semantics is unaffected. gcc/ada/ * osint.adb (Locate_File): Use Name_Find with a parameter and not with a global buffer. --- gcc/ada/osint.adb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb index eeedfcb..86fbf2d 100644 --- a/gcc/ada/osint.adb +++ b/gcc/ada/osint.adb @@ -1904,10 +1904,8 @@ package body Osint is if Dir_Name'Length = 0 then Found := N; else - Name_Len := Full_Name'Length - 1; - Name_Buffer (1 .. Name_Len) := - Full_Name (1 .. Full_Name'Last - 1); - Found := Name_Find; + Found := + Name_Find (Full_Name (Full_Name'First .. Full_Name'Last - 1)); end if; end if; end; -- cgit v1.1 From 5709fac357bb922a9eeecf42adbedd532c00fde6 Mon Sep 17 00:00:00 2001 From: Doug Rupp Date: Wed, 8 Jun 2022 07:39:16 -0700 Subject: [Ada] qnx-7.1: ACATS cxag001 failure on qnx - realpath The implementation of __gnat_full_name uses the CRTL realpath, however this function returns a null string so use the default implementation instead. gcc/ada/ * cstreams.c (__gnat_full_name) [QNX]: Remove block. --- gcc/ada/cstreams.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c index 48f996d..10cc3a6 100644 --- a/gcc/ada/cstreams.c +++ b/gcc/ada/cstreams.c @@ -202,19 +202,6 @@ __gnat_full_name (char *nam, char *buffer) getcwd approach instead. */ realpath (nam, buffer); -#elif defined (__QNX__) - - int length; - - if (__gnat_is_absolute_path (nam, strlen (nam))) - realpath (nam, buffer); - else - { - length = __gnat_max_path_len; - __gnat_get_current_dir (buffer, &length); - strncat (buffer, nam, __gnat_max_path_len - length - 1); - } - #elif defined (__vxworks) /* On VxWorks systems, an absolute path can be represented (depending on -- cgit v1.1 From 076a6d13d1e07a72fb964579316920225829777c Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Wed, 8 Jun 2022 16:58:18 +0200 Subject: [Ada] Remove redundant protection against empty lists Calls to First on No_List intentionally return Empty node, so explicit guards against No_List are unnecessary. Code cleanup; semantics is unaffected. gcc/ada/ * exp_code.adb (Setup_Asm_IO_Args): Remove guard against No_List. * par_sco.adb (Process_Decisions): Likewise. * sem_ch13.adb (Check_Component_List): Likewise. * sem_ch6.adb (FCL): Likewise. --- gcc/ada/exp_code.adb | 6 +----- gcc/ada/par_sco.adb | 12 +++++------- gcc/ada/sem_ch13.adb | 32 +++++++++++++++----------------- gcc/ada/sem_ch6.adb | 13 ++----------- 4 files changed, 23 insertions(+), 40 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_code.adb b/gcc/ada/exp_code.adb index 11fbc5f..d144b48 100644 --- a/gcc/ada/exp_code.adb +++ b/gcc/ada/exp_code.adb @@ -471,11 +471,7 @@ package body Exp_Code is -- Case of list of arguments elsif Nkind (Arg) = N_Aggregate then - if Expressions (Arg) = No_List then - Operand_Var := Empty; - else - Operand_Var := First (Expressions (Arg)); - end if; + Operand_Var := First (Expressions (Arg)); -- Otherwise must be default (no operands) case diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb index aba863d..e8875cf 100644 --- a/gcc/ada/par_sco.adb +++ b/gcc/ada/par_sco.adb @@ -480,13 +480,11 @@ package body Par_SCO is N : Node_Id; begin - if L /= No_List then - N := First (L); - while Present (N) loop - Process_Decisions (N, T, Pragma_Sloc); - Next (N); - end loop; - end if; + N := First (L); + while Present (N) loop + Process_Decisions (N, T, Pragma_Sloc); + Next (N); + end loop; end Process_Decisions; -- Version taking a node diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 27f3250..bb654ab 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -12135,24 +12135,22 @@ package body Sem_Ch13 is begin -- Gather discriminants into Comp - if DS /= No_List then - Citem := First (DS); - while Present (Citem) loop - if Nkind (Citem) = N_Discriminant_Specification then - declare - Ent : constant Entity_Id := - Defining_Identifier (Citem); - begin - if Ekind (Ent) = E_Discriminant then - Ncomps := Ncomps + 1; - Comps (Ncomps) := Ent; - end if; - end; - end if; + Citem := First (DS); + while Present (Citem) loop + if Nkind (Citem) = N_Discriminant_Specification then + declare + Ent : constant Entity_Id := + Defining_Identifier (Citem); + begin + if Ekind (Ent) = E_Discriminant then + Ncomps := Ncomps + 1; + Comps (Ncomps) := Ent; + end if; + end; + end if; - Next (Citem); - end loop; - end if; + Next (Citem); + end loop; -- Gather component entities into Comp diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index e5c13ed..440770a 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -9988,17 +9988,8 @@ package body Sem_Ch6 is N2 : Node_Id; begin - if L1 = No_List then - N1 := Empty; - else - N1 := First (L1); - end if; - - if L2 = No_List then - N2 := Empty; - else - N2 := First (L2); - end if; + N1 := First (L1); + N2 := First (L2); -- Compare two lists, skipping rewrite insertions (we want to compare -- the original trees, not the expanded versions). -- cgit v1.1 From 6ba8c078cabee2c6abc669971e1351536ce721ec Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Wed, 8 Jun 2022 20:49:57 +0200 Subject: [Ada] Reorder processing of default expressions to avoid repeated calls Code cleanup related to improved detection of uninitialised objects; semantics is unaffected. gcc/ada/ * sem_ch6.adb (Process_Formals): Avoid repeated calls to Expression. --- gcc/ada/sem_ch6.adb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 440770a..1efc884 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -12985,10 +12985,10 @@ package body Sem_Ch6 is Set_Formal_Mode (Formal); if Ekind (Formal) = E_In_Parameter then - Set_Default_Value (Formal, Expression (Param_Spec)); + Default := Expression (Param_Spec); - if Present (Expression (Param_Spec)) then - Default := Expression (Param_Spec); + if Present (Default) then + Set_Default_Value (Formal, Default); if Is_Scalar_Type (Etype (Default)) then if Nkind (Parameter_Type (Param_Spec)) /= -- cgit v1.1 From c96dcf055028510b5b1630e12015b86d5f5c2f6e Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Wed, 8 Jun 2022 20:52:48 +0200 Subject: [Ada] Remove repeated setting of Never_Set_In_Source Formal parameters have their flag Never_Set_In_Source set at the beginning of Process_Formals routine (regardless of the parameter mode). There is no need to set it again when Process_Formals calls Set_Formal_Mode (for parameters of mode IN OUT and OUT). Code cleanup related to improved detection of uninitialised objects; behaviour is unaffected. gcc/ada/ * sem_ch6.adb (Set_Formal_Mode): Remove unnecessary setting of Never_Set_In_Source. --- gcc/ada/sem_ch6.adb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 1efc884..8334647 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -13298,10 +13298,9 @@ package body Sem_Ch6 is Mutate_Ekind (Formal_Id, E_In_Out_Parameter); else - Mutate_Ekind (Formal_Id, E_Out_Parameter); - Set_Never_Set_In_Source (Formal_Id, True); - Set_Is_True_Constant (Formal_Id, False); - Set_Current_Value (Formal_Id, Empty); + Mutate_Ekind (Formal_Id, E_Out_Parameter); + Set_Is_True_Constant (Formal_Id, False); + Set_Current_Value (Formal_Id, Empty); end if; else -- cgit v1.1 From a2eaf87ffeaee689e431a3c85b001208d6705421 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 6 Jun 2022 23:23:32 +0200 Subject: [Ada] Remove kludge for validity checks on Long_Float type This patch reverts a fix for a spurious warning for validity checks on type Long_Float. This fix was dubious (as it was only affecting Long_Float and not Float) and apparently is no longer needed. Cleanup related to improved detection of uninitialised scalar objects. gcc/ada/ * sem_attr.adb (Note_Possible_Modification): Revert a special-case for validity checks on Long_Float type. * snames.ads-tmpl (Name_Attr_Long_Float): Remove name added exclusively for the mentioned fix. --- gcc/ada/sem_attr.adb | 41 ++++------------------------------------- gcc/ada/snames.ads-tmpl | 1 - 2 files changed, 4 insertions(+), 38 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index b8d878c..cab2461 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -11145,43 +11145,10 @@ package body Sem_Attr is => -- Note possible modification if we have a variable - if Is_Variable (P) then - declare - PN : constant Node_Id := Parent (N); - Nm : Node_Id; - - Note : Boolean := True; - -- Skip this for the case of Unrestricted_Access occurring - -- in the context of a Valid check, since this otherwise - -- leads to a missed warning (the Valid check does not - -- really modify!) If this case, Note will be reset to - -- False. - - -- Skip it as well if the type is an Access_To_Constant, - -- given that no use of the value can modify the prefix. - - begin - if Attr_Id = Attribute_Unrestricted_Access - and then Nkind (PN) = N_Function_Call - then - Nm := Name (PN); - - if Nkind (Nm) = N_Expanded_Name - and then Chars (Nm) = Name_Valid - and then Nkind (Prefix (Nm)) = N_Identifier - and then Chars (Prefix (Nm)) = Name_Attr_Long_Float - then - Note := False; - end if; - - elsif Is_Access_Constant (Typ) then - Note := False; - end if; - - if Note then - Note_Possible_Modification (P, Sure => False); - end if; - end; + if Is_Variable (P) + and then not Is_Access_Constant (Typ) + then + Note_Possible_Modification (P, Sure => False); end if; -- Case where prefix is an entity name diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl index 73e7304..dbf711d 100644 --- a/gcc/ada/snames.ads-tmpl +++ b/gcc/ada/snames.ads-tmpl @@ -776,7 +776,6 @@ package Snames is Name_Allow : constant Name_Id := N + $; Name_Amount : constant Name_Id := N + $; Name_As_Is : constant Name_Id := N + $; - Name_Attr_Long_Float : constant Name_Id := N + $; Name_Assertion : constant Name_Id := N + $; Name_Assertions : constant Name_Id := N + $; Name_Attribute_Name : constant Name_Id := N + $; -- cgit v1.1 From d2672ffea0a478b265f5ed0239723c8ba54e8d24 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 9 Jun 2022 00:24:34 +0200 Subject: [Ada] Couple of small cleanups for Cloned_Subtype No functional changes. gcc/ada/ * exp_util.adb (Make_Subtype_From_Expr): Do not set field to Empty. * sem_util.adb (Visit_Itype): Remove ??? comment. --- gcc/ada/exp_util.adb | 9 ++++----- gcc/ada/sem_util.adb | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index eaf7ebf..8557e4b 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -10213,8 +10213,8 @@ package body Exp_Util is elsif Is_Class_Wide_Type (Unc_Typ) then declare - CW_Subtype : Entity_Id; - EQ_Typ : Entity_Id := Empty; + CW_Subtype : constant Entity_Id := + New_Class_Wide_Subtype (Unc_Typ, E); begin -- A class-wide equivalent type is not needed on VM targets @@ -10237,11 +10237,10 @@ package body Exp_Util is Set_Etype (Unc_Typ, Base_Type (Full_View (Etype (Unc_Typ)))); end if; - EQ_Typ := Make_CW_Equivalent_Type (Unc_Typ, E); + Set_Equivalent_Type + (CW_Subtype, Make_CW_Equivalent_Type (Unc_Typ, E)); end if; - CW_Subtype := New_Class_Wide_Subtype (Unc_Typ, E); - Set_Equivalent_Type (CW_Subtype, EQ_Typ); Set_Cloned_Subtype (CW_Subtype, Base_Type (Unc_Typ)); return New_Occurrence_Of (CW_Subtype, Loc); diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index df9fed1..edb9482 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -25146,8 +25146,7 @@ package body Sem_Util is end if; -- If a record subtype is simply copied, the entity list will be - -- shared. Thus cloned_Subtype must be set to indicate the sharing. - -- ??? What does this do? + -- shared, so Cloned_Subtype must be set to indicate this. if Ekind (Itype) in E_Class_Wide_Subtype | E_Record_Subtype then Set_Cloned_Subtype (New_Itype, Itype); -- cgit v1.1 From 5a387a2b8f58a238acfea6ec820a0fd44057a09a Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 19 May 2022 20:42:42 +0200 Subject: [Ada] Warn about obsolete uses of renamed Ada 83 packages Ada 83 packages like Unchecked_Conversion or Text_IO are obsolete since Ada 95. GNAT now warns about their uses when warnings on obsolescent featured (Annex J) is active. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Warning Message Control): Update description of switch -gnatwj. * gnat_ugn.texi: Regenerate. * sem_ch10.adb (Analyze_With_Clause): Warn on WITH clauses for obsolete renamed units; in Ada 83 mode do not consider predefined renamings to be obsolete. gcc/testsuite/ * gnat.dg/renaming1.adb: Update WITH clause. * gnat.dg/renaming1.ads: Likewise. * gnat.dg/warn29.adb: Likewise. --- .../doc/gnat_ugn/building_executable_programs_with_gnat.rst | 3 +-- gcc/ada/gnat_ugn.texi | 3 +-- gcc/ada/sem_ch10.adb | 12 ++++++++++-- gcc/testsuite/gnat.dg/renaming1.adb | 8 ++++---- gcc/testsuite/gnat.dg/renaming1.ads | 4 ++-- gcc/testsuite/gnat.dg/warn29.adb | 2 +- 6 files changed, 19 insertions(+), 13 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst index 2e835f2..c0eeca4 100644 --- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst @@ -3277,8 +3277,7 @@ of the pragma in the :title:`GNAT_Reference_manual`). If this warning option is activated, then warnings are generated for calls to subprograms marked with ``pragma Obsolescent`` and for use of features in Annex J of the Ada Reference Manual. In the - case of Annex J, not all features are flagged. In particular use - of the renamed packages (like ``Text_IO``) and use of package + case of Annex J, not all features are flagged. In particular, uses of package ``ASCII`` are not flagged, since these are very common and would generate many annoying positive warnings. The default is that such warnings are not generated. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index a080cd4..cfd9a87 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -11383,8 +11383,7 @@ This switch disables warnings on overlapping actuals in a call. If this warning option is activated, then warnings are generated for calls to subprograms marked with @code{pragma Obsolescent} and for use of features in Annex J of the Ada Reference Manual. In the -case of Annex J, not all features are flagged. In particular use -of the renamed packages (like @code{Text_IO}) and use of package +case of Annex J, not all features are flagged. In particular, uses of package @code{ASCII} are not flagged, since these are very common and would generate many annoying positive warnings. The default is that such warnings are not generated. diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 9b9a9f1..8c1c00c 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -2597,11 +2597,19 @@ package body Sem_Ch10 is -- Note: this is not quite right if the user defines one of these units -- himself, but that's a marginal case, and fixing it is hard ??? - if Restriction_Check_Required (No_Obsolescent_Features) then - if In_Predefined_Renaming (U) then + if Ada_Version >= Ada_95 + and then In_Predefined_Renaming (U) + then + if Restriction_Check_Required (No_Obsolescent_Features) then Check_Restriction (No_Obsolescent_Features, N); Restriction_Violation := True; end if; + + if Warn_On_Obsolescent_Feature then + Error_Msg_N + ("renamed predefined unit is an obsolescent feature " + & "(RM J.1)?j?", N); + end if; end if; -- Check No_Implementation_Units violation diff --git a/gcc/testsuite/gnat.dg/renaming1.adb b/gcc/testsuite/gnat.dg/renaming1.adb index d033c9a..c85e50a 100644 --- a/gcc/testsuite/gnat.dg/renaming1.adb +++ b/gcc/testsuite/gnat.dg/renaming1.adb @@ -1,12 +1,12 @@ -- { dg-do compile} -- { dg-options "-gnatwa" } -with Text_IO; -use Text_IO; +with Ada.Text_IO; +use Ada.Text_IO; package body renaming1 is - procedure Fo (A : Text_IO.File_Access) is + procedure Fo (A : Ada.Text_IO.File_Access) is begin - if A = Text_IO.Standard_Output then + if A = Ada.Text_IO.Standard_Output then null; end if; end Fo; diff --git a/gcc/testsuite/gnat.dg/renaming1.ads b/gcc/testsuite/gnat.dg/renaming1.ads index 893f423..fba216a 100644 --- a/gcc/testsuite/gnat.dg/renaming1.ads +++ b/gcc/testsuite/gnat.dg/renaming1.ads @@ -1,4 +1,4 @@ -with Text_IO; +with Ada.Text_IO; package renaming1 is - procedure Fo (A : Text_IO.File_Access); + procedure Fo (A : Ada.Text_IO.File_Access); end; diff --git a/gcc/testsuite/gnat.dg/warn29.adb b/gcc/testsuite/gnat.dg/warn29.adb index ec3b9ee..eeb3a89 100644 --- a/gcc/testsuite/gnat.dg/warn29.adb +++ b/gcc/testsuite/gnat.dg/warn29.adb @@ -1,7 +1,7 @@ -- { dg-do compile } -- { dg-options "-gnatwa" } -with Text_IO; use Text_IO; +with Ada.Text_IO; use Ada.Text_IO; package body Warn29 is procedure P (X : T; Y : Integer) is -- cgit v1.1 From 510ac273a785361f7c8f24e4815bfb477a6a2e07 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 5 Jul 2022 06:12:28 -0300 Subject: testsuite: fix array type in two_plus_gigs test The array element type for the two_plus_gigs test was mistakely put in as int rather than char. for gcc/testsuite/ChangeLog * lib/target-supports.exp (check_effective_target_two_plus_gigs): Fix array element type. Reported by Hans-Peter Nilsson. --- gcc/testsuite/lib/target-supports.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 48c5dda..4ed7b25 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2909,7 +2909,7 @@ proc check_effective_target_le { } { proc check_effective_target_two_plus_gigs { } { return [check_no_compiler_messages two_plus_gigs executable { - int dummy[0x80000000]; + char dummy[0x80000000]; int main () { return 0; } }] } -- cgit v1.1 From 7f4028ae9bbbd35bff34738d5e2f9b6810242ba7 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 4 Jul 2022 14:58:41 +0200 Subject: Maintain LC SSA when doing SVE vectorization The final loop IV use after the loop has that not in LC SSA (and inserts not simplified _2 = _3 - 0 stmts). In particular since it splits the exit edge when there's a virtual PHI in the destination it breaks virtual LC SSA form (but likely also non-virtual). The following properly inserts LC PHIs instead. 2022-07-04 Richard Biener * tree-vect-loop-manip.cc (vect_set_loop_condition_normal): Maintain LC SSA. --- gcc/tree-vect-loop-manip.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index 5c31f0a..d7410d7 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -920,9 +920,22 @@ vect_set_loop_condition_normal (class loop *loop, tree niters, tree step, if (final_iv) { - gassign *assign = gimple_build_assign (final_iv, MINUS_EXPR, - indx_after_incr, init); - gsi_insert_on_edge_immediate (single_exit (loop), assign); + gassign *assign; + edge exit = single_exit (loop); + gcc_assert (single_pred_p (exit->dest)); + tree phi_dest + = integer_zerop (init) ? final_iv : copy_ssa_name (indx_after_incr); + /* Make sure to maintain LC SSA form here and elide the subtraction + if the value is zero. */ + gphi *phi = create_phi_node (phi_dest, exit->dest); + add_phi_arg (phi, indx_after_incr, exit, UNKNOWN_LOCATION); + if (!integer_zerop (init)) + { + assign = gimple_build_assign (final_iv, MINUS_EXPR, + phi_dest, init); + gimple_stmt_iterator gsi = gsi_after_labels (exit->dest); + gsi_insert_before (&gsi, assign, GSI_SAME_STMT); + } } return cond_stmt; -- cgit v1.1 From 1a6e0d8252a71c61d4dc616044fb25b5ac2cfffb Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 5 Jul 2022 10:43:42 +0200 Subject: tree-optimization/106196 - properly update virtual SSA for vector stores The following properly handles aggregate returns of the const marked STORE_LANES internal function to update virtual SSA form on-the-fly rather than relying on a costly virtual SSA rewrite. PR tree-optimization/106196 * tree-vect-stmts.cc (vect_finish_stmt_generation): Properly handle aggregate returns of calls for VDEF updates. * gcc.dg/torture/pr106196.c: New testcase. --- gcc/testsuite/gcc.dg/torture/pr106196.c | 14 ++++++++++++++ gcc/tree-vect-stmts.cc | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr106196.c (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/torture/pr106196.c b/gcc/testsuite/gcc.dg/torture/pr106196.c new file mode 100644 index 0000000..56723de --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr106196.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-ftree-vectorize -fno-vect-cost-model" } */ + +extern char a[]; +char *b; +void e() { + char *d; + int c; + d = a; + for (; c; c++) { + d[2] = d[1] = d[0] = b[c]; + d += 3; + } +} diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 72107af..3db6620 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -1638,8 +1638,10 @@ vect_finish_stmt_generation (vec_info *vinfo, && ((is_gimple_assign (vec_stmt) && !is_gimple_reg (gimple_assign_lhs (vec_stmt))) || (is_gimple_call (vec_stmt) - && !(gimple_call_flags (vec_stmt) - & (ECF_CONST|ECF_PURE|ECF_NOVOPS))))) + && (!(gimple_call_flags (vec_stmt) + & (ECF_CONST|ECF_PURE|ECF_NOVOPS)) + || (gimple_call_lhs (vec_stmt) + && !is_gimple_reg (gimple_call_lhs (vec_stmt))))))) { tree new_vdef = copy_ssa_name (vuse, vec_stmt); gimple_set_vdef (vec_stmt, new_vdef); -- cgit v1.1 From c3d2600cfb476e576fd27f3f29f49e968e86774d Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 5 Jul 2022 11:38:52 +0200 Subject: tree-optimization/106186 - propagate out virtual LC PHI nodes properly The code to remove LC PHI nodes in clean_up_loop_closed_phi does not handle virtual operands because may_propagate_copy generally returns false for them. The following copies the merge_blocks variant for dealing with them. This fixes a missed jump threading in gcc.dg/auto-init-uninit-4.c which manifests in bogus uninit diagnostics. PR tree-optimization/106186 * tree-ssa-propagate.cc (clean_up_loop_closed_phi): Properly handle virtual PHI nodes. --- gcc/tree-ssa-propagate.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-propagate.cc b/gcc/tree-ssa-propagate.cc index 163b24f..9dc4bfd 100644 --- a/gcc/tree-ssa-propagate.cc +++ b/gcc/tree-ssa-propagate.cc @@ -1272,7 +1272,21 @@ clean_up_loop_closed_phi (function *fun) rhs = gimple_phi_arg_def (phi, 0); lhs = gimple_phi_result (phi); - if (rhs && may_propagate_copy (lhs, rhs)) + if (virtual_operand_p (rhs)) + { + imm_use_iterator iter; + use_operand_p use_p; + gimple *stmt; + + FOR_EACH_IMM_USE_STMT (stmt, iter, lhs) + FOR_EACH_IMM_USE_ON_STMT (use_p, iter) + SET_USE (use_p, rhs); + + if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) + SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs) = 1; + remove_phi_node (&gsi, true); + } + else if (may_propagate_copy (lhs, rhs)) { /* Dump details. */ if (dump_file && (dump_flags & TDF_DETAILS)) -- cgit v1.1 From 1cc08ceb5baa4e4d6ade6de3a82d22d8fc2cc2a0 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 5 Jul 2022 14:09:36 +0200 Subject: Remove dead loop-based LC SSA rewrite The following removes the now unused per-loop path in LC SSA rewrite. * tree-ssa-loop-manip.cc (find_uses_to_rename_def): Remove. (find_uses_to_rename_in_loop): Likewise. (rewrite_into_loop_closed_ssa_1): Remove loop parameter and uses. (rewrite_into_loop_closed_ssa): Adjust. --- gcc/tree-ssa-loop-manip.cc | 109 ++------------------------------------------- 1 file changed, 4 insertions(+), 105 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc index 623d03b..9f3b626 100644 --- a/gcc/tree-ssa-loop-manip.cc +++ b/gcc/tree-ssa-loop-manip.cc @@ -498,94 +498,6 @@ find_uses_to_rename (bitmap changed_bbs, bitmap *use_blocks, bitmap need_phis, find_uses_to_rename_bb (bb, use_blocks, need_phis, use_flags); } -/* Mark uses of DEF that are used outside of the loop they are defined in for - rewrite. Record the set of blocks in which the ssa names are used to - USE_BLOCKS. Record the SSA names that will need exit PHIs in NEED_PHIS. */ - -static void -find_uses_to_rename_def (tree def, bitmap *use_blocks, bitmap need_phis) -{ - gimple *use_stmt; - imm_use_iterator imm_iter; - - FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def) - { - if (is_gimple_debug (use_stmt)) - continue; - - basic_block use_bb = gimple_bb (use_stmt); - - use_operand_p use_p; - FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter) - { - if (gimple_code (use_stmt) == GIMPLE_PHI) - { - edge e = gimple_phi_arg_edge (as_a (use_stmt), - PHI_ARG_INDEX_FROM_USE (use_p)); - use_bb = e->src; - } - find_uses_to_rename_use (use_bb, USE_FROM_PTR (use_p), use_blocks, - need_phis); - } - } -} - -/* Marks names matching USE_FLAGS that are defined in LOOP and used outside of - it for rewrite. Records the set of blocks in which the ssa names are used to - USE_BLOCKS. Record the SSA names that will need exit PHIs in NEED_PHIS. */ - -static void -find_uses_to_rename_in_loop (class loop *loop, bitmap *use_blocks, - bitmap need_phis, int use_flags) -{ - bool do_virtuals = (use_flags & SSA_OP_VIRTUAL_USES) != 0; - bool do_nonvirtuals = (use_flags & SSA_OP_USE) != 0; - int def_flags = ((do_virtuals ? SSA_OP_VIRTUAL_DEFS : 0) - | (do_nonvirtuals ? SSA_OP_DEF : 0)); - - - basic_block *bbs = get_loop_body (loop); - - for (unsigned int i = 0; i < loop->num_nodes; i++) - { - basic_block bb = bbs[i]; - - for (gphi_iterator bsi = gsi_start_phis (bb); !gsi_end_p (bsi); - gsi_next (&bsi)) - { - gphi *phi = bsi.phi (); - tree res = gimple_phi_result (phi); - bool virtual_p = virtual_operand_p (res); - if ((virtual_p && do_virtuals) - || (!virtual_p && do_nonvirtuals)) - find_uses_to_rename_def (res, use_blocks, need_phis); - } - - for (gimple_stmt_iterator bsi = gsi_start_bb (bb); !gsi_end_p (bsi); - gsi_next (&bsi)) - { - gimple *stmt = gsi_stmt (bsi); - /* FOR_EACH_SSA_TREE_OPERAND iterator does not allows - SSA_OP_VIRTUAL_DEFS only. */ - if (def_flags == SSA_OP_VIRTUAL_DEFS) - { - tree vdef = gimple_vdef (stmt); - if (vdef != NULL) - find_uses_to_rename_def (vdef, use_blocks, need_phis); - } - else - { - tree var; - ssa_op_iter iter; - FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, def_flags) - find_uses_to_rename_def (var, use_blocks, need_phis); - } - } - } - - XDELETEVEC (bbs); -} - /* Rewrites the program into a loop closed ssa form -- i.e. inserts extra phi nodes to ensure that no variable is used outside the loop it is defined in. @@ -615,8 +527,7 @@ find_uses_to_rename_in_loop (class loop *loop, bitmap *use_blocks, is not well-behaved, while the second one is an induction variable with base 99 and step 1. - If LOOP is non-null, only rewrite uses that have defs in LOOP. Otherwise, - if CHANGED_BBS is not NULL, we look for uses outside loops only in the + If CHANGED_BBS is not NULL, we look for uses outside loops only in the basic blocks in this set. USE_FLAGS allows us to specify whether we want virtual, non-virtual or @@ -627,7 +538,7 @@ find_uses_to_rename_in_loop (class loop *loop, bitmap *use_blocks, static void rewrite_into_loop_closed_ssa_1 (bitmap changed_bbs, unsigned update_flag, - int use_flags, class loop *loop) + int use_flags) { bitmap *use_blocks; bitmap names_to_rename; @@ -651,18 +562,7 @@ rewrite_into_loop_closed_ssa_1 (bitmap changed_bbs, unsigned update_flag, because we know that we will only have entries for the SSA names in NAMES_TO_RENAME. */ use_blocks = XNEWVEC (bitmap, num_ssa_names); - - if (loop != NULL) - { - gcc_assert (changed_bbs == NULL); - find_uses_to_rename_in_loop (loop, use_blocks, names_to_rename, - use_flags); - } - else - { - gcc_assert (loop == NULL); - find_uses_to_rename (changed_bbs, use_blocks, names_to_rename, use_flags); - } + find_uses_to_rename (changed_bbs, use_blocks, names_to_rename, use_flags); if (!bitmap_empty_p (names_to_rename)) { @@ -694,8 +594,7 @@ rewrite_into_loop_closed_ssa_1 (bitmap changed_bbs, unsigned update_flag, void rewrite_into_loop_closed_ssa (bitmap changed_bbs, unsigned update_flag) { - rewrite_into_loop_closed_ssa_1 (changed_bbs, update_flag, - SSA_OP_ALL_USES, NULL); + rewrite_into_loop_closed_ssa_1 (changed_bbs, update_flag, SSA_OP_ALL_USES); } /* Check invariants of the loop closed ssa form for the def in DEF_BB. */ -- cgit v1.1 From 07dd0f7ba27d1fe9f0ce5b049ac5735dc5d361ad Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 5 Jul 2022 14:14:49 +0200 Subject: tree-optimization/106198 - CFG cleanup vs LC SSA This is another case like PR106182 where for the 2nd testcase in the bug there are no removed or discovered loops but still changing loop exits invalidates LC SSA and it is not enough to just scan for uses in the blocks that changed loop depth. One might argue that if we'd include former exit destinations we'd pick up the original LC SSA use but for virtuals on block merging we'd have propagated those out (while for regular uses we insert copies). CFG cleanup can also be entered with loops needing fixup so any heuristics based on loop structure are bound to fail. PR tree-optimization/106198 * tree-cfgcleanup.cc (repair_loop_structures): Always do a full LC SSA rewrite but only if any blocks changed loop depth. * gcc.dg/pr106198.c: New testcase. --- gcc/testsuite/gcc.dg/pr106198.c | 22 ++++++++++++++++++++++ gcc/tree-cfgcleanup.cc | 6 +++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr106198.c (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/pr106198.c b/gcc/testsuite/gcc.dg/pr106198.c new file mode 100644 index 0000000..00d2758 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr106198.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options "-O3" } */ + +int printf(const char *, ...); +long a; +int b; +volatile int c; +int main() { + long e = a; + int f = a; + L: + if (b > 0) { + printf("0"); + goto L; + } + if (f) { + printf("%ld", (long)b); + goto L; + } + e >= b && c; + return 0; +} diff --git a/gcc/tree-cfgcleanup.cc b/gcc/tree-cfgcleanup.cc index 3b24e02..b9ff689 100644 --- a/gcc/tree-cfgcleanup.cc +++ b/gcc/tree-cfgcleanup.cc @@ -1183,9 +1183,9 @@ repair_loop_structures (void) become unreachable by back edges from latch). Also a former irreducible loop can become reducible - in this case force a full rewrite into loop-closed SSA form. */ - if (loops_state_satisfies_p (LOOP_CLOSED_SSA)) - rewrite_into_loop_closed_ssa (n_new_or_deleted_loops ? NULL : changed_bbs, - TODO_update_ssa); + if (loops_state_satisfies_p (LOOP_CLOSED_SSA) + && (!bitmap_empty_p (changed_bbs) || n_new_or_deleted_loops)) + rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa); BITMAP_FREE (changed_bbs); -- cgit v1.1 From 069f46c71e9432eda3d48a366e5c2a750cf8d612 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 24 Jun 2022 05:57:42 -0700 Subject: c++: Prune ordinary locations Like macro locations, we only need to emit ordinary location information for locations emitted into the CMI. This adds a hash table noting which ordinary lines are needed. These are then sorted and (sufficiently) adjacent lines are coalesced to a single map. There is a tradeoff here, allowing greater separation reduces the number of line maps, but increases the number of locations. It appears allowing 2 or 3 intervening lines is the sweet spot, and this patch chooses 2. Compiling a hello-world #includeing in it's GMF gives a reduction in number of locations of 5 fold, but an increase in number of maps about 4 fold. Examining one of the xtreme-header tests we halve the number of locations and increase the number of maps by 9 fold. Module interfaces that emit no entities (or macros, if a header-unit), will now have no location tables. gcc/cp/ * module.cc (struct ord_loc_info, ord_loc_traits): New. (ord_loc_tabke, ord_loc_remap): New globals. (struct location_map_info): Delete. (struct module_state_config): Rename ordinary_loc_align to loc_range_bits. (module_for_ordinary_loc): Adjust. (module_state::note_location): Note ordinary locations, return bool. (module_state::write_location): Adjust ordinary location streaming. (module_state::read_location): Likewise. (module_state::write_init_maps): Allocate ord_loc_table. (module_state::write_prepare_maps): Reimplement ordinary map preparation. (module_state::read_prepare_maps): Adjust. (module_state::write_ordinary_maps): Reimplement. (module_state::write_macro_maps): Adjust. (module_state::read_ordinary_maps): Reimplement. (module_state::write_macros): Adjust. (module_state::write_config): Adjust. (module_state::read_config): Adjust. (module_state::write_begin): Adjust. (module_state::read_initial): Adjust. gcc/testsuite/ * g++.dg/modules/loc-prune-1.C: Adjust. * g++.dg/modules/loc-prune-4.C: New. * g++.dg/modules/pr98718_a.C: Adjust. * g++.dg/modules/pr98718_b.C: Adjust. * g++.dg/modules/pr99072.H: Adjust. --- gcc/cp/module.cc | 629 ++++++++++++++++------------- gcc/testsuite/g++.dg/modules/loc-prune-1.C | 2 +- gcc/testsuite/g++.dg/modules/loc-prune-4.C | 22 + gcc/testsuite/g++.dg/modules/pr98718_a.C | 2 +- gcc/testsuite/g++.dg/modules/pr98718_b.C | 2 +- gcc/testsuite/g++.dg/modules/pr99072.H | 4 +- 6 files changed, 375 insertions(+), 286 deletions(-) create mode 100644 gcc/testsuite/g++.dg/modules/loc-prune-4.C (limited to 'gcc') diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 238a5eb..f27f4d0 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -3240,6 +3240,66 @@ public: static loc_spans spans; +/* Information about ordinary locations we stream out. */ +struct ord_loc_info +{ + const line_map_ordinary *src; // line map we're based on + unsigned offset; // offset to this line + unsigned span; // number of locs we span + unsigned remap; // serialization + + static int compare (const void *a_, const void *b_) + { + auto *a = static_cast (a_); + auto *b = static_cast (b_); + + if (a->src != b->src) + return a->src < b->src ? -1 : +1; + + // Ensure no overlap + gcc_checking_assert (a->offset + a->span <= b->offset + || b->offset + b->span <= a->offset); + + gcc_checking_assert (a->offset != b->offset); + return a->offset < b->offset ? -1 : +1; + } +}; +struct ord_loc_traits +{ + typedef ord_loc_info value_type; + typedef value_type compare_type; + + static const bool empty_zero_p = false; + + static hashval_t hash (const value_type &v) + { + auto h = pointer_hash::hash (v.src); + return iterative_hash_hashval_t (v.offset, h); + } + static bool equal (const value_type &v, const compare_type p) + { + return v.src == p.src && v.offset == p.offset; + } + + static void mark_empty (value_type &v) + { + v.src = nullptr; + } + static bool is_empty (value_type &v) + { + return !v.src; + } + + static bool is_deleted (value_type &) { return false; } + static void mark_deleted (value_type &) { gcc_unreachable (); } + + static void remove (value_type &) {} +}; +/* Table keyed by ord_loc_info, used for noting. */ +static hash_table *ord_loc_table; +/* Sorted vector, used for writing. */ +static vec *ord_loc_remap; + /* Information about macro locations we stream out. */ struct macro_loc_info { @@ -3401,15 +3461,7 @@ void slurping::release_macros () elf_in::release (from, macro_tbl); } -/* Information about location maps used during writing. */ - -struct location_map_info { - range_t num_maps; - - unsigned max_range; -}; - -/* Flage for extensions that end up being streamed. */ +/* Flags for extensions that end up being streamed. */ enum streamed_extensions { SE_OPENMP = 1 << 0, @@ -3652,14 +3704,13 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state { private: void write_init_maps (); - location_map_info write_prepare_maps (module_state_config *); + range_t write_prepare_maps (module_state_config *, bool); bool read_prepare_maps (const module_state_config *); - void write_ordinary_maps (elf_out *to, location_map_info &, - module_state_config *, bool, unsigned *crc_ptr); - bool read_ordinary_maps (); - void write_macro_maps (elf_out *to, location_map_info &, - module_state_config *, unsigned *crc_ptr); + void write_ordinary_maps (elf_out *to, range_t &, + bool, unsigned *crc_ptr); + bool read_ordinary_maps (unsigned, unsigned); + void write_macro_maps (elf_out *to, range_t &, unsigned *crc_ptr); bool read_macro_maps (unsigned); private: @@ -3678,7 +3729,7 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state { static cpp_macro *deferred_macro (cpp_reader *, location_t, cpp_hashnode *); public: - static void note_location (location_t); + static bool note_location (location_t); static void write_location (bytes_out &, location_t); location_t read_location (bytes_in &) const; @@ -14444,14 +14495,14 @@ struct module_state_config { unsigned num_entities; unsigned ordinary_locs; unsigned macro_locs; - unsigned ordinary_loc_align; + unsigned loc_range_bits; unsigned active_init; public: module_state_config () :dialect_str (get_dialect ()), num_imports (0), num_partitions (0), num_entities (0), - ordinary_locs (0), macro_locs (0), ordinary_loc_align (0), + ordinary_locs (0), macro_locs (0), loc_range_bits (0), active_init (0) { } @@ -15562,7 +15613,7 @@ module_for_ordinary_loc (location_t loc) module_state *probe = (*ool)[pos + half]; if (loc < probe->ordinary_locs.first) len = half; - else if (loc < probe->ordinary_locs.second) + else if (loc < probe->ordinary_locs.first + probe->ordinary_locs.second) return probe; else { @@ -15589,7 +15640,7 @@ module_for_macro_loc (location_t loc) pos += half + 1; len = len - (half + 1); } - else if (loc >= (probe->macro_locs.first + probe->macro_locs.second)) + else if (loc >= probe->macro_locs.first + probe->macro_locs.second) len = half; else return probe; @@ -15614,10 +15665,11 @@ module_state::imported_from () const /* Note that LOC will need writing. This allows us to prune locations that are not needed. */ -void +bool module_state::note_location (location_t loc) { - if (!macro_loc_table) + bool added = false; + if (!macro_loc_table && !ord_loc_table) ; else if (loc < RESERVED_LOCATION_COUNT) ; @@ -15654,17 +15706,33 @@ module_state::note_location (location_t loc) tloc = mac_map->macro_locations[ix]; note_location (tloc); } + added = true; } } } else if (IS_ORDINARY_LOC (loc)) { - /* This is where we should note we use this location. See comment - about write_ordinary_maps. */ + if (spans.ordinary (loc)) + { + const line_map *map = linemap_lookup (line_table, loc); + const line_map_ordinary *ord_map = linemap_check_ordinary (map); + ord_loc_info lkup; + lkup.src = ord_map; + lkup.span = 1 << ord_map->m_column_and_range_bits; + lkup.offset = (loc - MAP_START_LOCATION (ord_map)) & ~(lkup.span - 1); + lkup.remap = 0; + ord_loc_info *slot = (ord_loc_table->find_slot_with_hash + (lkup, ord_loc_traits::hash (lkup), INSERT)); + if (!slot->src) + { + *slot = lkup; + added = true; + } + } } else gcc_unreachable (); - return; + return added; } /* If we're not streaming, record that we need location LOC. @@ -15745,16 +15813,37 @@ module_state::write_location (bytes_out &sec, location_t loc) } else if (IS_ORDINARY_LOC (loc)) { - if (const loc_spans::span *span = spans.ordinary (loc)) + const ord_loc_info *info = nullptr; + unsigned offset = 0; + if (unsigned hwm = ord_loc_remap->length ()) { - unsigned off = loc; + info = ord_loc_remap->begin (); + while (hwm != 1) + { + unsigned mid = hwm / 2; + if (MAP_START_LOCATION (info[mid].src) + info[mid].offset <= loc) + { + info += mid; + hwm -= mid; + } + else + hwm = mid; + } + offset = loc - MAP_START_LOCATION (info->src) - info->offset; + if (offset > info->span) + info = nullptr; + } + + gcc_checking_assert (bool (info) == bool (spans.ordinary (loc))); - off += span->ordinary_delta; + if (info) + { + offset += info->remap; sec.u (LK_ORDINARY); - sec.u (off); + sec.u (offset); dump (dumper::LOCATION) - && dump ("Ordinary location %u output %u", loc, off); + && dump ("Ordinary location %u output %u", loc, offset); } else if (const module_state *import = module_for_ordinary_loc (loc)) { @@ -15809,7 +15898,7 @@ module_state::read_location (bytes_in &sec) const { unsigned off = sec.u (); - if (macro_locs.first) + if (macro_locs.second) { if (off < macro_locs.second) locus = off + macro_locs.first; @@ -15828,15 +15917,10 @@ module_state::read_location (bytes_in &sec) const unsigned off = sec.u (); if (ordinary_locs.second) { - location_t adjusted = off; - - adjusted += slurp->loc_deltas.first; - if (adjusted >= ordinary_locs.second) + if (off < ordinary_locs.second) + locus = off + ordinary_locs.first; + else sec.set_overrun (); - else if (adjusted >= ordinary_locs.first) - locus = adjusted; - else if (adjusted < spans.main_start ()) - locus = off; } else locus = loc; @@ -15870,7 +15954,7 @@ module_state::read_location (bytes_in &sec) const { if (kind == LK_IMPORT_MACRO) { - if (!import->macro_locs.first) + if (!import->macro_locs.second) locus = import->loc; else if (off < import->macro_locs.second) locus = off + import->macro_locs.first; @@ -15881,8 +15965,7 @@ module_state::read_location (bytes_in &sec) const { if (!import->ordinary_locs.second) locus = import->loc; - else if (off < (import->ordinary_locs.second - - import->ordinary_locs.first)) + else if (off < import->ordinary_locs.second) locus = import->ordinary_locs.first + off; else sec.set_overrun (); @@ -15895,26 +15978,21 @@ module_state::read_location (bytes_in &sec) const return locus; } -/* Prepare the span adjustments. */ - -// FIXME:QOI I do not prune the unreachable locations. Modules with -// textually-large GMFs could well cause us to run out of locations. -// Regular single-file modules could also be affected. We should -// determine which locations we need to represent, so that we do not -// grab more locations than necessary. An example is in -// write_macro_maps where we work around macro expansions that are not -// covering any locations -- the macro expands to nothing. Perhaps we -// should decompose locations so that we can have a more graceful -// degradation upon running out? +/* Allocate hash tables to record needed locations. */ void module_state::write_init_maps () { macro_loc_table = new hash_table (EXPERIMENT (1, 400)); + ord_loc_table = new hash_table (EXPERIMENT (1, 400)); } -location_map_info -module_state::write_prepare_maps (module_state_config *cfg) +/* Prepare the span adjustments. We prune unneeded locations -- at + this point every needed location must have been seen by + note_location. */ + +range_t +module_state::write_prepare_maps (module_state_config *cfg, bool has_partitions) { dump () && dump ("Preparing locations"); dump.indent (); @@ -15925,82 +16003,98 @@ module_state::write_prepare_maps (module_state_config *cfg) spans[loc_spans::SPAN_RESERVED].macro.first, spans[loc_spans::SPAN_RESERVED].macro.second); - location_map_info info; - - info.num_maps.first = info.num_maps.second = 0; - - /* Figure the alignment of ordinary location spans. */ - unsigned max_range = 0; - for (unsigned ix = loc_spans::SPAN_FIRST; ix != spans.length (); ix++) - { - loc_spans::span &span = spans[ix]; + range_t info {0, 0}; - if (span.ordinary.first != span.ordinary.second) - { - line_map_ordinary const *omap - = linemap_check_ordinary (linemap_lookup (line_table, - span.ordinary.first)); + // Sort the noted lines. + vec_alloc (ord_loc_remap, ord_loc_table->size ()); + for (auto iter = ord_loc_table->begin (), end = ord_loc_table->end (); + iter != end; ++iter) + ord_loc_remap->quick_push (*iter); + ord_loc_remap->qsort (&ord_loc_info::compare); - /* We should exactly match up. */ - gcc_checking_assert (MAP_START_LOCATION (omap) == span.ordinary.first); + // Note included-from maps. + bool added = false; + const line_map_ordinary *current = nullptr; + for (auto iter = ord_loc_remap->begin (), end = ord_loc_remap->end (); + iter != end; ++iter) + if (iter->src != current) + { + current = iter->src; + for (auto probe = current; + auto from = linemap_included_from (probe); + probe = linemap_check_ordinary (linemap_lookup (line_table, from))) + { + if (has_partitions) + { + // Partition locations need to elide their module map + // entry. + probe + = linemap_check_ordinary (linemap_lookup (line_table, from)); + if (MAP_MODULE_P (probe)) + from = linemap_included_from (probe); + } - line_map_ordinary const *fmap = omap; - for (; MAP_START_LOCATION (omap) < span.ordinary.second; omap++) + if (!note_location (from)) + break; + added = true; + } + } + if (added) + { + // Reconstruct the line array as we added items to the hash table. + vec_free (ord_loc_remap); + vec_alloc (ord_loc_remap, ord_loc_table->size ()); + for (auto iter = ord_loc_table->begin (), end = ord_loc_table->end (); + iter != end; ++iter) + ord_loc_remap->quick_push (*iter); + ord_loc_remap->qsort (&ord_loc_info::compare); + } + delete ord_loc_table; + ord_loc_table = nullptr; + + // Merge (sufficiently) adjacent spans, and calculate remapping. + constexpr unsigned adjacency = 2; // Allow 2 missing lines. + auto begin = ord_loc_remap->begin (), end = ord_loc_remap->end (); + auto dst = begin; + unsigned offset = 0, range_bits = 0; + ord_loc_info *base = nullptr; + for (auto iter = begin; iter != end; ++iter) + { + if (base && iter->src == base->src) + { + if (base->offset + base->span + + ((adjacency << base->src->m_column_and_range_bits) + // If there are few c&r bits, allow further separation. + | (adjacency << 4)) + >= iter->offset) { - /* We should never find a module linemap in an interval. */ - gcc_checking_assert (!MAP_MODULE_P (omap)); - - if (max_range < omap->m_range_bits) - max_range = omap->m_range_bits; + // Merge. + offset -= base->span; + base->span = iter->offset + iter->span - base->offset; + offset += base->span; + continue; } - - info.num_maps.first += omap - fmap; - } - } - - /* Adjust the maps. Ordinary ones ascend, and we must maintain - alignment. Macro ones descend, but are unaligned. */ - location_t ord_off = spans[loc_spans::SPAN_FIRST].ordinary.first; - location_t range_mask = (1u << max_range) - 1; - - dump () && dump ("Ordinary maps range bits:%u, preserve:%x, zero:%u", - max_range, ord_off & range_mask, ord_off & ~range_mask); - - for (unsigned ix = loc_spans::SPAN_FIRST; ix != spans.length (); ix++) - { - loc_spans::span &span = spans[ix]; - - line_map_ordinary const *omap - = linemap_check_ordinary (linemap_lookup (line_table, - span.ordinary.first)); - location_t base = MAP_START_LOCATION (omap); - - /* Preserve the low MAX_RANGE bits of base by incrementing ORD_OFF. */ - unsigned low_bits = base & range_mask; - if ((ord_off & range_mask) > low_bits) - low_bits += range_mask + 1; - ord_off = (ord_off & ~range_mask) + low_bits; - span.ordinary_delta = ord_off - base; - - for (; MAP_START_LOCATION (omap) < span.ordinary.second; omap++) - { - location_t start_loc = MAP_START_LOCATION (omap); - unsigned to = start_loc + span.ordinary_delta; - location_t end_loc = MAP_START_LOCATION (omap + 1); - - dump () && dump ("Ordinary span:%u [%u,%u):%u->%d(%u)", - ix, start_loc, - end_loc, end_loc - start_loc, - span.ordinary_delta, to); - - /* There should be no change in the low order bits. */ - gcc_checking_assert (((start_loc ^ to) & range_mask) == 0); } + else if (range_bits < iter->src->m_range_bits) + range_bits = iter->src->m_range_bits; - /* The ending serialized value. */ - ord_off = span.ordinary.second + span.ordinary_delta; + offset += ((1u << iter->src->m_range_bits) - 1); + offset &= ~((1u << iter->src->m_range_bits) - 1); + iter->remap = offset; + offset += iter->span; + base = dst; + *dst++ = *iter; } + ord_loc_remap->truncate (dst - begin); + + info.first = ord_loc_remap->length (); + cfg->ordinary_locs = offset; + cfg->loc_range_bits = range_bits; + dump () && dump ("Ordinary maps:%u locs:%u range_bits:%u", + info.first, cfg->ordinary_locs, + cfg->loc_range_bits); + // Remap the macro locations. vec_alloc (macro_loc_remap, macro_loc_table->size ()); for (auto iter = macro_loc_table->begin (), end = macro_loc_table->end (); iter != end; ++iter) @@ -16009,7 +16103,7 @@ module_state::write_prepare_maps (module_state_config *cfg) macro_loc_table = nullptr; macro_loc_remap->qsort (¯o_loc_info::compare); - unsigned offset = 0; + offset = 0; for (auto iter = macro_loc_remap->begin (), end = macro_loc_remap->end (); iter != end; ++iter) { @@ -16017,16 +16111,15 @@ module_state::write_prepare_maps (module_state_config *cfg) iter->remap = offset; offset += mac->n_tokens; } - info.num_maps.second = macro_loc_remap->length (); + info.second = macro_loc_remap->length (); cfg->macro_locs = offset; - dump () && dump ("Ordinary:%u maps hwm:%u macro:%u maps %u locs", - info.num_maps.first, ord_off, - info.num_maps.second, cfg->macro_locs); + dump () && dump ("Macro maps:%u locs:%u", info.second, cfg->macro_locs); dump.outdent (); - info.max_range = max_range; + // If we have no ordinary locs, we must also have no macro locs. + gcc_checking_assert (cfg->ordinary_locs || !cfg->macro_locs); return info; } @@ -16035,8 +16128,6 @@ bool module_state::read_prepare_maps (const module_state_config *cfg) { location_t ordinary = line_table->highest_location + 1; - ordinary = ((ordinary + (1u << cfg->ordinary_loc_align)) - & ~((1u << cfg->ordinary_loc_align) - 1)); ordinary += cfg->ordinary_locs; location_t macro = LINEMAPS_MACRO_LOWEST_LOCATION (line_table); @@ -16061,13 +16152,12 @@ module_state::read_prepare_maps (const module_state_config *cfg) return false; } -/* Write the location maps. This also determines the shifts for the - location spans. */ +/* Write & read the location maps. Not called if there are no + locations. */ void -module_state::write_ordinary_maps (elf_out *to, location_map_info &info, - module_state_config *cfg, bool has_partitions, - unsigned *crc_p) +module_state::write_ordinary_maps (elf_out *to, range_t &info, + bool has_partitions, unsigned *crc_p) { dump () && dump ("Writing ordinary location maps"); dump.indent (); @@ -16076,45 +16166,36 @@ module_state::write_ordinary_maps (elf_out *to, location_map_info &info, filenames.create (20); /* Determine the unique filenames. */ - // FIXME:QOI We should find the set of filenames when working out - // which locations we actually need. See write_prepare_maps. - for (unsigned ix = loc_spans::SPAN_FIRST; ix != spans.length (); ix++) - { - loc_spans::span &span = spans[ix]; - line_map_ordinary const *omap - = linemap_check_ordinary (linemap_lookup (line_table, - span.ordinary.first)); - - /* We should exactly match up. */ - gcc_checking_assert (MAP_START_LOCATION (omap) == span.ordinary.first); - - for (; MAP_START_LOCATION (omap) < span.ordinary.second; omap++) - { - const char *fname = ORDINARY_MAP_FILE_NAME (omap); + const line_map_ordinary *current = nullptr; + for (auto iter = ord_loc_remap->begin (), end = ord_loc_remap->end (); + iter != end; ++iter) + if (iter->src != current) + { + current = iter->src; + const char *fname = ORDINARY_MAP_FILE_NAME (iter->src); - /* We should never find a module linemap in an interval. */ - gcc_checking_assert (!MAP_MODULE_P (omap)); + /* We should never find a module linemap in an interval. */ + gcc_checking_assert (!MAP_MODULE_P (iter->src)); - /* We expect very few filenames, so just an array. - (Not true when headers are still in play :() */ - for (unsigned jx = filenames.length (); jx--;) - { - const char *name = filenames[jx]; - if (0 == strcmp (name, fname)) - { - /* Reset the linemap's name, because for things like - preprocessed input we could have multiple - instances of the same name, and we'd rather not - percolate that. */ - const_cast (omap)->to_file = name; - fname = NULL; - break; - } - } - if (fname) - filenames.safe_push (fname); - } - } + /* We expect very few filenames, so just an array. + (Not true when headers are still in play :() */ + for (unsigned jx = filenames.length (); jx--;) + { + const char *name = filenames[jx]; + if (0 == strcmp (name, fname)) + { + /* Reset the linemap's name, because for things like + preprocessed input we could have multiple instances + of the same name, and we'd rather not percolate + that. */ + const_cast (iter->src)->to_file = name; + fname = NULL; + break; + } + } + if (fname) + filenames.safe_push (fname); + } bytes_out sec (to); sec.begin (); @@ -16130,56 +16211,45 @@ module_state::write_ordinary_maps (elf_out *to, location_map_info &info, sec.str (fname); } - location_t offset = spans[loc_spans::SPAN_FIRST].ordinary.first; - location_t range_mask = (1u << info.max_range) - 1; - - dump () && dump ("Ordinary maps:%u, range bits:%u, preserve:%x, zero:%u", - info.num_maps.first, info.max_range, offset & range_mask, - offset & ~range_mask); - sec.u (info.num_maps.first); /* Num maps. */ - sec.u (info.max_range); /* Maximum range bits */ - sec.u (offset & range_mask); /* Bits to preserve. */ - sec.u (offset & ~range_mask); - - for (unsigned ix = loc_spans::SPAN_FIRST; ix != spans.length (); ix++) + sec.u (info.first); /* Num maps. */ + const ord_loc_info *base = nullptr; + for (auto iter = ord_loc_remap->begin (), end = ord_loc_remap->end (); + iter != end; ++iter) { - loc_spans::span &span = spans[ix]; - line_map_ordinary const *omap - = linemap_check_ordinary (linemap_lookup (line_table, - span.ordinary.first)); - for (; MAP_START_LOCATION (omap) < span.ordinary.second; omap++) - { - location_t start_loc = MAP_START_LOCATION (omap); - unsigned to = start_loc + span.ordinary_delta; - - dump (dumper::LOCATION) - && dump ("Span:%u ordinary [%u,%u)->%u", ix, start_loc, - MAP_START_LOCATION (omap + 1), to); - - /* There should be no change in the low order bits. */ - gcc_checking_assert (((start_loc ^ to) & range_mask) == 0); - sec.u (to); + dump (dumper::LOCATION) + && dump ("Span:%u ordinary [%u+%u,+%u)->[%u,+%u)", + iter - ord_loc_remap->begin (), + MAP_START_LOCATION (iter->src), iter->offset, iter->span, + iter->remap, iter->span); - /* Making accessors just for here, seems excessive. */ - sec.u (omap->reason); - sec.u (omap->sysp); - sec.u (omap->m_range_bits); - sec.u (omap->m_column_and_range_bits - omap->m_range_bits); + if (!base || iter->src != base->src) + base = iter; + sec.u (iter->offset - base->offset); + if (base == iter) + { + sec.u (iter->src->sysp); + sec.u (iter->src->m_range_bits); + sec.u (iter->src->m_column_and_range_bits - iter->src->m_range_bits); - const char *fname = ORDINARY_MAP_FILE_NAME (omap); + const char *fname = ORDINARY_MAP_FILE_NAME (iter->src); for (unsigned ix = 0; ix != filenames.length (); ix++) if (filenames[ix] == fname) { sec.u (ix); break; } - sec.u (ORDINARY_MAP_STARTING_LINE_NUMBER (omap)); - + unsigned line = ORDINARY_MAP_STARTING_LINE_NUMBER (iter->src); + line += iter->offset >> iter->src->m_column_and_range_bits; + sec.u (line); + } + sec.u (iter->remap); + if (base == iter) + { /* Write the included from location, which means reading it while reading in the ordinary maps. So we'd better not be getting ahead of ourselves. */ - location_t from = linemap_included_from (omap); - gcc_checking_assert (from < MAP_START_LOCATION (omap)); + location_t from = linemap_included_from (iter->src); + gcc_checking_assert (from < MAP_START_LOCATION (iter->src)); if (from != UNKNOWN_LOCATION && has_partitions) { /* A partition's span will have a from pointing at a @@ -16191,15 +16261,7 @@ module_state::write_ordinary_maps (elf_out *to, location_map_info &info, } write_location (sec, from); } - /* The ending serialized value. */ - offset = MAP_START_LOCATION (omap) + span.ordinary_delta; } - dump () && dump ("Ordinary location hwm:%u", offset); - sec.u (offset); - - // Record number of locations and alignment. - cfg->ordinary_loc_align = info.max_range; - cfg->ordinary_locs = offset; filenames.release (); @@ -16208,8 +16270,7 @@ module_state::write_ordinary_maps (elf_out *to, location_map_info &info, } void -module_state::write_macro_maps (elf_out *to, location_map_info &info, - module_state_config *, unsigned *crc_p) +module_state::write_macro_maps (elf_out *to, range_t &info, unsigned *crc_p) { dump () && dump ("Writing macro location maps"); dump.indent (); @@ -16217,8 +16278,8 @@ module_state::write_macro_maps (elf_out *to, location_map_info &info, bytes_out sec (to); sec.begin (); - dump () && dump ("Macro maps:%u", info.num_maps.second); - sec.u (info.num_maps.second); + dump () && dump ("Macro maps:%u", info.second); + sec.u (info.second); unsigned macro_num = 0; for (auto iter = macro_loc_remap->end (), begin = macro_loc_remap->begin (); @@ -16258,14 +16319,14 @@ module_state::write_macro_maps (elf_out *to, location_map_info &info, iter->remap); macro_num++; } - gcc_assert (macro_num == info.num_maps.second); + gcc_assert (macro_num == info.second); sec.end (to, to->name (MOD_SNAME_PFX ".mlm"), crc_p); dump.outdent (); } bool -module_state::read_ordinary_maps () +module_state::read_ordinary_maps (unsigned num_ord_locs, unsigned range_bits) { bytes_in sec; @@ -16291,70 +16352,62 @@ module_state::read_ordinary_maps () filenames.quick_push (fname); } - unsigned num_ordinary = sec.u (); - unsigned max_range = sec.u (); - unsigned low_bits = sec.u (); - location_t zero = sec.u (); - location_t range_mask = (1u << max_range) - 1; - - dump () && dump ("Ordinary maps:%u, range bits:%u, preserve:%x, zero:%u", - num_ordinary, max_range, low_bits, zero); + unsigned num_ordinary = sec.u (); + dump () && dump ("Ordinary maps:%u, range_bits:%u", num_ordinary, range_bits); location_t offset = line_table->highest_location + 1; - /* Ensure offset doesn't go backwards at the start. */ - if ((offset & range_mask) > low_bits) - offset += range_mask + 1; - offset = (offset & ~range_mask); - - bool propagated = spans.maybe_propagate (this, offset + low_bits); + offset += ((1u << range_bits) - 1); + offset &= ~((1u << range_bits) - 1); + ordinary_locs.first = offset; + bool propagated = spans.maybe_propagate (this, offset); line_map_ordinary *maps = static_cast (line_map_new_raw (line_table, false, num_ordinary)); - location_t lwm = offset; - slurp->loc_deltas.first = offset - zero; - ordinary_locs.first = zero + low_bits + slurp->loc_deltas.first; - dump () && dump ("Ordinary loc delta %d", slurp->loc_deltas.first); - + const line_map_ordinary *base = nullptr; for (unsigned ix = 0; ix != num_ordinary && !sec.get_overrun (); ix++) { line_map_ordinary *map = &maps[ix]; - unsigned hwm = sec.u (); - /* Record the current HWM so that the below read_location is - ok. */ - ordinary_locs.second = hwm + slurp->loc_deltas.first; - map->start_location = hwm + (offset - zero); - if (map->start_location < lwm) - sec.set_overrun (); - lwm = map->start_location; - dump (dumper::LOCATION) && dump ("Map:%u %u->%u", ix, hwm, lwm); - map->reason = lc_reason (sec.u ()); - map->sysp = sec.u (); - map->m_range_bits = sec.u (); - map->m_column_and_range_bits = map->m_range_bits + sec.u (); - - unsigned fnum = sec.u (); - map->to_file = (fnum < filenames.length () ? filenames[fnum] : ""); - map->to_line = sec.u (); - - /* Root the outermost map at our location. */ - location_t from = read_location (sec); - map->included_from = from != UNKNOWN_LOCATION ? from : loc; + unsigned offset = sec.u (); + if (!offset) + { + map->reason = LC_RENAME; + map->sysp = sec.u (); + map->m_range_bits = sec.u (); + map->m_column_and_range_bits = sec.u () + map->m_range_bits; + unsigned fnum = sec.u (); + map->to_file = (fnum < filenames.length () ? filenames[fnum] : ""); + map->to_line = sec.u (); + base = map; + } + else + { + *map = *base; + map->to_line += offset >> map->m_column_and_range_bits; + } + unsigned remap = sec.u (); + map->start_location = remap + ordinary_locs.first; + if (base == map) + { + /* Root the outermost map at our location. */ + ordinary_locs.second = remap; + location_t from = read_location (sec); + map->included_from = from != UNKNOWN_LOCATION ? from : loc; + } } - location_t hwm = sec.u (); - ordinary_locs.second = hwm + slurp->loc_deltas.first; - + ordinary_locs.second = num_ord_locs; /* highest_location is the one handed out, not the next one to hand out. */ - line_table->highest_location = ordinary_locs.second - 1; + line_table->highest_location = ordinary_locs.first + ordinary_locs.second - 1; if (line_table->highest_location >= LINE_MAP_MAX_LOCATION_WITH_COLS) /* We shouldn't run out of locations, as we checked before starting. */ sec.set_overrun (); - dump () && dump ("Ordinary location hwm:%u", ordinary_locs.second); + dump () && dump ("Ordinary location [%u,+%u)", + ordinary_locs.first, ordinary_locs.second); if (propagated) spans.close (); @@ -16988,6 +17041,10 @@ module_state::write_macros (elf_out *to, vec *macros, if (mac.def) write_define (sec, mac.def); } + if (count) + // We may have ended on a tokenless macro with a very short + // location, that will cause problems reading its bit flags. + sec.u (0); sec.end (to, to->name (MOD_SNAME_PFX ".def"), crc_p); if (count) @@ -17453,7 +17510,7 @@ module_state::write_config (elf_out *to, module_state_config &config, cfg.u (config.ordinary_locs); cfg.u (config.macro_locs); - cfg.u (config.ordinary_loc_align); + cfg.u (config.loc_range_bits); cfg.u (config.active_init); @@ -17639,7 +17696,7 @@ module_state::read_config (module_state_config &config) config.ordinary_locs = cfg.u (); config.macro_locs = cfg.u (); - config.ordinary_loc_align = cfg.u (); + config.loc_range_bits = cfg.u (); config.active_init = cfg.u (); @@ -17656,7 +17713,7 @@ ool_cmp (const void *a_, const void *b_) auto *b = *static_cast (b_); if (a == b) return 0; - else if (a->ordinary_locs.first < b->ordinary_locs.second) + else if (a->ordinary_locs.first < b->ordinary_locs.first) return -1; else return +1; @@ -17690,6 +17747,7 @@ module_state::write_begin (elf_out *to, cpp_reader *reader, bitmap partitions = NULL; if (!is_header () && !is_partition ()) partitions = BITMAP_GGC_ALLOC (); + write_init_maps (); unsigned mod_hwm = 1; for (unsigned ix = 1; ix != modules->length (); ix++) @@ -17727,14 +17785,15 @@ module_state::write_begin (elf_out *to, cpp_reader *reader, gcc_checking_assert (!slot->is_lazy ()); } } + + if (imp->is_direct () && (imp->remap || imp->is_partition ())) + note_location (imp->imported_from ()); } if (partitions && bitmap_empty_p (partitions)) /* No partitions present. */ partitions = nullptr; - write_init_maps (); - /* Find the set of decls we must write out. */ depset::hash table (DECL_NAMESPACE_BINDINGS (global_namespace)->size () * 8); /* Add the specializations before the writables, so that we can @@ -17785,11 +17844,10 @@ module_state::write_begin (elf_out *to, cpp_reader *reader, if (is_header ()) macros = prepare_macros (reader); - location_map_info map_info = write_prepare_maps (&config); - unsigned counts[MSC_HWM]; - config.num_imports = mod_hwm; config.num_partitions = modules->length () - mod_hwm; + auto map_info = write_prepare_maps (&config, bool (config.num_partitions)); + unsigned counts[MSC_HWM]; memset (counts, 0, sizeof (counts)); /* depset::cluster is the cluster number, @@ -17926,8 +17984,10 @@ module_state::write_begin (elf_out *to, cpp_reader *reader, write_partitions (to, config.num_partitions, &crc); /* Write the line maps. */ - write_ordinary_maps (to, map_info, &config, config.num_partitions, &crc); - write_macro_maps (to, map_info, &config, &crc); + if (config.ordinary_locs) + write_ordinary_maps (to, map_info, bool (config.num_partitions), &crc); + if (config.macro_locs) + write_macro_maps (to, map_info, &crc); if (is_header ()) { @@ -17947,6 +18007,7 @@ module_state::write_begin (elf_out *to, cpp_reader *reader, sccs.release (); vec_free (macro_loc_remap); + vec_free (ord_loc_remap); vec_free (ool); // FIXME:QOI: Have a command line switch to control more detailed @@ -17990,7 +18051,9 @@ module_state::read_initial (cpp_reader *reader) bool have_locs = ok && read_prepare_maps (&config); /* Ordinary maps before the imports. */ - if (have_locs && !read_ordinary_maps ()) + if (!(have_locs && config.ordinary_locs)) + ordinary_locs.first = line_table->highest_location + 1; + else if (!read_ordinary_maps (config.ordinary_locs, config.loc_range_bits)) ok = false; /* Allocate the REMAP vector. */ @@ -18017,7 +18080,7 @@ module_state::read_initial (cpp_reader *reader) { /* Allocate space in the entities array now -- that array must be - monotionically in step with the modules array. */ + monotonically in step with the modules array. */ entity_lwm = vec_safe_length (entity_ary); entity_num = config.num_entities; gcc_checking_assert (modules->length () == 1 @@ -18048,7 +18111,9 @@ module_state::read_initial (cpp_reader *reader) gcc_assert (!from ()->is_frozen ()); /* Macro maps after the imports. */ - if (ok && have_locs && !read_macro_maps (config.macro_locs)) + if (!(ok && have_locs && config.macro_locs)) + macro_locs.first = LINEMAPS_MACRO_LOWEST_LOCATION (line_table); + else if (!read_macro_maps (config.macro_locs)) ok = false; /* Note whether there's an active initializer. */ diff --git a/gcc/testsuite/g++.dg/modules/loc-prune-1.C b/gcc/testsuite/g++.dg/modules/loc-prune-1.C index 6978e49..55d46e4 100644 --- a/gcc/testsuite/g++.dg/modules/loc-prune-1.C +++ b/gcc/testsuite/g++.dg/modules/loc-prune-1.C @@ -14,6 +14,6 @@ int foo (int = YES) // { dg-final { scan-lang-dump { Macro maps:1} module } } // { dg-final { scan-lang-dump { Macro:0 YES 1/1.2 locations } module } } -// { dg-final { scan-lang-dump { Ordinary:[0-9]* maps hwm:[0-9]* macro:1 maps 1 locs} module } } +// { dg-final { scan-lang-dump { Macro maps:1 locs:1} module } } // { dg-final { scan-lang-dump-not {Macro:. NOT } module } } // { dg-final { scan-lang-dump-not {Macro:. AGAIN_NO } module } } diff --git a/gcc/testsuite/g++.dg/modules/loc-prune-4.C b/gcc/testsuite/g++.dg/modules/loc-prune-4.C new file mode 100644 index 0000000..765c378 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/loc-prune-4.C @@ -0,0 +1,22 @@ +// { dg-additional-options {-Wno-pedantic -fmodules-ts -fdump-lang-module-lineno} } + +# 4 "unused" 1 +# 5 "" 2 + +export module foo; + +int foo (int) // separate +{ + + + return 0; +} + +int bar (int); // merge lines +int baz (int); + + +// { dg-final { scan-lang-dump {Ordinary maps:2 locs:12288 range_bits:5} module } } +// { dg-final { scan-lang-dump { 1 source file names\n Source file...=[^\n]*loc-prune-4.C\n} module } } +// { dg-final { scan-lang-dump { Span:0 ordinary \[2.....\+12288,\+4096\)->\[0,\+4096\)} module } } +// { dg-final { scan-lang-dump { Span:1 ordinary \[2.....\+40960,\+8192\)->\[4096,\+8192\)} module } } diff --git a/gcc/testsuite/g++.dg/modules/pr98718_a.C b/gcc/testsuite/g++.dg/modules/pr98718_a.C index ebd95ea..01242d9 100644 --- a/gcc/testsuite/g++.dg/modules/pr98718_a.C +++ b/gcc/testsuite/g++.dg/modules/pr98718_a.C @@ -14,5 +14,5 @@ namespace std _GLIBCXX_VISIBILITY(default) export module hello:format; // { dg-module-cmi hello:format } -// { dg-final { scan-lang-dump { Ordinary:4 maps hwm:[0-9]* macro:0 maps 0 locs} module } } +// { dg-final { scan-lang-dump { Macro maps:0 locs:0} module } } // { dg-final { scan-lang-dump-not { Macro:. _GLIBCXX_VISIBILITY} module } } diff --git a/gcc/testsuite/g++.dg/modules/pr98718_b.C b/gcc/testsuite/g++.dg/modules/pr98718_b.C index 6cb4698..d2a1c53 100644 --- a/gcc/testsuite/g++.dg/modules/pr98718_b.C +++ b/gcc/testsuite/g++.dg/modules/pr98718_b.C @@ -14,5 +14,5 @@ export module hello; export import :format; // { dg-module-cmi hello } -// { dg-final { scan-lang-dump { Ordinary:8 maps hwm:[0-9]* macro:0 maps 0 locs} module } } +// { dg-final { scan-lang-dump { Macro maps:0 locs:0} module } } // { dg-final { scan-lang-dump-not { Macro:. _GLIBCXX_VISIBILITY} module } } diff --git a/gcc/testsuite/g++.dg/modules/pr99072.H b/gcc/testsuite/g++.dg/modules/pr99072.H index eda0c07..3be6996 100644 --- a/gcc/testsuite/g++.dg/modules/pr99072.H +++ b/gcc/testsuite/g++.dg/modules/pr99072.H @@ -7,4 +7,6 @@ # 1 "REALNAME" // { dg-additional-options {-fmodule-header -fpreprocessed -fdump-lang-module-lineno} } -// { dg-final { scan-lang-dump { 4 source file names\n Source file\[0\]=REALNAME\n Source file\[1\]=\n Source file\[2\]=\n Source file\[3\]=/usr/include/stdc-predef.h\n} module } } +// All locations are pruned. +// { dg-final { scan-lang-dump-not {Writing ordinary location maps} module } } +// { dg-final { scan-lang-dump-not { Span:. ordinary } module } } -- cgit v1.1 From d458c53a6f37c8c49aa854d12e6867b4d914555f Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Tue, 5 Jul 2022 17:55:53 +0100 Subject: PR rtl-optimization/96692: ((A|B)^C)^A using andn with -mbmi on x86. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch addresses PR rtl-optimization/96692 on x86_64, by providing a set of combine splitters to convert the three operation ((A|B)^C)^D into a two operation sequence using andn when either A or B is the same register as C or D. This is essentially a reassociation problem that's only a win if the target supports an and-not instruction (as with -mbmi). Hence for the new test case: int f(int a, int b, int c) { return (a ^ b) ^ (a | c); } GCC on x86_64-pc-linux-gnu wth -O2 -mbmi would previously generate: xorl %edi, %esi orl %edx, %edi movl %esi, %eax xorl %edi, %eax ret but with this patch now generates: andn %edx, %edi, %eax xorl %esi, %eax ret 2022-07-05 Roger Sayle Uroš Bizjak gcc/ChangeLog PR rtl-optimization/96692 * config/i386/i386.md (define_split): Split ((A | B) ^ C) ^ D as (X & ~Y) ^ Z on target BMI when either C or D is A or B. gcc/testsuite/ChangeLog PR rtl-optimization/96692 * gcc.target/i386/bmi-andn-4.c: New test case. --- gcc/config/i386/i386.md | 76 ++++++++++++++++++++++++++++++ gcc/testsuite/gcc.target/i386/bmi-andn-4.c | 9 ++++ 2 files changed, 85 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/bmi-andn-4.c (limited to 'gcc') diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 20c3b9a..d114754 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -10522,6 +10522,82 @@ (set (match_dup 0) (match_op_dup 1 [(and:SI (match_dup 3) (match_dup 2)) (const_int 0)]))]) + +;; Variant 1 of 4: Split ((A | B) ^ A) ^ C as (B & ~A) ^ C. +(define_split + [(set (match_operand:SWI48 0 "register_operand") + (xor:SWI48 + (xor:SWI48 + (ior:SWI48 (match_operand:SWI48 1 "register_operand") + (match_operand:SWI48 2 "nonimmediate_operand")) + (match_dup 1)) + (match_operand:SWI48 3 "nonimmediate_operand"))) + (clobber (reg:CC FLAGS_REG))] + "TARGET_BMI" + [(parallel + [(set (match_dup 4) (and:SWI48 (not:SWI48 (match_dup 1)) (match_dup 2))) + (clobber (reg:CC FLAGS_REG))]) + (parallel + [(set (match_dup 0) (xor:SWI48 (match_dup 4) (match_dup 3))) + (clobber (reg:CC FLAGS_REG))])] + "operands[4] = gen_reg_rtx (mode);") + +;; Variant 2 of 4: Split ((A | B) ^ B) ^ C as (A & ~B) ^ C. +(define_split + [(set (match_operand:SWI48 0 "register_operand") + (xor:SWI48 + (xor:SWI48 + (ior:SWI48 (match_operand:SWI48 1 "register_operand") + (match_operand:SWI48 2 "register_operand")) + (match_dup 2)) + (match_operand:SWI48 3 "nonimmediate_operand"))) + (clobber (reg:CC FLAGS_REG))] + "TARGET_BMI" + [(parallel + [(set (match_dup 4) (and:SWI48 (not:SWI48 (match_dup 2)) (match_dup 1))) + (clobber (reg:CC FLAGS_REG))]) + (parallel + [(set (match_dup 0) (xor:SWI48 (match_dup 4) (match_dup 3))) + (clobber (reg:CC FLAGS_REG))])] + "operands[4] = gen_reg_rtx (mode);") + +;; Variant 3 of 4: Split ((A | B) ^ C) ^ A as (B & ~A) ^ C. +(define_split + [(set (match_operand:SWI48 0 "register_operand") + (xor:SWI48 + (xor:SWI48 + (ior:SWI48 (match_operand:SWI48 1 "register_operand") + (match_operand:SWI48 2 "nonimmediate_operand")) + (match_operand:SWI48 3 "nonimmediate_operand")) + (match_dup 1))) + (clobber (reg:CC FLAGS_REG))] + "TARGET_BMI" + [(parallel + [(set (match_dup 4) (and:SWI48 (not:SWI48 (match_dup 1)) (match_dup 2))) + (clobber (reg:CC FLAGS_REG))]) + (parallel + [(set (match_dup 0) (xor:SWI48 (match_dup 4) (match_dup 3))) + (clobber (reg:CC FLAGS_REG))])] + "operands[4] = gen_reg_rtx (mode);") + +;; Variant 4 of 4: Split ((A | B) ^ C) ^ B as (A & ~B) ^ C. +(define_split + [(set (match_operand:SWI48 0 "register_operand") + (xor:SWI48 + (xor:SWI48 + (ior:SWI48 (match_operand:SWI48 1 "register_operand") + (match_operand:SWI48 2 "register_operand")) + (match_operand:SWI48 3 "nonimmediate_operand")) + (match_dup 2))) + (clobber (reg:CC FLAGS_REG))] + "TARGET_BMI" + [(parallel + [(set (match_dup 4) (and:SWI48 (not:SWI48 (match_dup 2)) (match_dup 1))) + (clobber (reg:CC FLAGS_REG))]) + (parallel + [(set (match_dup 0) (xor:SWI48 (match_dup 4) (match_dup 3))) + (clobber (reg:CC FLAGS_REG))])] + "operands[4] = gen_reg_rtx (mode);") ;; Logical inclusive and exclusive OR instructions diff --git a/gcc/testsuite/gcc.target/i386/bmi-andn-4.c b/gcc/testsuite/gcc.target/i386/bmi-andn-4.c new file mode 100644 index 0000000..fb89529 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/bmi-andn-4.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mbmi" } */ + +int f(int a, int b, int c) +{ + return (a ^ b) ^ (a | c); +} + +/* { dg-final { scan-assembler "andn\[ \\t\]+" } } */ -- cgit v1.1 From 02e2e15ec4b610c0f5c73e1db424b1bbc65dd39a Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Tue, 5 Jul 2022 18:00:00 +0100 Subject: UNSPEC_PALIGNR optimizations and clean-ups on x86. This patch is a follow-up to Hongtao's fix for PR target/105854. That fix is perfectly correct, but the thing that caught my eye was why is the compiler generating a shift by zero at all. Digging deeper it turns out that we can easily optimize __builtin_ia32_palignr for alignments of 0 and 64 respectively, which may be simplified to moves of the highpart and lowpart respectively. After adding optimizations to simplify the 64-bit DImode palignr, I started to add the corresponding optimizations for vpalignr (i.e. 128-bit). The first oddity is that sse.md uses TImode and a special SSESCALARMODE iterator, rather than V1TImode, and indeed the comment above SSESCALARMODE hints that this should be "dropped in favor of VIMAX_AVX2_AVX512BW". Hence this patch includes the migration of _palignr to use VIMAX_AVX2_AVX512BW, basically using V1TImode instead of TImode for 128-bit palignr. This patch has been tested on x86_64-pc-linux-gnu with make bootstrap and make -k check, both with and without --target_board=unix{-,32}, with no new failures. Ok for mainline? 2022-07-05 Roger Sayle Hongtao Liu gcc/ChangeLog * config/i386/i386-builtin.def (__builtin_ia32_palignr128): Change CODE_FOR_ssse3_palignrti to CODE_FOR_ssse3_palignrv1ti. * config/i386/i386-expand.cc (expand_vec_perm_palignr): Use V1TImode and gen_ssse3_palignv1ti instead of TImode. * config/i386/sse.md (SSESCALARMODE): Delete. (define_mode_attr ssse3_avx2): Handle V1TImode instead of TImode. (_palignr): Use VIMAX_AVX2_AVX512BW as a mode iterator instead of SSESCALARMODE. (ssse3_palignrdi): Optimize cases where operands[3] is 0 or 64, using a single move instruction (if required). gcc/testsuite/ChangeLog * gcc.target/i386/ssse3-palignr-2.c: New test case. --- gcc/config/i386/i386-builtin.def | 2 +- gcc/config/i386/i386-expand.cc | 8 ++++-- gcc/config/i386/sse.md | 37 +++++++++++++++++-------- gcc/testsuite/gcc.target/i386/ssse3-palignr-2.c | 21 ++++++++++++++ 4 files changed, 53 insertions(+), 15 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/ssse3-palignr-2.c (limited to 'gcc') diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def index e6daad4..fd16093 100644 --- a/gcc/config/i386/i386-builtin.def +++ b/gcc/config/i386/i386-builtin.def @@ -900,7 +900,7 @@ BDESC (OPTION_MASK_ISA_SSSE3, 0, CODE_FOR_ssse3_psignv4si3, "__builtin_ia32_psig BDESC (OPTION_MASK_ISA_SSSE3 | OPTION_MASK_ISA_MMX, 0, CODE_FOR_ssse3_psignv2si3, "__builtin_ia32_psignd", IX86_BUILTIN_PSIGND, UNKNOWN, (int) V2SI_FTYPE_V2SI_V2SI) /* SSSE3. */ -BDESC (OPTION_MASK_ISA_SSSE3, 0, CODE_FOR_ssse3_palignrti, "__builtin_ia32_palignr128", IX86_BUILTIN_PALIGNR128, UNKNOWN, (int) V2DI_FTYPE_V2DI_V2DI_INT_CONVERT) +BDESC (OPTION_MASK_ISA_SSSE3, 0, CODE_FOR_ssse3_palignrv1ti, "__builtin_ia32_palignr128", IX86_BUILTIN_PALIGNR128, UNKNOWN, (int) V2DI_FTYPE_V2DI_V2DI_INT_CONVERT) BDESC (OPTION_MASK_ISA_SSSE3 | OPTION_MASK_ISA_MMX, 0, CODE_FOR_ssse3_palignrdi, "__builtin_ia32_palignr", IX86_BUILTIN_PALIGNR, UNKNOWN, (int) V1DI_FTYPE_V1DI_V1DI_INT_CONVERT) /* SSE4.1 */ diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc index 8bc5430..6a3fcde 100644 --- a/gcc/config/i386/i386-expand.cc +++ b/gcc/config/i386/i386-expand.cc @@ -19548,9 +19548,11 @@ expand_vec_perm_palignr (struct expand_vec_perm_d *d, bool single_insn_only_p) shift = GEN_INT (min * GET_MODE_UNIT_BITSIZE (d->vmode)); if (GET_MODE_SIZE (d->vmode) == 16) { - target = gen_reg_rtx (TImode); - emit_insn (gen_ssse3_palignrti (target, gen_lowpart (TImode, dcopy.op1), - gen_lowpart (TImode, dcopy.op0), shift)); + target = gen_reg_rtx (V1TImode); + emit_insn (gen_ssse3_palignrv1ti (target, + gen_lowpart (V1TImode, dcopy.op1), + gen_lowpart (V1TImode, dcopy.op0), + shift)); } else { diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 3396ff7..81d32a8 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -575,10 +575,6 @@ (define_mode_iterator VIMAX_AVX2 [(V2TI "TARGET_AVX2") V1TI]) -;; ??? This should probably be dropped in favor of VIMAX_AVX2_AVX512BW. -(define_mode_iterator SSESCALARMODE - [(V4TI "TARGET_AVX512BW") (V2TI "TARGET_AVX2") TI]) - (define_mode_iterator VI12_AVX2 [(V32QI "TARGET_AVX2") V16QI (V16HI "TARGET_AVX2") V8HI]) @@ -712,7 +708,7 @@ (V4HI "ssse3") (V8HI "ssse3") (V16HI "avx2") (V32HI "avx512bw") (V4SI "ssse3") (V8SI "avx2") (V2DI "ssse3") (V4DI "avx2") - (TI "ssse3") (V2TI "avx2") (V4TI "avx512bw")]) + (V1TI "ssse3") (V2TI "avx2") (V4TI "avx512bw")]) (define_mode_attr sse4_1_avx2 [(V16QI "sse4_1") (V32QI "avx2") (V64QI "avx512bw") @@ -21108,10 +21104,10 @@ (set_attr "mode" "")]) (define_insn "_palignr" - [(set (match_operand:SSESCALARMODE 0 "register_operand" "=x,") - (unspec:SSESCALARMODE - [(match_operand:SSESCALARMODE 1 "register_operand" "0,") - (match_operand:SSESCALARMODE 2 "vector_operand" "xBm,m") + [(set (match_operand:VIMAX_AVX2_AVX512BW 0 "register_operand" "=x,") + (unspec:VIMAX_AVX2_AVX512BW + [(match_operand:VIMAX_AVX2_AVX512BW 1 "register_operand" "0,") + (match_operand:VIMAX_AVX2_AVX512BW 2 "vector_operand" "xBm,m") (match_operand:SI 3 "const_0_to_255_mul_8_operand")] UNSPEC_PALIGNR))] "TARGET_SSSE3" @@ -21157,11 +21153,30 @@ gcc_unreachable (); } } - "TARGET_SSSE3 && reload_completed - && SSE_REGNO_P (REGNO (operands[0]))" + "(TARGET_SSSE3 && reload_completed + && SSE_REGNO_P (REGNO (operands[0]))) + || operands[3] == const0_rtx + || INTVAL (operands[3]) == 64" [(set (match_dup 0) (lshiftrt:V1TI (match_dup 0) (match_dup 3)))] { + if (operands[3] == const0_rtx) + { + if (!rtx_equal_p (operands[0], operands[2])) + emit_move_insn (operands[0], operands[2]); + else + emit_note (NOTE_INSN_DELETED); + DONE; + } + else if (INTVAL (operands[3]) == 64) + { + if (!rtx_equal_p (operands[0], operands[1])) + emit_move_insn (operands[0], operands[1]); + else + emit_note (NOTE_INSN_DELETED); + DONE; + } + /* Emulate MMX palignrdi with SSE psrldq. */ rtx op0 = lowpart_subreg (V2DImode, operands[0], GET_MODE (operands[0])); diff --git a/gcc/testsuite/gcc.target/i386/ssse3-palignr-2.c b/gcc/testsuite/gcc.target/i386/ssse3-palignr-2.c new file mode 100644 index 0000000..791222d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/ssse3-palignr-2.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mssse3" } */ + +typedef long long __attribute__ ((__vector_size__ (8))) T; + +T x; +T y; +T z; + +void foo() +{ + z = __builtin_ia32_palignr (x, y, 0); +} + +void bar() +{ + z = __builtin_ia32_palignr (x, y, 64); +} +/* { dg-final { scan-assembler-not "punpcklqdq" } } */ +/* { dg-final { scan-assembler-not "pshufd" } } */ +/* { dg-final { scan-assembler-not "psrldq" } } */ -- cgit v1.1 From c73e8d45ca0111f51d7187641963df97f5c9c63f Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Tue, 5 Jul 2022 18:06:13 +0100 Subject: Doubleword version of and;cmp to not;test optimization on x86. This patch extends the earlier and;cmp to not;test optimization to also perform this transformation for TImode on TARGET_64BIT and DImode on -m32, One motivation for this is that it's a step to fixing the current failure of gcc.target/i386/pr65105-5.c on -m32. A more direct benefit for x86_64 is that the following code: int foo(__int128 x, __int128 y) { return (x & y) == y; } improves with -O2 from 15 instructions: movq %rdi, %r8 movq %rsi, %rax movq %rax, %rdi movq %r8, %rsi movq %rdx, %r8 andq %rdx, %rsi andq %rcx, %rdi movq %rsi, %rax movq %rdi, %rdx xorq %r8, %rax xorq %rcx, %rdx orq %rdx, %rax sete %al movzbl %al, %eax ret to the slightly better 13 instructions: movq %rdi, %r8 movq %rsi, %rax movq %r8, %rsi movq %rax, %rdi notq %rsi notq %rdi andq %rdx, %rsi andq %rcx, %rdi movq %rsi, %rax orq %rdi, %rax sete %al movzbl %al, %eax ret 2022-07-05 Roger Sayle gcc/ChangeLog * config/i386/i386.cc (ix86_rtx_costs) : Provide costs for double word comparisons and tests (comparisons against zero). * config/i386/i386.md (*test_not_doubleword): Split DWI and;cmp into andn;cmp $0 as a pre-reload splitter. (*andn3_doubleword_bmi): Use instead of in name. (*3_doubleword): Likewise. gcc/testsuite/ChangeLog * gcc.target/i386/testnot-3.c: New test case. --- gcc/config/i386/i386.cc | 13 +++++++++++++ gcc/config/i386/i386.md | 22 ++++++++++++++++++++-- gcc/testsuite/gcc.target/i386/testnot-3.c | 9 +++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/testnot-3.c (limited to 'gcc') diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 0cfe996..95cb1e2 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -20982,6 +20982,19 @@ ix86_rtx_costs (rtx x, machine_mode mode, int outer_code_i, int opno, return true; } + if (SCALAR_INT_MODE_P (GET_MODE (op0)) + && GET_MODE_SIZE (GET_MODE (op0)) > UNITS_PER_WORD) + { + if (op1 == const0_rtx) + *total = cost->add + + rtx_cost (op0, GET_MODE (op0), outer_code, opno, speed); + else + *total = 3*cost->add + + rtx_cost (op0, GET_MODE (op0), outer_code, opno, speed) + + rtx_cost (op1, GET_MODE (op0), outer_code, opno, speed); + return true; + } + /* The embedded comparison operand is completely free. */ if (!general_operand (op0, GET_MODE (op0)) && op1 == const0_rtx) *total = 0; diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index d114754..bdde577 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -9792,7 +9792,25 @@ (set (reg:CCZ FLAGS_REG) (compare:CCZ (and:SWI (match_dup 2) (match_dup 1)) (const_int 0)))] + "operands[2] = gen_reg_rtx (mode);") + +;; Split and;cmp (as optimized by combine) into andn;cmp $0 +(define_insn_and_split "*test_not_doubleword" + [(set (reg:CCZ FLAGS_REG) + (compare:CCZ + (and:DWI + (not:DWI (match_operand:DWI 0 "nonimmediate_operand")) + (match_operand:DWI 1 "nonimmediate_operand")) + (const_int 0)))] + "ix86_pre_reload_split ()" + "#" + "&& 1" + [(parallel + [(set (match_dup 2) (and:DWI (not:DWI (match_dup 0)) (match_dup 1))) + (clobber (reg:CC FLAGS_REG))]) + (set (reg:CCZ FLAGS_REG) (compare:CCZ (match_dup 2) (const_int 0)))] { + operands[0] = force_reg (mode, operands[0]); operands[2] = gen_reg_rtx (mode); }) @@ -10404,7 +10422,7 @@ operands[2] = gen_int_mode (INTVAL (operands[2]), QImode); }) -(define_insn_and_split "*andn3_doubleword_bmi" +(define_insn_and_split "*andn3_doubleword_bmi" [(set (match_operand: 0 "register_operand" "=r") (and: (not: (match_operand: 1 "register_operand" "r")) @@ -10618,7 +10636,7 @@ DONE; }) -(define_insn_and_split "*3_doubleword" +(define_insn_and_split "*3_doubleword" [(set (match_operand: 0 "nonimmediate_operand" "=ro,r") (any_or: (match_operand: 1 "nonimmediate_operand" "%0,0") diff --git a/gcc/testsuite/gcc.target/i386/testnot-3.c b/gcc/testsuite/gcc.target/i386/testnot-3.c new file mode 100644 index 0000000..7c54dbc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/testnot-3.c @@ -0,0 +1,9 @@ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O2" } */ + +int foo(__int128 x, __int128 y) +{ + return (x & y) == y; +} + +/* { dg-final { scan-assembler-not "xorq" } } */ -- cgit v1.1 From 1d2aa262482fc9b23201200ca82aa3b8659b072e Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 5 Jul 2022 10:54:26 -0400 Subject: Provide a relation verification mechanism. Provide a relation oracle API which validates a relation between 2 ranges. This allows relation queries that are symbolicly true to be overridden by range specific information. ie. x == x is true symbolically, but for floating point a NaN may invalidate this assumption. * value-relation.cc (relation_to_code): New vector. (relation_oracle::validate_relation): New. (set_relation): Allow ssa1 == ssa2 to be registered. * value-relation.h (validate_relation): New prototype. (query_relation): Make internal variant protected. --- gcc/value-relation.cc | 70 +++++++++++++++++++++++++++++++++++++++++++++++++-- gcc/value-relation.h | 10 +++++--- 2 files changed, 75 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/value-relation.cc b/gcc/value-relation.cc index 85d159f..13ce441 100644 --- a/gcc/value-relation.cc +++ b/gcc/value-relation.cc @@ -184,6 +184,71 @@ relation_transitive (relation_kind r1, relation_kind r2) return rr_transitive_table[r1][r2]; } +// This vector maps a relation to the equivalent tree code. + +tree_code relation_to_code [VREL_LAST + 1] = { + ERROR_MARK, ERROR_MARK, LT_EXPR, LE_EXPR, GT_EXPR, GE_EXPR, EQ_EXPR, + NE_EXPR }; + +// This routine validates that a relation can be applied to a specific set of +// ranges. In particular, floating point x == x may not be true if the NaN bit +// is set in the range. Symbolically the oracle will determine x == x, +// but specific range instances may override this. +// To verify, attempt to fold the relation using the supplied ranges. +// One would expect [1,1] to be returned, anything else means there is something +// in the range preventing the relation from applying. +// If there is no mechanism to verify, assume the relation is acceptable. + +relation_kind +relation_oracle::validate_relation (relation_kind rel, vrange &op1, vrange &op2) +{ + // If there is no mapping to a tree code, leave the relation as is. + tree_code code = relation_to_code [rel]; + if (code == ERROR_MARK) + return rel; + + // Undefined ranges cannot be checked either. + if (op1.undefined_p () || op2.undefined_p ()) + return rel; + + tree t1 = op1.type (); + tree t2 = op2.type (); + + // If the range types are not compatible, no relation can exist. + if (!range_compatible_p (t1, t2)) + return VREL_VARYING; + + // If there is no handler, leave the relation as is. + range_op_handler handler (code, t1); + if (!handler) + return rel; + + // If the relation cannot be folded for any reason, leave as is. + Value_Range result (boolean_type_node); + if (!handler.fold_range (result, boolean_type_node, op1, op2, rel)) + return rel; + + // The expression op1 REL op2 using REL should fold to [1,1]. + // Any other result means the relation is not verified to be true. + if (result.varying_p () || result.zero_p ()) + return VREL_VARYING; + + return rel; +} + +// If no range is available, create a varying range for each SSA name and +// verify. + +relation_kind +relation_oracle::validate_relation (relation_kind rel, tree ssa1, tree ssa2) +{ + Value_Range op1, op2; + op1.set_varying (TREE_TYPE (ssa1)); + op2.set_varying (TREE_TYPE (ssa2)); + + return validate_relation (rel, op1, op2); +} + // Given an equivalence set EQUIV, set all the bits in B that are still valid // members of EQUIV in basic block BB. @@ -602,7 +667,8 @@ private: inline void value_relation::set_relation (relation_kind r, tree n1, tree n2) { - gcc_checking_assert (SSA_NAME_VERSION (n1) != SSA_NAME_VERSION (n2)); + gcc_checking_assert (SSA_NAME_VERSION (n1) != SSA_NAME_VERSION (n2) + || r == VREL_EQ); related = r; name1 = n1; name2 = n2; @@ -1199,7 +1265,7 @@ dom_oracle::query_relation (basic_block bb, tree ssa1, tree ssa2) if (kind != VREL_VARYING) return kind; - // Query using the equiovalence sets. + // Query using the equivalence sets. kind = query_relation (bb, equiv1, equiv2); return kind; } diff --git a/gcc/value-relation.h b/gcc/value-relation.h index 478729b..77e1208 100644 --- a/gcc/value-relation.h +++ b/gcc/value-relation.h @@ -95,15 +95,19 @@ public: virtual void register_relation (basic_block, relation_kind, tree, tree) = 0; // Query for a relation between two ssa names in a basic block. virtual relation_kind query_relation (basic_block, tree, tree) = 0; - // Query for a relation between two equivalency stes in a basic block. - virtual relation_kind query_relation (basic_block, const_bitmap, - const_bitmap) = 0; + + relation_kind validate_relation (relation_kind, tree, tree); + relation_kind validate_relation (relation_kind, vrange &, vrange &); virtual void dump (FILE *, basic_block) const = 0; virtual void dump (FILE *) const = 0; void debug () const; protected: void valid_equivs (bitmap b, const_bitmap equivs, basic_block bb); + // Query for a relation between two equivalency sets in a basic block. + virtual relation_kind query_relation (basic_block, const_bitmap, + const_bitmap) = 0; + friend class path_oracle; }; // This class represents an equivalency set, and contains a link to the next -- cgit v1.1 From 543828e79bfa63ef26b11a2c9ea81fd7905f33aa Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Tue, 5 Jul 2022 14:22:26 -0400 Subject: c-family: Prevent -Wformat warnings with u8 strings [PR105626] The thread seems to have concluded that -Wformat shouldn't warn about printf((const char*) u8"test %d\n", 1); saying "format string is not an array of type 'char'". This code is not an aliasing violation, and there are no I/O functions for u8 strings, so the const char * cast is OK and shouldn't be disregarded. PR c++/105626 gcc/c-family/ChangeLog: * c-format.cc (check_format_arg): Don't emit -Wformat warnings with u8 strings. gcc/testsuite/ChangeLog: * g++.dg/warn/Wformat-char8_t-1.C: New test. --- gcc/c-family/c-format.cc | 3 ++- gcc/testsuite/g++.dg/warn/Wformat-char8_t-1.C | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/g++.dg/warn/Wformat-char8_t-1.C (limited to 'gcc') diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc index 4559ca3..7547804 100644 --- a/gcc/c-family/c-format.cc +++ b/gcc/c-family/c-format.cc @@ -1742,7 +1742,8 @@ check_format_arg (void *ctx, tree format_tree, } tree underlying_type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (format_tree))); - if (underlying_type != char_type_node) + if (underlying_type != char_type_node + && !(flag_char8_t && underlying_type == char8_type_node)) { if (underlying_type == char16_type_node || underlying_type == char32_type_node diff --git a/gcc/testsuite/g++.dg/warn/Wformat-char8_t-1.C b/gcc/testsuite/g++.dg/warn/Wformat-char8_t-1.C new file mode 100644 index 0000000..ba6f388 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wformat-char8_t-1.C @@ -0,0 +1,10 @@ +// PR c++/105626 +// { dg-do compile { target c++11 } } +// { dg-options "-Wformat" } +// { dg-additional-options "-fchar8_t" { target c++17_down } } + +int main() +{ + __builtin_printf((const char*) u8"test %d\n", 1); // { dg-bogus "format string" } + return 0; +} -- cgit v1.1 From ccc39d9e97ce24623aefae2097bff791e01619d9 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 4 Jul 2022 12:20:36 -0700 Subject: compiler: better error message for unknown package name Fixes golang/go#51237 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415994 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/parse.cc | 6 +++++- gcc/testsuite/go.test/test/fixedbugs/issue27938.go | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 7b1d301..461e2fd 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -6479d5976c5d848ec6f5843041275723a00006b0 +a209dca9ec918535977dcab99fd9bb60986ffacd The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index a3c6f63..c93d82b 100644 --- a/gcc/go/gofrontend/parse.cc +++ b/gcc/go/gofrontend/parse.cc @@ -191,7 +191,11 @@ Parse::qualified_ident(std::string* pname, Named_object** ppackage) Named_object* package = this->gogo_->lookup(name, NULL); if (package == NULL || !package->is_package()) { - go_error_at(this->location(), "expected package"); + if (package == NULL) + go_error_at(this->location(), "reference to undefined name %qs", + Gogo::message_name(name).c_str()); + else + go_error_at(this->location(), "expected package"); // We expect . IDENTIFIER; skip both. if (this->advance_token()->is_identifier()) this->advance_token(); diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue27938.go b/gcc/testsuite/go.test/test/fixedbugs/issue27938.go index ed974e6..aecc676 100644 --- a/gcc/testsuite/go.test/test/fixedbugs/issue27938.go +++ b/gcc/testsuite/go.test/test/fixedbugs/issue27938.go @@ -11,13 +11,13 @@ package p type _ struct { - F sync.Mutex // ERROR "undefined: sync|expected package" + F sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name" } type _ struct { - sync.Mutex // ERROR "undefined: sync|expected package" + sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name" } type _ interface { - sync.Mutex // ERROR "undefined: sync|expected package|expected signature or type name" + sync.Mutex // ERROR "undefined: sync|expected package|expected signature or type name|reference to undefined name" } -- cgit v1.1 From c70a48a8f8f6a43b35f783b5672c9a3c0a363c31 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 3 Jul 2022 14:37:23 -0700 Subject: compiler: propagate array length error marker farther Fixes golang/go#53639 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415936 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/expressions.cc | 6 ++++++ gcc/go/gofrontend/types.cc | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 461e2fd..7c5c456 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -a209dca9ec918535977dcab99fd9bb60986ffacd +d295a0a2c96c0f7c3abd94fea3aa4e2303bf2af2 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 00d35a9..2492d9f 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -8486,6 +8486,11 @@ Builtin_call_expression::do_flatten(Gogo* gogo, Named_object* function, pa != this->args()->end(); ++pa) { + if ((*pa)->is_error_expression()) + { + go_assert(saw_errors()); + return Expression::make_error(loc); + } if ((*pa)->is_nil_expression()) { Expression* nil = Expression::make_nil(loc); @@ -13391,6 +13396,7 @@ Array_index_expression::do_check_types(Gogo*) if (array_type == NULL) { go_assert(this->array_->type()->is_error()); + this->set_is_error(); return; } diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index 4995283..9f34801 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -7429,7 +7429,10 @@ bool Array_type::do_verify() { if (this->element_type()->is_error_type()) - return false; + { + this->set_is_error(); + return false; + } if (!this->verify_length()) { this->length_ = Expression::make_error(this->length_->location()); -- cgit v1.1 From d1f3a3fffeb40e646ec5a643783cd753fa7def33 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Wed, 6 Jul 2022 00:16:33 +0000 Subject: Daily bump. --- gcc/ChangeLog | 93 +++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/ada/ChangeLog | 242 ++++++++++++++++++++++++++++++++++++++++++++++++ gcc/c-family/ChangeLog | 6 ++ gcc/cp/ChangeLog | 27 ++++++ gcc/testsuite/ChangeLog | 72 ++++++++++++++ 6 files changed, 441 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 879f9e5..4267279 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,96 @@ +2022-07-05 Andrew MacLeod + + * value-relation.cc (relation_to_code): New vector. + (relation_oracle::validate_relation): New. + (set_relation): Allow ssa1 == ssa2 to be registered. + * value-relation.h (validate_relation): New prototype. + (query_relation): Make internal variant protected. + +2022-07-05 Roger Sayle + + * config/i386/i386.cc (ix86_rtx_costs) : Provide costs + for double word comparisons and tests (comparisons against zero). + * config/i386/i386.md (*test_not_doubleword): Split DWI + and;cmp into andn;cmp $0 as a pre-reload splitter. + (*andn3_doubleword_bmi): Use instead of in name. + (*3_doubleword): Likewise. + +2022-07-05 Roger Sayle + Hongtao Liu + + * config/i386/i386-builtin.def (__builtin_ia32_palignr128): Change + CODE_FOR_ssse3_palignrti to CODE_FOR_ssse3_palignrv1ti. + * config/i386/i386-expand.cc (expand_vec_perm_palignr): Use V1TImode + and gen_ssse3_palignv1ti instead of TImode. + * config/i386/sse.md (SSESCALARMODE): Delete. + (define_mode_attr ssse3_avx2): Handle V1TImode instead of TImode. + (_palignr): Use VIMAX_AVX2_AVX512BW as a mode + iterator instead of SSESCALARMODE. + (ssse3_palignrdi): Optimize cases where operands[3] is 0 or 64, + using a single move instruction (if required). + +2022-07-05 Roger Sayle + Uroš Bizjak + + PR rtl-optimization/96692 + * config/i386/i386.md (define_split): Split ((A | B) ^ C) ^ D + as (X & ~Y) ^ Z on target BMI when either C or D is A or B. + +2022-07-05 Richard Biener + + PR tree-optimization/106198 + * tree-cfgcleanup.cc (repair_loop_structures): Always do a + full LC SSA rewrite but only if any blocks changed loop + depth. + +2022-07-05 Richard Biener + + * tree-ssa-loop-manip.cc (find_uses_to_rename_def): Remove. + (find_uses_to_rename_in_loop): Likewise. + (rewrite_into_loop_closed_ssa_1): Remove loop parameter and + uses. + (rewrite_into_loop_closed_ssa): Adjust. + +2022-07-05 Richard Biener + + PR tree-optimization/106186 + * tree-ssa-propagate.cc (clean_up_loop_closed_phi): + Properly handle virtual PHI nodes. + +2022-07-05 Richard Biener + + PR tree-optimization/106196 + * tree-vect-stmts.cc (vect_finish_stmt_generation): Properly + handle aggregate returns of calls for VDEF updates. + +2022-07-05 Richard Biener + + * tree-vect-loop-manip.cc (vect_set_loop_condition_normal): + Maintain LC SSA. + +2022-07-05 Richard Sandiford + + * tree-vect-patterns.cc (vect_convert_input): Expect the input + type to be signed for optab_vector_mixed_sign. Update the vectype + at the same time as type. + (vect_recog_dot_prod_pattern): Update accordingly. If usdot isn't + available, try sdot instead. + * tree-vect-loop.cc (vect_is_emulated_mixed_dot_prod): New function. + (vect_model_reduction_cost): Model the cost of implementing usdot + using sdot. + (vectorizable_reduction): Likewise. Skip target support test + for lane reductions. + (vect_emulate_mixed_dot_prod): New function. + (vect_transform_reduction): Use it to emulate usdot via sdot. + +2022-07-05 Richard Biener + + PR tree-optimization/106182 + * loop-init.cc (fix_loop_structure): Return the number + of newly discovered plus the number of deleted loops. + * tree-cfgcleanup.cc (repair_loop_structures): Adjust + variable name. + 2022-07-04 Aldy Hernandez * gimple-range-fold.cc diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 7111af0..ebfebbb 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220705 +20220706 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 570579b..3b69064 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,245 @@ +2022-07-05 Piotr Trojanek + + * doc/gnat_ugn/building_executable_programs_with_gnat.rst + (Warning Message Control): Update description of switch -gnatwj. + * gnat_ugn.texi: Regenerate. + * sem_ch10.adb (Analyze_With_Clause): Warn on WITH clauses for + obsolete renamed units; in Ada 83 mode do not consider + predefined renamings to be obsolete. + +2022-07-05 Eric Botcazou + + * exp_util.adb (Make_Subtype_From_Expr): Do not set field to Empty. + * sem_util.adb (Visit_Itype): Remove ??? comment. + +2022-07-05 Piotr Trojanek + + * sem_attr.adb (Note_Possible_Modification): Revert a + special-case for validity checks on Long_Float type. + * snames.ads-tmpl (Name_Attr_Long_Float): Remove name added + exclusively for the mentioned fix. + +2022-07-05 Piotr Trojanek + + * sem_ch6.adb (Set_Formal_Mode): Remove unnecessary setting of + Never_Set_In_Source. + +2022-07-05 Piotr Trojanek + + * sem_ch6.adb (Process_Formals): Avoid repeated calls to + Expression. + +2022-07-05 Piotr Trojanek + + * exp_code.adb (Setup_Asm_IO_Args): Remove guard against No_List. + * par_sco.adb (Process_Decisions): Likewise. + * sem_ch13.adb (Check_Component_List): Likewise. + * sem_ch6.adb (FCL): Likewise. + +2022-07-05 Doug Rupp + + * cstreams.c (__gnat_full_name) [QNX]: Remove block. + +2022-07-05 Piotr Trojanek + + * osint.adb (Locate_File): Use Name_Find with a parameter and + not with a global buffer. + +2022-07-05 Piotr Trojanek + + * exp_ch3.adb (Build_Init_Statements): Reuse Get_Pragma_Arg. + * exp_prag.adb (Arg_N): Likewise. + +2022-07-05 Yannick Moy + + * ghost.adb (Is_OK_Ghost_Context): Detect ghost type inside object + renaming. + +2022-07-05 Bob Duff + + * exp_ch7.adb: Change two constants Is_Protected_Body and + Is_Prot_Body to be Is_Protected_Subp_Body; these are not true + for protected bodies, but for protected subprogram bodies. + (Expand_Cleanup_Actions): No need to search for + Activation_Chain_Entity; just use Activation_Chain_Entity. + * sem_ch8.adb (Find_Direct_Name): Use Entyp constant. + * atree.adb, atree.ads, atree.h, nlists.adb, nlists.ads + (Parent): Provide nonoverloaded versions of Parent, so that they + can be easily found in the debugger. + * debug_a.adb, debug_a.ads: Clarify that we're talking about the + -gnatda switch; switches are case sensitive. Print out the + Chars field if appropriate, which makes it easier to find things + in the output. + (Debug_Output_Astring): Simplify. Also fix an off-by-one + bug ("for I in Vbars'Length .." should have been "for I in + Vbars'Length + 1 .."). Before, it was printing Debug_A_Depth + + 1 '|' characters if Debug_A_Depth > Vbars'Length. + +2022-07-05 Piotr Trojanek + + * sem_prag.adb (Analyze_Pragma): Remove unnecessary call to + Analyze. + +2022-07-05 Piotr Trojanek + + * libgnat/g-socket.adb (Raise_Host_Error): Add No_Return aspect. + (Raise_GAI_Error): Likewise. + * libgnat/g-socket.ads (Raise_Socket_Error): Likewise. + +2022-07-05 Piotr Trojanek + + * sem_util.adb (Aggregate_Constraint_Checks): Fix whitespace; + refactor repeated code; replace a ??? comment with an + explanation based on the comment for the routine spec. + +2022-07-05 Piotr Trojanek + + * sem_util.ads (Note_Possible_Modification): Fix occurrence of + May_Be_Modified in comment. + * sem_warn.ads (Check_Unset_Reference): Fix occurrence of + Not_Assigned in comment. + +2022-07-05 Yannick Moy + + * sem_attr.adb (Analyze_Attribute): Take into account the + possibility of homonyms. + +2022-07-05 Eric Botcazou + + * exp_ch3.adb (Expand_N_Object_Declaration): Rewrite as a renaming + for any nonaliased local object with nominal unconstrained subtype + originally initialized with the result of a function call that has + been rewritten as the dereference of a reference to the result. + * sem_ch3.adb (Analyze_Object_Declaration): Do not do it here + +2022-07-05 Arnaud Charlet + + * exp_imgv.adb (Build_Enumeration_Image_Tables): Also disable + perfect hash in GNAT_Mode. + * raise-gcc.c (__gnat_Unwind_RaiseException): Add support for + disabling exception propagation. + * sem_eval.adb (Compile_Time_Known_Value): Update comment and + remove wrong call to Check_Error_Detected. + * sem_prag.adb (Check_Loop_Pragma_Grouping, Analyze_Pragma): + Remove exception propagation during bootstrap. + +2022-07-05 Eric Botcazou + + * exp_aggr.adb (Expand_Array_Aggregate): Remove obsolete code. + Delay the expansion of aggregates initializing return objects of + build-in-place functions. + * exp_ch3.ads (Ensure_Activation_Chain_And_Master): Delete. + * exp_ch3.adb (Ensure_Activation_Chain_And_Master): Fold back to... + (Expand_N_Object_Declaration): ...here. + Perform the expansion of return objects of build-in-place functions + here instead of... + * exp_ch6.ads (Is_Build_In_Place_Return_Object): Declare. + * exp_ch6.adb (Expand_N_Extended_Return_Statement): ...here. + (Is_Build_In_Place_Result_Type): Alphabetize. + (Is_Build_In_Place_Return_Object): New predicate. + * exp_ch7.adb (Enclosing_Function): Delete. + (Process_Object_Declaration): Tidy up handling of return objects. + * sem_ch3.adb (Analyze_Object_Declaration): Do not decorate and + freeze the actual type if it is the same as the nominal type. + * sem_ch6.adb: Remove use and with clauses for Exp_Ch3. + (Analyze_Function_Return): Analyze again all return objects. + (Create_Extra_Formals): Do not force the definition of an Itype + if the subprogram is a compilation unit. + +2022-07-05 Piotr Trojanek + + * gnatls.adb (Corresponding_Sdep_Entry): Remove dead return + statement in defensive path; there is another return statement + for a normal execution of this routine, so rule Ada RM 6.5(5), + which requires function to have at least one return statement is + still satisfied. + (Gnatls): Remove dead, call to nonreturning Exit_Program after + Output_License_Information which itself does not return. + * libgnat/a-exstat.adb (Bad_EO): Remove raise statement that was + meant to please some ancient version of GNAT. + * libgnat/g-awk.adb (Raise_With_Info): Likewise. + * sem_attr.adb (Check_Reference): Remove dead return statement; + rule Ada RM 6.5(5), which requires function to have at least one + return statement is still satisfied. + (Analyze_Attribute): Remove dead exit statement. + (Check_Reference): Same as above. + * sem_ch12.adb (Instantiate_Formal_Package): Remove dead raise + statement; it was inconsistent with other calls to + Abandon_Instantiation, which are not followed by a raise + statement. + * sem_prag.adb (Process_Convention): Remove dead defensive + assignment. + (Interrupt_State): Remove dead defensive exit statement. + (Do_SPARK_Mode): Likewise. + * sfn_scan.adb (Scan_String): Remove dead defensive assignment. + +2022-07-05 Piotr Trojanek + + * sem_attr.adb, sem_prag.adb: Remove dead return statements + after calls to Error_Attr, Error_Pragma, Error_Pragma_Arg and + Placement_Error. All these calls raise exceptions that are + handled to gently recover from errors. + +2022-07-05 Doug Rupp + + * libgnat/system-vxworks-ppc-kernel.ads (Word_Size): Compute + based on Standard'Word_Size. + (Memory_Size): Compute based on Word_Size. + * libgnat/system-vxworks-ppc-rtp-smp.ads: Likewise. + * libgnat/system-vxworks-ppc-rtp.ads: Likewise. + +2022-07-05 Piotr Trojanek + + * sem_attr.adb (Analyze_Attribute): Move call to + Set_Address_Taken so that it is executed when the prefix + attribute is legal. + +2022-07-05 Piotr Trojanek + + * sem_ch5.adb (Check_Unreachable_Code): Avoid explicit use of + Sloc; this should also help when we finally use Source_Span for + prettier error messages. + +2022-07-05 Piotr Trojanek + + * sem_ch5.adb (Check_Unreachable_Code): Remove redundant guard; + the call to Present wasn't needed either. + +2022-07-05 Piotr Trojanek + + * sem_ch5.adb (Analyze_Block_Statement): Call to List_Length with + No_List is safe and will return zero. + +2022-07-05 Piotr Trojanek + + * sem_ch6.adb (Check_Missing_Return): Add reference to an RM rule. + +2022-07-05 Piotr Trojanek + + * sem_ch6.adb (Check_Missing_Return): Remove outdated comment. + +2022-07-05 Dmitriy Anisimkov + + * adaint.h (convert_addresses): Remove function declaration. + +2022-07-05 Doug Rupp + + * Makefile.rtl (*vxworks*): Remove most pre-vxworks7 code. + * vxworks-arm-link.spec: Remove. + * vxworks-e500-link.spec: Likewise. + * vxworks-smp-arm-link.spec: Likewise. + * vxworks-smp-e500-link.spec: Likewise. + * vxworks-smp-x86-link.spec: Likewise. + * libgnat/system-vxworks-arm-rtp-smp.ads: Likewise. + * libgnat/system-vxworks-arm-rtp.ads: Likewise. + * libgnat/system-vxworks-arm.ads: Likewise. + * libgnat/system-vxworks-e500-kernel.ads: Likewise. + * libgnat/system-vxworks-e500-rtp-smp.ads: Likewise. + * libgnat/system-vxworks-e500-rtp.ads: Likewise. + * libgnat/system-vxworks-x86-kernel.ads: Likewise. + * libgnat/system-vxworks-x86-rtp-smp.ads: Likewise. + * libgnat/system-vxworks-x86-rtp.ads: Likewise. + 2022-07-04 Eric Botcazou * sem_disp.adb (Check_Dispatching_Call): Merge the two special cases diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 5beb46e..402484b 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2022-07-05 Marek Polacek + + PR c++/105626 + * c-format.cc (check_format_arg): Don't emit -Wformat warnings with + u8 strings. + 2022-07-01 Marek Polacek PR c++/106111 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b0bd3b4..ba13cdd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,30 @@ +2022-07-05 Nathan Sidwell + + * module.cc + (struct ord_loc_info, ord_loc_traits): New. + (ord_loc_tabke, ord_loc_remap): New globals. + (struct location_map_info): Delete. + (struct module_state_config): Rename ordinary_loc_align to + loc_range_bits. + (module_for_ordinary_loc): Adjust. + (module_state::note_location): Note ordinary locations, + return bool. + (module_state::write_location): Adjust ordinary location + streaming. + (module_state::read_location): Likewise. + (module_state::write_init_maps): Allocate ord_loc_table. + (module_state::write_prepare_maps): Reimplement ordinary + map preparation. + (module_state::read_prepare_maps): Adjust. + (module_state::write_ordinary_maps): Reimplement. + (module_state::write_macro_maps): Adjust. + (module_state::read_ordinary_maps): Reimplement. + (module_state::write_macros): Adjust. + (module_state::write_config): Adjust. + (module_state::read_config): Adjust. + (module_state::write_begin): Adjust. + (module_state::read_initial): Adjust. + 2022-07-04 Tobias Burnus Chung-Lin Tang Thomas Schwinge diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a1e58e..208590b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,75 @@ +2022-07-05 Marek Polacek + + PR c++/105626 + * g++.dg/warn/Wformat-char8_t-1.C: New test. + +2022-07-05 Roger Sayle + + * gcc.target/i386/testnot-3.c: New test case. + +2022-07-05 Roger Sayle + Hongtao Liu + + * gcc.target/i386/ssse3-palignr-2.c: New test case. + +2022-07-05 Roger Sayle + Uroš Bizjak + + PR rtl-optimization/96692 + * gcc.target/i386/bmi-andn-4.c: New test case. + +2022-07-05 Nathan Sidwell + + * g++.dg/modules/loc-prune-1.C: Adjust. + * g++.dg/modules/loc-prune-4.C: New. + * g++.dg/modules/pr98718_a.C: Adjust. + * g++.dg/modules/pr98718_b.C: Adjust. + * g++.dg/modules/pr99072.H: Adjust. + +2022-07-05 Richard Biener + + PR tree-optimization/106198 + * gcc.dg/pr106198.c: New testcase. + +2022-07-05 Richard Biener + + PR tree-optimization/106196 + * gcc.dg/torture/pr106196.c: New testcase. + +2022-07-05 Alexandre Oliva + + * lib/target-supports.exp (check_effective_target_two_plus_gigs): + Fix array element type. Reported by Hans-Peter Nilsson. + +2022-07-05 Piotr Trojanek + + * gnat.dg/renaming1.adb: Update WITH clause. + * gnat.dg/renaming1.ads: Likewise. + * gnat.dg/warn29.adb: Likewise. + +2022-07-05 Richard Sandiford + + * gcc.dg/vect/vect-reduc-dot-9.c: Reduce target requirements + from i8mm to dotprod. + * gcc.dg/vect/vect-reduc-dot-10.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-11.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-12.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-13.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-14.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-15.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-16.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-17.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-18.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-19.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-20.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-21.c: Likewise. + * gcc.dg/vect/vect-reduc-dot-22.c: Likewise. + +2022-07-05 Richard Biener + + PR tree-optimization/106182 + * gcc.dg/torture/pr106182.c: New testcase. + 2022-07-05 Hans-Peter Nilsson * gcc.dg/analyzer/allocation-size-1.c, -- cgit v1.1 From 656c0212909bc91b1025aa12774d981adb531b4c Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 5 Jul 2022 17:05:47 -0400 Subject: c++: dependent conversion operator lookup [PR106179] This testcase demonstrates that my assumption that we would only be interested in a class template lookup if the template-id is followed by :: was wrong. PR c++/106179 PR c++/106024 gcc/cp/ChangeLog: * parser.cc (cp_parser_lookup_name): Remove :: requirement for using unqualified lookup result. gcc/testsuite/ChangeLog: * g++.dg/template/operator16.C: New test. --- gcc/cp/parser.cc | 4 ---- gcc/testsuite/g++.dg/template/operator16.C | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/g++.dg/template/operator16.C (limited to 'gcc') diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index df657a3..5cd6a52 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -30738,10 +30738,6 @@ cp_parser_lookup_name (cp_parser *parser, tree name, looking at a template arg list. */ if (!cp_parser_skip_entire_template_parameter_list (parser)) decl = NULL_TREE; - /* And only use the unqualified lookup if we're looking at ::. */ - if (decl - && !cp_lexer_next_token_is (parser->lexer, CPP_SCOPE)) - decl = NULL_TREE; } /* If we know we're looking for a type (e.g. A in p->A::x), diff --git a/gcc/testsuite/g++.dg/template/operator16.C b/gcc/testsuite/g++.dg/template/operator16.C new file mode 100644 index 0000000..434a266 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/operator16.C @@ -0,0 +1,9 @@ +// PR c++/106179 + +struct Mat { + template Mat(); +}; +template struct Mat_; +template Mat::Mat() { + _Tp commaInitializer = commaInitializer.operator Mat_<_Tp>; +} -- cgit v1.1 From b33dd7874523af5c244fff3c45be1358815691e4 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 6 Jul 2022 07:27:45 -0400 Subject: analyzer: fix uninit false positive with -ftrivial-auto-var-init= [PR106204] -fanalyzer handles -ftrivial-auto-var-init= by special-casing IFN_DEFERRED_INIT to be a no-op, so that e.g.: len_2 = .DEFERRED_INIT (4, 2, &"len"[0]); is treated as a no-op, so that len_2 is still uninitialized after the stmt. PR analyzer/106204 reports that -fanalyzer gives false positives from -Wanalyzer-use-of-uninitialized-value on locals that have their address taken, due to e.g.: _1 = .DEFERRED_INIT (4, 2, &"len"[0]); len = _1; where -fanalyzer leaves _1 uninitialized, and then complains about the assignment to "len". Fixed thusly by suppressing the warning when assigning from such SSA names. gcc/analyzer/ChangeLog: PR analyzer/106204 * region-model.cc (within_short_circuited_stmt_p): Move extraction of assign_stmt to caller. (due_to_ifn_deferred_init_p): New. (region_model::check_for_poison): Move extraction of assign_stmt from within_short_circuited_stmt_p to here. Share logic with call to due_to_ifn_deferred_init_p. gcc/testsuite/ChangeLog: PR analyzer/106204 * gcc.dg/analyzer/torture/uninit-pr106204.c: New test. * gcc.dg/analyzer/uninit-pr106204.c: New test. Signed-off-by: David Malcolm --- gcc/analyzer/region-model.cc | 69 ++++++++++++++++++---- .../gcc.dg/analyzer/torture/uninit-pr106204.c | 13 ++++ gcc/testsuite/gcc.dg/analyzer/uninit-pr106204.c | 17 ++++++ 3 files changed, 86 insertions(+), 13 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/analyzer/torture/uninit-pr106204.c create mode 100644 gcc/testsuite/gcc.dg/analyzer/uninit-pr106204.c (limited to 'gcc') diff --git a/gcc/analyzer/region-model.cc b/gcc/analyzer/region-model.cc index 5d93932..8b7b4e1 100644 --- a/gcc/analyzer/region-model.cc +++ b/gcc/analyzer/region-model.cc @@ -896,17 +896,9 @@ region_model::get_gassign_result (const gassign *assign, static bool within_short_circuited_stmt_p (const region_model *model, - region_model_context *ctxt) + const gassign *assign_stmt) { - gcc_assert (ctxt); - const gimple *curr_stmt = ctxt->get_stmt (); - if (curr_stmt == NULL) - return false; - /* We must have an assignment to a temporary of _Bool type. */ - const gassign *assign_stmt = dyn_cast (curr_stmt); - if (!assign_stmt) - return false; tree lhs = gimple_assign_lhs (assign_stmt); if (TREE_TYPE (lhs) != boolean_type_node) return false; @@ -959,6 +951,47 @@ within_short_circuited_stmt_p (const region_model *model, return true; } +/* Workaround for discarding certain false positives from + -Wanalyzer-use-of-uninitialized-value + seen with -ftrivial-auto-var-init=. + + -ftrivial-auto-var-init= will generate calls to IFN_DEFERRED_INIT. + + If the address of the var is taken, gimplification will give us + something like: + + _1 = .DEFERRED_INIT (4, 2, &"len"[0]); + len = _1; + + The result of DEFERRED_INIT will be an uninit value; we don't + want to emit a false positive for "len = _1;" + + Return true if ASSIGN_STMT is such a stmt. */ + +static bool +due_to_ifn_deferred_init_p (const gassign *assign_stmt) + +{ + /* We must have an assignment to a decl from an SSA name that's the + result of a IFN_DEFERRED_INIT call. */ + if (gimple_assign_rhs_code (assign_stmt) != SSA_NAME) + return false; + tree lhs = gimple_assign_lhs (assign_stmt); + if (TREE_CODE (lhs) != VAR_DECL) + return false; + tree rhs = gimple_assign_rhs1 (assign_stmt); + if (TREE_CODE (rhs) != SSA_NAME) + return false; + const gimple *def_stmt = SSA_NAME_DEF_STMT (rhs); + const gcall *call = dyn_cast (def_stmt); + if (!call) + return false; + if (gimple_call_internal_p (call) + && gimple_call_internal_fn (call) == IFN_DEFERRED_INIT) + return true; + return false; +} + /* Check for SVAL being poisoned, adding a warning to CTXT. Return SVAL, or, if a warning is added, another value, to avoid repeatedly complaining about the same poisoned value in followup code. */ @@ -982,10 +1015,20 @@ region_model::check_for_poison (const svalue *sval, && is_empty_type (sval->get_type ())) return sval; - /* Special case to avoid certain false positives. */ - if (pkind == POISON_KIND_UNINIT - && within_short_circuited_stmt_p (this, ctxt)) - return sval; + if (pkind == POISON_KIND_UNINIT) + if (const gimple *curr_stmt = ctxt->get_stmt ()) + if (const gassign *assign_stmt + = dyn_cast (curr_stmt)) + { + /* Special case to avoid certain false positives. */ + if (within_short_circuited_stmt_p (this, assign_stmt)) + return sval; + + /* Special case to avoid false positive on + -ftrivial-auto-var-init=. */ + if (due_to_ifn_deferred_init_p (assign_stmt)) + return sval; + } /* If we have an SSA name for a temporary, we don't want to print ''. diff --git a/gcc/testsuite/gcc.dg/analyzer/torture/uninit-pr106204.c b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-pr106204.c new file mode 100644 index 0000000..25edcf5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/torture/uninit-pr106204.c @@ -0,0 +1,13 @@ +/* { dg-additional-options "-ftrivial-auto-var-init=zero" } */ + +int foo(unsigned *len); +int test_1() +{ + unsigned len; /* { dg-bogus "uninit" } */ + int rc; + + rc = foo(&len); + if (!rc) + rc = len; + return rc; +} diff --git a/gcc/testsuite/gcc.dg/analyzer/uninit-pr106204.c b/gcc/testsuite/gcc.dg/analyzer/uninit-pr106204.c new file mode 100644 index 0000000..7d7cf7b --- /dev/null +++ b/gcc/testsuite/gcc.dg/analyzer/uninit-pr106204.c @@ -0,0 +1,17 @@ +/* { dg-additional-options "-ftrivial-auto-var-init=zero" } */ + +int foo(unsigned *len); + +/* Modified version of reproducer that does use "len" before init. */ + +int test_2() +{ + unsigned len; + int rc; + + rc = len; /* { dg-warning "use of uninitialized value 'len'" } */ + rc = foo(&len); + if (!rc) + rc = len; + return rc; +} -- cgit v1.1 From c061e99b7dec27f2dd4f154b95dd42cd477bf6ef Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 8 Jun 2022 13:14:46 +0200 Subject: [Ada] Fix spurious error for aggregate with box component choice It comes from the Volatile_Full_Access (or Atomic) aspect: the aggregate is effectively analyzed/resolved twice and this does not work. It is fixed by calling Is_Full_Access_Aggregate before resolution. gcc/ada/ * exp_aggr.adb (Expand_Record_Aggregate): Do not call Is_Full_Access_Aggregate here. * freeze.ads (Is_Full_Access_Aggregate): Delete. * freeze.adb (Is_Full_Access_Aggregate): Move to... (Freeze_Entity): Do not call Is_Full_Access_Aggregate here. * sem_aggr.adb (Is_Full_Access_Aggregate): ...here (Resolve_Aggregate): Call Is_Full_Access_Aggregate here. --- gcc/ada/exp_aggr.adb | 11 +------ gcc/ada/freeze.adb | 75 ----------------------------------------------- gcc/ada/freeze.ads | 9 ------ gcc/ada/sem_aggr.adb | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 94 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index 027a647..4493f0f 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -8779,19 +8779,10 @@ package body Exp_Aggr is -- Start of processing for Expand_Record_Aggregate begin - -- If the aggregate is to be assigned to a full access variable, we have - -- to prevent a piecemeal assignment even if the aggregate is to be - -- expanded. We create a temporary for the aggregate, and assign the - -- temporary instead, so that the back end can generate an atomic move - -- for it. - - if Is_Full_Access_Aggregate (N) then - return; - -- No special management required for aggregates used to initialize -- statically allocated dispatch tables - elsif Is_Static_Dispatch_Table_Aggregate (N) then + if Is_Static_Dispatch_Table_Aggregate (N) then return; -- Case pattern aggregates need to remain as aggregates diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index b7310a4..3a33373 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -2309,67 +2309,6 @@ package body Freeze is end loop; end Check_Unsigned_Type; - ------------------------------ - -- Is_Full_Access_Aggregate -- - ------------------------------ - - function Is_Full_Access_Aggregate (N : Node_Id) return Boolean is - Loc : constant Source_Ptr := Sloc (N); - New_N : Node_Id; - Par : Node_Id; - Temp : Entity_Id; - Typ : Entity_Id; - - begin - Par := Parent (N); - - -- Array may be qualified, so find outer context - - if Nkind (Par) = N_Qualified_Expression then - Par := Parent (Par); - end if; - - if not Comes_From_Source (Par) then - return False; - end if; - - case Nkind (Par) is - when N_Assignment_Statement => - Typ := Etype (Name (Par)); - - if not Is_Full_Access (Typ) - and then not Is_Full_Access_Object (Name (Par)) - then - return False; - end if; - - when N_Object_Declaration => - Typ := Etype (Defining_Identifier (Par)); - - if not Is_Full_Access (Typ) - and then not Is_Full_Access (Defining_Identifier (Par)) - then - return False; - end if; - - when others => - return False; - end case; - - Temp := Make_Temporary (Loc, 'T', N); - New_N := - Make_Object_Declaration (Loc, - Defining_Identifier => Temp, - Constant_Present => True, - Object_Definition => New_Occurrence_Of (Typ, Loc), - Expression => Relocate_Node (N)); - Insert_Before (Par, New_N); - Analyze (New_N); - - Set_Expression (Par, New_Occurrence_Of (Temp, Loc)); - return True; - end Is_Full_Access_Aggregate; - ----------------------------------------------- -- Explode_Initialization_Compound_Statement -- ----------------------------------------------- @@ -6447,20 +6386,6 @@ package body Freeze is then Set_Encoded_Interface_Name (E, Get_Default_External_Name (E)); - - -- If entity is an atomic object appearing in a declaration and - -- the expression is an aggregate, assign it to a temporary to - -- ensure that the actual assignment is done atomically rather - -- than component-wise (the assignment to the temp may be done - -- component-wise, but that is harmless). - - elsif Is_Full_Access (E) - and then Nkind (Parent (E)) = N_Object_Declaration - and then Present (Expression (Parent (E))) - and then Nkind (Expression (Parent (E))) = N_Aggregate - and then Is_Full_Access_Aggregate (Expression (Parent (E))) - then - null; end if; -- Subprogram case diff --git a/gcc/ada/freeze.ads b/gcc/ada/freeze.ads index bef4e14..bf941c6 100644 --- a/gcc/ada/freeze.ads +++ b/gcc/ada/freeze.ads @@ -177,15 +177,6 @@ package Freeze is -- True when we are processing the body of a primitive with no previous -- spec defined after R is frozen (see Check_Dispatching_Operation). - function Is_Full_Access_Aggregate (N : Node_Id) return Boolean; - -- If a full access object is initialized with an aggregate or is assigned - -- an aggregate, we have to prevent a piecemeal access or assignment to the - -- object, even if the aggregate is to be expanded. We create a temporary - -- for the aggregate, and assign the temporary instead, so that the back - -- end can generate an atomic move for it. This is only done in the context - -- of an object declaration or an assignment. Function is a noop and - -- returns false in other contexts. - procedure Explode_Initialization_Compound_Statement (E : Entity_Id); -- If Initialization_Statements (E) is an N_Compound_Statement, insert its -- actions in the enclosing list and reset the attribute. diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index b85f766..2cd8807 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -849,9 +849,81 @@ package body Sem_Aggr is -- Set to True if N represents a simple aggregate with only -- (others => <>), not nested as part of another aggregate. + function Is_Full_Access_Aggregate (N : Node_Id) return Boolean; + -- If a full access object is initialized with an aggregate or is + -- assigned an aggregate, we have to prevent a piecemeal access or + -- assignment to the object, even if the aggregate is to be expanded. + -- We create a temporary for the aggregate, and assign the temporary + -- instead, so that the back end can generate an atomic move for it. + -- This is only done in the context of an object declaration or an + -- assignment. Function is a noop and returns false in other contexts. + function Within_Aggregate (N : Node_Id) return Boolean; -- Return True if N is part of an N_Aggregate + ------------------------------ + -- Is_Full_Access_Aggregate -- + ------------------------------ + + function Is_Full_Access_Aggregate (N : Node_Id) return Boolean is + Loc : constant Source_Ptr := Sloc (N); + + New_N : Node_Id; + Par : Node_Id; + Temp : Entity_Id; + Typ : Entity_Id; + + begin + Par := Parent (N); + + -- Aggregate may be qualified, so find outer context + + if Nkind (Par) = N_Qualified_Expression then + Par := Parent (Par); + end if; + + if not Comes_From_Source (Par) then + return False; + end if; + + case Nkind (Par) is + when N_Assignment_Statement => + Typ := Etype (Name (Par)); + + if not Is_Full_Access (Typ) + and then not Is_Full_Access_Object (Name (Par)) + then + return False; + end if; + + when N_Object_Declaration => + Typ := Etype (Defining_Identifier (Par)); + + if not Is_Full_Access (Typ) + and then not Is_Full_Access (Defining_Identifier (Par)) + then + return False; + end if; + + when others => + return False; + end case; + + Temp := Make_Temporary (Loc, 'T', N); + New_N := + Make_Object_Declaration (Loc, + Defining_Identifier => Temp, + Constant_Present => True, + Object_Definition => New_Occurrence_Of (Typ, Loc), + Expression => Relocate_Node (N)); + Insert_Action (Par, New_N); + + Rewrite (N, New_Occurrence_Of (Temp, Loc)); + Analyze_And_Resolve (N, Typ); + + return True; + end Is_Full_Access_Aggregate; + ---------------------- -- Within_Aggregate -- ---------------------- @@ -880,6 +952,16 @@ package body Sem_Aggr is and then not Null_Record_Present (N) then return; + + -- If the aggregate is assigned to a full access variable, we have + -- to prevent a piecemeal assignment even if the aggregate is to be + -- expanded. We create a temporary for the aggregate, and assign the + -- temporary instead, so that the back end can generate an atomic move + -- for it. This is properly an expansion activity but it must be done + -- before resolution because aggregate resolution cannot be done twice. + + elsif Expander_Active and then Is_Full_Access_Aggregate (N) then + return; end if; -- If the aggregate has box-initialized components, its type must be -- cgit v1.1 From 3fdb556c8387024493509a9f19f886617eced601 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 9 Jun 2022 23:23:46 +0200 Subject: [Ada] Restore accidentally removed part of a comment about unset references Fix an unintentionally removed comment. gcc/ada/ * sem_res.adb (Resolve_Actuals): Restore first sentence of a comment. --- gcc/ada/sem_res.adb | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc') diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 650b7d5..8fbd2d5 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -4620,6 +4620,7 @@ package body Sem_Res is ("invalid use of untagged formal incomplete type", A); end if; + -- For mode IN, if actual is an entity, and the type of the formal -- has warnings suppressed, then we reset Never_Set_In_Source for -- the calling entity. The reason for this is to catch cases like -- GNAT.Spitbol.Patterns.Vstring_Var where the called subprogram -- cgit v1.1 From 405ebd743d392d2b0afd384e0955e3922e388ca9 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 9 Jun 2022 22:01:06 +0200 Subject: [Ada] Remove explicit call to Make_Unchecked_Type_Conversion Respect a comment in sinfo.ads, which says: "Unchecked type conversion nodes should be created by calling Tbuild.Unchecked_Convert_To, rather than by directly calling Nmake.Make_Unchecked_Type_Conversion." No test appears to be affected by this change, so this is just a cleanup. gcc/ada/ * exp_ch6.adb (Build_Static_Check_Helper_Call): Replace explicit call to Make_Unchecked_Type_Conversion with a call to Unchecked_Convert_To. * tbuild.adb (Unchecked_Convert_To): Fix whitespace. --- gcc/ada/exp_ch6.adb | 4 +--- gcc/ada/tbuild.adb | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index d6d9d00..b5764ad 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -7578,9 +7578,7 @@ package body Exp_Ch6 is and then Etype (F) /= Etype (A) then Append_To (Actuals, - Make_Unchecked_Type_Conversion (Loc, - New_Occurrence_Of (Etype (F), Loc), - New_Copy_Tree (A))); + Unchecked_Convert_To (Etype (F), New_Copy_Tree (A))); else Append_To (Actuals, New_Copy_Tree (A)); end if; diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb index 5aa9fbc..df13e9f 100644 --- a/gcc/ada/tbuild.adb +++ b/gcc/ada/tbuild.adb @@ -882,8 +882,8 @@ package body Tbuild is -- We don't really want to allow E_Void here, but existing code passes -- it. - Loc : constant Source_Ptr := Sloc (Expr); - Result : Node_Id; + Loc : constant Source_Ptr := Sloc (Expr); + Result : Node_Id; begin -- If the expression is already of the correct type, then nothing -- cgit v1.1 From 614c45555a11a658f0c9639afb67d1d4bbb3454f Mon Sep 17 00:00:00 2001 From: Justin Squirek Date: Fri, 10 Jun 2022 12:16:17 +0000 Subject: [Ada] Incorrect emptying of CUDA global subprograms This patch corrects an error in the compiler whereby no Corresponding_Spec was set for emptied CUDA global subprograms - leading to a malformed tree. gcc/ada/ * gnat_cuda.adb (Empty_CUDA_Global_Subprogram): Set Specification and Corresponding_Spec to match the original Kernel_Body. --- gcc/ada/gnat_cuda.adb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/gnat_cuda.adb b/gcc/ada/gnat_cuda.adb index 44394b7..3391263 100644 --- a/gcc/ada/gnat_cuda.adb +++ b/gcc/ada/gnat_cuda.adb @@ -165,17 +165,20 @@ package body GNAT_CUDA is Kernel_Elm := First_Elmt (Kernels); while Present (Kernel_Elm) loop - Kernel := Node (Kernel_Elm); + Kernel := Node (Kernel_Elm); Kernel_Body := Subprogram_Body (Kernel); - Loc := Sloc (Kernel_Body); + Loc := Sloc (Kernel_Body); Null_Body := Make_Subprogram_Body (Loc, - Specification => Subprogram_Specification (Kernel), + Specification => Specification (Kernel_Body), Declarations => New_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List (Make_Null_Statement (Loc)))); + Set_Corresponding_Spec (Null_Body, + Corresponding_Spec (Kernel_Body)); + Rewrite (Kernel_Body, Null_Body); Next_Elmt (Kernel_Elm); -- cgit v1.1 From 56311a3c9f207c83a08f964e65687b2ba302799e Mon Sep 17 00:00:00 2001 From: Doug Rupp Date: Thu, 2 Jun 2022 08:38:50 -0700 Subject: [Ada] Remove old vxworks from Makefile.rtl - e500 port. The powerpc e500 port has been LTS'd gcc/ada/ * libgnat/system-vxworks7-e500-kernel.ads: Remove. * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise. * libgnat/system-vxworks7-e500-rtp.ads: Likewise. --- gcc/ada/libgnat/system-vxworks7-e500-kernel.ads | 160 ---------------------- gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads | 165 ----------------------- gcc/ada/libgnat/system-vxworks7-e500-rtp.ads | 164 ---------------------- 3 files changed, 489 deletions(-) delete mode 100644 gcc/ada/libgnat/system-vxworks7-e500-kernel.ads delete mode 100644 gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads delete mode 100644 gcc/ada/libgnat/system-vxworks7-e500-rtp.ads (limited to 'gcc') diff --git a/gcc/ada/libgnat/system-vxworks7-e500-kernel.ads b/gcc/ada/libgnat/system-vxworks7-e500-kernel.ads deleted file mode 100644 index fb271c3..0000000 --- a/gcc/ada/libgnat/system-vxworks7-e500-kernel.ads +++ /dev/null @@ -1,160 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks 7 Kernel Version E500) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := Standard'Word_Size; - Memory_Size : constant := 2 ** Word_Size; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := High_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := False; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - -- MPC8548ECE Chip Errata Rev 8: signed zero not reliable - Signed_Zeros : constant Boolean := False; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := True; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".out"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads b/gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads deleted file mode 100644 index b132f91..0000000 --- a/gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads +++ /dev/null @@ -1,165 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks 7.x E500 RTP) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the VxWorks version of this package for RTPs - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := Standard'Word_Size; - Memory_Size : constant := 2 ** Word_Size; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := High_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - pragma Linker_Options ("--specs=vxworks7-rtp-base-link.spec"); - -- Define the symbol wrs_rtp_base - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := True; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - -- MPC8548ECE Chip Errata Rev 8: signed zero not reliable - Signed_Zeros : constant Boolean := False; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := False; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".vxe"; - -end System; diff --git a/gcc/ada/libgnat/system-vxworks7-e500-rtp.ads b/gcc/ada/libgnat/system-vxworks7-e500-rtp.ads deleted file mode 100644 index 9ca14b5..0000000 --- a/gcc/ada/libgnat/system-vxworks7-e500-rtp.ads +++ /dev/null @@ -1,164 +0,0 @@ ------------------------------------------------------------------------------- --- -- --- GNAT RUN-TIME COMPONENTS -- --- -- --- S Y S T E M -- --- -- --- S p e c -- --- (VxWorks 7.x E500 RTP) -- --- -- --- Copyright (C) 1992-2022, Free Software Foundation, Inc. -- --- -- --- This specification is derived from the Ada Reference Manual for use with -- --- GNAT. The copyright notice above, and the license provisions that follow -- --- apply solely to the contents of the part following the private keyword. -- --- -- --- GNAT is free software; you can redistribute it and/or modify it under -- --- terms of the GNU General Public License as published by the Free Soft- -- --- ware Foundation; either version 3, or (at your option) any later ver- -- --- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- --- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- --- or FITNESS FOR A PARTICULAR PURPOSE. -- --- -- --- As a special exception under Section 7 of GPL version 3, you are granted -- --- additional permissions described in the GCC Runtime Library Exception, -- --- version 3.1, as published by the Free Software Foundation. -- --- -- --- You should have received a copy of the GNU General Public License and -- --- a copy of the GCC Runtime Library Exception along with this program; -- --- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- --- . -- --- -- --- GNAT was originally developed by the GNAT team at New York University. -- --- Extensive contributions were provided by Ada Core Technologies Inc. -- --- -- ------------------------------------------------------------------------------- - --- This is the VxWorks version of this package for RTPs - -package System is - pragma Pure; - -- Note that we take advantage of the implementation permission to make - -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada - -- 2005, this is Pure in any case (AI-362). - - pragma No_Elaboration_Code_All; - -- Allow the use of that restriction in units that WITH this unit - - type Name is (SYSTEM_NAME_GNAT); - System_Name : constant Name := SYSTEM_NAME_GNAT; - - -- System-Dependent Named Numbers - - Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1); - Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1; - - Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size; - Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1; - - Max_Base_Digits : constant := Long_Long_Float'Digits; - Max_Digits : constant := Long_Long_Float'Digits; - - Max_Mantissa : constant := Standard'Max_Integer_Size - 1; - Fine_Delta : constant := 2.0 ** (-Max_Mantissa); - - Tick : constant := 1.0 / 60.0; - - -- Storage-related Declarations - - type Address is private; - pragma Preelaborable_Initialization (Address); - Null_Address : constant Address; - - Storage_Unit : constant := 8; - Word_Size : constant := Standard'Word_Size; - Memory_Size : constant := 2 ** Word_Size; - - -- Address comparison - - function "<" (Left, Right : Address) return Boolean; - function "<=" (Left, Right : Address) return Boolean; - function ">" (Left, Right : Address) return Boolean; - function ">=" (Left, Right : Address) return Boolean; - function "=" (Left, Right : Address) return Boolean; - - pragma Import (Intrinsic, "<"); - pragma Import (Intrinsic, "<="); - pragma Import (Intrinsic, ">"); - pragma Import (Intrinsic, ">="); - pragma Import (Intrinsic, "="); - - -- Other System-Dependent Declarations - - type Bit_Order is (High_Order_First, Low_Order_First); - Default_Bit_Order : constant Bit_Order := High_Order_First; - pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning - - -- Priority-related Declarations (RM D.1) - - -- Ada priorities are mapped to VxWorks priorities using the following - -- transformation: 255 - Ada Priority - - -- Ada priorities are used as follows: - - -- 256 is reserved for the VxWorks kernel - -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 - -- 247 is a catchall default "interrupt" priority for signals, - -- allowing higher priority than normal tasks, but lower than - -- hardware priority levels. Protected Object ceilings can - -- override these values. - -- 246 is used by the Interrupt_Manager task - - Max_Priority : constant Positive := 245; - Max_Interrupt_Priority : constant Positive := 255; - - subtype Any_Priority is Integer range 0 .. 255; - subtype Priority is Any_Priority range 0 .. 245; - subtype Interrupt_Priority is Any_Priority range 246 .. 255; - - Default_Priority : constant Priority := 122; - -private - - pragma Linker_Options ("--specs=vxworks-e500-link.spec"); - -- Setup proper set of -L's for this configuration - - type Address is mod Memory_Size; - Null_Address : constant Address := 0; - - -------------------------------------- - -- System Implementation Parameters -- - -------------------------------------- - - -- These parameters provide information about the target that is used - -- by the compiler. They are in the private part of System, where they - -- can be accessed using the special circuitry in the Targparm unit - -- whose source should be consulted for more detailed descriptions - -- of the individual switch values. - - Backend_Divide_Checks : constant Boolean := False; - Backend_Overflow_Checks : constant Boolean := True; - Command_Line_Args : constant Boolean := True; - Configurable_Run_Time : constant Boolean := False; - Denorm : constant Boolean := True; - Duration_32_Bits : constant Boolean := False; - Exit_Status_Supported : constant Boolean := True; - Machine_Overflows : constant Boolean := False; - Machine_Rounds : constant Boolean := True; - Preallocated_Stacks : constant Boolean := False; - Signed_Zeros : constant Boolean := True; - Stack_Check_Default : constant Boolean := False; - Stack_Check_Probes : constant Boolean := True; - Stack_Check_Limits : constant Boolean := False; - Support_Aggregates : constant Boolean := True; - Support_Composite_Assign : constant Boolean := True; - Support_Composite_Compare : constant Boolean := True; - Support_Long_Shifts : constant Boolean := True; - Always_Compatible_Rep : constant Boolean := False; - Suppress_Standard_Library : constant Boolean := False; - Use_Ada_Main_Program_Name : constant Boolean := False; - ZCX_By_Default : constant Boolean := True; - - Executable_Extension : constant String := ".vxe"; - -end System; -- cgit v1.1 From baa3015d8efebd731701d6985bb7a7083db244a8 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 11 Jun 2022 13:05:39 +0200 Subject: [Ada] Fix incorrect itype sharing for case expression in limited type return The compiler aborts with an internal error in gigi, but the problem is an itype incorrectly shared between several branches of an if_statement that has been created for a Build-In-Place return. Three branches of this if_statement contain an allocator statement and the latter two have been obtained as the result of calling New_Copy_Tree on the first; now the initialization expression of the first had also been obtained as the result of calling New_Copy_Tree on the original tree, and these chained calls to New_Copy_Tree run afoul of an issue with the copy of itypes after the rewrite of an aggregate as an expression with actions. Fixing this issue looks quite delicate, so this fixes the incorrect sharing by replacing the chained calls to New_Copy_Tree with repeated calls on the original expression, which is more elegant in any case. gcc/ada/ * exp_ch3.adb (Make_Allocator_For_BIP_Return): New local function. (Expand_N_Object_Declaration): Use it to build the three allocators for a Build-In-Place return with an unconstrained type. Update the head comment after other recent changes. --- gcc/ada/exp_ch3.adb | 148 +++++++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 72 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index c9f0bfd..38552ef 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -7980,16 +7980,11 @@ package body Exp_Ch3 is -- the value one, then the caller has passed access to an -- existing object for use as the return object. If the value -- is two, then the return object must be allocated on the - -- secondary stack. Otherwise, the object must be allocated in - -- a storage pool. We generate an if statement to test the - -- implicit allocation formal and initialize a local access - -- value appropriately, creating allocators in the secondary - -- stack and global heap cases. The special formal also exists - -- and must be tested when the function has a tagged result, - -- even when the result subtype is constrained, because in - -- general such functions can be called in dispatching contexts - -- and must be handled similarly to functions with a class-wide - -- result. + -- secondary stack. If the value is three, then the return + -- object must be allocated on the heap. Otherwise, the object + -- must be allocated in a storage pool. We generate an if + -- statement to test the BIP_Alloc_Form formal and initialize + -- a local access value appropriately. if Needs_BIP_Alloc_Form (Func_Id) then declare @@ -8005,6 +8000,73 @@ package body Exp_Ch3 is Pool_Id : constant Entity_Id := Make_Temporary (Loc, 'P'); + function Make_Allocator_For_BIP_Return return Node_Id; + -- Make an allocator for the BIP return being processed + + ----------------------------------- + -- Make_Allocator_For_BIP_Return -- + ----------------------------------- + + function Make_Allocator_For_BIP_Return return Node_Id is + Alloc : Node_Id; + + begin + if Present (Expr_Q) + and then not Is_Delayed_Aggregate (Expr_Q) + and then not No_Initialization (N) + then + -- Always use the type of the expression for the + -- qualified expression, rather than the result type. + -- In general we cannot always use the result type + -- for the allocator, because the expression might be + -- of a specific type, such as in the case of an + -- aggregate or even a nonlimited object when the + -- result type is a limited class-wide interface type. + + Alloc := + Make_Allocator (Loc, + Expression => + Make_Qualified_Expression (Loc, + Subtype_Mark => + New_Occurrence_Of (Etype (Expr_Q), Loc), + Expression => New_Copy_Tree (Expr_Q))); + + else + -- If the function returns a class-wide type we cannot + -- use the return type for the allocator. Instead we + -- use the type of the expression, which must be an + -- aggregate of a definite type. + + if Is_Class_Wide_Type (Ret_Obj_Typ) then + Alloc := + Make_Allocator (Loc, + Expression => + New_Occurrence_Of (Etype (Expr_Q), Loc)); + + else + Alloc := + Make_Allocator (Loc, + Expression => + New_Occurrence_Of (Ret_Obj_Typ, Loc)); + end if; + + -- If the object requires default initialization then + -- that will happen later following the elaboration of + -- the object renaming. If we don't turn it off here + -- then the object will be default initialized twice. + + Set_No_Initialization (Alloc); + end if; + + -- Set the flag indicating that the allocator came from + -- a build-in-place return statement, so we can avoid + -- adjusting the allocated object. + + Set_Alloc_For_BIP_Return (Alloc); + + return Alloc; + end Make_Allocator_For_BIP_Return; + Alloc_Obj_Id : Entity_Id; Alloc_Obj_Decl : Node_Id; Alloc_Stmt : Node_Id; @@ -8049,71 +8111,15 @@ package body Exp_Ch3 is Insert_Action (N, Alloc_Obj_Decl); - -- Create allocators for both the secondary stack and - -- global heap. If there's an initialization expression, - -- then create these as initialized allocators. - - if Present (Expr_Q) - and then not Is_Delayed_Aggregate (Expr_Q) - and then not No_Initialization (N) - then - -- Always use the type of the expression for the - -- qualified expression, rather than the result type. - -- In general we cannot always use the result type - -- for the allocator, because the expression might be - -- of a specific type, such as in the case of an - -- aggregate or even a nonlimited object when the - -- result type is a limited class-wide interface type. - - Heap_Allocator := - Make_Allocator (Loc, - Expression => - Make_Qualified_Expression (Loc, - Subtype_Mark => - New_Occurrence_Of (Etype (Expr_Q), Loc), - Expression => New_Copy_Tree (Expr_Q))); - - else - -- If the function returns a class-wide type we cannot - -- use the return type for the allocator. Instead we - -- use the type of the expression, which must be an - -- aggregate of a definite type. + -- First create the Heap_Allocator - if Is_Class_Wide_Type (Ret_Obj_Typ) then - Heap_Allocator := - Make_Allocator (Loc, - Expression => - New_Occurrence_Of (Etype (Expr_Q), Loc)); - - else - Heap_Allocator := - Make_Allocator (Loc, - Expression => - New_Occurrence_Of (Ret_Obj_Typ, Loc)); - end if; - - -- If the object requires default initialization then - -- that will happen later following the elaboration of - -- the object renaming. If we don't turn it off here - -- then the object will be default initialized twice. - - Set_No_Initialization (Heap_Allocator); - end if; - - -- Set the flag indicating that the allocator came from - -- a build-in-place return statement, so we can avoid - -- adjusting the allocated object. Note that this flag - -- will be inherited by the copies made below. - - Set_Alloc_For_BIP_Return (Heap_Allocator); + Heap_Allocator := Make_Allocator_For_BIP_Return; -- The Pool_Allocator is just like the Heap_Allocator, -- except we set Storage_Pool and Procedure_To_Call so -- it will use the user-defined storage pool. - Pool_Allocator := New_Copy_Tree (Heap_Allocator); - - pragma Assert (Alloc_For_BIP_Return (Pool_Allocator)); + Pool_Allocator := Make_Allocator_For_BIP_Return; -- Do not generate the renaming of the build-in-place -- pool parameter on ZFP because the parameter is not @@ -8154,9 +8160,7 @@ package body Exp_Ch3 is -- allocation. else - SS_Allocator := New_Copy_Tree (Heap_Allocator); - - pragma Assert (Alloc_For_BIP_Return (SS_Allocator)); + SS_Allocator := Make_Allocator_For_BIP_Return; -- The heap and pool allocators are marked as -- Comes_From_Source since they correspond to an -- cgit v1.1 From 35e0aa2df74f2ce1e6d593e699cd7b9e81b9e2ee Mon Sep 17 00:00:00 2001 From: Doug Rupp Date: Wed, 8 Jun 2022 13:32:51 -0700 Subject: [Ada] Vxworks7* - Makefile.rtl rtp vs rtp-smp cleanup Only smp runtimes are built for vxworks7*, even though the -smp suffix is removed during install. Therefore, in general, the build macros for the non-smp runtimes are superfluous except on the legacy ppc-vxworks6 target where both the smp and non-smp runtime are built. Lastly, an error message is added if a runtime build is commanded that doesn't exist, rather then letting the build mysteriously fail. gcc/ada/ * Makefile.rtl [arm,aarch64 vxworks7]: Remove rtp and kernel build macros and set an error variable if needed. [x86,x86_vxworks7]: Likewise. [ppc,ppc64]: Set an error variable if needed. (rts-err): New phony Makefile target. (setup-rts): Depend on rts-err. --- gcc/ada/Makefile.rtl | 74 ++++++++++++++++++---------------------------------- 1 file changed, 25 insertions(+), 49 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl index 002d425..3ae4e23 100644 --- a/gcc/ada/Makefile.rtl +++ b/gcc/ada/Makefile.rtl @@ -1124,6 +1124,7 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks vxworks7%, $(target_cpu) $(targe EH_MECHANISM=-gcc + # The rtp and kernel sections must be retained for the sake of ppc-vx6 ifeq ($(strip $(filter-out rtp,$(THREAD_KIND))),) LIBGNAT_TARGET_PAIRS += \ s-vxwext.ads Date: Tue, 14 Jun 2022 13:47:27 +0200 Subject: [Ada] Cleanup use of local scalars in GNAT.Socket.Get_Address_Info A cleanup opportunity spotted while working on improved detection of uninitialised local scalar objects. gcc/ada/ * libgnat/g-socket.adb (Get_Address_Info): Reduce scope of the Found variable; avoid repeated assignment inside the loop. --- gcc/ada/libgnat/g-socket.adb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/libgnat/g-socket.adb b/gcc/ada/libgnat/g-socket.adb index 4267d9f..86ce3b8 100644 --- a/gcc/ada/libgnat/g-socket.adb +++ b/gcc/ada/libgnat/g-socket.adb @@ -1036,7 +1036,6 @@ package body GNAT.Sockets is R : C.int; Iter : Addrinfo_Access; - Found : Boolean; function To_Array return Address_Info_Array; -- Convert taken from OS addrinfo list A into Address_Info_Array @@ -1046,8 +1045,6 @@ package body GNAT.Sockets is -------------- function To_Array return Address_Info_Array is - Result : Address_Info_Array (1 .. 8); - procedure Unsupported; -- Calls Unknown callback if defiend @@ -1066,6 +1063,9 @@ package body GNAT.Sockets is end if; end Unsupported; + Found : Boolean; + Result : Address_Info_Array (1 .. 8); + -- Start of processing for To_Array begin @@ -1087,8 +1087,8 @@ package body GNAT.Sockets is if Result (J).Addr.Family = Family_Unspec then Unsupported; else + Found := False; for M in Modes'Range loop - Found := False; if Modes (M) = Iter.ai_socktype then Result (J).Mode := M; Found := True; -- cgit v1.1 From 3202e9f88fd286a8fc4814abeaa2238d70f4d585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= Date: Thu, 2 Jun 2022 09:52:21 +0200 Subject: [Ada] Handle secondary stack memory allocations alignment To accomodate cases where objects allocated on the secondary stack needed a more constrained alignement than Standard'Maximum_Alignement, the alignment for all allocations in the full runtime were forced on to be aligned on Standard'Maximum_Alignement*2. This changes removes this workaround and correctly handles the over-alignment in all runtimes. This change modifies the SS_Allocate procedure to accept a new Alignment parameter and to dynamically realign the pointer returned by the memory allocation (Allocate_* functions or dedicated stack allocations for zfp/cert). It also simplifies the 0-sized allocations by not allocating any memory if pointer is already correctly aligned (already the case in cert and zfp runtimes). gcc/ada/ * libgnat/s-secsta.ads (SS_Allocate): Add new Alignment parameter. (Memory_Alignment): Remove. * libgnat/s-secsta.adb (Align_Addr): New. (SS_Allocate): Add new Alignment parameter. Realign pointer if needed. Don't allocate anything for 0-sized allocations. * gcc-interface/utils2.cc (build_call_alloc_dealloc_proc): Add allocated object's alignment as last parameter to allocation invocation. --- gcc/ada/gcc-interface/utils2.cc | 10 +++--- gcc/ada/libgnat/s-secsta.adb | 73 ++++++++++++++++++++++++++++++++++------- gcc/ada/libgnat/s-secsta.ads | 26 ++++----------- 3 files changed, 74 insertions(+), 35 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-interface/utils2.cc index ae81a0d..0dcc9ff 100644 --- a/gcc/ada/gcc-interface/utils2.cc +++ b/gcc/ada/gcc-interface/utils2.cc @@ -2139,6 +2139,8 @@ build_call_alloc_dealloc_proc (tree gnu_obj, tree gnu_size, tree gnu_type, Entity_Id gnat_proc, Entity_Id gnat_pool) { tree gnu_proc = gnat_to_gnu (gnat_proc); + tree gnu_align = size_int (TYPE_ALIGN (gnu_type) / BITS_PER_UNIT); + tree gnu_call; /* A storage pool's underlying type is a record type for both predefined @@ -2154,7 +2156,6 @@ build_call_alloc_dealloc_proc (tree gnu_obj, tree gnu_size, tree gnu_type, tree gnu_pool = gnat_to_gnu (gnat_pool); tree gnu_pool_addr = build_unary_op (ADDR_EXPR, NULL_TREE, gnu_pool); - tree gnu_align = size_int (TYPE_ALIGN (gnu_type) / BITS_PER_UNIT); gnu_size = convert (gnu_size_type, gnu_size); gnu_align = convert (gnu_size_type, gnu_align); @@ -2178,6 +2179,7 @@ build_call_alloc_dealloc_proc (tree gnu_obj, tree gnu_size, tree gnu_type, tree gnu_size_type = gnat_to_gnu_type (gnat_size_type); gnu_size = convert (gnu_size_type, gnu_size); + gnu_align = convert (gnu_size_type, gnu_align); if (DECL_BUILT_IN_CLASS (gnu_proc) == BUILT_IN_FRONTEND && DECL_FE_FUNCTION_CODE (gnu_proc) == BUILT_IN_RETURN_SLOT) @@ -2191,7 +2193,7 @@ build_call_alloc_dealloc_proc (tree gnu_obj, tree gnu_size, tree gnu_type, gnu_call = DECL_RESULT (current_function_decl); - /* The allocation has alreay been done by the caller so we check that + /* The allocation has already been done by the caller so we check that we are not going to overflow the return slot. */ if (TYPE_CI_CO_LIST (TREE_TYPE (current_function_decl))) gnu_ret_size @@ -2216,7 +2218,7 @@ build_call_alloc_dealloc_proc (tree gnu_obj, tree gnu_size, tree gnu_type, gnu_call = build_call_n_expr (gnu_proc, 2, gnu_obj, gnu_size); else - gnu_call = build_call_n_expr (gnu_proc, 1, gnu_size); + gnu_call = build_call_n_expr (gnu_proc, 2, gnu_size, gnu_align); } return gnu_call; @@ -2334,7 +2336,7 @@ maybe_wrap_free (tree data_ptr, tree data_type) /* Build a GCC tree to call an allocation or deallocation function. If GNU_OBJ is nonzero, it is an object to deallocate. Otherwise, - generate an allocator. + generate an allocation. GNU_SIZE is the number of bytes to allocate and GNU_TYPE is the contained object type, used to determine the to-be-honored address alignment. diff --git a/gcc/ada/libgnat/s-secsta.adb b/gcc/ada/libgnat/s-secsta.adb index ac929c0..24b7601 100644 --- a/gcc/ada/libgnat/s-secsta.adb +++ b/gcc/ada/libgnat/s-secsta.adb @@ -550,22 +550,52 @@ package body System.Secondary_Stack is procedure SS_Allocate (Addr : out Address; - Storage_Size : Storage_Count) + Storage_Size : Storage_Count; + Alignment : SSE.Storage_Count := Standard'Maximum_Alignment) is + function Round_Up (Size : Storage_Count) return Memory_Size; pragma Inline (Round_Up); -- Round Size up to the nearest multiple of the maximum alignment + function Align_Addr (Addr : Address) return Address; + pragma Inline (Align_Addr); + -- Align Addr to the next multiple of Alignment + + ---------------- + -- Align_Addr -- + ---------------- + + function Align_Addr (Addr : Address) return Address is + Int_Algn : constant Integer_Address := Integer_Address (Alignment); + Int_Addr : constant Integer_Address := To_Integer (Addr); + begin + + -- L : Alignment + -- A : Standard'Maximum_Alignment + + -- Addr + -- L | L L + -- A--A--A--A--A--A--A--A--A--A--A + -- | | + -- \----/ | | + -- Addr mod L | Addr + L + -- | + -- Addr + L - (Addr mod L) + + return To_Address (Int_Addr + Int_Algn - (Int_Addr mod Int_Algn)); + end Align_Addr; + -------------- -- Round_Up -- -------------- function Round_Up (Size : Storage_Count) return Memory_Size is - Algn_MS : constant Memory_Size := Memory_Alignment; + Algn_MS : constant Memory_Size := Standard'Maximum_Alignment; Size_MS : constant Memory_Size := Memory_Size (Size); begin - -- Detect a case where the Storage_Size is very large and may yield + -- Detect a case where the Size is very large and may yield -- a rounded result which is outside the range of Chunk_Memory_Size. -- Treat this case as secondary-stack depletion. @@ -581,27 +611,46 @@ package body System.Secondary_Stack is Stack : constant SS_Stack_Ptr := Get_Sec_Stack.all; Mem_Size : Memory_Size; + Over_Aligning : constant Boolean := + Alignment > Standard'Maximum_Alignment; + + Padding : SSE.Storage_Count := 0; + -- Start of processing for SS_Allocate begin - -- Round the requested size up to the nearest multiple of the maximum - -- alignment to ensure efficient access. + -- Alignment must be a power of two and can be: - if Storage_Size = 0 then - Mem_Size := Memory_Alignment; - else - -- It should not be possible to request an allocation of negative - -- size. + -- - lower than or equal to Maximum_Alignment, in which case the result + -- will be aligned on Maximum_Alignment; + -- - higher than Maximum_Alignment, in which case the result will be + -- dynamically realigned. - pragma Assert (Storage_Size >= 0); - Mem_Size := Round_Up (Storage_Size); + if Over_Aligning then + Padding := Alignment; end if; + -- Round the requested size (plus the needed padding in case of + -- over-alignment) up to the nearest multiple of the default + -- alignment to ensure efficient access and that the next available + -- Byte is always aligned on the default alignement value. + + -- It should not be possible to request an allocation of negative + -- size. + + pragma Assert (Storage_Size >= 0); + Mem_Size := Round_Up (Storage_Size + Padding); + if Sec_Stack_Dynamic then Allocate_Dynamic (Stack, Mem_Size, Addr); else Allocate_Static (Stack, Mem_Size, Addr); end if; + + if Over_Aligning then + Addr := Align_Addr (Addr); + end if; + end SS_Allocate; ------------- diff --git a/gcc/ada/libgnat/s-secsta.ads b/gcc/ada/libgnat/s-secsta.ads index b75f1a3..9399fa3 100644 --- a/gcc/ada/libgnat/s-secsta.ads +++ b/gcc/ada/libgnat/s-secsta.ads @@ -69,11 +69,13 @@ package System.Secondary_Stack is procedure SS_Allocate (Addr : out Address; - Storage_Size : SSE.Storage_Count); + Storage_Size : SSE.Storage_Count; + Alignment : SSE.Storage_Count := Standard'Maximum_Alignment); -- Allocate enough space on the secondary stack of the invoking task to - -- accommodate an alloction of size Storage_Size. Return the address of the - -- first byte of the allocation in Addr. The routine may carry out one or - -- more of the following actions: + -- accommodate an allocation of size Storage_Size. Return the address of + -- the first byte of the allocation in Addr, which is a multiple of + -- Alignment. The routine may carry out one or more of the following + -- actions: -- -- * Reuse an existing chunk that is big enough to accommodate the -- requested Storage_Size. @@ -259,22 +261,8 @@ private subtype Memory_Index is Memory_Size; -- Index into the memory storage of a single chunk - Memory_Alignment : constant := Standard'Maximum_Alignment * 2; - -- The memory alignment we will want to honor on every allocation. - -- - -- At this stage, gigi assumes we can accommodate any alignment requirement - -- there might be on the data type for which the memory gets allocated (see - -- build_call_alloc_dealloc). - -- - -- The multiplication factor is intended to account for requirements - -- by user code compiled with specific arch/cpu options such as -mavx - -- on X86[_64] targets, which Standard'Maximum_Alignment doesn't convey - -- without such compilation options. * 4 would actually be needed to - -- support -mavx512f on X86, but this would incur more annoying memory - -- consumption overheads. - type Chunk_Memory is array (Memory_Size range <>) of SSE.Storage_Element; - for Chunk_Memory'Alignment use Memory_Alignment; + for Chunk_Memory'Alignment use Standard'Maximum_Alignment; -- The memory storage of a single chunk -------------- -- cgit v1.1 From 28add0a4c82f52631b434e1e126588cd3f5b7782 Mon Sep 17 00:00:00 2001 From: Javier Miranda Date: Tue, 10 May 2022 17:18:30 +0000 Subject: [Ada] Missing error on tagged type conversion The compiler does not report an error on a type conversion to/from a tagged type whose parent type is an interface type and there is no relationship between the source and target types. This bug has been dormant since January/2016. This patch also improves the text of errors reported on interface type conversions suggesting how to fix these errors. gcc/ada/ * sem_res.adb (Resolve_Type_Conversion): Code cleanup since the previous static check has been moved to Valid_Tagged_Conversion. (Valid_Tagged_Conversion): Fix the code checking conversion to/from interface types since incorrectly returns True when the parent type of the operand type (or the target type) is an interface type; add missing static checks on interface type conversions. --- gcc/ada/sem_res.adb | 136 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 102 insertions(+), 34 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 8fbd2d5..3ff0afd 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -31,6 +31,7 @@ with Debug_A; use Debug_A; with Einfo; use Einfo; with Einfo.Entities; use Einfo.Entities; with Einfo.Utils; use Einfo.Utils; +with Elists; use Elists; with Errout; use Errout; with Expander; use Expander; with Exp_Ch6; use Exp_Ch6; @@ -12308,26 +12309,7 @@ package body Sem_Res is -- Conversion to interface type elsif Is_Interface (Target) then - - -- Handle subtypes - - if Ekind (Opnd) in E_Protected_Subtype | E_Task_Subtype then - Opnd := Etype (Opnd); - end if; - - if Is_Class_Wide_Type (Opnd) - or else Interface_Present_In_Ancestor - (Typ => Opnd, - Iface => Target) - then - Expand_Interface_Conversion (N); - else - Error_Msg_Name_1 := Chars (Etype (Target)); - Error_Msg_Name_2 := Chars (Opnd); - Error_Msg_N - ("wrong interface conversion (% is not a progenitor " - & "of %)", N); - end if; + Expand_Interface_Conversion (N); end if; end; end if; @@ -13621,29 +13603,115 @@ package body Sem_Res is Conversion_Check (False, "downward conversion of tagged objects not allowed"); - -- Ada 2005 (AI-251): The conversion to/from interface types is - -- always valid. The types involved may be class-wide (sub)types. + -- Ada 2005 (AI-251): A conversion is valid if the operand and target + -- types are both class-wide types and the specific type associated + -- with at least one of them is an interface type (RM 4.6 (23.1/2)); + -- at run-time a check will verify the validity of this interface + -- type conversion. - elsif Is_Interface (Etype (Base_Type (Target_Type))) - or else Is_Interface (Etype (Base_Type (Opnd_Type))) + elsif Is_Class_Wide_Type (Target_Type) + and then Is_Class_Wide_Type (Opnd_Type) + and then (Is_Interface (Target_Type) + or else Is_Interface (Opnd_Type)) then return True; - -- If the operand is a class-wide type obtained through a limited_ - -- with clause, and the context includes the nonlimited view, use - -- it to determine whether the conversion is legal. + -- Report errors + + elsif Is_Class_Wide_Type (Target_Type) + and then Is_Interface (Target_Type) + and then not Is_Interface (Opnd_Type) + and then not Interface_Present_In_Ancestor + (Typ => Opnd_Type, + Iface => Target_Type) + then + Error_Msg_Name_1 := Chars (Etype (Target_Type)); + Error_Msg_Name_2 := Chars (Opnd_Type); + Conversion_Error_N + ("wrong interface conversion (% is not a progenitor " + & "of %)", N); + return False; elsif Is_Class_Wide_Type (Opnd_Type) - and then From_Limited_With (Opnd_Type) - and then Present (Non_Limited_View (Etype (Opnd_Type))) - and then Is_Interface (Non_Limited_View (Etype (Opnd_Type))) + and then Is_Interface (Opnd_Type) + and then not Is_Interface (Target_Type) + and then not Interface_Present_In_Ancestor + (Typ => Target_Type, + Iface => Opnd_Type) then - return True; + Error_Msg_Name_1 := Chars (Etype (Opnd_Type)); + Error_Msg_Name_2 := Chars (Target_Type); + Conversion_Error_N + ("wrong interface conversion (% is not a progenitor " + & "of %)", N); - elsif Is_Access_Type (Opnd_Type) - and then Is_Interface (Directly_Designated_Type (Opnd_Type)) + -- Search for interface types shared between the target type and + -- the operand interface type to complete the text of the error + -- since the source of this error is a missing type conversion + -- to such interface type. + + if Has_Interfaces (Target_Type) then + declare + Operand_Ifaces_List : Elist_Id; + Operand_Iface_Elmt : Elmt_Id; + Target_Ifaces_List : Elist_Id; + Target_Iface_Elmt : Elmt_Id; + First_Candidate : Boolean := True; + + begin + Collect_Interfaces (Base_Type (Target_Type), + Target_Ifaces_List); + Collect_Interfaces (Root_Type (Base_Type (Opnd_Type)), + Operand_Ifaces_List); + + Operand_Iface_Elmt := First_Elmt (Operand_Ifaces_List); + while Present (Operand_Iface_Elmt) loop + Target_Iface_Elmt := First_Elmt (Target_Ifaces_List); + while Present (Target_Iface_Elmt) loop + if Node (Operand_Iface_Elmt) + = Node (Target_Iface_Elmt) + then + Error_Msg_Name_1 := + Chars (Node (Target_Iface_Elmt)); + + if First_Candidate then + First_Candidate := False; + Conversion_Error_N + ("\must convert to `%''Class` before downward " + & "conversion", Operand); + else + Conversion_Error_N + ("\or must convert to `%''Class` before " + & "downward conversion", Operand); + end if; + end if; + + Next_Elmt (Target_Iface_Elmt); + end loop; + + Next_Elmt (Operand_Iface_Elmt); + end loop; + end; + end if; + + return False; + + elsif not Is_Class_Wide_Type (Target_Type) + and then Is_Interface (Target_Type) then - return True; + Conversion_Error_N + ("wrong use of interface type in tagged conversion", N); + Conversion_Error_N + ("\add ''Class to the target interface type", N); + return False; + + elsif not Is_Class_Wide_Type (Opnd_Type) + and then Is_Interface (Opnd_Type) + then + Conversion_Error_N + ("must convert to class-wide interface type before downward " + & "conversion", Operand); + return False; else Conversion_Error_NE -- cgit v1.1 From be3bdaa1a53beaa5bb881c079ceaae132fb422a6 Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Fri, 10 Jun 2022 17:18:23 +0200 Subject: [Ada] Support ghost generic formal parameters This adds support in GNAT for ghost generic formal parameters, as included in SPARK RM 6.9. gcc/ada/ * ghost.adb (Check_Ghost_Context): Delay checking for generic associations. (Check_Ghost_Context_In_Generic_Association): Perform ghost checking in analyzed generic associations. (Check_Ghost_Formal_Procedure_Or_Package): Check SPARK RM 6.9(13-14) for formal procedures and packages. (Check_Ghost_Formal_Variable): Check SPARK RM 6.9(13-14) for variables. * ghost.ads: Declarations for the above. * sem_ch12.adb (Analyze_Associations): Apply delayed checking for generic associations. (Analyze_Formal_Object_Declaration): Same. (Analyze_Formal_Subprogram_Declaration): Same. (Instantiate_Formal_Package): Same. (Instantiate_Formal_Subprogram): Same. (Instantiate_Object): Same. Copy ghost aspect to newly declared object for actual for IN formal object. Use new function Get_Enclosing_Deep_Object to retrieve root object. (Instantiate_Type): Copy ghost aspect to declared subtype for actual for formal type. * sem_prag.adb (Analyze_Pragma): Recognize new allowed declarations. * sem_util.adb (Copy_Ghost_Aspect): Copy the ghost aspect between nodes. (Get_Enclosing_Deep_Object): New function to return enclosing deep object (or root for reachable part). * sem_util.ads (Copy_Ghost_Aspect): Same. (Get_Enclosing_Deep_Object): Same. * libgnat/s-imageu.ads: Declare formal subprograms as ghost. * libgnat/s-valuei.ads: Same. * libgnat/s-valuti.ads: Same. --- gcc/ada/ghost.adb | 142 +++++++++++++++++++++++++++++++++++++++---- gcc/ada/ghost.ads | 27 ++++++++ gcc/ada/libgnat/s-imageu.ads | 21 ++++--- gcc/ada/libgnat/s-valuei.ads | 21 ++++--- gcc/ada/libgnat/s-valuti.ads | 27 +++++--- gcc/ada/sem_ch12.adb | 113 ++++++++++++++++++++++++++-------- gcc/ada/sem_prag.adb | 3 + gcc/ada/sem_util.adb | 45 ++++++++++++++ gcc/ada/sem_util.ads | 11 ++++ 9 files changed, 347 insertions(+), 63 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb index 8f23cbd..1ce1d6a 100644 --- a/gcc/ada/ghost.adb +++ b/gcc/ada/ghost.adb @@ -472,6 +472,13 @@ package body Ghost is if Is_Ignored_Ghost_Node (Par) then return True; + -- It is not possible to check correct use of Ghost entities + -- in generic instantiations until after the generic has been + -- resolved. Postpone that verification to after resolution. + + elsif Nkind (Par) = N_Generic_Association then + return True; + -- A reference to a Ghost entity can appear within an aspect -- specification (SPARK RM 6.9(10)). The precise checking will -- occur when analyzing the corresponding pragma. We make an @@ -521,19 +528,6 @@ package body Ghost is then return True; - -- In the context of an instantiation, accept currently Ghost - -- arguments for formal subprograms, as SPARK does not provide - -- a way to distinguish Ghost formal parameters from non-Ghost - -- ones. Illegal use of such arguments in a non-Ghost context - -- will lead to errors inside the instantiation. - - elsif Nkind (Parent (Par)) = N_Generic_Association - and then (Nkind (Par) in N_Has_Entity - and then Present (Entity (Par)) - and then Is_Subprogram (Entity (Par))) - then - return True; - elsif Is_OK_Declaration (Par) then return True; @@ -680,6 +674,128 @@ package body Ghost is end if; end Check_Ghost_Context; + ------------------------------------------------ + -- Check_Ghost_Context_In_Generic_Association -- + ------------------------------------------------ + + procedure Check_Ghost_Context_In_Generic_Association + (Actual : Node_Id; + Formal : Entity_Id) + is + function Emit_Error_On_Ghost_Reference + (N : Node_Id) + return Traverse_Result; + -- Determine wether N denotes a reference to a ghost entity, and if so + -- issue an error. + + ----------------------------------- + -- Emit_Error_On_Ghost_Reference -- + ----------------------------------- + + function Emit_Error_On_Ghost_Reference + (N : Node_Id) + return Traverse_Result + is + begin + if Is_Entity_Name (N) + and then Present (Entity (N)) + and then Is_Ghost_Entity (Entity (N)) + then + Error_Msg_N ("ghost entity cannot appear in this context", N); + Error_Msg_Sloc := Sloc (Formal); + Error_Msg_NE ("\formal & was not declared as ghost #", N, Formal); + return Abandon; + end if; + + return OK; + end Emit_Error_On_Ghost_Reference; + + procedure Check_Ghost_References is + new Traverse_Proc (Emit_Error_On_Ghost_Reference); + + -- Start of processing for Check_Ghost_Context_In_Generic_Association + + begin + -- The context is ghost when it appears within a Ghost package or + -- subprogram. + + if Ghost_Mode > None then + return; + + -- The context is ghost if Formal is explicitly marked as ghost + + elsif Is_Ghost_Entity (Formal) then + return; + + else + Check_Ghost_References (Actual); + end if; + end Check_Ghost_Context_In_Generic_Association; + + --------------------------------------------- + -- Check_Ghost_Formal_Procedure_Or_Package -- + --------------------------------------------- + + procedure Check_Ghost_Formal_Procedure_Or_Package + (N : Node_Id; + Actual : Entity_Id; + Formal : Entity_Id; + Is_Default : Boolean := False) + is + begin + if not Is_Ghost_Entity (Formal) then + return; + end if; + + if Present (Actual) and then Is_Ghost_Entity (Actual) then + return; + end if; + + if Is_Default then + Error_Msg_N ("ghost procedure expected as default", N); + Error_Msg_NE ("\formal & is declared as ghost", N, Formal); + + else + if Ekind (Formal) = E_Procedure then + Error_Msg_N ("ghost procedure expected for actual", N); + else + Error_Msg_N ("ghost package expected for actual", N); + end if; + + Error_Msg_Sloc := Sloc (Formal); + Error_Msg_NE ("\formal & was declared as ghost #", N, Formal); + end if; + end Check_Ghost_Formal_Procedure_Or_Package; + + --------------------------------- + -- Check_Ghost_Formal_Variable -- + --------------------------------- + + procedure Check_Ghost_Formal_Variable + (Actual : Node_Id; + Formal : Entity_Id; + Is_Default : Boolean := False) + is + Actual_Obj : constant Entity_Id := Get_Enclosing_Deep_Object (Actual); + begin + if not Is_Ghost_Entity (Formal) then + return; + end if; + + if No (Actual_Obj) + or else not Is_Ghost_Entity (Actual_Obj) + then + if Is_Default then + Error_Msg_N ("ghost object expected as default", Actual); + Error_Msg_NE ("\formal & is declared as ghost", Actual, Formal); + else + Error_Msg_N ("ghost object expected for mutable actual", Actual); + Error_Msg_Sloc := Sloc (Formal); + Error_Msg_NE ("\formal & was declared as ghost #", Actual, Formal); + end if; + end if; + end Check_Ghost_Formal_Variable; + ---------------------------- -- Check_Ghost_Overriding -- ---------------------------- diff --git a/gcc/ada/ghost.ads b/gcc/ada/ghost.ads index 21126a7..ca311bf 100644 --- a/gcc/ada/ghost.ads +++ b/gcc/ada/ghost.ads @@ -44,6 +44,33 @@ package Ghost is -- Determine whether node Ghost_Ref appears within a Ghost-friendly context -- where Ghost entity Ghost_Id can safely reside. + procedure Check_Ghost_Context_In_Generic_Association + (Actual : Node_Id; + Formal : Entity_Id); + -- Check that if Actual contains references to ghost entities, generic + -- formal parameter Formal is ghost (SPARK RM 6.9(10)). + + procedure Check_Ghost_Formal_Procedure_Or_Package + (N : Node_Id; + Actual : Entity_Id; + Formal : Entity_Id; + Is_Default : Boolean := False); + -- Verify that if generic formal procedure (resp. package) Formal is ghost, + -- then Actual is not Empty and also a ghost procedure (resp. package) + -- (SPARK RM 6.9(13-14)). The error if any is located on N. If + -- Is_Default is False, N and Actual represent the actual parameter in an + -- instantiation. Otherwise, they represent the default subprogram of a + -- formal subprogram declaration. + + procedure Check_Ghost_Formal_Variable + (Actual : Node_Id; + Formal : Entity_Id; + Is_Default : Boolean := False); + -- Verify that if Formal (either an IN OUT generic formal parameter, or an + -- IN generic formal parameter of access-to-variable type) is ghost, then + -- Actual is a ghost object (SPARK RM 6.9(13-14)). Is_Default is True when + -- Actual is the default expression of the formal object declaration. + procedure Check_Ghost_Overriding (Subp : Entity_Id; Overridden_Subp : Entity_Id); diff --git a/gcc/ada/libgnat/s-imageu.ads b/gcc/ada/libgnat/s-imageu.ads index d3f2981..789cf65 100644 --- a/gcc/ada/libgnat/s-imageu.ads +++ b/gcc/ada/libgnat/s-imageu.ads @@ -54,27 +54,34 @@ generic Unsigned_Width_Ghost : Natural; - with function Wrap_Option (Value : Uns) return Uns_Option; + with function Wrap_Option (Value : Uns) return Uns_Option + with Ghost; with function Only_Decimal_Ghost (Str : String; From, To : Integer) - return Boolean; - with function Hexa_To_Unsigned_Ghost (X : Character) return Uns; + return Boolean + with Ghost; + with function Hexa_To_Unsigned_Ghost (X : Character) return Uns + with Ghost; with function Scan_Based_Number_Ghost (Str : String; From, To : Integer; Base : Uns := 10; - Acc : Uns := 0) return Uns_Option; - with function Is_Unsigned_Ghost (Str : String) return Boolean; + Acc : Uns := 0) return Uns_Option + with Ghost; + with function Is_Unsigned_Ghost (Str : String) return Boolean + with Ghost; with function Value_Unsigned (Str : String) return Uns; with procedure Prove_Iter_Scan_Based_Number_Ghost (Str1, Str2 : String; From, To : Integer; Base : Uns := 10; - Acc : Uns := 0); + Acc : Uns := 0) + with Ghost; with procedure Prove_Scan_Only_Decimal_Ghost (Str : String; - Val : Uns); + Val : Uns) + with Ghost; package System.Image_U is diff --git a/gcc/ada/libgnat/s-valuei.ads b/gcc/ada/libgnat/s-valuei.ads index c5b4b8e..5e42773 100644 --- a/gcc/ada/libgnat/s-valuei.ads +++ b/gcc/ada/libgnat/s-valuei.ads @@ -55,30 +55,37 @@ generic -- Additional parameters for ghost subprograms used inside contracts type Uns_Option is private; - with function Wrap_Option (Value : Uns) return Uns_Option; - with function Is_Raw_Unsigned_Format_Ghost (Str : String) return Boolean; + with function Wrap_Option (Value : Uns) return Uns_Option + with Ghost; + with function Is_Raw_Unsigned_Format_Ghost (Str : String) return Boolean + with Ghost; with function Raw_Unsigned_Overflows_Ghost (Str : String; From, To : Integer) - return Boolean; + return Boolean + with Ghost; with function Scan_Raw_Unsigned_Ghost (Str : String; From, To : Integer) - return Uns; + return Uns + with Ghost; with function Raw_Unsigned_Last_Ghost (Str : String; From, To : Integer) - return Positive; + return Positive + with Ghost; with function Only_Decimal_Ghost (Str : String; From, To : Integer) - return Boolean; + return Boolean + with Ghost; with function Scan_Based_Number_Ghost (Str : String; From, To : Integer; Base : Uns := 10; Acc : Uns := 0) - return Uns_Option; + return Uns_Option + with Ghost; package System.Value_I is pragma Preelaborate; diff --git a/gcc/ada/libgnat/s-valuti.ads b/gcc/ada/libgnat/s-valuti.ads index 45a0b66..2b89b12 100644 --- a/gcc/ada/libgnat/s-valuti.ads +++ b/gcc/ada/libgnat/s-valuti.ads @@ -384,27 +384,36 @@ is Unsigned_Width_Ghost : Natural; - with function Wrap_Option (Value : Uns) return Uns_Option; + with function Wrap_Option (Value : Uns) return Uns_Option + with Ghost; with function Only_Decimal_Ghost (Str : String; From, To : Integer) - return Boolean; - with function Hexa_To_Unsigned_Ghost (X : Character) return Uns; + return Boolean + with Ghost; + with function Hexa_To_Unsigned_Ghost (X : Character) return Uns + with Ghost; with function Scan_Based_Number_Ghost (Str : String; From, To : Integer; Base : Uns := 10; Acc : Uns := 0) - return Uns_Option; - with function Is_Integer_Ghost (Str : String) return Boolean; + return Uns_Option + with Ghost; + with function Is_Integer_Ghost (Str : String) return Boolean + with Ghost; with procedure Prove_Iter_Scan_Based_Number_Ghost (Str1, Str2 : String; From, To : Integer; Base : Uns := 10; - Acc : Uns := 0); - with procedure Prove_Scan_Only_Decimal_Ghost (Str : String; Val : Int); - with function Abs_Uns_Of_Int (Val : Int) return Uns; - with function Value_Integer (Str : String) return Int; + Acc : Uns := 0) + with Ghost; + with procedure Prove_Scan_Only_Decimal_Ghost (Str : String; Val : Int) + with Ghost; + with function Abs_Uns_Of_Int (Val : Int) return Uns + with Ghost; + with function Value_Integer (Str : String) return Int + with Ghost; package Int_Params is end Int_Params; diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index dcc0dac..af8bbbe 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -2204,6 +2204,19 @@ package body Sem_Ch12 is raise Program_Error; end case; + -- Check here the correct use of Ghost entities in generic + -- instantiations, as now the generic has been resolved and + -- we know which formal generic parameters are ghost (SPARK + -- RM 6.9(10)). + + if Nkind (Formal) not in N_Use_Package_Clause + | N_Use_Type_Clause + then + Check_Ghost_Context_In_Generic_Association + (Actual => Match, + Formal => Defining_Entity (Analyzed_Formal)); + end if; + Formal := Saved_Formal; Next_Non_Pragma (Analyzed_Formal); end loop; @@ -2715,6 +2728,17 @@ package body Sem_Ch12 is if Present (E) then Preanalyze_Spec_Expression (E, T); + -- The default for a ghost generic formal IN parameter of + -- access-to-variable type should be a ghost object (SPARK + -- RM 6.9(13)). + + if Is_Access_Variable (T) then + Check_Ghost_Formal_Variable + (Actual => E, + Formal => Id, + Is_Default => True); + end if; + if Is_Limited_Type (T) and then not OK_For_Limited_Init (T, E) then Error_Msg_N ("initialization not allowed for limited types", E); @@ -3398,6 +3422,25 @@ package body Sem_Ch12 is goto Leave; end if; + -- The default for a ghost generic formal procedure should be a ghost + -- procedure (SPARK RM 6.9(13)). + + if Ekind (Nam) = E_Procedure then + declare + Def_E : Entity_Id := Empty; + begin + if Nkind (Def) in N_Has_Entity then + Def_E := Entity (Def); + end if; + + Check_Ghost_Formal_Procedure_Or_Package + (N => Def, + Actual => Def_E, + Formal => Nam, + Is_Default => True); + end; + end if; + -- Default name may be overloaded, in which case the interpretation -- with the correct profile must be selected, as for a renaming. -- If the definition is an indexed component, it must denote a @@ -10594,6 +10637,14 @@ package body Sem_Ch12 is Gen_Parent := Generic_Parent (Specification (Analyzed_Formal)); Formal_Pack := Defining_Unit_Name (Specification (Analyzed_Formal)); + -- The actual for a ghost generic formal package should be a ghost + -- package (SPARK RM 6.9(14)). + + Check_Ghost_Formal_Procedure_Or_Package + (N => Actual, + Actual => Actual_Pack, + Formal => Formal_Pack); + if Nkind (Parent (Actual_Pack)) = N_Defining_Program_Unit_Name then Parent_Spec := Package_Specification (Actual_Pack); else @@ -10881,6 +10932,18 @@ package body Sem_Ch12 is Act_E := Empty; end if; + -- The actual for a ghost generic formal procedure should be a ghost + -- procedure (SPARK RM 6.9(14)). + + if Present (Act_E) + and then Ekind (Act_E) = E_Procedure + then + Check_Ghost_Formal_Procedure_Or_Package + (N => Act, + Actual => Act_E, + Formal => Analyzed_S); + end if; + if (Present (Act_E) and then Is_Overloadable (Act_E)) or else Nkind (Act) in N_Attribute_Reference | N_Indexed_Component @@ -11400,40 +11463,22 @@ package body Sem_Ch12 is -- volatility refinement aspects. declare - Actual_Obj : Entity_Id; - N : Node_Id := Actual; + Actual_Obj : constant Entity_Id := + Get_Enclosing_Deep_Object (Actual); begin - -- Similar to Sem_Util.Get_Enclosing_Object, but treat - -- pointer dereference like component selection. - loop - if Is_Entity_Name (N) then - Actual_Obj := Entity (N); - exit; - end if; - - case Nkind (N) is - when N_Indexed_Component - | N_Selected_Component - | N_Slice - | N_Explicit_Dereference - => - N := Prefix (N); - - when N_Type_Conversion => - N := Expression (N); - - when others => - Actual_Obj := Etype (N); - exit; - end case; - end loop; - Check_Volatility_Compatibility (Actual_Obj, A_Gen_Obj, "actual object", "its corresponding formal object of mode in out", Srcpos_Bearer => Actual); end; + -- The actual for a ghost generic formal IN OUT parameter should be a + -- ghost object (SPARK RM 6.9(14)). + + Check_Ghost_Formal_Variable + (Actual => Actual, + Formal => A_Gen_Obj); + -- Formal in-parameter else @@ -11459,6 +11504,7 @@ package body Sem_Ch12 is Object_Definition => Def, Expression => Actual); + Copy_Ghost_Aspect (Formal, To => Decl_Node); Set_Corresponding_Generic_Association (Decl_Node, Act_Assoc); -- A generic formal object of a tagged type is defined to be @@ -11470,6 +11516,16 @@ package body Sem_Ch12 is Append (Decl_Node, List); + -- The actual for a ghost generic formal IN parameter of + -- access-to-variable type should be a ghost object (SPARK + -- RM 6.9(14)). + + if Is_Access_Variable (Etype (A_Gen_Obj)) then + Check_Ghost_Formal_Variable + (Actual => Actual, + Formal => A_Gen_Obj); + end if; + -- No need to repeat (pre-)analysis of some expression nodes -- already handled in Preanalyze_Actuals. @@ -11543,6 +11599,7 @@ package body Sem_Ch12 is Expression => New_Copy_Tree (Default_Expression (Formal))); + Copy_Ghost_Aspect (Formal, To => Decl_Node); Set_Corresponding_Generic_Association (Decl_Node, Expression (Decl_Node)); @@ -14199,6 +14256,8 @@ package body Sem_Ch12 is Defining_Identifier => Subt, Subtype_Indication => New_Occurrence_Of (Act_T, Loc)); + Copy_Ghost_Aspect (Formal, To => Decl_Node); + -- Record whether the actual is private at this point, so that -- Check_Generic_Actuals can restore its proper view before the -- semantic analysis of the instance. diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 9ebac41..ad43808 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -17002,6 +17002,9 @@ package body Sem_Prag is -- The pragma applies to a legal construct, stop the traversal elsif Nkind (Stmt) in N_Abstract_Subprogram_Declaration + | N_Formal_Object_Declaration + | N_Formal_Subprogram_Declaration + | N_Formal_Type_Declaration | N_Full_Type_Declaration | N_Generic_Subprogram_Declaration | N_Object_Declaration diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index edb9482..942a77a 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -7024,6 +7024,25 @@ package body Sem_Util is return Comps; end Copy_Component_List; + ----------------------- + -- Copy_Ghost_Aspect -- + ----------------------- + + procedure Copy_Ghost_Aspect (From : Node_Id; To : Node_Id) is + pragma Assert (not Has_Aspects (To)); + Asp : Node_Id; + + begin + if Has_Aspects (From) then + Asp := Find_Aspect (Defining_Entity (From), Aspect_Ghost); + + if Present (Asp) then + Set_Aspect_Specifications (To, New_List (New_Copy_Tree (Asp))); + Set_Has_Aspects (To, True); + end if; + end if; + end Copy_Ghost_Aspect; + ------------------------- -- Copy_Parameter_List -- ------------------------- @@ -11004,6 +11023,32 @@ package body Sem_Util is end if; end Get_Enclosing_Object; + ------------------------------- + -- Get_Enclosing_Deep_Object -- + ------------------------------- + + function Get_Enclosing_Deep_Object (N : Node_Id) return Entity_Id is + begin + if Is_Entity_Name (N) then + return Entity (N); + else + case Nkind (N) is + when N_Explicit_Dereference + | N_Indexed_Component + | N_Selected_Component + | N_Slice + => + return Get_Enclosing_Deep_Object (Prefix (N)); + + when N_Type_Conversion => + return Get_Enclosing_Deep_Object (Expression (N)); + + when others => + return Empty; + end case; + end if; + end Get_Enclosing_Deep_Object; + --------------------------- -- Get_Enum_Lit_From_Pos -- --------------------------- diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index de7883c..a8afda0 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -625,6 +625,11 @@ package Sem_Util is -- create a new compatible record type. Loc is the source location assigned -- to the created nodes. + procedure Copy_Ghost_Aspect (From : Node_Id; To : Node_Id); + -- Copy the Ghost aspect if present in the aspect specifications of node + -- From to node To. On entry it is assumed that To does not have aspect + -- specifications. If From has no aspects, the routine has no effect. + function Copy_Parameter_List (Subp_Id : Entity_Id) return List_Id; -- Utility to create a parameter profile for a new subprogram spec, when -- the subprogram has a body that acts as spec. This is done for some cases @@ -1183,6 +1188,12 @@ package Sem_Util is -- If expression N references a part of an object, return this object. -- Otherwise return Empty. Expression N should have been resolved already. + function Get_Enclosing_Deep_Object (N : Node_Id) return Entity_Id; + -- If expression N references a reachable part of an object (as defined in + -- SPARK RM 6.9), return this object. Otherwise return Empty. It is similar + -- to Get_Enclosing_Object, but treats pointer dereference like component + -- selection. Expression N should have been resolved already. + function Get_Generic_Entity (N : Node_Id) return Entity_Id; -- Returns the true generic entity in an instantiation. If the name in the -- instantiation is a renaming, the function returns the renamed generic. -- cgit v1.1 From 0d7fbcf10f0d2b375a29fc6c184142f68c7f7da7 Mon Sep 17 00:00:00 2001 From: Justin Squirek Date: Wed, 15 Jun 2022 01:14:31 +0000 Subject: [Ada] Spurious non-callable warning on prefixed call in class condition This patch corrects an error in the compiler whereby a function call in prefix notation within a class condition causes a spurious error claiming the name in the call is a non-callable entity when there exists a type extension in the same unit extended with a component featuring the same name as the function in question. gcc/ada/ * sem_ch4.adb (Analyze_Selected_Component): Add condition to avoid interpreting derived type components as candidates for selected components in preanalysis of inherited class conditions. --- gcc/ada/sem_ch4.adb | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index 4bc3696..5497483 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -5158,11 +5158,26 @@ package body Sem_Ch4 is elsif Is_Record_Type (Prefix_Type) then - -- Find component with given name. In an instance, if the node is - -- known as a prefixed call, do not examine components whose - -- visibility may be accidental. + -- Find a component with the given name. If the node is a prefixed + -- call, do not examine components whose visibility may be + -- accidental. - while Present (Comp) and then not Is_Prefixed_Call (N) loop + while Present (Comp) + and then not Is_Prefixed_Call (N) + + -- When the selector has been resolved to a function then we may be + -- looking at a prefixed call which has been preanalyzed already as + -- part of a class condition. In such cases it is possible for a + -- derived type to declare a component which has the same name as + -- a primitive used in a parent's class condition. + + -- Avoid seeing components as possible interpretations of the + -- selected component when this is true. + + and then not (Inside_Class_Condition_Preanalysis + and then Present (Entity (Sel)) + and then Ekind (Entity (Sel)) = E_Function) + loop if Chars (Comp) = Chars (Sel) and then Is_Visible_Component (Comp, N) then -- cgit v1.1 From 870518bfe257908095eb8d299fb0bbf14a4d2920 Mon Sep 17 00:00:00 2001 From: Justin Squirek Date: Wed, 15 Jun 2022 02:03:48 +0000 Subject: [Ada] Indexing error when calling GNAT.Regpat.Match This patch corrects an error in the compiler whereby a buffer sizing error fails to get raised when compiling a regex expression with an insufficiently sized Pattern_Matcher as the documentation indicated. This, in turn, could lead to indexing errors when attempting to call Match with the malformed regex program buffer. gcc/ada/ * libgnat/s-regpat.adb, libgnat/s-regpat.ads (Compile): Add a new defaulted parameter Error_When_Too_Small to trigger an error, if specified true, when Matcher is too small to hold the compiled regex program. --- gcc/ada/libgnat/s-regpat.adb | 33 ++++++++++++++++++--------------- gcc/ada/libgnat/s-regpat.ads | 29 ++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 20 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/libgnat/s-regpat.adb b/gcc/ada/libgnat/s-regpat.adb index 4f758f9..3290f90 100644 --- a/gcc/ada/libgnat/s-regpat.adb +++ b/gcc/ada/libgnat/s-regpat.adb @@ -359,10 +359,11 @@ package body System.Regpat is ------------- procedure Compile - (Matcher : out Pattern_Matcher; - Expression : String; - Final_Code_Size : out Program_Size; - Flags : Regexp_Flags := No_Flags) + (Matcher : out Pattern_Matcher; + Expression : String; + Final_Code_Size : out Program_Size; + Flags : Regexp_Flags := No_Flags; + Error_When_Too_Small : Boolean := True) is -- We can't allocate space until we know how big the compiled form -- will be, but we can't compile it (and thus know how big it is) @@ -1994,6 +1995,12 @@ package body System.Regpat is end if; PM.Flags := Flags; + + -- Raise the appropriate error when Matcher does not have enough space + + if Error_When_Too_Small and then Matcher.Size < Final_Code_Size then + raise Expression_Error with "Pattern_Matcher is too small"; + end if; end Compile; function Compile @@ -2009,7 +2016,7 @@ package body System.Regpat is Size : Program_Size; begin - Compile (Dummy, Expression, Size, Flags); + Compile (Dummy, Expression, Size, Flags, Error_When_Too_Small => False); if Size <= Dummy.Size then return Pattern_Matcher' @@ -2023,17 +2030,13 @@ package body System.Regpat is Program => Dummy.Program (Dummy.Program'First .. Dummy.Program'First + Size - 1)); - else - -- We have to recompile now that we know the size - -- ??? Can we use Ada 2005's return construct ? - - declare - Result : Pattern_Matcher (Size); - begin - Compile (Result, Expression, Size, Flags); - return Result; - end; end if; + + return + Result : Pattern_Matcher (Size) + do + Compile (Result, Expression, Size, Flags); + end return; end Compile; procedure Compile diff --git a/gcc/ada/libgnat/s-regpat.ads b/gcc/ada/libgnat/s-regpat.ads index baa91be..6d0cbf4 100644 --- a/gcc/ada/libgnat/s-regpat.ads +++ b/gcc/ada/libgnat/s-regpat.ads @@ -403,10 +403,11 @@ package System.Regpat is -- (e.g. case sensitivity,...). procedure Compile - (Matcher : out Pattern_Matcher; - Expression : String; - Final_Code_Size : out Program_Size; - Flags : Regexp_Flags := No_Flags); + (Matcher : out Pattern_Matcher; + Expression : String; + Final_Code_Size : out Program_Size; + Flags : Regexp_Flags := No_Flags; + Error_When_Too_Small : Boolean := True); -- Compile a regular expression into internal code -- This procedure is significantly faster than the Compile function since @@ -426,7 +427,25 @@ package System.Regpat is -- expression. -- -- This function raises Storage_Error if Matcher is too small to hold - -- the resulting code (i.e. Matcher.Size has too small a value). + -- the resulting code (i.e. Matcher.Size has too small a value) only when + -- the paramter Error_When_Too_Small is set to True. Otherwise, no error + -- will be raised and the required size will be placed in the + -- Final_Code_Size parameter. + -- + -- Thus when Error_When_Too_Small is specified as false a check will need + -- to be made to ensure successful compilation - as in: + -- + -- ... + -- Compile + -- (Matcher, Expr, Code_Size, Flags, Error_When_Too_Small => False); + -- + -- if Matcher.Size < Code_Size then + -- declare + -- New_Matcher : Pattern_Matcher (1..Code_Size); + -- begin + -- Compile (New_Matcher, Expr, Code_Size, Flags); + -- end; + -- end if; -- -- Expression_Error is raised if the string Expression does not contain -- a valid regular expression. -- cgit v1.1 From e5802d60130bd804663559471f9c5f3561dfab4d Mon Sep 17 00:00:00 2001 From: Yannick Moy Date: Thu, 16 Jun 2022 14:14:56 +0200 Subject: [Ada] Deferred constant considered as not preelaborable Fix detection of non-preelaborable constructs for checking SPARK elaboration rules, which was tagging deferred constant declarations as not preelaborable. gcc/ada/ * sem_util.adb (Is_Non_Preelaborable_Construct): Fix for deferred constants. --- gcc/ada/sem_util.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 942a77a..7b7566d 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -18952,8 +18952,9 @@ package body Sem_Util is if Has_Init_Expression (Nod) then Visit (Expression (Nod)); - elsif not Has_Preelaborable_Initialization - (Etype (Defining_Entity (Nod))) + elsif not Constant_Present (Nod) + and then not Has_Preelaborable_Initialization + (Etype (Defining_Entity (Nod))) then raise Non_Preelaborable; end if; -- cgit v1.1 From cd7d1f448a4a826a4210121ed6bec989913ba4e7 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 16 Jun 2022 13:22:18 +0200 Subject: [Ada] Document the various function return mechanisms gcc/ada/ * exp_ch6.adb (Function return mechanisms): New paragraph. --- gcc/ada/exp_ch6.adb | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index b5764ad..bf51e64 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -83,7 +83,48 @@ with Validsw; use Validsw; package body Exp_Ch6 is - -- Suffix for BIP formals + -------------------------------- + -- Function return mechanisms -- + -------------------------------- + + -- This is a summary of the various function return mechanisms implemented + -- in GNAT for Ada 2005 and later versions of the language. In the below + -- table, the first column must be read as an if expression: if the result + -- type of the function is limited, then the return mechanism is and ...; + -- elsif the result type is indefinite or large definite, then ...; elsif + -- ...; else ... The different mechanisms are implemented either in the + -- front end, or in the back end, or partly in both ends, depending on the + -- result type. + + -- Result type | Return mechanism | Front end | Back end + -- -------------------------------------------------------------------- + + -- Limited Build In Place All + + -- Indefinite/ Secondary Stack Needs Fin. Others + -- Large definite + + -- Needs Fin. Secondary Stack All + -- (BERS False) + + -- Needs Fin. Invisible Parameter All All + -- (BERS True) (return) (call) + + -- By Reference Invisible Parameter All + + -- Others Primary stack/ All + -- Registers + + -- Needs Fin.: type needs finalization [RM 7.6(9.1/2-9.6/2)] + -- BERS: Opt.Back_End_Return_Slot setting + + -- The table is valid for all calls except for those dispatching on result; + -- the latter calls are considered as returning a class-wide type and thus + -- always return on the secondary stack, with the help of a small wrapper + -- function (thunk) if the original result type is not itself returned on + -- the secondary stack as per the above table. + + -- Suffixes for Build-In-Place extra formals BIP_Alloc_Suffix : constant String := "BIPalloc"; BIP_Storage_Pool_Suffix : constant String := "BIPstoragepool"; -- cgit v1.1 From 889db59e6e77abf5253c8355d6a5ccbdfe42d3ec Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 24 May 2022 01:39:08 +0200 Subject: [Ada] Do not give warnings for compiler-generated entities by default gcc/ada/ * gcc-interface/trans.cc (gnat_gimplify_expr) : New case. --- gcc/ada/gcc-interface/trans.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gcc') diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc index f0602b8..758df38 100644 --- a/gcc/ada/gcc-interface/trans.cc +++ b/gcc/ada/gcc-interface/trans.cc @@ -8731,6 +8731,17 @@ gnat_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimplify_and_add (TREE_OPERAND (expr, 0), pre_p); return GS_OK; + case SAVE_EXPR: + op = TREE_OPERAND (expr, 0); + + /* Propagate TREE_NO_WARNING from expression to temporary by using the + SAVE_EXPR itself as an intermediate step. See gimplify_save_expr. */ + if (SAVE_EXPR_RESOLVED_P (expr)) + TREE_NO_WARNING (op) = TREE_NO_WARNING (expr); + else + TREE_NO_WARNING (expr) = TREE_NO_WARNING (op); + break; + case UNCONSTRAINED_ARRAY_REF: /* We should only do this if we are just elaborating for side effects, but we can't know that yet. */ -- cgit v1.1 From 940bbc4363b4cee9682a96e17fbb536f61c50c21 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 24 May 2022 10:01:13 +0200 Subject: [Ada] Small tweak to gnat_to_gnu_subprog_type No functional changes. gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Constify a local variable and move a couple of others around. --- gcc/ada/gcc-interface/decl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 6e22feb..e7e5ad5 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -5777,10 +5777,9 @@ gnat_to_gnu_subprog_type (Entity_Id gnat_subprog, bool definition, bool debug_info_p, tree *param_list) { const Entity_Kind kind = Ekind (gnat_subprog); + const Entity_Id gnat_return_type = Etype (gnat_subprog); const bool method_p = is_cplusplus_method (gnat_subprog); const bool variadic = IN (Convention (gnat_subprog), Convention_C_Variadic); - Entity_Id gnat_return_type = Etype (gnat_subprog); - Entity_Id gnat_param; tree gnu_type = present_gnu_tree (gnat_subprog) ? TREE_TYPE (get_gnu_tree (gnat_subprog)) : NULL_TREE; tree gnu_return_type; @@ -5810,7 +5809,6 @@ gnat_to_gnu_subprog_type (Entity_Id gnat_subprog, bool definition, bool return_by_direct_ref_p = false; bool return_by_invisi_ref_p = false; bool incomplete_profile_p = false; - int num; /* Look into the return type and get its associated GCC tree if it is not void, and then compute various flags for the subprogram type. But make @@ -5944,6 +5942,8 @@ gnat_to_gnu_subprog_type (Entity_Id gnat_subprog, bool definition, /* Loop over the parameters and get their associated GCC tree. While doing this, build a copy-in copy-out structure if we need one. */ + Entity_Id gnat_param; + int num; for (gnat_param = First_Formal_With_Extras (gnat_subprog), num = 0; Present (gnat_param); gnat_param = Next_Formal_With_Extras (gnat_param), num++) -- cgit v1.1 From 40242ebb71ed7a03ab23349a893afe6140c512d1 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 3 Jun 2022 10:02:56 +0200 Subject: [Ada] Fix crash on aliased renaming of unconstrained array gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity) : Create a local constant holding the underlying GNAT type of the object. Do not fiddle with the object size for an unconstrained array. --- gcc/ada/gcc-interface/decl.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index e7e5ad5..3f6b88a 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -711,6 +711,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) case E_Variable: { const Entity_Id gnat_type = Etype (gnat_entity); + const Entity_Id gnat_und_type = Underlying_Type (gnat_type); /* Always create a variable for volatile objects and variables seen constant but with a Linker_Section pragma. */ bool const_flag @@ -749,7 +750,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) } /* Get the type after elaborating the renamed object. */ - if (foreign && Is_Descendant_Of_Address (Underlying_Type (gnat_type))) + if (foreign && Is_Descendant_Of_Address (gnat_und_type)) gnu_type = ptr_type_node; else gnu_type = gnat_to_gnu_type (gnat_type); @@ -947,7 +948,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) subtype, make a type that includes the template. We will either allocate or create a variable of that type, see below. */ if (Is_Constr_Subt_For_UN_Aliased (gnat_type) - && Is_Array_Type (Underlying_Type (gnat_type)) + && Is_Array_Type (gnat_und_type) && !type_annotate_only) { tree gnu_array = gnat_to_gnu_type (Base_Type (gnat_type)); @@ -996,8 +997,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) /* If the object is aliased, of a constrained nominal subtype and its size might be zero at run time, we force at least the unit size. */ if (Is_Aliased (gnat_entity) + && Is_Constrained (gnat_type) && !Is_Constr_Subt_For_UN_Aliased (gnat_type) - && Is_Array_Type (Underlying_Type (gnat_type)) + && Is_Array_Type (gnat_und_type) && !TREE_CONSTANT (gnu_object_size)) gnu_size = size_binop (MAX_EXPR, gnu_object_size, bitsize_unit_node); @@ -1246,7 +1248,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) subtype, then it can overlay only another aliased object with an unconstrained array nominal subtype and compatible template. */ if (Is_Constr_Subt_For_UN_Aliased (gnat_type) - && Is_Array_Type (Underlying_Type (gnat_type)) + && Is_Array_Type (gnat_und_type) && !type_annotate_only) { tree rec_type = TREE_TYPE (gnu_type); @@ -1487,7 +1489,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) object. Note that we have to do it this late because of the couple of allocation adjustments that might be made above. */ if (Is_Constr_Subt_For_UN_Aliased (gnat_type) - && Is_Array_Type (Underlying_Type (gnat_type)) + && Is_Array_Type (gnat_und_type) && !type_annotate_only) { /* In case the object with the template has already been allocated -- cgit v1.1 From 1141fbd71ea1782c6eac750cfed809f0706aaafc Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 7 Jun 2022 21:46:04 +0200 Subject: [Ada] Improve code generated for aggregates of VFA type This avoids using a full access for constants internally generated from assignments of aggregates with a Volatile_Full_Access type. gcc/ada/ * gcc-interface/gigi.h (simple_constant_p): Declare. * gcc-interface/decl.cc (gnat_to_gnu_entity) : Strip the qualifiers from the type of a simple constant. (simple_constant_p): New predicate. * gcc-interface/trans.cc (node_is_atomic): Return true for objects with atomic type except for simple constants. (node_is_volatile_full_access): Return false for simple constants with VFA type. --- gcc/ada/gcc-interface/decl.cc | 20 +++++++++++++++++++- gcc/ada/gcc-interface/gigi.h | 4 ++++ gcc/ada/gcc-interface/trans.cc | 9 ++++++--- 3 files changed, 29 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index 3f6b88a..99277f0 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -660,8 +660,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) like variables. */ if (definition && !gnu_expr - && No (Address_Clause (gnat_entity)) && !No_Initialization (gnat_decl) + && No (Address_Clause (gnat_entity)) && No (gnat_renamed_obj)) { gnu_decl = error_mark_node; @@ -781,6 +781,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) if (kind == E_Loop_Parameter) gnu_type = get_base_type (gnu_type); + /* If this is a simple constant, strip the qualifiers from its type, + since the constant represents only its value. */ + else if (simple_constant_p (gnat_entity)) + gnu_type = TYPE_MAIN_VARIANT (gnu_type); + /* Reject non-renamed objects whose type is an unconstrained array or any object whose type is a dummy type or void. */ if ((TREE_CODE (gnu_type) == UNCONSTRAINED_ARRAY_TYPE @@ -9541,6 +9546,19 @@ promote_object_alignment (tree gnu_type, tree gnu_size, Entity_Id gnat_entity) return align; } +/* Return whether GNAT_ENTITY is a simple constant, i.e. it represents only + its value and reading it has no side effects. */ + +bool +simple_constant_p (Entity_Id gnat_entity) +{ + return Ekind (gnat_entity) == E_Constant + && Present (Constant_Value (gnat_entity)) + && !No_Initialization (gnat_entity) + && No (Address_Clause (gnat_entity)) + && No (Renamed_Object (gnat_entity)); +} + /* Verify that TYPE is something we can implement atomically. If not, issue an error for GNAT_ENTITY. COMPONENT_P is true if we are being called to process a component type. */ diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index b88dfc1..1c1397a 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -998,6 +998,10 @@ extern Entity_Id get_debug_scope (Node_Id gnat_node, bool *is_subprogram); should be synchronized with Exp_Dbug.Debug_Renaming_Declaration. */ extern bool can_materialize_object_renaming_p (Node_Id expr); +/* Return whether GNAT_ENTITY is a simple constant, i.e. it represents only + its value and reading it has no side effects. */ +extern bool simple_constant_p (Entity_Id gnat_entity); + /* Return the size of TYPE, which must be a positive power of 2. */ extern unsigned int resolve_atomic_size (tree type); diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc index 758df38..aec27e1 100644 --- a/gcc/ada/gcc-interface/trans.cc +++ b/gcc/ada/gcc-interface/trans.cc @@ -4111,9 +4111,11 @@ node_is_atomic (Node_Id gnat_node) case N_Identifier: case N_Expanded_Name: gnat_entity = Entity (gnat_node); - if (Ekind (gnat_entity) != E_Variable) + if (!Is_Object (gnat_entity)) break; - return Is_Atomic (gnat_entity) || Is_Atomic (Etype (gnat_entity)); + return Is_Atomic (gnat_entity) + || (Is_Atomic (Etype (gnat_entity)) + && !simple_constant_p (gnat_entity)); case N_Selected_Component: return Is_Atomic (Etype (gnat_node)) @@ -4152,7 +4154,8 @@ node_is_volatile_full_access (Node_Id gnat_node) if (!Is_Object (gnat_entity)) break; return Is_Volatile_Full_Access (gnat_entity) - || Is_Volatile_Full_Access (Etype (gnat_entity)); + || (Is_Volatile_Full_Access (Etype (gnat_entity)) + && !simple_constant_p (gnat_entity)); case N_Selected_Component: return Is_Volatile_Full_Access (Etype (gnat_node)) -- cgit v1.1 From fc84bb8c167297dd739d8ced30b2193b3892080d Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 9 Jun 2022 18:49:10 +0200 Subject: [Ada] Update comment after recent changes wrt. secondary stack & tagged types gcc/ada/ * gcc-interface/trans.cc (gnat_to_gnu): Update comment. --- gcc/ada/gcc-interface/trans.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc index aec27e1..8164801 100644 --- a/gcc/ada/gcc-interface/trans.cc +++ b/gcc/ada/gcc-interface/trans.cc @@ -7387,9 +7387,7 @@ gnat_to_gnu (Node_Id gnat_node) gnu_ret_val = maybe_unconstrained_array (gnu_ret_val); /* And find out whether it is a candidate for Named Return - Value. If so, record it. Note that we disable this NRV - optimization when we're preserving the control flow as - it entails hoisting the allocation done below. */ + Value. If so, record it. */ if (optimize && !optimize_debug && !TYPE_CI_CO_LIST (gnu_subprog_type)) -- cgit v1.1 From 9e0d5db3e04afd2d030ace4ccb5c1af5e9f05a8f Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Thu, 9 Jun 2022 12:05:21 +0200 Subject: [Ada] Simplify regular expression that matches 8 consecutive digits Makefile cleanup; behaviour is unaffected. gcc/ada/ * gcc-interface/Make-lang.in (ada/generated/gnatvsn.ads): Simplify regular expression. The "interval expression", i.e. \{8\} is part of the POSIX regular expressions, so it should not be a problem for modern implementations of sed. --- gcc/ada/gcc-interface/Make-lang.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index 1e245ed..02b2d1c 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -1158,7 +1158,7 @@ ada/generated/gnatvsn.ads: ada/gnatvsn.ads BASE-VER ada/GNAT_DATE s=`cat $(srcdir)/BASE-VER | sed -e "s/\([0-9]*\)\.\([0-9]*\)\..*/-\1\2/g"`; \ d=`if test -f $(srcdir)/ada/GNAT_DATE; then \ cat $(srcdir)/ada/GNAT_DATE; else date +%Y%m%d; fi`; \ - cat $< | sed -e "/Version/s/(\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*)/($$d$$s)/g" >$@ + cat $< | sed -e "/Version/s/(\([0-9]\{8\}\).*)/($$d$$s)/g" >$@ ada/gnatvsn.o : ada/gnatvsn.adb ada/generated/gnatvsn.ads $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(ADA_OUTPUT_OPTION) -- cgit v1.1 From 71c05bb8e2b7585f459b702cc1b55efe9892cc3d Mon Sep 17 00:00:00 2001 From: Immad Mir Date: Wed, 6 Jul 2022 21:35:53 +0530 Subject: analyzer: show close event for use_after_close diagnostic This patch saves the "close" event in use_after_close diagnostic and shows it where possible. gcc/analyzer/ChangeLog: * sm-fd.cc (use_after_close): save the "close" event and show it where possible. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-4.c (test_3): change the message note to conform to the changes in analyzer/sm-fd.cc (test_4): Likewise. Signed-off-by: Immad Mir --- gcc/analyzer/sm-fd.cc | 15 ++++++++++++--- gcc/testsuite/gcc.dg/analyzer/fd-4.c | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'gcc') diff --git a/gcc/analyzer/sm-fd.cc b/gcc/analyzer/sm-fd.cc index 4058ac5..8196d33 100644 --- a/gcc/analyzer/sm-fd.cc +++ b/gcc/analyzer/sm-fd.cc @@ -454,7 +454,10 @@ public: return label_text::borrow ("opened here"); if (change.m_new_state == m_sm.m_closed) - return change.formatted_print ("closed here"); + { + m_first_close_event = change.m_event_id; + return change.formatted_print ("closed here"); + } return fd_diagnostic::describe_state_change (change); } @@ -462,11 +465,17 @@ public: label_text describe_final_event (const evdesc::final_event &ev) final override { - return ev.formatted_print ("%qE on closed file descriptor %qE here", - m_callee_fndecl, m_arg); + if (m_first_close_event.known_p ()) + return ev.formatted_print ( + "%qE on closed file descriptor %qE; %qs was at %@", m_callee_fndecl, + m_arg, "close", &m_first_close_event); + else + return ev.formatted_print ("%qE on closed file descriptor %qE", + m_callee_fndecl, m_arg); } private: + diagnostic_event_id_t m_first_close_event; const tree m_callee_fndecl; }; diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c index a973704..c992db6 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-4.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-4.c @@ -45,7 +45,7 @@ test_3 (const char *path, void *buf) { close(fd); /* {dg-message "\\(2\\) closed here"} */ read(fd, buf, 1); /* { dg-warning "'read' on closed file descriptor 'fd'" } */ - /* {dg-message "\\(3\\) 'read' on closed file descriptor 'fd' here" "" {target *-*-*} .-1 } */ + /* {dg-message "\\(3\\) 'read' on closed file descriptor 'fd'; 'close' was at \\(2\\)" "" {target *-*-*} .-1 } */ } } @@ -57,6 +57,6 @@ test_4 (const char *path, void *buf) { close(fd); /* {dg-message "\\(2\\) closed here"} */ write(fd, buf, 1); /* { dg-warning "'write' on closed file descriptor 'fd'" } */ - /* {dg-message "\\(3\\) 'write' on closed file descriptor 'fd' here" "" {target *-*-*} .-1 } */ + /* {dg-message "\\(3\\) 'write' on closed file descriptor 'fd'; 'close' was at \\(2\\)" "" {target *-*-*} .-1 } */ } } -- cgit v1.1 From 3a6de2b2db500d76ac141a6ef85d336bd0f8430b Mon Sep 17 00:00:00 2001 From: Immad Mir Date: Wed, 6 Jul 2022 21:37:14 +0530 Subject: analyzer: reorder initialization of state m_invalid in sm-fd.cc [PR106184] This patch reorders the initialization of state m_invalid in sm-fd.cc so that the order of initializers is same as the ordering of the fields in the class decl. gcc/analyzer/ChangeLog: PR analyzer/106184 * sm-fd.cc (fd_state_machine): Change ordering of initialization of state m_invalid so that the order of initializers is same as the ordering of the fields in the class decl. Signed-off-by: Immad Mir --- gcc/analyzer/sm-fd.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/analyzer/sm-fd.cc b/gcc/analyzer/sm-fd.cc index 8196d33..8e4300b 100644 --- a/gcc/analyzer/sm-fd.cc +++ b/gcc/analyzer/sm-fd.cc @@ -551,11 +551,12 @@ fd_state_machine::fd_state_machine (logger *logger) m_unchecked_read_write (add_state ("fd-unchecked-read-write")), m_unchecked_read_only (add_state ("fd-unchecked-read-only")), m_unchecked_write_only (add_state ("fd-unchecked-write-only")), - m_invalid (add_state ("fd-invalid")), m_valid_read_write (add_state ("fd-valid-read-write")), m_valid_read_only (add_state ("fd-valid-read-only")), m_valid_write_only (add_state ("fd-valid-write-only")), - m_closed (add_state ("fd-closed")), m_stop (add_state ("fd-stop")) + m_invalid (add_state ("fd-invalid")), + m_closed (add_state ("fd-closed")), + m_stop (add_state ("fd-stop")) { } -- cgit v1.1 From acb696b792eeab92167f516b5236ed9242e62deb Mon Sep 17 00:00:00 2001 From: Immad Mir Date: Wed, 6 Jul 2022 21:38:27 +0530 Subject: analyzer: add testcase of using closed fd without warning. This patch adds a testcase for passing a closed fd to a function that does not emit any warning. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-4.c: Add a new testcase to demonstrate passsing of a closed file descriptor to a function that does not emit any warning. Signed-off-by: Immad Mir --- gcc/testsuite/gcc.dg/analyzer/fd-4.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c index c992db6..fcfa616 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-4.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-4.c @@ -1,3 +1,5 @@ +#include + int open(const char *, int mode); void close(int fd); int write (int fd, void *buf, int nbytes); @@ -60,3 +62,11 @@ test_4 (const char *path, void *buf) /* {dg-message "\\(3\\) 'write' on closed file descriptor 'fd'; 'close' was at \\(2\\)" "" {target *-*-*} .-1 } */ } } + +void +test_5 (const char *path) +{ + int fd = open (path, O_RDWR); + close(fd); + printf("%d", fd); /* { dg-bogus "'printf' on a closed file descriptor 'fd'" } */ +} \ No newline at end of file -- cgit v1.1 From c785204735b2cace9a676969de0967105a06438d Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Fri, 1 Jul 2022 17:40:18 +0200 Subject: d: Build the D sources in the front-end with -fno-exceptions The D front-end does not use exceptions, but it still requires RTTI for some lowerings of convenience language features. Enforce it with by building with `-fno-exceptions'. gcc/d/ChangeLog: * Make-lang.in (NOEXCEPTION_DFLAGS): Define. (ALL_DFLAGS): Add NO_EXCEPTION_DFLAGS. --- gcc/d/Make-lang.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in index 9f13437..6f9b2e5 100644 --- a/gcc/d/Make-lang.in +++ b/gcc/d/Make-lang.in @@ -57,8 +57,12 @@ CHECKING_DFLAGS = endif WARN_DFLAGS = -Wall -Wdeprecated $(NOCOMMON_FLAG) +# D front-end doesn't use exceptions, but it does require RTTI. +NOEXCEPTION_DFLAGS = $(filter-out -fno-rtti, $(NOEXCEPTION_FLAGS)) + ALL_DFLAGS = $(DFLAGS-$@) $(GDCFLAGS) -fversion=IN_GCC $(CHECKING_DFLAGS) \ - $(PICFLAG) $(ALIASING_FLAGS) $(COVERAGE_FLAGS) $(WARN_DFLAGS) + $(PICFLAG) $(ALIASING_FLAGS) $(NOEXCEPTION_DFLAGS) $(COVERAGE_FLAGS) \ + $(WARN_DFLAGS) DCOMPILE.base = $(GDC) $(NO_PIE_CFLAGS) -c $(ALL_DFLAGS) -o $@ DCOMPILE = $(DCOMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo -- cgit v1.1 From 208fbc779c713715da1465a1a2c6710c084c9b05 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 6 Jul 2022 19:45:28 +0200 Subject: d: Merge upstream dmd 56589f0f4, druntime 651389b5, phobos 1516ecad9. D front-end changes: - Import latest bug fixes to mainline. D runtime changes: - Import latest bug fixes to mainline. Phobos changes: - Import latest bug fixes to mainline. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 56589f0f4. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 651389b5. * src/MERGE: Merge upstream phobos 1516ecad9. --- gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/cparse.d | 118 +++++++++++++++++++-- gcc/d/dmd/dmodule.d | 2 +- gcc/d/dmd/expressionsem.d | 8 ++ gcc/d/dmd/globals.d | 2 +- gcc/d/dmd/globals.h | 2 +- gcc/d/dmd/hdrgen.d | 17 ++- gcc/d/dmd/mtype.d | 15 +-- gcc/d/dmd/tokens.d | 5 +- gcc/d/dmd/tokens.h | 1 + gcc/d/dmd/typesem.d | 9 +- gcc/testsuite/gdc.test/compilable/test3004.d | 4 +- gcc/testsuite/gdc.test/compilable/vcg-ast.d | 3 + .../gdc.test/fail_compilation/diag_in_array.d | 20 ++++ 14 files changed, 173 insertions(+), 35 deletions(-) create mode 100644 gcc/testsuite/gdc.test/fail_compilation/diag_in_array.d (limited to 'gcc') diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index f5c42f0..8324c1c 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -529110f66d7d301d62d943a4e4482edaddeb46ea +56589f0f4d724c1c8022c57509a243f16a04228a The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/cparse.d b/gcc/d/dmd/cparse.d index dff7634..a3bebb7 100644 --- a/gcc/d/dmd/cparse.d +++ b/gcc/d/dmd/cparse.d @@ -1619,6 +1619,12 @@ final class CParser(AST) : Parser!AST return; } + if (token.value == TOK.__pragma) + { + uupragmaDirective(scanloc); + return; + } + if (token.value == TOK._import) // import declaration extension { auto a = parseImport(); @@ -2322,6 +2328,14 @@ final class CParser(AST) : Parser!AST break; } + case TOK.__declspec: + { + /* Microsoft extension + */ + cparseDeclspec(specifier); + break; + } + case TOK.typeof_: { nextToken(); @@ -3042,9 +3056,13 @@ final class CParser(AST) : Parser!AST * extended-decl-modifier: * dllimport * dllexport + * noreturn + * Params: + * specifier = filled in with the attribute(s) */ - private void cparseDeclspec() + private void cparseDeclspec(ref Specifier specifier) { + //printf("cparseDeclspec()\n"); /* Check for dllexport, dllimport * Ignore the rest */ @@ -3073,6 +3091,11 @@ final class CParser(AST) : Parser!AST dllexport = true; nextToken(); } + else if (token.ident == Id.noreturn) + { + specifier.noreturn = true; + nextToken(); + } else { nextToken(); @@ -3083,8 +3106,8 @@ final class CParser(AST) : Parser!AST else { error("extended-decl-modifier expected"); + break; } - break; } } @@ -4789,6 +4812,8 @@ final class CParser(AST) : Parser!AST // type function itself. if (auto tf = t.isTypeFunction()) tf.next = tf.next.addSTC(STC.const_); + else if (auto tt = t.isTypeTag()) + tt.mod |= MODFlags.const_; else t = t.addSTC(STC.const_); return t; @@ -4961,11 +4986,41 @@ final class CParser(AST) : Parser!AST return true; } } - error("C preprocessor directive `#%s` is not supported", n.toChars()); + if (n.ident != Id.undef) + error("C preprocessor directive `#%s` is not supported", n.toChars()); return false; } /********************************************* + * VC __pragma + * https://docs.microsoft.com/en-us/cpp/preprocessor/pragma-directives-and-the-pragma-keyword?view=msvc-170 + * Scanner is on the `__pragma` + * Params: + * startloc = location to use for error messages + */ + private void uupragmaDirective(const ref Loc startloc) + { + const loc = startloc; + nextToken(); + if (token.value != TOK.leftParenthesis) + { + error(loc, "left parenthesis expected to follow `__pragma`"); + return; + } + nextToken(); + if (token.value == TOK.identifier && token.ident == Id.pack) + pragmaPack(startloc, false); + else + error(loc, "unrecognized __pragma"); + if (token.value != TOK.rightParenthesis) + { + error(loc, "right parenthesis expected to close `__pragma(...)`"); + return; + } + nextToken(); + } + + /********************************************* * C11 6.10.6 Pragma directive * # pragma pp-tokens(opt) new-line * The C preprocessor sometimes leaves pragma directives in @@ -4977,7 +5032,7 @@ final class CParser(AST) : Parser!AST Token n; scan(&n); if (n.value == TOK.identifier && n.ident == Id.pack) - return pragmaPack(loc); + return pragmaPack(loc, true); if (n.value != TOK.endOfLine) skipToNextLine(); } @@ -4989,10 +5044,27 @@ final class CParser(AST) : Parser!AST * Scanner is on the `pack` * Params: * startloc = location to use for error messages + * useScan = use scan() to retrieve next token, instead of nextToken() */ - private void pragmaPack(const ref Loc startloc) + private void pragmaPack(const ref Loc startloc, bool useScan) { const loc = startloc; + + /* Pull tokens from scan() or nextToken() + */ + void scan(Token* t) + { + if (useScan) + { + Lexer.scan(t); + } + else + { + nextToken(); + *t = token; + } + } + Token n; scan(&n); if (n.value != TOK.leftParenthesis) @@ -5155,13 +5227,35 @@ final class CParser(AST) : Parser!AST { if (!defines || defines.length < 10) // minimum length of a #define line return; - const length = defines.length; - defines.writeByte(0); - auto slice = defines.peekChars()[0 .. length]; + OutBuffer* buf = defines; + defines = null; // prevent skipToNextLine() and parseSpecialTokenSequence() + // from appending to slice[] + const length = buf.length; + buf.writeByte(0); + auto slice = buf.peekChars()[0 .. length]; resetDefineLines(slice); // reset lexer const(char)* endp = &slice[length - 7]; + size_t[void*] defineTab; // hash table of #define's turned into Symbol's + // indexed by Identifier, returns index into symbols[] + // The memory for this is leaked + + void addVar(AST.VarDeclaration v) + { + /* If it's already defined, replace the earlier + * definition + */ + if (size_t* pd = cast(void*)v.ident in defineTab) + { + //printf("replacing %s\n", v.toChars()); + (*symbols)[*pd] = v; + return; + } + defineTab[cast(void*)v.ident] = symbols.length; + symbols.push(v); + } + Token n; while (p < endp) @@ -5200,7 +5294,7 @@ final class CParser(AST) : Parser!AST */ AST.Expression e = new AST.IntegerExp(scanloc, intvalue, t); auto v = new AST.VarDeclaration(scanloc, t, id, new AST.ExpInitializer(scanloc, e), STC.manifest); - symbols.push(v); + addVar(v); nextDefineLine(); continue; } @@ -5223,7 +5317,7 @@ final class CParser(AST) : Parser!AST */ AST.Expression e = new AST.RealExp(scanloc, floatvalue, t); auto v = new AST.VarDeclaration(scanloc, t, id, new AST.ExpInitializer(scanloc, e), STC.manifest); - symbols.push(v); + addVar(v); nextDefineLine(); continue; } @@ -5241,7 +5335,7 @@ final class CParser(AST) : Parser!AST */ AST.Expression e = new AST.StringExp(scanloc, str[0 .. len], len, 1, postfix); auto v = new AST.VarDeclaration(scanloc, null, id, new AST.ExpInitializer(scanloc, e), STC.manifest); - symbols.push(v); + addVar(v); nextDefineLine(); continue; } @@ -5263,6 +5357,8 @@ final class CParser(AST) : Parser!AST } nextDefineLine(); } + + defines = buf; } //} diff --git a/gcc/d/dmd/dmodule.d b/gcc/d/dmd/dmodule.d index f8e5073a..0be938f 100644 --- a/gcc/d/dmd/dmodule.d +++ b/gcc/d/dmd/dmodule.d @@ -680,7 +680,7 @@ extern (C++) final class Module : Package FileName.equalsExt(srcfile.toString(), c_ext) && FileName.exists(srcfile.toString())) { - filename = global.preprocess(srcfile, loc, global.params.cppswitches, ifile, &defines); // run C preprocessor + filename = global.preprocess(srcfile, loc, ifile, &defines); // run C preprocessor } if (auto result = global.fileManager.lookup(filename)) diff --git a/gcc/d/dmd/expressionsem.d b/gcc/d/dmd/expressionsem.d index 99e003b..35ba5fa 100644 --- a/gcc/d/dmd/expressionsem.d +++ b/gcc/d/dmd/expressionsem.d @@ -11689,6 +11689,14 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor case Terror: return setError(); + case Tarray, Tsarray: + result = exp.incompatibleTypes(); + exp.errorSupplemental("`in` is only allowed on associative arrays"); + const(char)* slice = (t2b.ty == Tsarray) ? "[]" : ""; + exp.errorSupplemental("perhaps use `std.algorithm.find(%s, %s%s)` instead", + exp.e1.toChars(), exp.e2.toChars(), slice); + return; + default: result = exp.incompatibleTypes(); return; diff --git a/gcc/d/dmd/globals.d b/gcc/d/dmd/globals.d index 3766a0b..05886f9 100644 --- a/gcc/d/dmd/globals.d +++ b/gcc/d/dmd/globals.d @@ -299,7 +299,7 @@ extern (C++) struct Global enum recursionLimit = 500; /// number of recursive template expansions before abort - extern (C++) FileName function(FileName, ref const Loc, ref Array!(const(char)*) cppswitches, out bool, OutBuffer* defines) preprocess; + extern (C++) FileName function(FileName, ref const Loc, out bool, OutBuffer*) preprocess; nothrow: diff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h index 07298dd..41472b2 100644 --- a/gcc/d/dmd/globals.h +++ b/gcc/d/dmd/globals.h @@ -272,7 +272,7 @@ struct Global FileManager* fileManager; - FileName (*preprocess)(FileName, const Loc&, Array& cppswitches, bool&, OutBuffer&); + FileName (*preprocess)(FileName, const Loc&, bool&, OutBuffer&); /* Start gagging. Return the current number of gagged errors */ diff --git a/gcc/d/dmd/hdrgen.d b/gcc/d/dmd/hdrgen.d index fcc9b61..680d9c8 100644 --- a/gcc/d/dmd/hdrgen.d +++ b/gcc/d/dmd/hdrgen.d @@ -1449,7 +1449,20 @@ public: buf.writestring(" = "); if (stcToBuffer(buf, d.storage_class)) buf.writeByte(' '); - d.aliassym.accept(this); + /* + https://issues.dlang.org/show_bug.cgi?id=23223 + https://issues.dlang.org/show_bug.cgi?id=23222 + This special case (initially just for modules) avoids some segfaults + and nicer -vcg-ast output. + */ + if (d.aliassym.isModule()) + { + buf.writestring(d.aliassym.ident.toString()); + } + else + { + d.aliassym.accept(this); + } } else if (d.type.ty == Tfunction) { @@ -3916,6 +3929,8 @@ private void typeToBufferx(Type t, OutBuffer* buf, HdrGenState* hgs) void visitTag(TypeTag t) { + if (t.mod & MODFlags.const_) + buf.writestring("const "); buf.writestring(Token.toChars(t.tok)); buf.writeByte(' '); if (t.id) diff --git a/gcc/d/dmd/mtype.d b/gcc/d/dmd/mtype.d index 6b5389d..860cfa9 100644 --- a/gcc/d/dmd/mtype.d +++ b/gcc/d/dmd/mtype.d @@ -4437,15 +4437,7 @@ extern (C++) final class TypeFunction : TypeNext // Check escaping through `this` if (tthis && tthis.isMutable()) { - auto tb = tthis.toBasetype(); - AggregateDeclaration ad; - if (auto tc = tb.isTypeClass()) - ad = tc.sym; - else if (auto ts = tb.isTypeStruct()) - ad = ts.sym; - else - assert(0); - foreach (VarDeclaration v; ad.fields) + foreach (VarDeclaration v; isAggregate(tthis).fields) { if (v.hasPointers()) return stc; @@ -6655,16 +6647,18 @@ extern (C++) final class TypeTag : Type Type resolved; /// type after semantic() in case there are more others /// pointing to this instance, which can happen with /// struct S { int a; } s1, *s2; + MOD mod; /// modifiers to apply after type is resolved (only MODFlags.const_ at the moment) extern (D) this(const ref Loc loc, TOK tok, Identifier id, Type base, Dsymbols* members) { - //printf("TypeTag %p\n", this); + //printf("TypeTag ctor %s %p\n", id ? id.toChars() : "null".ptr, this); super(Ttag); this.loc = loc; this.tok = tok; this.id = id; this.base = base; this.members = members; + this.mod = 0; } override const(char)* kind() const @@ -6674,6 +6668,7 @@ extern (C++) final class TypeTag : Type override TypeTag syntaxCopy() { + //printf("TypeTag syntaxCopy()\n"); // No semantic analysis done, no need to copy return this; } diff --git a/gcc/d/dmd/tokens.d b/gcc/d/dmd/tokens.d index 170a534..86abedf 100644 --- a/gcc/d/dmd/tokens.d +++ b/gcc/d/dmd/tokens.d @@ -273,6 +273,7 @@ enum TOK : ubyte __cdecl, __declspec, __stdcall, + __pragma, __attribute__, } @@ -582,6 +583,7 @@ private immutable TOK[] keywords = TOK.__cdecl, TOK.__declspec, TOK.__stdcall, + TOK.__pragma, TOK.__attribute__, ]; @@ -610,7 +612,7 @@ static immutable TOK[TOK.max + 1] Ckeywords = restrict, return_, int16, signed, sizeof_, static_, struct_, switch_, typedef_, union_, unsigned, void_, volatile, while_, asm_, typeof_, _Alignas, _Alignof, _Atomic, _Bool, _Complex, _Generic, _Imaginary, _Noreturn, - _Static_assert, _Thread_local, _import, __cdecl, __declspec, __stdcall, __attribute__ ]; + _Static_assert, _Thread_local, _import, __cdecl, __declspec, __stdcall, __pragma, __attribute__ ]; foreach (kw; Ckwds) tab[kw] = cast(TOK) kw; @@ -880,6 +882,7 @@ extern (C++) struct Token TOK.__cdecl : "__cdecl", TOK.__declspec : "__declspec", TOK.__stdcall : "__stdcall", + TOK.__pragma : "__pragma", TOK.__attribute__ : "__attribute__", ]; diff --git a/gcc/d/dmd/tokens.h b/gcc/d/dmd/tokens.h index f9b6062..35fd68b 100644 --- a/gcc/d/dmd/tokens.h +++ b/gcc/d/dmd/tokens.h @@ -282,6 +282,7 @@ enum class TOK : unsigned char cdecl_, declspec, stdcall, + pragma, attribute__, MAX, diff --git a/gcc/d/dmd/typesem.d b/gcc/d/dmd/typesem.d index 8cacdb1..0469b92 100644 --- a/gcc/d/dmd/typesem.d +++ b/gcc/d/dmd/typesem.d @@ -1778,8 +1778,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc) { /* struct S s, *p; */ - //printf("already resolved\n"); - return mtype.resolved; + return mtype.resolved.addSTC(mtype.mod); } /* Find the current scope by skipping tag scopes. @@ -1850,7 +1849,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc) { mtype.id = Identifier.generateId("__tag"[]); declareTag(); - return mtype.resolved; + return mtype.resolved.addSTC(mtype.mod); } /* look for pre-existing declaration @@ -1863,7 +1862,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc) if (mtype.tok == TOK.enum_ && !mtype.members) .error(mtype.loc, "`enum %s` is incomplete without members", mtype.id.toChars()); // C11 6.7.2.3-3 declareTag(); - return mtype.resolved; + return mtype.resolved.addSTC(mtype.mod); } /* A redeclaration only happens if both declarations are in @@ -1963,7 +1962,7 @@ extern(C++) Type typeSemantic(Type type, const ref Loc loc, Scope* sc) declareTag(); } } - return mtype.resolved; + return mtype.resolved.addSTC(mtype.mod); } switch (type.ty) diff --git a/gcc/testsuite/gdc.test/compilable/test3004.d b/gcc/testsuite/gdc.test/compilable/test3004.d index 9912b88..23ec46f 100644 --- a/gcc/testsuite/gdc.test/compilable/test3004.d +++ b/gcc/testsuite/gdc.test/compilable/test3004.d @@ -1,15 +1,13 @@ // https://issues.dlang.org/show_bug.cgi?id=3004 /* REQUIRED_ARGS: -ignore -v -TRANSFORM_OUTPUT: remove_lines("^(predefs|binary|version|config|DFLAG|parse|import|semantic|entry|library|function object|\s*$)") +TRANSFORM_OUTPUT: remove_lines("^(predefs|binary|version|config|DFLAG|parse|import|semantic|entry|library|function object|function core|\s*$)") TEST_OUTPUT: --- pragma GNU_attribute (__error) pragma GNU_attribute (__error) code test3004 function test3004.test -function core.internal.array.appending._d_arrayappendcTXImpl!(char[], char)._d_arrayappendcTX -function core.internal.array.utils._d_HookTraceImpl!(char[], _d_arrayappendcTX, "Cannot append to array if compiling without support for runtime type information!")._d_HookTraceImpl --- */ diff --git a/gcc/testsuite/gdc.test/compilable/vcg-ast.d b/gcc/testsuite/gdc.test/compilable/vcg-ast.d index cbb150c..4a7b8bc 100644 --- a/gcc/testsuite/gdc.test/compilable/vcg-ast.d +++ b/gcc/testsuite/gdc.test/compilable/vcg-ast.d @@ -7,6 +7,9 @@ TEST_OUTPUT_FILE: extra-files/vcg-ast.d.cg module vcg; +alias xyz = __traits(parent, {}); +alias named = vcg; + template Seq(A...) { alias Seq = A; diff --git a/gcc/testsuite/gdc.test/fail_compilation/diag_in_array.d b/gcc/testsuite/gdc.test/fail_compilation/diag_in_array.d new file mode 100644 index 0000000..f869b32 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/diag_in_array.d @@ -0,0 +1,20 @@ +/** +TEST_OUTPUT: +--- +fail_compilation/diag_in_array.d(17): Error: incompatible types for `(3) in (a)`: `int` and `int[4]` +fail_compilation/diag_in_array.d(17): `in` is only allowed on associative arrays +fail_compilation/diag_in_array.d(17): perhaps use `std.algorithm.find(3, a[])` instead +fail_compilation/diag_in_array.d(19): Error: incompatible types for `("s") in (b)`: `string` and `string[]` +fail_compilation/diag_in_array.d(19): `in` is only allowed on associative arrays +fail_compilation/diag_in_array.d(19): perhaps use `std.algorithm.find("s", b)` instead +--- +*/ + +void main() +{ + int[4] a; + string[] b; + if (3 in a) + return; + auto c = "s" in b; +} -- cgit v1.1 From e46f4d7430c5210465791603735ab219ef263c51 Mon Sep 17 00:00:00 2001 From: Lewis Hyatt Date: Tue, 5 Jul 2022 17:15:28 -0400 Subject: diagnostics: Honor #pragma GCC diagnostic in the preprocessor [PR53431] As discussed on PR c++/53431, currently, "#pragma GCC diagnostic" does not always take effect for diagnostics generated by libcpp. The reason is that libcpp itself does not interpret this pragma and only sends it on to the frontend, hence the pragma is only honored if the frontend arranges for it. The C frontend does process the pragma immediately (more or less) after seeing the token, so things work fine there. The PR points out that it doesn't work for C++, because the C++ frontend doesn't handle anything until it has read all the tokens from libcpp. The underlying problem is not C++-specific, though, and for instance, gcc -E has the same issue. This commit fixes the PR by adding the concept of an early pragma handler that can be registered by frontends, which gives them a chance to process diagnostic pragmas from libcpp before it is too late for them to take effect. The C++ and preprocess-only frontends are modified to use early pragmas and correct the behavior. gcc/c-family/ChangeLog: PR preprocessor/53920 PR c++/53431 * c-common.cc (c_option_is_from_cpp_diagnostics): New function. * c-common.h (c_option_is_from_cpp_diagnostics): Declare. (c_pp_stream_token): Declare. * c-ppoutput.cc (init_pp_output): Refactor logic about skipping pragmas to... (should_output_pragmas): ...here. New function. (token_streamer::stream): Support handling early pragmas. (do_line_change): Likewise. (c_pp_stream_token): New function. * c-pragma.cc (struct pragma_diagnostic_data): New helper class. (pragma_diagnostic_lex_normal): New function. Moved logic for interpreting GCC diagnostic pragmas here. (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas directly from libcpp. (handle_pragma_diagnostic): Refactor into helper function... (handle_pragma_diagnostic_impl): ...here. New function. (handle_pragma_diagnostic_early): New function. (handle_pragma_diagnostic_early_pp): New function. (struct pragma_ns_name): Renamed to... (struct pragma_pp_data): ...this. Add new "early_handler" member. (c_register_pragma_1): Support early pragmas in the preprocessor. (c_register_pragma_with_early_handler): New function. (c_register_pragma): Support the new early handlers in struct internal_pragma_handler. (c_register_pragma_with_data): Likewise. (c_register_pragma_with_expansion): Likewise. (c_register_pragma_with_expansion_and_data): Likewise. (c_invoke_early_pragma_handler): New function. (c_pp_invoke_early_pragma_handler): New function. (init_pragma): Add early pragma support for diagnostic pragmas. * c-pragma.h (struct internal_pragma_handler): Add new early handler members. (c_register_pragma_with_early_handler): Declare. (c_invoke_early_pragma_handler): Declare. (c_pp_invoke_early_pragma_handler): Declare. gcc/cp/ChangeLog: PR c++/53431 * parser.cc (cp_parser_pragma_kind): Move earlier in the file. (cp_lexer_handle_early_pragma): New function. (cp_lexer_new_main): Support parsing and handling early pragmas. (c_parse_file): Adapt to changes in cp_lexer_new_main. gcc/testsuite/ChangeLog: PR preprocessor/53920 PR c++/53431 * c-c++-common/pragma-diag-11.c: New test. * c-c++-common/pragma-diag-12.c: New test. * c-c++-common/pragma-diag-13.c: New test. --- gcc/c-family/c-common.cc | 14 + gcc/c-family/c-common.h | 2 + gcc/c-family/c-ppoutput.cc | 78 +++-- gcc/c-family/c-pragma.cc | 425 +++++++++++++++++++++------- gcc/c-family/c-pragma.h | 13 +- gcc/cp/parser.cc | 89 ++++-- gcc/testsuite/c-c++-common/pragma-diag-11.c | 13 + gcc/testsuite/c-c++-common/pragma-diag-12.c | 10 + gcc/testsuite/c-c++-common/pragma-diag-13.c | 4 + 9 files changed, 506 insertions(+), 142 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/pragma-diag-11.c create mode 100644 gcc/testsuite/c-c++-common/pragma-diag-12.c create mode 100644 gcc/testsuite/c-c++-common/pragma-diag-13.c (limited to 'gcc') diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc index c9c9e72..1b8e73f 100644 --- a/gcc/c-family/c-common.cc +++ b/gcc/c-family/c-common.cc @@ -6611,6 +6611,20 @@ c_option_controlling_cpp_diagnostic (enum cpp_warning_reason reason) return 0; } +/* Return TRUE if the given option index corresponds to a diagnostic + issued by libcpp. Linear search seems fine for now. */ +bool +c_option_is_from_cpp_diagnostics (int option_index) +{ + for (auto entry = cpp_reason_option_codes; entry->reason != CPP_W_NONE; + ++entry) + { + if (entry->option_code == option_index) + return true; + } + return false; +} + /* Callback from cpp_diagnostic for PFILE to print diagnostics from the preprocessor. The diagnostic is of type LEVEL, with REASON set to the reason code if LEVEL is represents a warning, at location diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index a1e6a55..c090084 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -911,6 +911,7 @@ extern tree fold_for_warn (tree); extern tree c_common_get_narrower (tree, int *); extern bool get_attribute_operand (tree, unsigned HOST_WIDE_INT *); extern void c_common_finalize_early_debug (void); +extern bool c_option_is_from_cpp_diagnostics (int); /* Used by convert_and_check; in front ends. */ extern tree convert_init (tree, tree); @@ -1191,6 +1192,7 @@ extern void preprocess_file (cpp_reader *); extern void pp_file_change (const line_map_ordinary *); extern void pp_dir_change (cpp_reader *, const char *); extern bool check_missing_format_attribute (tree, tree); +extern void c_pp_stream_token (cpp_reader *, const cpp_token *, location_t loc); /* In c-omp.cc */ typedef wide_int_bitmask omp_clause_mask; diff --git a/gcc/c-family/c-ppoutput.cc b/gcc/c-family/c-ppoutput.cc index 9de46a9..cd38c96 100644 --- a/gcc/c-family/c-ppoutput.cc +++ b/gcc/c-family/c-ppoutput.cc @@ -25,6 +25,8 @@ #include "c-pragma.h" /* For parse_in. */ #include "file-prefix-map.h" /* remap_macro_filename() */ +class token_streamer; + /* Encapsulates state used to convert a stream of tokens into a text file. */ static struct @@ -38,6 +40,8 @@ static struct bool prev_was_system_token; /* True if the previous token was a system token.*/ const char *src_file; /* Current source file. */ + token_streamer *streamer; /* Instance of class token_streamer using this + object. */ } print; /* Defined and undefined macros being queued for output with -dU at @@ -110,6 +114,14 @@ preprocess_file (cpp_reader *pfile) putc ('\n', print.outf); } +/* Don't emit #pragma or #ident directives if we are processing + assembly language; the assembler may choke on them. */ +static bool +should_output_pragmas () +{ + return cpp_get_options (parse_in)->lang != CLK_ASM; +} + /* Set up the callbacks as appropriate. */ void init_pp_output (FILE *out_stream) @@ -119,9 +131,7 @@ init_pp_output (FILE *out_stream) if (!flag_no_output) { cb->line_change = cb_line_change; - /* Don't emit #pragma or #ident directives if we are processing - assembly language; the assembler may choke on them. */ - if (cpp_get_options (parse_in)->lang != CLK_ASM) + if (should_output_pragmas ()) { cb->ident = cb_ident; cb->def_pragma = cb_def_pragma; @@ -163,6 +173,7 @@ init_pp_output (FILE *out_stream) print.first_time = 1; print.src_file = ""; print.prev_was_system_token = false; + print.streamer = nullptr; } // FIXME: Ideally we'd just turn the entirety of the print struct into @@ -183,6 +194,8 @@ class token_streamer in_pragma (false), line_marker_emitted (false) { + gcc_assert (!print.streamer); + print.streamer = this; } void begin_pragma () @@ -235,7 +248,7 @@ token_streamer::stream (cpp_reader *pfile, const cpp_token *token, print.printed = true; } } - else if (token->flags & PREV_WHITE) + else if (token->flags & PREV_WHITE && token->type != CPP_PRAGMA) { unsigned src_line = LOCATION_LINE (loc); @@ -252,22 +265,28 @@ token_streamer::stream (cpp_reader *pfile, const cpp_token *token, print.prev = token; if (token->type == CPP_PRAGMA) { - const char *space; - const char *name; - - line_marker_emitted = maybe_print_line (token->src_loc); - fputs ("#pragma ", print.outf); - c_pp_lookup_pragma (token->val.pragma, &space, &name); - if (space) - fprintf (print.outf, "%s %s", space, name); - else - fprintf (print.outf, "%s", name); - print.printed = true; in_pragma = true; + if (should_output_pragmas ()) + { + const char *space; + const char *name; + + line_marker_emitted = maybe_print_line (token->src_loc); + fputs ("#pragma ", print.outf); + c_pp_lookup_pragma (token->val.pragma, &space, &name); + if (space) + fprintf (print.outf, "%s %s", space, name); + else + fprintf (print.outf, "%s", name); + print.printed = true; + } + if (token->val.pragma >= PRAGMA_FIRST_EXTERNAL) + c_pp_invoke_early_pragma_handler (token->val.pragma); } else if (token->type == CPP_PRAGMA_EOL) { - maybe_print_line (UNKNOWN_LOCATION); + if (should_output_pragmas ()) + maybe_print_line (UNKNOWN_LOCATION); in_pragma = false; } else @@ -287,9 +306,12 @@ token_streamer::stream (cpp_reader *pfile, const cpp_token *token, do_line_change (pfile, token, loc, false); print.prev_was_system_token = !!in_system_header_at (loc); } - cpp_output_token (token, print.outf); - line_marker_emitted = false; - print.printed = true; + if (!in_pragma || should_output_pragmas ()) + { + cpp_output_token (token, print.outf); + line_marker_emitted = false; + print.printed = true; + } } /* CPP_COMMENT tokens and raw-string literal tokens can have @@ -561,8 +583,12 @@ do_line_change (cpp_reader *pfile, const cpp_token *token, one space per column greater than 2, since scan_translation_unit will provide a space if PREV_WHITE. Don't bother trying to reconstruct tabs; we can't get it right in general, and nothing - ought to care. Some things do care; the fault lies with them. */ - if (!CPP_OPTION (pfile, traditional)) + ought to care. Some things do care; the fault lies with them. + + Also do not output the spaces if this is a CPP_PRAGMA token. In this + case, libcpp has provided the location of the first token after #pragma, + so we would start at the wrong column. */ + if (!CPP_OPTION (pfile, traditional) && token->type != CPP_PRAGMA) { int spaces = LOCATION_COLUMN (src_loc) - 2; print.printed = true; @@ -782,6 +808,16 @@ cb_def_pragma (cpp_reader *pfile, location_t line) print.src_line++; } +/* Stream a token as if we had seen it directly ourselves; needed + in case a token was lexed externally, e.g. while processing a + pragma. */ +void +c_pp_stream_token (cpp_reader *pfile, const cpp_token *tok, location_t loc) +{ + gcc_assert (print.streamer); + print.streamer->stream (pfile, tok, loc); +} + /* Dump out the hash table. */ static int dump_macro (cpp_reader *pfile, cpp_hashnode *node, void *v ATTRIBUTE_UNUSED) diff --git a/gcc/c-family/c-pragma.cc b/gcc/c-family/c-pragma.cc index cc05b25..62bce2e 100644 --- a/gcc/c-family/c-pragma.cc +++ b/gcc/c-family/c-pragma.cc @@ -764,139 +764,324 @@ handle_pragma_visibility (cpp_reader *) warning (OPT_Wpragmas, "junk at end of %<#pragma GCC visibility%>"); } +/* Helper routines for parsing #pragma GCC diagnostic. */ +class pragma_diagnostic_data +{ + pragma_diagnostic_data (const pragma_diagnostic_data &) = delete; + pragma_diagnostic_data& operator= (const pragma_diagnostic_data &) = delete; + +public: + bool valid; + location_t loc_kind, loc_option; + enum pd_kind_t + { + PK_INVALID, + PK_PUSH, + PK_POP, + PK_IGNORED_ATTRIBUTES, + PK_DIAGNOSTIC, + } pd_kind; + diagnostic_t diagnostic_kind; + const char *kind_str; + const char *option_str; + bool own_option_str; + + pragma_diagnostic_data () { clear (); } + void clear () + { + valid = false; + loc_kind = loc_option = UNKNOWN_LOCATION; + pd_kind = PK_INVALID; + diagnostic_kind = DK_UNSPECIFIED; + kind_str = option_str = nullptr; + own_option_str = false; + } + + ~pragma_diagnostic_data () + { + if (own_option_str && option_str) + XDELETEVEC (const_cast (option_str)); + } + + void set_kind (const char *kind_string) + { + kind_str = kind_string; + + pd_kind = PK_INVALID; + diagnostic_kind = DK_UNSPECIFIED; + if (strcmp (kind_str, "push") == 0) + pd_kind = PK_PUSH; + else if (strcmp (kind_str, "pop") == 0) + pd_kind = PK_POP; + else if (strcmp (kind_str, "ignored_attributes") == 0) + pd_kind = PK_IGNORED_ATTRIBUTES; + else if (strcmp (kind_str, "error") == 0) + { + pd_kind = PK_DIAGNOSTIC; + diagnostic_kind = DK_ERROR; + } + else if (strcmp (kind_str, "warning") == 0) + { + pd_kind = PK_DIAGNOSTIC; + diagnostic_kind = DK_WARNING; + } + else if (strcmp (kind_str, "ignored") == 0) + { + pd_kind = PK_DIAGNOSTIC; + diagnostic_kind = DK_IGNORED; + } + } + + bool needs_option () const + { + return pd_kind == PK_IGNORED_ATTRIBUTES + || pd_kind == PK_DIAGNOSTIC; + } + +}; + +/* When compiling normally, use pragma_lex () to obtain the needed tokens. + This will call into either the C or C++ frontends as appropriate. */ + static void -handle_pragma_diagnostic(cpp_reader *) +pragma_diagnostic_lex_normal (pragma_diagnostic_data *result) { + result->clear (); tree x; - location_t loc; - enum cpp_ttype token = pragma_lex (&x, &loc); - if (token != CPP_NAME) + auto ttype = pragma_lex (&x, &result->loc_kind); + if (ttype != CPP_NAME) + return; + result->set_kind (IDENTIFIER_POINTER (x)); + if (result->pd_kind == pragma_diagnostic_data::PK_INVALID) + return; + + if (result->needs_option ()) { - warning_at (loc, OPT_Wpragmas, - "missing %, %, %, %, " - "%, or % after " - "%<#pragma GCC diagnostic%>"); - return; + ttype = pragma_lex (&x, &result->loc_option); + if (ttype != CPP_STRING) + return; + result->option_str = TREE_STRING_POINTER (x); } - diagnostic_t kind; - const char *kind_string = IDENTIFIER_POINTER (x); - if (strcmp (kind_string, "error") == 0) - kind = DK_ERROR; - else if (strcmp (kind_string, "warning") == 0) - kind = DK_WARNING; - else if (strcmp (kind_string, "ignored") == 0) - kind = DK_IGNORED; - else if (strcmp (kind_string, "push") == 0) + result->valid = true; +} + +/* When preprocessing only, pragma_lex () is not available, so obtain the + tokens directly from libcpp. We also need to inform the token streamer + about all tokens we lex ourselves here, so it outputs them too; this is + done by calling c_pp_stream_token () for each. + + ??? If we need to support more pragmas in the future, maybe initialize + this_parser with the pragma tokens and call pragma_lex () instead? */ + +static void +pragma_diagnostic_lex_pp (pragma_diagnostic_data *result) +{ + result->clear (); + + auto tok = cpp_get_token_with_location (parse_in, &result->loc_kind); + c_pp_stream_token (parse_in, tok, result->loc_kind); + if (!(tok->type == CPP_NAME || tok->type == CPP_KEYWORD)) + return; + const unsigned char *const kind_u = cpp_token_as_text (parse_in, tok); + result->set_kind ((const char *)kind_u); + if (result->pd_kind == pragma_diagnostic_data::PK_INVALID) + return; + + if (result->needs_option ()) { - diagnostic_push_diagnostics (global_dc, input_location); - return; + tok = cpp_get_token_with_location (parse_in, &result->loc_option); + c_pp_stream_token (parse_in, tok, result->loc_option); + if (tok->type != CPP_STRING) + return; + cpp_string str; + if (!cpp_interpret_string_notranslate (parse_in, &tok->val.str, 1, &str, + CPP_STRING) + || !str.len) + return; + result->option_str = (const char *)str.text; + result->own_option_str = true; } - else if (strcmp (kind_string, "pop") == 0) + + result->valid = true; +} + +/* Handle #pragma GCC diagnostic. Early mode is used by frontends (such as C++) + that do not process the deferred pragma while they are consuming tokens; they + can use early mode to make sure diagnostics affecting the preprocessor itself + are correctly modified by the #pragma. */ +template static void +handle_pragma_diagnostic_impl () +{ + static const bool want_diagnostics = (is_pp || !early); + + pragma_diagnostic_data data; + if (is_pp) + pragma_diagnostic_lex_pp (&data); + else + pragma_diagnostic_lex_normal (&data); + + if (!data.kind_str) { - diagnostic_pop_diagnostics (global_dc, input_location); + if (want_diagnostics) + warning_at (data.loc_kind, OPT_Wpragmas, + "missing %, %, %, %, " + "%, or % after " + "%<#pragma GCC diagnostic%>"); return; } - else if (strcmp (kind_string, "ignored_attributes") == 0) + + switch (data.pd_kind) { - token = pragma_lex (&x, &loc); - if (token != CPP_STRING) - { - warning_at (loc, OPT_Wpragmas, - "missing attribute name after %<#pragma GCC diagnostic " - "ignored_attributes%>"); - return; - } - char *args = xstrdup (TREE_STRING_POINTER (x)); - const size_t l = strlen (args); - if (l == 0) - { - warning_at (loc, OPT_Wpragmas, "missing argument to %<#pragma GCC " - "diagnostic ignored_attributes%>"); - free (args); + + case pragma_diagnostic_data::PK_PUSH: + diagnostic_push_diagnostics (global_dc, input_location); + return; + + case pragma_diagnostic_data::PK_POP: + diagnostic_pop_diagnostics (global_dc, input_location); + return; + + case pragma_diagnostic_data::PK_IGNORED_ATTRIBUTES: + { + if (early) return; - } - else if (args[l - 1] == ',') + if (!data.option_str) + { + warning_at (data.loc_option, OPT_Wpragmas, + "missing attribute name after %<#pragma GCC diagnostic " + "ignored_attributes%>"); + return; + } + char *args = xstrdup (data.option_str); + const size_t l = strlen (args); + if (l == 0) + { + warning_at (data.loc_option, OPT_Wpragmas, + "missing argument to %<#pragma GCC " + "diagnostic ignored_attributes%>"); + free (args); + return; + } + else if (args[l - 1] == ',') + { + warning_at (data.loc_option, OPT_Wpragmas, + "trailing %<,%> in arguments for " + "%<#pragma GCC diagnostic ignored_attributes%>"); + free (args); + return; + } + auto_vec v; + for (char *p = strtok (args, ","); p; p = strtok (NULL, ",")) + v.safe_push (p); + handle_ignored_attributes_option (&v); + free (args); + return; + } + + case pragma_diagnostic_data::PK_DIAGNOSTIC: + if (!data.option_str) { - warning_at (loc, OPT_Wpragmas, "trailing %<,%> in arguments for " - "%<#pragma GCC diagnostic ignored_attributes%>"); - free (args); + if (want_diagnostics) + warning_at (data.loc_option, OPT_Wpragmas, + "missing option after %<#pragma GCC diagnostic%> kind"); return; } - auto_vec v; - for (char *p = strtok (args, ","); p; p = strtok (NULL, ",")) - v.safe_push (p); - handle_ignored_attributes_option (&v); - free (args); - return; - } - else - { - warning_at (loc, OPT_Wpragmas, - "expected %, %, %, %, " - "%, % after " - "%<#pragma GCC diagnostic%>"); - return; - } + break; - token = pragma_lex (&x, &loc); - if (token != CPP_STRING) - { - warning_at (loc, OPT_Wpragmas, - "missing option after %<#pragma GCC diagnostic%> kind"); + default: + if (want_diagnostics) + warning_at (data.loc_kind, OPT_Wpragmas, + "expected %, %, %, %, " + "%, % after " + "%<#pragma GCC diagnostic%>"); return; + } - const char *option_string = TREE_STRING_POINTER (x); + gcc_assert (data.pd_kind == pragma_diagnostic_data::PK_DIAGNOSTIC); + gcc_assert (data.valid); + unsigned int lang_mask = c_common_option_lang_mask () | CL_COMMON; /* option_string + 1 to skip the initial '-' */ - unsigned int option_index = find_opt (option_string + 1, lang_mask); + unsigned int option_index = find_opt (data.option_str + 1, lang_mask); + + if (early && !c_option_is_from_cpp_diagnostics (option_index)) + return; + + const char *arg = NULL; + if (cl_options[option_index].flags & CL_JOINED) + arg = data.option_str + 1 + cl_options[option_index].opt_len; + if (option_index == OPT_SPECIAL_unknown) { - auto_diagnostic_group d; - if (warning_at (loc, OPT_Wpragmas, - "unknown option after %<#pragma GCC diagnostic%> kind")) + if (want_diagnostics) { - option_proposer op; - const char *hint = op.suggest_option (option_string + 1); - if (hint) - inform (loc, "did you mean %<-%s%>?", hint); + auto_diagnostic_group d; + if (warning_at (data.loc_option, OPT_Wpragmas, + "unknown option after %<#pragma GCC diagnostic%> kind")) + { + option_proposer op; + const char *hint = op.suggest_option (data.option_str + 1); + if (hint) + inform (data.loc_option, "did you mean %<-%s%>?", hint); + } } return; } else if (!(cl_options[option_index].flags & CL_WARNING)) { - warning_at (loc, OPT_Wpragmas, - "%qs is not an option that controls warnings", option_string); + if (want_diagnostics) + warning_at (data.loc_option, OPT_Wpragmas, + "%qs is not an option that controls warnings", + data.option_str); return; } else if (!(cl_options[option_index].flags & lang_mask)) { - char *ok_langs = write_langs (cl_options[option_index].flags); - char *bad_lang = write_langs (c_common_option_lang_mask ()); - warning_at (loc, OPT_Wpragmas, - "option %qs is valid for %s but not for %s", - option_string, ok_langs, bad_lang); - free (ok_langs); - free (bad_lang); + if (want_diagnostics) + { + char *ok_langs = write_langs (cl_options[option_index].flags); + char *bad_lang = write_langs (c_common_option_lang_mask ()); + warning_at (data.loc_option, OPT_Wpragmas, + "option %qs is valid for %s but not for %s", + data.option_str, ok_langs, bad_lang); + free (ok_langs); + free (bad_lang); + } return; } struct cl_option_handlers handlers; set_default_handlers (&handlers, NULL); - const char *arg = NULL; - if (cl_options[option_index].flags & CL_JOINED) - arg = option_string + 1 + cl_options[option_index].opt_len; /* FIXME: input_location isn't the best location here, but it is what we used to do here before and changing it breaks e.g. PR69543 and PR69558. */ - control_warning_option (option_index, (int) kind, - arg, kind != DK_IGNORED, + control_warning_option (option_index, (int) data.diagnostic_kind, + arg, data.diagnostic_kind != DK_IGNORED, input_location, lang_mask, &handlers, &global_options, &global_options_set, global_dc); } +static void +handle_pragma_diagnostic (cpp_reader *) +{ + handle_pragma_diagnostic_impl (); +} + +static void +handle_pragma_diagnostic_early (cpp_reader *) +{ + handle_pragma_diagnostic_impl (); +} + +static void +handle_pragma_diagnostic_early_pp (cpp_reader *) +{ + handle_pragma_diagnostic_impl (); +} + /* Parse #pragma GCC target (xxx) to set target specific options. */ static void handle_pragma_target(cpp_reader *) @@ -1332,14 +1517,15 @@ handle_pragma_float_const_decimal64 (cpp_reader *) static vec registered_pragmas; -struct pragma_ns_name +struct pragma_pp_data { const char *space; const char *name; + pragma_handler_1arg early_handler; }; -static vec registered_pp_pragmas; +static vec registered_pp_pragmas; struct omp_pragma_def { const char *name; unsigned int id; }; static const struct omp_pragma_def oacc_pragmas[] = { @@ -1452,14 +1638,14 @@ c_register_pragma_1 (const char *space, const char *name, if (flag_preprocess_only) { - pragma_ns_name ns_name; - - if (!allow_expansion) + if (!(allow_expansion || ihandler.early_handler.handler_1arg)) return; - ns_name.space = space; - ns_name.name = name; - registered_pp_pragmas.safe_push (ns_name); + pragma_pp_data pp_data; + pp_data.space = space; + pp_data.name = name; + pp_data.early_handler = ihandler.early_handler.handler_1arg; + registered_pp_pragmas.safe_push (pp_data); id = registered_pp_pragmas.length (); id += PRAGMA_FIRST_EXTERNAL - 1; } @@ -1485,9 +1671,16 @@ void c_register_pragma (const char *space, const char *name, pragma_handler_1arg handler) { + c_register_pragma_with_early_handler (space, name, handler, nullptr); +} +void c_register_pragma_with_early_handler (const char *space, const char *name, + pragma_handler_1arg handler, + pragma_handler_1arg early_handler) +{ internal_pragma_handler ihandler; ihandler.handler.handler_1arg = handler; + ihandler.early_handler.handler_1arg = early_handler; ihandler.extra_data = false; ihandler.data = NULL; c_register_pragma_1 (space, name, ihandler, false); @@ -1504,6 +1697,7 @@ c_register_pragma_with_data (const char *space, const char *name, internal_pragma_handler ihandler; ihandler.handler.handler_2arg = handler; + ihandler.early_handler.handler_2arg = nullptr; ihandler.extra_data = true; ihandler.data = data; c_register_pragma_1 (space, name, ihandler, false); @@ -1523,6 +1717,7 @@ c_register_pragma_with_expansion (const char *space, const char *name, internal_pragma_handler ihandler; ihandler.handler.handler_1arg = handler; + ihandler.early_handler.handler_1arg = nullptr; ihandler.extra_data = false; ihandler.data = NULL; c_register_pragma_1 (space, name, ihandler, true); @@ -1544,6 +1739,7 @@ c_register_pragma_with_expansion_and_data (const char *space, const char *name, internal_pragma_handler ihandler; ihandler.handler.handler_2arg = handler; + ihandler.early_handler.handler_2arg = nullptr; ihandler.extra_data = true; ihandler.data = data; c_register_pragma_1 (space, name, ihandler, true); @@ -1570,6 +1766,38 @@ c_invoke_pragma_handler (unsigned int id) } } +/* In contrast to the normal handler, the early handler is optional. */ +void +c_invoke_early_pragma_handler (unsigned int id) +{ + internal_pragma_handler *ihandler; + pragma_handler_1arg handler_1arg; + pragma_handler_2arg handler_2arg; + + id -= PRAGMA_FIRST_EXTERNAL; + ihandler = ®istered_pragmas[id]; + if (ihandler->extra_data) + { + handler_2arg = ihandler->early_handler.handler_2arg; + if (handler_2arg) + handler_2arg (parse_in, ihandler->data); + } + else + { + handler_1arg = ihandler->early_handler.handler_1arg; + if (handler_1arg) + handler_1arg (parse_in); + } +} + +void +c_pp_invoke_early_pragma_handler (unsigned int id) +{ + const auto data = ®istered_pp_pragmas[id - PRAGMA_FIRST_EXTERNAL]; + if (data->early_handler) + data->early_handler (parse_in); +} + /* Set up front-end pragmas. */ void init_pragma (void) @@ -1625,7 +1853,14 @@ init_pragma (void) c_register_pragma ("GCC", "visibility", handle_pragma_visibility); - c_register_pragma ("GCC", "diagnostic", handle_pragma_diagnostic); + if (flag_preprocess_only) + c_register_pragma_with_early_handler ("GCC", "diagnostic", + nullptr, + handle_pragma_diagnostic_early_pp); + else + c_register_pragma_with_early_handler ("GCC", "diagnostic", + handle_pragma_diagnostic, + handle_pragma_diagnostic_early); c_register_pragma ("GCC", "target", handle_pragma_target); c_register_pragma ("GCC", "optimize", handle_pragma_optimize); c_register_pragma ("GCC", "push_options", handle_pragma_push_options); diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h index d5d4fe3..de806a6 100644 --- a/gcc/c-family/c-pragma.h +++ b/gcc/c-family/c-pragma.h @@ -219,7 +219,7 @@ union gen_pragma_handler { }; /* Internally used to keep the data of the handler. */ struct internal_pragma_handler { - union gen_pragma_handler handler; + union gen_pragma_handler handler, early_handler; /* Permits to know if handler is a pragma_handler_1arg (extra_data is false) or a pragma_handler_2arg (extra_data is true). */ bool extra_data; @@ -242,6 +242,17 @@ extern void c_register_pragma_with_expansion_and_data (const char *space, void *data); extern void c_invoke_pragma_handler (unsigned int); +/* Early pragma handlers run in addition to the normal ones. They can be used + by frontends such as C++ that may want to process some pragmas during lexing + before they start processing them. */ +extern void +c_register_pragma_with_early_handler (const char *space, const char *name, + pragma_handler_1arg handler, + pragma_handler_1arg early_handler); +extern void c_invoke_early_pragma_handler (unsigned int); +extern void c_pp_invoke_early_pragma_handler (unsigned int); + + extern void maybe_apply_pragma_weak (tree); extern void maybe_apply_pending_pragma_weaks (void); extern tree maybe_apply_renaming_pragma (tree, tree); diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc index 5cd6a52..bf9ea36 100644 --- a/gcc/cp/parser.cc +++ b/gcc/cp/parser.cc @@ -639,8 +639,61 @@ cp_token_is_module_directive (cp_token *token) || token->keyword == RID__IMPORT; } +/* Return TOKEN's pragma_kind if it is CPP_PRAGMA, otherwise + PRAGMA_NONE. */ + +static enum pragma_kind +cp_parser_pragma_kind (cp_token *token) +{ + if (token->type != CPP_PRAGMA) + return PRAGMA_NONE; + /* We smuggled the cpp_token->u.pragma value in an INTEGER_CST. */ + return (enum pragma_kind) TREE_INT_CST_LOW (token->u.value); +} + +/* Handle early pragmas such as #pragma GCC diagnostic, which needs to be done + during preprocessing for the case of preprocessing-related diagnostics. This + is called immediately after pushing the CPP_PRAGMA_EOL token onto + lexer->buffer. */ + +static void +cp_lexer_handle_early_pragma (cp_lexer *lexer) +{ + const auto first_token = lexer->buffer->address (); + const auto last_token = first_token + lexer->buffer->length () - 1; + + /* Back up to the start of the pragma so pragma_lex () can parse it when + c-pragma lib asks it to. */ + auto begin = last_token; + gcc_assert (begin->type == CPP_PRAGMA_EOL); + while (begin->type != CPP_PRAGMA) + { + if (cp_token_is_module_directive (begin)) + return; + gcc_assert (begin != first_token); + --begin; + } + gcc_assert (!lexer->next_token); + gcc_assert (!lexer->last_token); + lexer->next_token = begin; + lexer->last_token = last_token; + + /* Dispatch it. */ + const unsigned int id + = cp_parser_pragma_kind (cp_lexer_consume_token (lexer)); + if (id >= PRAGMA_FIRST_EXTERNAL) + c_invoke_early_pragma_handler (id); + + /* Reset to normal state. */ + lexer->next_token = lexer->last_token = nullptr; +} + +/* The parser. */ +static cp_parser *cp_parser_new (cp_lexer *); +static GTY (()) cp_parser *the_parser; + /* Create a new main C++ lexer, the lexer that gets tokens from the - preprocessor. */ + preprocessor, and also create the main parser. */ static cp_lexer * cp_lexer_new_main (void) @@ -662,6 +715,10 @@ cp_lexer_new_main (void) if (modules_p ()) filter = module_token_cdtor (parse_in, filter); + /* Create the parser now, so we can use it to handle early pragmas. */ + gcc_assert (!the_parser); + the_parser = cp_parser_new (lexer); + /* Get the remaining tokens from the preprocessor. */ while (tok->type != CPP_EOF) { @@ -669,6 +726,11 @@ cp_lexer_new_main (void) /* Process the previous token. */ module_token_lang (tok->type, tok->keyword, tok->u.value, tok->location, filter); + + /* Check for early pragmas that need to be handled now. */ + if (tok->type == CPP_PRAGMA_EOL) + cp_lexer_handle_early_pragma (lexer); + tok = vec_safe_push (lexer->buffer, cp_token ()); cp_lexer_get_preprocessor_token (C_LEX_STRING_NO_JOIN, tok); } @@ -2131,11 +2193,6 @@ pop_unparsed_function_queues (cp_parser *parser) /* Prototypes. */ -/* Constructors and destructors. */ - -static cp_parser *cp_parser_new - (cp_lexer *); - /* Routines to parse various constructs. Those that return `tree' will return the error_mark_node (rather @@ -2898,18 +2955,6 @@ cp_parser_is_keyword (cp_token* token, enum rid keyword) return token->keyword == keyword; } -/* Return TOKEN's pragma_kind if it is CPP_PRAGMA, otherwise - PRAGMA_NONE. */ - -static enum pragma_kind -cp_parser_pragma_kind (cp_token *token) -{ - if (token->type != CPP_PRAGMA) - return PRAGMA_NONE; - /* We smuggled the cpp_token->u.pragma value in an INTEGER_CST. */ - return (enum pragma_kind) TREE_INT_CST_LOW (token->u.value); -} - /* Helper function for cp_parser_error. Having peeked a token of kind TOK1_KIND that might signify a conflict marker, peek successor tokens to determine @@ -47936,11 +47981,7 @@ cp_parser_transaction_cancel (cp_parser *parser) return stmt; } -/* The parser. */ - -static GTY (()) cp_parser *the_parser; - /* Special handling for the first token or line in the file. The first thing in the file might be #pragma GCC pch_preprocess, which loads a PCH file, which is a GC collection point. So we need to handle this @@ -48435,9 +48476,7 @@ c_parse_file (void) /* cp_lexer_new_main is called before doing any GC allocation because tokenization might load a PCH file. */ - cp_lexer *lexer = cp_lexer_new_main (); - - the_parser = cp_parser_new (lexer); + cp_lexer_new_main (); cp_parser_translation_unit (the_parser); class_decl_loc_t::diag_mismatched_tags (); diff --git a/gcc/testsuite/c-c++-common/pragma-diag-11.c b/gcc/testsuite/c-c++-common/pragma-diag-11.c new file mode 100644 index 0000000..2eef5c4 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pragma-diag-11.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-Wundef" } */ +#pragma GCC diagnostic ignored "-Wundef" +#if FOO +#endif +#define P _Pragma ("GCC diagnostic push") _Pragma ("GCC diagnostic warning \"-Wundef\"") +P +#if FOO2 /* { dg-warning "is not defined" } */ +#endif +#pragma GCC diagnostic pop +#if FOO3 +#endif +int i; diff --git a/gcc/testsuite/c-c++-common/pragma-diag-12.c b/gcc/testsuite/c-c++-common/pragma-diag-12.c new file mode 100644 index 0000000..0043a42 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pragma-diag-12.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-E -Wdate-time" } */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdate-time" +const char *date = __DATE__; +_Pragma ("GCC diagnostic pop"); +const char *date2 = __DATE__; /* { dg-warning "__DATE__" } */ +/* { dg-final { scan-assembler "#pragma GCC diagnostic push" } } */ +/* { dg-final { scan-assembler "#pragma GCC diagnostic ignored \"-Wdate-time\"" } } */ +/* { dg-final { scan-assembler "#pragma GCC diagnostic pop" } } */ diff --git a/gcc/testsuite/c-c++-common/pragma-diag-13.c b/gcc/testsuite/c-c++-common/pragma-diag-13.c new file mode 100644 index 0000000..d67b365 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pragma-diag-13.c @@ -0,0 +1,4 @@ +/* { dg-do compile } */ +#pragma GCC diagnostic /* { dg-warning "missing" } */ +#pragma GCC diagnostic warn /* { dg-warning "24:expected" } */ +#pragma GCC diagnostic ignored "-Wfoo" /* { dg-warning "32:unknown" } */ -- cgit v1.1 From 2f0d819a81edee50a98a8a05eed585f0a72bb932 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 5 Jul 2022 11:04:46 +0200 Subject: Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place Clean up for recent commit 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0 "OpenMP: Move omp requires checks to libgomp". gcc/ * omp-general.h (enum omp_requires): Use 'GOMP_REQUIRES_[...]'. include/ * gomp-constants.h (OMP_REQUIRES_[...]): Update comment. --- gcc/omp-general.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/omp-general.h b/gcc/omp-general.h index 7a94831..74e90e1 100644 --- a/gcc/omp-general.h +++ b/gcc/omp-general.h @@ -126,12 +126,12 @@ extern int oacc_get_ifn_dim_arg (const gimple *stmt); enum omp_requires { OMP_REQUIRES_ATOMIC_DEFAULT_MEM_ORDER = 0xf, - OMP_REQUIRES_UNIFIED_ADDRESS = 0x10, - OMP_REQUIRES_UNIFIED_SHARED_MEMORY = 0x20, + OMP_REQUIRES_UNIFIED_ADDRESS = GOMP_REQUIRES_UNIFIED_ADDRESS, + OMP_REQUIRES_UNIFIED_SHARED_MEMORY = GOMP_REQUIRES_UNIFIED_SHARED_MEMORY, OMP_REQUIRES_DYNAMIC_ALLOCATORS = 0x40, - OMP_REQUIRES_REVERSE_OFFLOAD = 0x80, + OMP_REQUIRES_REVERSE_OFFLOAD = GOMP_REQUIRES_REVERSE_OFFLOAD, OMP_REQUIRES_ATOMIC_DEFAULT_MEM_ORDER_USED = 0x100, - OMP_REQUIRES_TARGET_USED = 0x200 + OMP_REQUIRES_TARGET_USED = GOMP_REQUIRES_TARGET_USED, }; extern GTY(()) enum omp_requires omp_requires_mask; -- cgit v1.1 From 3f05e03d6cfdf723ca0556318b6a9aa37be438e7 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 5 Jul 2022 18:23:15 +0200 Subject: Restore 'GOMP_offload_unregister_ver' functionality The recent commit 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0 "OpenMP: Move omp requires checks to libgomp" changed the 'GOMP_offload_register_ver' interface but didn't change 'GOMP_offload_unregister_ver' accordingly, so we're no longer actually unregistering. gcc/ * config/gcn/mkoffload.cc (process_obj): Clarify 'target_data' -> '[...]_data'. * config/nvptx/mkoffload.cc (process): Likewise. libgomp/ * target.c (GOMP_offload_register_ver): Clarify 'target_data' -> 'data'. (GOMP_offload_unregister_ver): Likewise. Fix up 'target_data'. --- gcc/config/gcn/mkoffload.cc | 8 ++++---- gcc/config/nvptx/mkoffload.cc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/config/gcn/mkoffload.cc b/gcc/config/gcn/mkoffload.cc index b8b3fec..d246433 100644 --- a/gcc/config/gcn/mkoffload.cc +++ b/gcc/config/gcn/mkoffload.cc @@ -692,13 +692,13 @@ process_obj (FILE *in, FILE *cfile, uint32_t omp_requires) len); fprintf (cfile, - "static const struct gcn_image_desc {\n" + "static const struct gcn_data {\n" " uintptr_t omp_requires_mask;\n" " const struct gcn_image *gcn_image;\n" " unsigned kernel_count;\n" " const struct hsa_kernel_description *kernel_infos;\n" " unsigned global_variable_count;\n" - "} target_data = {\n" + "} gcn_data = {\n" " %d,\n" " &gcn_image,\n" " sizeof (gcn_kernels) / sizeof (gcn_kernels[0]),\n" @@ -723,7 +723,7 @@ process_obj (FILE *in, FILE *cfile, uint32_t omp_requires) fprintf (cfile, "static __attribute__((constructor)) void init (void)\n" "{\n" " GOMP_offload_register_ver (%#x, __OFFLOAD_TABLE__," - " %d/*GCN*/, &target_data);\n" + " %d/*GCN*/, &gcn_data);\n" "};\n", GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_GCN), GOMP_DEVICE_GCN); @@ -731,7 +731,7 @@ process_obj (FILE *in, FILE *cfile, uint32_t omp_requires) fprintf (cfile, "static __attribute__((destructor)) void fini (void)\n" "{\n" " GOMP_offload_unregister_ver (%#x, __OFFLOAD_TABLE__," - " %d/*GCN*/, &target_data);\n" + " %d/*GCN*/, &gcn_data);\n" "};\n", GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_GCN), GOMP_DEVICE_GCN); diff --git a/gcc/config/nvptx/mkoffload.cc b/gcc/config/nvptx/mkoffload.cc index d8c81eb..0fa5f44 100644 --- a/gcc/config/nvptx/mkoffload.cc +++ b/gcc/config/nvptx/mkoffload.cc @@ -310,7 +310,7 @@ process (FILE *in, FILE *out, uint32_t omp_requires) fprintf (out, "\n};\n\n"); fprintf (out, - "static const struct nvptx_tdata {\n" + "static const struct nvptx_data {\n" " uintptr_t omp_requires_mask;\n" " const struct ptx_obj *ptx_objs;\n" " unsigned ptx_num;\n" @@ -318,7 +318,7 @@ process (FILE *in, FILE *out, uint32_t omp_requires) " unsigned var_num;\n" " const struct nvptx_fn *fn_names;\n" " unsigned fn_num;\n" - "} target_data = {\n" + "} nvptx_data = {\n" " %d, ptx_objs, sizeof (ptx_objs) / sizeof (ptx_objs[0]),\n" " var_mappings," " sizeof (var_mappings) / sizeof (var_mappings[0]),\n" @@ -344,7 +344,7 @@ process (FILE *in, FILE *out, uint32_t omp_requires) fprintf (out, "static __attribute__((constructor)) void init (void)\n" "{\n" " GOMP_offload_register_ver (%#x, __OFFLOAD_TABLE__," - " %d/*NVIDIA_PTX*/, &target_data);\n" + " %d/*NVIDIA_PTX*/, &nvptx_data);\n" "};\n", GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX), GOMP_DEVICE_NVIDIA_PTX); @@ -352,7 +352,7 @@ process (FILE *in, FILE *out, uint32_t omp_requires) fprintf (out, "static __attribute__((destructor)) void fini (void)\n" "{\n" " GOMP_offload_unregister_ver (%#x, __OFFLOAD_TABLE__," - " %d/*NVIDIA_PTX*/, &target_data);\n" + " %d/*NVIDIA_PTX*/, &nvptx_data);\n" "};\n", GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX), GOMP_DEVICE_NVIDIA_PTX); -- cgit v1.1 From 4bc92c3bfab065f5984a020aa490bd0dc74157ec Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Thu, 7 Jul 2022 00:16:46 +0000 Subject: Daily bump. --- gcc/ChangeLog | 10 +++ gcc/DATESTAMP | 2 +- gcc/ada/ChangeLog | 171 ++++++++++++++++++++++++++++++++++++++++++++++++ gcc/analyzer/ChangeLog | 22 +++++++ gcc/c-family/ChangeLog | 40 +++++++++++ gcc/cp/ChangeLog | 15 +++++ gcc/d/ChangeLog | 9 +++ gcc/testsuite/ChangeLog | 32 +++++++++ 8 files changed, 300 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4267279..0f291f9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2022-07-06 Thomas Schwinge + + * config/gcn/mkoffload.cc (process_obj): Clarify 'target_data' -> + '[...]_data'. + * config/nvptx/mkoffload.cc (process): Likewise. + +2022-07-06 Thomas Schwinge + + * omp-general.h (enum omp_requires): Use 'GOMP_REQUIRES_[...]'. + 2022-07-05 Andrew MacLeod * value-relation.cc (relation_to_code): New vector. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index ebfebbb..56ceb7f 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220706 +20220707 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3b69064..02490f0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,174 @@ +2022-07-06 Piotr Trojanek + + * gcc-interface/Make-lang.in (ada/generated/gnatvsn.ads): + Simplify regular expression. The "interval expression", + i.e. \{8\} is part of the POSIX regular expressions, so it + should not be a problem for modern implementations of sed. + +2022-07-06 Eric Botcazou + + * gcc-interface/trans.cc (gnat_to_gnu): Update comment. + +2022-07-06 Eric Botcazou + + * gcc-interface/gigi.h (simple_constant_p): Declare. + * gcc-interface/decl.cc (gnat_to_gnu_entity) : Strip + the qualifiers from the type of a simple constant. + (simple_constant_p): New predicate. + * gcc-interface/trans.cc (node_is_atomic): Return true for objects + with atomic type except for simple constants. + (node_is_volatile_full_access): Return false for simple constants + with VFA type. + +2022-07-06 Eric Botcazou + + * gcc-interface/decl.cc (gnat_to_gnu_entity) : Create a + local constant holding the underlying GNAT type of the object. Do + not fiddle with the object size for an unconstrained array. + +2022-07-06 Eric Botcazou + + * gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Constify a + local variable and move a couple of others around. + +2022-07-06 Eric Botcazou + + * gcc-interface/trans.cc (gnat_gimplify_expr) : New case. + +2022-07-06 Eric Botcazou + + * exp_ch6.adb (Function return mechanisms): New paragraph. + +2022-07-06 Yannick Moy + + * sem_util.adb (Is_Non_Preelaborable_Construct): Fix for + deferred constants. + +2022-07-06 Justin Squirek + + * libgnat/s-regpat.adb, libgnat/s-regpat.ads (Compile): Add a + new defaulted parameter Error_When_Too_Small to trigger an + error, if specified true, when Matcher is too small to hold the + compiled regex program. + +2022-07-06 Justin Squirek + + * sem_ch4.adb (Analyze_Selected_Component): Add condition to + avoid interpreting derived type components as candidates for + selected components in preanalysis of inherited class + conditions. + +2022-07-06 Yannick Moy + + * ghost.adb (Check_Ghost_Context): Delay checking for generic + associations. + (Check_Ghost_Context_In_Generic_Association): Perform ghost + checking in analyzed generic associations. + (Check_Ghost_Formal_Procedure_Or_Package): Check SPARK RM + 6.9(13-14) for formal procedures and packages. + (Check_Ghost_Formal_Variable): Check SPARK RM 6.9(13-14) for + variables. + * ghost.ads: Declarations for the above. + * sem_ch12.adb (Analyze_Associations): Apply delayed checking + for generic associations. + (Analyze_Formal_Object_Declaration): Same. + (Analyze_Formal_Subprogram_Declaration): Same. + (Instantiate_Formal_Package): Same. + (Instantiate_Formal_Subprogram): Same. + (Instantiate_Object): Same. Copy ghost aspect to newly declared + object for actual for IN formal object. Use new function + Get_Enclosing_Deep_Object to retrieve root object. + (Instantiate_Type): Copy ghost aspect to declared subtype for + actual for formal type. + * sem_prag.adb (Analyze_Pragma): Recognize new allowed + declarations. + * sem_util.adb (Copy_Ghost_Aspect): Copy the ghost aspect + between nodes. + (Get_Enclosing_Deep_Object): New function to return enclosing + deep object (or root for reachable part). + * sem_util.ads (Copy_Ghost_Aspect): Same. + (Get_Enclosing_Deep_Object): Same. + * libgnat/s-imageu.ads: Declare formal subprograms as ghost. + * libgnat/s-valuei.ads: Same. + * libgnat/s-valuti.ads: Same. + +2022-07-06 Javier Miranda + + * sem_res.adb (Resolve_Type_Conversion): Code cleanup since the + previous static check has been moved to Valid_Tagged_Conversion. + (Valid_Tagged_Conversion): Fix the code checking conversion + to/from interface types since incorrectly returns True when the + parent type of the operand type (or the target type) is an + interface type; add missing static checks on interface type + conversions. + +2022-07-06 Marc Poulhiès + + * libgnat/s-secsta.ads (SS_Allocate): Add new Alignment + parameter. + (Memory_Alignment): Remove. + * libgnat/s-secsta.adb (Align_Addr): New. + (SS_Allocate): Add new Alignment parameter. Realign pointer if + needed. Don't allocate anything for 0-sized allocations. + * gcc-interface/utils2.cc (build_call_alloc_dealloc_proc): Add + allocated object's alignment as last parameter to allocation + invocation. + +2022-07-06 Piotr Trojanek + + * libgnat/g-socket.adb (Get_Address_Info): Reduce scope of the + Found variable; avoid repeated assignment inside the loop. + +2022-07-06 Doug Rupp + + * Makefile.rtl [arm,aarch64 vxworks7]: Remove rtp and kernel + build macros and set an error variable if needed. + [x86,x86_vxworks7]: Likewise. + [ppc,ppc64]: Set an error variable if needed. + (rts-err): New phony Makefile target. + (setup-rts): Depend on rts-err. + +2022-07-06 Eric Botcazou + + * exp_ch3.adb (Make_Allocator_For_BIP_Return): New local function. + (Expand_N_Object_Declaration): Use it to build the three allocators + for a Build-In-Place return with an unconstrained type. Update the + head comment after other recent changes. + +2022-07-06 Doug Rupp + + * libgnat/system-vxworks7-e500-kernel.ads: Remove. + * libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise. + * libgnat/system-vxworks7-e500-rtp.ads: Likewise. + +2022-07-06 Justin Squirek + + * gnat_cuda.adb (Empty_CUDA_Global_Subprogram): Set + Specification and Corresponding_Spec to match the original + Kernel_Body. + +2022-07-06 Piotr Trojanek + + * exp_ch6.adb (Build_Static_Check_Helper_Call): Replace explicit + call to Make_Unchecked_Type_Conversion with a call to + Unchecked_Convert_To. + * tbuild.adb (Unchecked_Convert_To): Fix whitespace. + +2022-07-06 Piotr Trojanek + + * sem_res.adb (Resolve_Actuals): Restore first sentence of a + comment. + +2022-07-06 Eric Botcazou + + * exp_aggr.adb (Expand_Record_Aggregate): Do not call + Is_Full_Access_Aggregate here. + * freeze.ads (Is_Full_Access_Aggregate): Delete. + * freeze.adb (Is_Full_Access_Aggregate): Move to... + (Freeze_Entity): Do not call Is_Full_Access_Aggregate here. + * sem_aggr.adb (Is_Full_Access_Aggregate): ...here + (Resolve_Aggregate): Call Is_Full_Access_Aggregate here. + 2022-07-05 Piotr Trojanek * doc/gnat_ugn/building_executable_programs_with_gnat.rst diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog index fa732ab..0391870 100644 --- a/gcc/analyzer/ChangeLog +++ b/gcc/analyzer/ChangeLog @@ -1,3 +1,25 @@ +2022-07-06 Immad Mir + + PR analyzer/106184 + * sm-fd.cc (fd_state_machine): Change ordering of initialization + of state m_invalid so that the order of initializers is same as + the ordering of the fields in the class decl. + +2022-07-06 Immad Mir + + * sm-fd.cc (use_after_close): save the "close" event and + show it where possible. + +2022-07-06 David Malcolm + + PR analyzer/106204 + * region-model.cc (within_short_circuited_stmt_p): Move extraction + of assign_stmt to caller. + (due_to_ifn_deferred_init_p): New. + (region_model::check_for_poison): Move extraction of assign_stmt + from within_short_circuited_stmt_p to here. Share logic with + call to due_to_ifn_deferred_init_p. + 2022-07-02 Tim Lange PR analyzer/105900 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 402484b..2853661 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,43 @@ +2022-07-06 Lewis Hyatt + + PR preprocessor/53920 + PR c++/53431 + * c-common.cc (c_option_is_from_cpp_diagnostics): New function. + * c-common.h (c_option_is_from_cpp_diagnostics): Declare. + (c_pp_stream_token): Declare. + * c-ppoutput.cc (init_pp_output): Refactor logic about skipping + pragmas to... + (should_output_pragmas): ...here. New function. + (token_streamer::stream): Support handling early pragmas. + (do_line_change): Likewise. + (c_pp_stream_token): New function. + * c-pragma.cc (struct pragma_diagnostic_data): New helper class. + (pragma_diagnostic_lex_normal): New function. Moved logic for + interpreting GCC diagnostic pragmas here. + (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas + directly from libcpp. + (handle_pragma_diagnostic): Refactor into helper function... + (handle_pragma_diagnostic_impl): ...here. New function. + (handle_pragma_diagnostic_early): New function. + (handle_pragma_diagnostic_early_pp): New function. + (struct pragma_ns_name): Renamed to... + (struct pragma_pp_data): ...this. Add new "early_handler" member. + (c_register_pragma_1): Support early pragmas in the preprocessor. + (c_register_pragma_with_early_handler): New function. + (c_register_pragma): Support the new early handlers in struct + internal_pragma_handler. + (c_register_pragma_with_data): Likewise. + (c_register_pragma_with_expansion): Likewise. + (c_register_pragma_with_expansion_and_data): Likewise. + (c_invoke_early_pragma_handler): New function. + (c_pp_invoke_early_pragma_handler): New function. + (init_pragma): Add early pragma support for diagnostic pragmas. + * c-pragma.h (struct internal_pragma_handler): Add new early handler + members. + (c_register_pragma_with_early_handler): Declare. + (c_invoke_early_pragma_handler): Declare. + (c_pp_invoke_early_pragma_handler): Declare. + 2022-07-05 Marek Polacek PR c++/105626 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ba13cdd..32ff5c0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,18 @@ +2022-07-06 Lewis Hyatt + + PR c++/53431 + * parser.cc (cp_parser_pragma_kind): Move earlier in the file. + (cp_lexer_handle_early_pragma): New function. + (cp_lexer_new_main): Support parsing and handling early pragmas. + (c_parse_file): Adapt to changes in cp_lexer_new_main. + +2022-07-06 Jason Merrill + + PR c++/106179 + PR c++/106024 + * parser.cc (cp_parser_lookup_name): Remove :: requirement + for using unqualified lookup result. + 2022-07-05 Nathan Sidwell * module.cc diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 81531a4..f1d1f00 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,12 @@ +2022-07-06 Iain Buclaw + + * dmd/MERGE: Merge upstream dmd 56589f0f4. + +2022-07-06 Iain Buclaw + + * Make-lang.in (NOEXCEPTION_DFLAGS): Define. + (ALL_DFLAGS): Add NO_EXCEPTION_DFLAGS. + 2022-06-29 Iain Buclaw PR d/106139 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 208590b..d5a391e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,35 @@ +2022-07-06 Lewis Hyatt + + PR preprocessor/53920 + PR c++/53431 + * c-c++-common/pragma-diag-11.c: New test. + * c-c++-common/pragma-diag-12.c: New test. + * c-c++-common/pragma-diag-13.c: New test. + +2022-07-06 Immad Mir + + * gcc.dg/analyzer/fd-4.c: Add a new testcase to demonstrate + passsing of a closed file descriptor to a function that does + not emit any warning. + +2022-07-06 Immad Mir + + * gcc.dg/analyzer/fd-4.c (test_3): change the message note to conform to the + changes in analyzer/sm-fd.cc + (test_4): Likewise. + +2022-07-06 David Malcolm + + PR analyzer/106204 + * gcc.dg/analyzer/torture/uninit-pr106204.c: New test. + * gcc.dg/analyzer/uninit-pr106204.c: New test. + +2022-07-06 Jason Merrill + + PR c++/106179 + PR c++/106024 + * g++.dg/template/operator16.C: New test. + 2022-07-05 Marek Polacek PR c++/105626 -- cgit v1.1 From 7922f5ee649a88cd7c0b6d1a242588013d96223d Mon Sep 17 00:00:00 2001 From: Dimitrije Milosevic Date: Thu, 7 Jul 2022 01:58:20 +0800 Subject: Mips: Fix the ASAN shadow offset hook for the n32 ABI gcc/ChangeLog: * config/mips/mips.cc (mips_asan_shadow_offset): Reformat to handle the N32 ABI. * config/mips/mips.h (SUBTARGET_SHADOW_OFFSET): Remove the macro, as it is not needed anymore. --- gcc/config/mips/mips.cc | 7 ++++++- gcc/config/mips/mips.h | 7 ------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index 5eb8459..e81a245 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -22743,7 +22743,12 @@ mips_constant_alignment (const_tree exp, HOST_WIDE_INT align) static unsigned HOST_WIDE_INT mips_asan_shadow_offset (void) { - return SUBTARGET_SHADOW_OFFSET; + if (mips_abi == ABI_N32) + return (HOST_WIDE_INT_1 << 29); + if (POINTER_SIZE == 64) + return (HOST_WIDE_INT_1 << 37); + else + return HOST_WIDE_INT_C (0x0aaa0000); } /* Implement TARGET_STARTING_FRAME_OFFSET. See mips_compute_frame_info diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 858bbba..0029864 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -3463,10 +3463,3 @@ struct GTY(()) machine_function { && !TARGET_MICROMIPS && !TARGET_FIX_24K) #define NEED_INDICATE_EXEC_STACK 0 - -/* Define the shadow offset for asan. Other OS's can override in the - respective tm.h files. */ -#ifndef SUBTARGET_SHADOW_OFFSET -#define SUBTARGET_SHADOW_OFFSET \ - (POINTER_SIZE == 64 ? HOST_WIDE_INT_1 << 37 : HOST_WIDE_INT_C (0x0aaa0000)) -#endif -- cgit v1.1 From e5a9d60317852a7323e46109fa366e630b8b5bae Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 7 Jul 2022 09:00:00 +0200 Subject: Speed up LC SSA rewrite The following avoids collecting all loops exit blocks into bitmaps and computing the union of those up the loop tree possibly repeatedly. Instead we make sure to do this only once for each loop with a definition possibly requiring a LC phi node plus make sure to leverage recorded exits to avoid the intermediate bitmap allocation. * tree-ssa-loop-manip.cc (compute_live_loop_exits): Take the def loop exit block bitmap as argument instead of re-computing it here. (add_exit_phis_var): Adjust. (loop_name_cmp): New function. (add_exit_phis): Sort variables to insert LC PHI nodes after definition loop, for each definition loop compute the exit block bitmap once. (get_loops_exit): Remove. (rewrite_into_loop_closed_ssa_1): Do not pre-record all loop exit blocks into bitmaps. Record loop exits if required. --- gcc/tree-ssa-loop-manip.cc | 95 +++++++++++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 39 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc index 9f3b626..0324ff6 100644 --- a/gcc/tree-ssa-loop-manip.cc +++ b/gcc/tree-ssa-loop-manip.cc @@ -183,12 +183,14 @@ find_sibling_superloop (class loop *use_loop, class loop *def_loop) /* DEF_BB is a basic block containing a DEF that needs rewriting into loop-closed SSA form. USE_BLOCKS is the set of basic blocks containing uses of DEF that "escape" from the loop containing DEF_BB (i.e. blocks in - USE_BLOCKS are dominated by DEF_BB but not in the loop father of DEF_B). + USE_BLOCKS are dominated by DEF_BB but not in the loop father of DEF_BB). ALL_EXITS[I] is the set of all basic blocks that exit loop I. + DEF_LOOP_EXITS is a bitmap of loop exit blocks that exit the loop + containing DEF_BB or its outer loops. - Compute the subset of LOOP_EXITS that exit the loop containing DEF_BB - or one of its loop fathers, in which DEF is live. This set is returned - in the bitmap LIVE_EXITS. + Compute the subset of loop exit destinations that exit the loop + containing DEF_BB or one of its loop fathers, in which DEF is live. + This set is returned in the bitmap LIVE_EXITS. Instead of computing the complete livein set of the def, we use the loop nesting tree as a form of poor man's structure analysis. This greatly @@ -197,18 +199,17 @@ find_sibling_superloop (class loop *use_loop, class loop *def_loop) static void compute_live_loop_exits (bitmap live_exits, bitmap use_blocks, - bitmap *loop_exits, basic_block def_bb) + basic_block def_bb, bitmap def_loop_exits) { unsigned i; bitmap_iterator bi; class loop *def_loop = def_bb->loop_father; unsigned def_loop_depth = loop_depth (def_loop); - bitmap def_loop_exits; /* Normally the work list size is bounded by the number of basic blocks in the largest loop. We don't know this number, but we can be fairly sure that it will be relatively small. */ - auto_vec worklist (MAX (8, n_basic_blocks_for_fn (cfun) / 128)); + auto_vec worklist (MAX (8, n_basic_blocks_for_fn (cfun) / 128)); EXECUTE_IF_SET_IN_BITMAP (use_blocks, 0, i, bi) { @@ -272,13 +273,7 @@ compute_live_loop_exits (bitmap live_exits, bitmap use_blocks, } } - def_loop_exits = BITMAP_ALLOC (&loop_renamer_obstack); - for (class loop *loop = def_loop; - loop != current_loops->tree_root; - loop = loop_outer (loop)) - bitmap_ior_into (def_loop_exits, loop_exits[loop->num]); bitmap_and_into (live_exits, def_loop_exits); - BITMAP_FREE (def_loop_exits); } /* Add a loop-closing PHI for VAR in basic block EXIT. */ @@ -322,23 +317,33 @@ add_exit_phi (basic_block exit, tree var) Exits of the loops are stored in LOOP_EXITS. */ static void -add_exit_phis_var (tree var, bitmap use_blocks, bitmap *loop_exits) +add_exit_phis_var (tree var, bitmap use_blocks, bitmap def_loop_exits) { unsigned index; bitmap_iterator bi; basic_block def_bb = gimple_bb (SSA_NAME_DEF_STMT (var)); - bitmap live_exits = BITMAP_ALLOC (&loop_renamer_obstack); gcc_checking_assert (! bitmap_bit_p (use_blocks, def_bb->index)); - compute_live_loop_exits (live_exits, use_blocks, loop_exits, def_bb); + auto_bitmap live_exits (&loop_renamer_obstack); + compute_live_loop_exits (live_exits, use_blocks, def_bb, def_loop_exits); EXECUTE_IF_SET_IN_BITMAP (live_exits, 0, index, bi) { add_exit_phi (BASIC_BLOCK_FOR_FN (cfun, index), var); } +} - BITMAP_FREE (live_exits); +static int +loop_name_cmp (const void *p1, const void *p2) +{ + auto l1 = (const std::pair *)p1; + auto l2 = (const std::pair *)p2; + if (l1->first < l2->first) + return -1; + else if (l1->first > l2->first) + return 1; + return 0; } /* Add exit phis for the names marked in NAMES_TO_RENAME. @@ -346,31 +351,38 @@ add_exit_phis_var (tree var, bitmap use_blocks, bitmap *loop_exits) names are used are stored in USE_BLOCKS. */ static void -add_exit_phis (bitmap names_to_rename, bitmap *use_blocks, bitmap *loop_exits) +add_exit_phis (bitmap names_to_rename, bitmap *use_blocks) { unsigned i; bitmap_iterator bi; + /* Sort names_to_rename after definition loop so we can avoid re-computing + def_loop_exits. */ + auto_vec > names (bitmap_count_bits (names_to_rename)); EXECUTE_IF_SET_IN_BITMAP (names_to_rename, 0, i, bi) { - add_exit_phis_var (ssa_name (i), use_blocks[i], loop_exits); + tree name = ssa_name (i); + loop_p def_loop = gimple_bb (SSA_NAME_DEF_STMT (name))->loop_father; + names.quick_push (std::make_pair (def_loop->num, i)); } -} + names.qsort (loop_name_cmp); -/* Fill the array of bitmaps LOOP_EXITS with all loop exit edge targets. */ - -static void -get_loops_exits (bitmap *loop_exits) -{ - unsigned j; - edge e; - - for (auto loop : loops_list (cfun, 0)) + auto_bitmap def_loop_exits (&loop_renamer_obstack); + loop_p last_def_loop = NULL; + for (auto p : names) { - auto_vec exit_edges = get_loop_exit_edges (loop); - loop_exits[loop->num] = BITMAP_ALLOC (&loop_renamer_obstack); - FOR_EACH_VEC_ELT (exit_edges, j, e) - bitmap_set_bit (loop_exits[loop->num], e->dest->index); + loop_p def_loop = get_loop (cfun, p.first); + if (def_loop != last_def_loop) + { + bitmap_clear (def_loop_exits); + last_def_loop = def_loop; + for (class loop *loop = def_loop; loop != current_loops->tree_root; + loop = loop_outer (loop)) + for (auto exit = loop->exits->next; exit->e; exit = exit->next) + bitmap_set_bit (def_loop_exits, exit->e->dest->index); + } + add_exit_phis_var (ssa_name (p.second), use_blocks[p.second], + def_loop_exits); } } @@ -566,16 +578,21 @@ rewrite_into_loop_closed_ssa_1 (bitmap changed_bbs, unsigned update_flag, if (!bitmap_empty_p (names_to_rename)) { - /* An array of bitmaps where LOOP_EXITS[I] is the set of basic blocks - that are the destination of an edge exiting loop number I. */ - bitmap *loop_exits = XNEWVEC (bitmap, number_of_loops (cfun)); - get_loops_exits (loop_exits); + bool release_recorded_exits_p = false; + if (!loops_state_satisfies_p (LOOPS_HAVE_RECORDED_EXITS)) + { + /* Doing one scan over the whole function is cheaper than + traversing the loop tree and gathering BBs of each loop. */ + record_loop_exits (); + release_recorded_exits_p = true; + } /* Add the PHI nodes on exits of the loops for the names we need to rewrite. */ - add_exit_phis (names_to_rename, use_blocks, loop_exits); + add_exit_phis (names_to_rename, use_blocks); - free (loop_exits); + if (release_recorded_exits_p) + release_recorded_exits (cfun); /* Fix up all the names found to be used outside their original loops. */ -- cgit v1.1 From 1e1fdb729d99647bb90d8a18afa1a5fc3c2d3a22 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 7 Jul 2022 09:29:55 +0200 Subject: Speed up LC SSA rewrite more In many cases loops have only one exit or a variable is only live across one of the exits. In this case we know that all uses outside of the loop will be dominated by the single LC PHI node we insert. If that holds for all variables requiring LC SSA PHIs then we can simplify the update_ssa process, avoiding the (iterated) dominance frontier computations. * tree-ssa-loop-manip.cc (add_exit_phis_var): Return the number of LC PHIs inserted. (add_exit_phis): Return whether any variable required multiple LC PHI nodes. (rewrite_into_loop_closed_ssa_1): Use TODO_update_ssa_no_phi when possible. --- gcc/tree-ssa-loop-manip.cc | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc index 0324ff6..c531f1f 100644 --- a/gcc/tree-ssa-loop-manip.cc +++ b/gcc/tree-ssa-loop-manip.cc @@ -314,9 +314,10 @@ add_exit_phi (basic_block exit, tree var) } /* Add exit phis for VAR that is used in LIVEIN. - Exits of the loops are stored in LOOP_EXITS. */ + Exits of the loops are stored in LOOP_EXITS. Returns the number + of PHIs added for VAR. */ -static void +static unsigned add_exit_phis_var (tree var, bitmap use_blocks, bitmap def_loop_exits) { unsigned index; @@ -328,10 +329,13 @@ add_exit_phis_var (tree var, bitmap use_blocks, bitmap def_loop_exits) auto_bitmap live_exits (&loop_renamer_obstack); compute_live_loop_exits (live_exits, use_blocks, def_bb, def_loop_exits); + unsigned cnt = 0; EXECUTE_IF_SET_IN_BITMAP (live_exits, 0, index, bi) { add_exit_phi (BASIC_BLOCK_FOR_FN (cfun, index), var); + cnt++; } + return cnt; } static int @@ -348,13 +352,15 @@ loop_name_cmp (const void *p1, const void *p2) /* Add exit phis for the names marked in NAMES_TO_RENAME. Exits of the loops are stored in EXITS. Sets of blocks where the ssa - names are used are stored in USE_BLOCKS. */ + names are used are stored in USE_BLOCKS. Returns whether any name + required multiple LC PHI nodes. */ -static void +static bool add_exit_phis (bitmap names_to_rename, bitmap *use_blocks) { unsigned i; bitmap_iterator bi; + bool multiple_p = false; /* Sort names_to_rename after definition loop so we can avoid re-computing def_loop_exits. */ @@ -381,9 +387,12 @@ add_exit_phis (bitmap names_to_rename, bitmap *use_blocks) for (auto exit = loop->exits->next; exit->e; exit = exit->next) bitmap_set_bit (def_loop_exits, exit->e->dest->index); } - add_exit_phis_var (ssa_name (p.second), use_blocks[p.second], - def_loop_exits); + if (add_exit_phis_var (ssa_name (p.second), use_blocks[p.second], + def_loop_exits) > 1) + multiple_p = true; } + + return multiple_p; } /* For USE in BB, if it is used outside of the loop it is defined in, @@ -588,15 +597,18 @@ rewrite_into_loop_closed_ssa_1 (bitmap changed_bbs, unsigned update_flag, } /* Add the PHI nodes on exits of the loops for the names we need to - rewrite. */ - add_exit_phis (names_to_rename, use_blocks); + rewrite. When no variable required multiple LC PHI nodes to be + inserted then we know that all uses outside of the loop are + dominated by the single LC SSA definition and no further PHI + node insertions are required. */ + bool need_phis_p = add_exit_phis (names_to_rename, use_blocks); if (release_recorded_exits_p) release_recorded_exits (cfun); /* Fix up all the names found to be used outside their original loops. */ - update_ssa (TODO_update_ssa); + update_ssa (need_phis_p ? TODO_update_ssa : TODO_update_ssa_no_phi); } bitmap_obstack_release (&loop_renamer_obstack); -- cgit v1.1 From c1b1c4e58bda152ae932b45396ab67b07dd8c3fe Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 6 Jul 2022 19:11:05 +0100 Subject: testsuite: Fix incorrect -mfloat128-type option This test currently fails with an error about -mfloat128-type being an invalid option, which is not what it's supposed to be testing: XFAIL: gcc.target/powerpc/ppc-fortran/pr80108-1.f90 -O (test for excess errors) Excess errors: xgcc: error: unrecognized command-line option '-mfloat128-type'; did you mean '-mfloat128'? With this change we get the error that the comment says it expects: XFAIL: gcc.target/powerpc/ppc-fortran/pr80108-1.f90 -O (test for excess errors) Excess errors: f951: Error: power9 target option is incompatible with '-mcpu=' for less than power9 f951: Error: '-mfloat128' requires VSX support f951: Error: '-m64' requires a PowerPC64 cpu gcc/testsuite/ChangeLog: * gcc.target/powerpc/ppc-fortran/pr80108-1.f90: Change -mfloat128-type to -mfloat128. --- gcc/testsuite/gcc.target/powerpc/ppc-fortran/pr80108-1.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/pr80108-1.f90 b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/pr80108-1.f90 index 844166d..dac5c36 100644 --- a/gcc/testsuite/gcc.target/powerpc/ppc-fortran/pr80108-1.f90 +++ b/gcc/testsuite/gcc.target/powerpc/ppc-fortran/pr80108-1.f90 @@ -1,7 +1,7 @@ ! Originally contributed by Tobias Burnas. ! { dg-do compile { target { powerpc*-*-* } } } ! { dg-require-effective-target powerpc_p9vector_ok } -! { dg-options "-mdejagnu-cpu=405 -mpower9-minmax -mfloat128-type" } +! { dg-options "-mdejagnu-cpu=405 -mpower9-minmax -mfloat128" } ! { dg-excess-errors "expect error due to conflicting target options" } ! Since the error message is not associated with a particular line ! number, we cannot use the dg-error directive and cannot specify a -- cgit v1.1 From 8bc243943765f969c0d4625721a9944e9516d013 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 7 Jul 2022 10:46:01 +0200 Subject: target/106219 - proprly mark builtins pure via ix86_add_new_builtins The target optimize pragma path to initialize extra target specific builtins missed handling of the pure_p flag which in turn causes extra clobber side-effects of gather builtins leading to unexpected issues downhill. PR target/106219 * config/i386/i386-builtins.cc (ix86_add_new_builtins): Properly set DECL_PURE_P. * g++.dg/pr106219.C: New testcase. --- gcc/config/i386/i386-builtins.cc | 2 ++ gcc/testsuite/g++.dg/pr106219.C | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/g++.dg/pr106219.C (limited to 'gcc') diff --git a/gcc/config/i386/i386-builtins.cc b/gcc/config/i386/i386-builtins.cc index 96743e6..fe7243c 100644 --- a/gcc/config/i386/i386-builtins.cc +++ b/gcc/config/i386/i386-builtins.cc @@ -385,6 +385,8 @@ ix86_add_new_builtins (HOST_WIDE_INT isa, HOST_WIDE_INT isa2) ix86_builtins[i] = decl; if (ix86_builtins_isa[i].const_p) TREE_READONLY (decl) = 1; + if (ix86_builtins_isa[i].pure_p) + DECL_PURE_P (decl) = 1; } } diff --git a/gcc/testsuite/g++.dg/pr106219.C b/gcc/testsuite/g++.dg/pr106219.C new file mode 100644 index 0000000..3cad150 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr106219.C @@ -0,0 +1,31 @@ +// { dg-do compile } +// { dg-options "-O3" } +// { dg-additional-options "-march=bdver2" { target x86_64-*-* } } + +int max(int __b) { + if (0 < __b) + return __b; + return 0; +} +struct Plane { + Plane(int, int); + int *Row(); +}; +#ifdef __x86_64__ +#pragma GCC target "sse2,ssse3,avx,avx2" +#endif +float *ConvolveXSampleAndTranspose_rowp; +int ConvolveXSampleAndTranspose_res, ConvolveXSampleAndTranspose_r; +void ConvolveXSampleAndTranspose() { + Plane out(0, ConvolveXSampleAndTranspose_res); + for (int y;;) { + float sum; + for (int i = ConvolveXSampleAndTranspose_r; i; ++i) + sum += i; + for (; ConvolveXSampleAndTranspose_r; ++ConvolveXSampleAndTranspose_r) + sum += + ConvolveXSampleAndTranspose_rowp[max(ConvolveXSampleAndTranspose_r)] * + ConvolveXSampleAndTranspose_r; + out.Row()[y] = sum; + } +} -- cgit v1.1 From 9ef714539cb7cc1cd746312fd5dcc987bf167471 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 5 Jul 2022 12:21:33 +0200 Subject: Fix Intel MIC 'mkoffload' for OpenMP 'requires' Similar to how the other 'mkoffload's got changed in recent commit 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0 "OpenMP: Move omp requires checks to libgomp". This also means finally switching Intel MIC 'mkoffload' to 'GOMP_offload_register_ver', 'GOMP_offload_unregister_ver', making 'GOMP_offload_register', 'GOMP_offload_unregister' legacy entry points. gcc/ * config/i386/intelmic-mkoffload.cc (generate_host_descr_file) (prepare_target_image, main): Handle OpenMP 'requires'. (generate_host_descr_file): Switch to 'GOMP_offload_register_ver', 'GOMP_offload_unregister_ver'. libgomp/ * target.c (GOMP_offload_register, GOMP_offload_unregister): Denote as legacy entry points. * testsuite/lib/libgomp.exp (check_effective_target_offload_target_any): New proc. * testsuite/libgomp.c-c++-common/requires-1.c: Enable for 'offload_target_any'. * testsuite/libgomp.c-c++-common/requires-3.c: Likewise. * testsuite/libgomp.c-c++-common/requires-7.c: Likewise. * testsuite/libgomp.fortran/requires-1.f90: Likewise. --- gcc/config/i386/intelmic-mkoffload.cc | 56 +++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 12 deletions(-) (limited to 'gcc') diff --git a/gcc/config/i386/intelmic-mkoffload.cc b/gcc/config/i386/intelmic-mkoffload.cc index c683d6f..596f6f1 100644 --- a/gcc/config/i386/intelmic-mkoffload.cc +++ b/gcc/config/i386/intelmic-mkoffload.cc @@ -370,7 +370,7 @@ generate_target_offloadend_file (const char *target_compiler) /* Generates object file with the host side descriptor. */ static const char * -generate_host_descr_file (const char *host_compiler) +generate_host_descr_file (const char *host_compiler, uint32_t omp_requires) { char *dump_filename = concat (dumppfx, "_host_descr.c", NULL); const char *src_filename = save_temps @@ -386,39 +386,50 @@ generate_host_descr_file (const char *host_compiler) if (!src_file) fatal_error (input_location, "cannot open '%s'", src_filename); + fprintf (src_file, "#include \n\n"); + fprintf (src_file, "extern const void *const __OFFLOAD_TABLE__;\n" "extern const void *const __offload_image_intelmic_start;\n" "extern const void *const __offload_image_intelmic_end;\n\n" - "static const void *const __offload_target_data[] = {\n" + "static const struct intelmic_data {\n" + " uintptr_t omp_requires_mask;\n" + " const void *const image_start;\n" + " const void *const image_end;\n" + "} intelmic_data = {\n" + " %d,\n" " &__offload_image_intelmic_start, &__offload_image_intelmic_end\n" - "};\n\n"); + "};\n\n", omp_requires); fprintf (src_file, "#ifdef __cplusplus\n" "extern \"C\"\n" "#endif\n" - "void GOMP_offload_register (const void *, int, const void *);\n" + "void GOMP_offload_register_ver (unsigned, const void *, int, const void *);\n" "#ifdef __cplusplus\n" "extern \"C\"\n" "#endif\n" - "void GOMP_offload_unregister (const void *, int, const void *);\n\n" + "void GOMP_offload_unregister_ver (unsigned, const void *, int, const void *);\n\n" "__attribute__((constructor))\n" "static void\n" "init (void)\n" "{\n" - " GOMP_offload_register (&__OFFLOAD_TABLE__, %d, __offload_target_data);\n" - "}\n\n", GOMP_DEVICE_INTEL_MIC); + " GOMP_offload_register_ver (%#x, &__OFFLOAD_TABLE__, %d, &intelmic_data);\n" + "}\n\n", + GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_INTEL_MIC), + GOMP_DEVICE_INTEL_MIC); fprintf (src_file, "__attribute__((destructor))\n" "static void\n" "fini (void)\n" "{\n" - " GOMP_offload_unregister (&__OFFLOAD_TABLE__, %d, __offload_target_data);\n" - "}\n", GOMP_DEVICE_INTEL_MIC); + " GOMP_offload_unregister_ver (%#x, &__OFFLOAD_TABLE__, %d, &intelmic_data);\n" + "}\n", + GOMP_VERSION_PACK (GOMP_VERSION, GOMP_VERSION_INTEL_MIC), + GOMP_DEVICE_INTEL_MIC); fclose (src_file); @@ -462,7 +473,7 @@ generate_host_descr_file (const char *host_compiler) } static const char * -prepare_target_image (const char *target_compiler, int argc, char **argv) +prepare_target_image (const char *target_compiler, int argc, char **argv, uint32_t *omp_requires) { const char *target_descr_filename = generate_target_descr_file (target_compiler); @@ -509,8 +520,26 @@ prepare_target_image (const char *target_compiler, int argc, char **argv) obstack_ptr_grow (&argv_obstack, ""); obstack_ptr_grow (&argv_obstack, "-o"); obstack_ptr_grow (&argv_obstack, target_so_filename); + + char *omp_requires_file; + if (save_temps) + omp_requires_file = concat (dumppfx, ".mkoffload.omp_requires", NULL); + else + omp_requires_file = make_temp_file (".mkoffload.omp_requires"); + xputenv (concat ("GCC_OFFLOAD_OMP_REQUIRES_FILE=", omp_requires_file, NULL)); + compile_for_target (&argv_obstack); + unsetenv("GCC_OFFLOAD_OMP_REQUIRES_FILE"); + FILE *in = fopen (omp_requires_file, "rb"); + if (!in) + fatal_error (input_location, "cannot open omp_requires file %qs", + omp_requires_file); + if (fread (omp_requires, sizeof (*omp_requires), 1, in) != 1) + fatal_error (input_location, "cannot read omp_requires file %qs", + omp_requires_file); + fclose (in); + /* Run objcopy. */ char *rename_section_opt = XALLOCAVEC (char, sizeof (".data=") + strlen (image_section_name)); @@ -643,10 +672,13 @@ main (int argc, char **argv) if (!dumppfx) dumppfx = out_obj_filename; + uint32_t omp_requires; + const char *target_so_filename - = prepare_target_image (target_compiler, argc, argv); + = prepare_target_image (target_compiler, argc, argv, &omp_requires); - const char *host_descr_filename = generate_host_descr_file (host_compiler); + const char *host_descr_filename + = generate_host_descr_file (host_compiler, omp_requires); /* Perform partial linking for the target image and host side descriptor. As a result we'll get a finalized object file with all offload data. */ -- cgit v1.1 From 9fc61fc8da9677db862790a6e522f1e2875096a7 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 7 Jul 2022 12:59:47 +0200 Subject: Speedup update-ssa some more The following avoids copying an sbitmap and one traversal by avoiding to re-allocate old_ssa_names when not necessary. In addition this actually checks what the comment before PHI insert iterating promises, that the old_ssa_names set does not grow. * tree-into-ssa.cc (iterating_old_ssa_names): New. (add_new_name_mapping): Grow {new,old}_ssa_names separately and only when actually needed. Assert we are not growing the old_ssa_names set when iterating over it. (update_ssa): Remove old_ssa_names copying and empty_p query, note we are iterating over it and expect no set changes. --- gcc/tree-into-ssa.cc | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'gcc') diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc index c90651c..9f45e62 100644 --- a/gcc/tree-into-ssa.cc +++ b/gcc/tree-into-ssa.cc @@ -587,6 +587,8 @@ add_to_repl_tbl (tree new_tree, tree old) bitmap_set_bit (*set, SSA_NAME_VERSION (old)); } +/* Debugging aid to fence old_ssa_names changes when iterating over it. */ +static bool iterating_old_ssa_names; /* Add a new mapping NEW_TREE -> OLD REPL_TBL. Every entry N_i in REPL_TBL represents the set of names O_1 ... O_j replaced by N_i. This is @@ -602,10 +604,15 @@ add_new_name_mapping (tree new_tree, tree old) /* We may need to grow NEW_SSA_NAMES and OLD_SSA_NAMES because our caller may have created new names since the set was created. */ - if (SBITMAP_SIZE (new_ssa_names) <= num_ssa_names - 1) + if (SBITMAP_SIZE (new_ssa_names) <= SSA_NAME_VERSION (new_tree)) { unsigned int new_sz = num_ssa_names + NAME_SETS_GROWTH_FACTOR; new_ssa_names = sbitmap_resize (new_ssa_names, new_sz, 0); + } + if (SBITMAP_SIZE (old_ssa_names) <= SSA_NAME_VERSION (old)) + { + gcc_assert (!iterating_old_ssa_names); + unsigned int new_sz = num_ssa_names + NAME_SETS_GROWTH_FACTOR; old_ssa_names = sbitmap_resize (old_ssa_names, new_sz, 0); } @@ -619,8 +626,11 @@ add_new_name_mapping (tree new_tree, tree old) /* Register NEW_TREE and OLD in NEW_SSA_NAMES and OLD_SSA_NAMES, respectively. */ + if (iterating_old_ssa_names) + gcc_assert (bitmap_bit_p (old_ssa_names, SSA_NAME_VERSION (old))); + else + bitmap_set_bit (old_ssa_names, SSA_NAME_VERSION (old)); bitmap_set_bit (new_ssa_names, SSA_NAME_VERSION (new_tree)); - bitmap_set_bit (old_ssa_names, SSA_NAME_VERSION (old)); } @@ -3460,20 +3470,14 @@ update_ssa (unsigned update_flags) bitmap_initialize (&dfs[bb->index], &bitmap_default_obstack); compute_dominance_frontiers (dfs); - if (bitmap_first_set_bit (old_ssa_names) >= 0) - { - sbitmap_iterator sbi; - - /* insert_update_phi_nodes_for will call add_new_name_mapping - when inserting new PHI nodes, so the set OLD_SSA_NAMES - will grow while we are traversing it (but it will not - gain any new members). Copy OLD_SSA_NAMES to a temporary - for traversal. */ - auto_sbitmap tmp (SBITMAP_SIZE (old_ssa_names)); - bitmap_copy (tmp, old_ssa_names); - EXECUTE_IF_SET_IN_BITMAP (tmp, 0, i, sbi) - insert_updated_phi_nodes_for (ssa_name (i), dfs, update_flags); - } + /* insert_update_phi_nodes_for will call add_new_name_mapping + when inserting new PHI nodes, but it will not add any + new members to OLD_SSA_NAMES. */ + iterating_old_ssa_names = true; + sbitmap_iterator sbi; + EXECUTE_IF_SET_IN_BITMAP (old_ssa_names, 0, i, sbi) + insert_updated_phi_nodes_for (ssa_name (i), dfs, update_flags); + iterating_old_ssa_names = false; symbols_to_rename.qsort (insert_updated_phi_nodes_compare_uids); FOR_EACH_VEC_ELT (symbols_to_rename, i, sym) -- cgit v1.1 From 81bec060e31b6ef2feeb3046c6f13a207c6f698a Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 7 Jul 2022 10:12:04 -0400 Subject: c++: -Woverloaded-virtual and dtors [PR87729] My earlier patch broke out of the loop over base members when we found a match, but that caused trouble for dtors, which can have multiple for which same_signature_p is true. But as the function comment says, we know this doesn't apply to [cd]tors, so skip them. PR c++/87729 gcc/cp/ChangeLog: * class.cc (warn_hidden): Ignore [cd]tors. gcc/testsuite/ChangeLog: * g++.dg/warn/Woverloaded-virt3.C: New test. --- gcc/cp/class.cc | 3 +++ gcc/testsuite/g++.dg/warn/Woverloaded-virt3.C | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 gcc/testsuite/g++.dg/warn/Woverloaded-virt3.C (limited to 'gcc') diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc index 17683f4..eb69e7f 100644 --- a/gcc/cp/class.cc +++ b/gcc/cp/class.cc @@ -3020,6 +3020,9 @@ warn_hidden (tree t) tree binfo; unsigned j; + if (IDENTIFIER_CDTOR_P (name)) + continue; + /* Iterate through all of the base classes looking for possibly hidden functions. */ for (binfo = TYPE_BINFO (t), j = 0; diff --git a/gcc/testsuite/g++.dg/warn/Woverloaded-virt3.C b/gcc/testsuite/g++.dg/warn/Woverloaded-virt3.C new file mode 100644 index 0000000..34214ba --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Woverloaded-virt3.C @@ -0,0 +1,7 @@ +// PR c++/87729 +// { dg-additional-options -Woverloaded-virtual } + +struct S1 {}; +struct S2: S1 { virtual ~S2(); }; +struct S3 { virtual ~S3(); }; +struct S4: S2, S3 { virtual ~S4(); }; -- cgit v1.1 From 9de8fbe1507d8c6e7c9657657a3c05337b8fde23 Mon Sep 17 00:00:00 2001 From: Prathamesh Kulkarni Date: Thu, 7 Jul 2022 22:03:35 +0530 Subject: statistics.cc: Add check to see if fn is not NULL in get_function_name. gcc/ChangeLog: * statistics.cc (get_function_name): Add check to see if fn is not NULL. --- gcc/statistics.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/statistics.cc b/gcc/statistics.cc index 6c21415..01ad353 100644 --- a/gcc/statistics.cc +++ b/gcc/statistics.cc @@ -121,7 +121,7 @@ static const char * get_function_name (struct function *fn) { if ((statistics_dump_flags & TDF_ASMNAME) - && DECL_ASSEMBLER_NAME_SET_P (fn->decl)) + && fn && DECL_ASSEMBLER_NAME_SET_P (fn->decl)) { tree asmname = decl_assembler_name (fn->decl); if (asmname) -- cgit v1.1 From 897b3b31f0a94b8bac59c6061655c6a32646d0a0 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 7 Jul 2022 15:50:26 -0400 Subject: analyzer: fix false positives from -Wanalyzer-tainted-divisor [PR106225] gcc/analyzer/ChangeLog: PR analyzer/106225 * sm-taint.cc (taint_state_machine::on_stmt): Move handling of assignments from division to... (taint_state_machine::check_for_tainted_divisor): ...this new function. Reject warning when the divisor is known to be non-zero. * sm.cc: Include "analyzer/program-state.h". (sm_context::get_old_region_model): New. * sm.h (sm_context::get_old_region_model): New decl. gcc/testsuite/ChangeLog: PR analyzer/106225 * gcc.dg/analyzer/taint-divisor-1.c: Add test coverage for various correct and incorrect checks against zero. Signed-off-by: David Malcolm --- gcc/analyzer/sm-taint.cc | 51 ++++++++++++++----- gcc/analyzer/sm.cc | 12 +++++ gcc/analyzer/sm.h | 2 + gcc/testsuite/gcc.dg/analyzer/taint-divisor-1.c | 66 +++++++++++++++++++++++++ 4 files changed, 119 insertions(+), 12 deletions(-) (limited to 'gcc') diff --git a/gcc/analyzer/sm-taint.cc b/gcc/analyzer/sm-taint.cc index d2d03c3..4075cf6 100644 --- a/gcc/analyzer/sm-taint.cc +++ b/gcc/analyzer/sm-taint.cc @@ -109,6 +109,9 @@ private: const supernode *node, const gcall *call, tree callee_fndecl) const; + void check_for_tainted_divisor (sm_context *sm_ctxt, + const supernode *node, + const gassign *assign) const; public: /* State for a "tainted" value: unsanitized data potentially under an @@ -803,18 +806,7 @@ taint_state_machine::on_stmt (sm_context *sm_ctxt, case ROUND_MOD_EXPR: case RDIV_EXPR: case EXACT_DIV_EXPR: - { - tree divisor = gimple_assign_rhs2 (assign);; - state_t state = sm_ctxt->get_state (stmt, divisor); - enum bounds b; - if (get_taint (state, TREE_TYPE (divisor), &b)) - { - tree diag_divisor = sm_ctxt->get_diagnostic_tree (divisor); - sm_ctxt->warn (node, stmt, divisor, - new tainted_divisor (*this, diag_divisor, b)); - sm_ctxt->set_next_state (stmt, divisor, m_stop); - } - } + check_for_tainted_divisor (sm_ctxt, node, assign); break; } } @@ -989,6 +981,41 @@ taint_state_machine::check_for_tainted_size_arg (sm_context *sm_ctxt, } } +/* Complain if ASSIGN (a division operation) has a tainted divisor + that could be zero. */ + +void +taint_state_machine::check_for_tainted_divisor (sm_context *sm_ctxt, + const supernode *node, + const gassign *assign) const +{ + const region_model *old_model = sm_ctxt->get_old_region_model (); + if (!old_model) + return; + + tree divisor_expr = gimple_assign_rhs2 (assign);; + const svalue *divisor_sval = old_model->get_rvalue (divisor_expr, NULL); + + state_t state = sm_ctxt->get_state (assign, divisor_sval); + enum bounds b; + if (get_taint (state, TREE_TYPE (divisor_expr), &b)) + { + const svalue *zero_sval + = old_model->get_manager ()->get_or_create_int_cst + (TREE_TYPE (divisor_expr), 0); + tristate ts + = old_model->eval_condition (divisor_sval, NE_EXPR, zero_sval); + if (ts.is_true ()) + /* The divisor is known to not equal 0: don't warn. */ + return; + + tree diag_divisor = sm_ctxt->get_diagnostic_tree (divisor_expr); + sm_ctxt->warn (node, assign, divisor_expr, + new tainted_divisor (*this, diag_divisor, b)); + sm_ctxt->set_next_state (assign, divisor_sval, m_stop); + } +} + } // anonymous namespace /* Internal interface to this file. */ diff --git a/gcc/analyzer/sm.cc b/gcc/analyzer/sm.cc index 24c20b8..d17d5c7 100644 --- a/gcc/analyzer/sm.cc +++ b/gcc/analyzer/sm.cc @@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see #include "analyzer/program-point.h" #include "analyzer/store.h" #include "analyzer/svalue.h" +#include "analyzer/program-state.h" #if ENABLE_ANALYZER @@ -159,6 +160,17 @@ state_machine::to_json () const return sm_obj; } +/* class sm_context. */ + +const region_model * +sm_context::get_old_region_model () const +{ + if (const program_state *old_state = get_old_program_state ()) + return old_state->m_region_model; + else + return NULL; +} + /* Create instances of the various state machines, each using LOGGER, and populate OUT with them. */ diff --git a/gcc/analyzer/sm.h b/gcc/analyzer/sm.h index e80ef1f..353a6db 100644 --- a/gcc/analyzer/sm.h +++ b/gcc/analyzer/sm.h @@ -279,6 +279,8 @@ public: virtual const program_state *get_old_program_state () const = 0; virtual const program_state *get_new_program_state () const = 0; + const region_model *get_old_region_model () const; + protected: sm_context (int sm_idx, const state_machine &sm) : m_sm_idx (sm_idx), m_sm (sm) {} diff --git a/gcc/testsuite/gcc.dg/analyzer/taint-divisor-1.c b/gcc/testsuite/gcc.dg/analyzer/taint-divisor-1.c index 5a5a0b9..b7c1fae 100644 --- a/gcc/testsuite/gcc.dg/analyzer/taint-divisor-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/taint-divisor-1.c @@ -24,3 +24,69 @@ int test_2 (FILE *f) fread (&s, sizeof (s), 1, f); return s.a % s.b; /* { dg-warning "use of attacker-controlled value 's\\.b' as divisor without checking for zero" } */ } + +/* We shouldn't complain if the divisor has been checked for zero. */ + +int test_checked_ne_zero (FILE *f) +{ + struct st1 s; + fread (&s, sizeof (s), 1, f); + if (s.b) + return s.a / s.b; /* { dg-bogus "divisor" } */ + else + return 0; +} + +int test_checked_gt_zero (FILE *f) +{ + struct st1 s; + fread (&s, sizeof (s), 1, f); + if (s.b > 0) + return s.a / s.b; /* { dg-bogus "divisor" } */ + else + return 0; +} + +int test_checked_lt_zero (FILE *f) +{ + struct st1 s; + fread (&s, sizeof (s), 1, f); + if (s.b < 0) + return s.a / s.b; /* { dg-bogus "divisor" } */ + else + return 0; +} + +/* We should complain if the check on the divisor still allows it to be + zero. */ + +int test_checked_ge_zero (FILE *f) +{ + struct st1 s; + fread (&s, sizeof (s), 1, f); + if (s.b >= 0) + return s.a / s.b; /* { dg-warning "use of attacker-controlled value 's\\.b' as divisor without checking for zero" } */ + else + return 0; +} + +int test_checked_le_zero (FILE *f) +{ + struct st1 s; + fread (&s, sizeof (s), 1, f); + if (s.b <= 0) + return s.a / s.b; /* { dg-warning "use of attacker-controlled value 's\\.b' as divisor without checking for zero" } */ + else + return 0; +} + +int test_checked_eq_zero (FILE *f) +{ + struct st1 s; + fread (&s, sizeof (s), 1, f); + /* Wrong sense of test. */ + if (s.b != 0) + return 0; + else + return s.a / s.b; /* { dg-warning "use of attacker-controlled value 's\\.b' as divisor without checking for zero" } */ +} -- cgit v1.1 From a8dce13c076019688f6d6aaaa338a2911022b336 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 7 Jul 2022 15:50:26 -0400 Subject: Convert label_text to C++11 move semantics libcpp's class label_text stores a char * for a string and a flag saying whether it owns the buffer. I added this class before we could use C++11, and so to avoid lots of copying it required an explicit call to label_text::maybe_free to potentially free the buffer. Now that we can use C++11, this patch removes label_text::maybe_free in favor of doing the cleanup in the destructor, and using C++ move semantics to avoid any copying. This allows lots of messy cleanup code to be eliminated in favor of implicit destruction (mostly in the analyzer). No functional change intended. gcc/analyzer/ChangeLog: * call-info.cc (call_info::print): Update for removal of label_text::maybe_free in favor of automatic memory management. * checker-path.cc (checker_event::dump): Likewise. (checker_event::prepare_for_emission): Likewise. (state_change_event::get_desc): Likewise. (superedge_event::should_filter_p): Likewise. (start_cfg_edge_event::get_desc): Likewise. (warning_event::get_desc): Likewise. (checker_path::dump): Likewise. (checker_path::debug): Likewise. * diagnostic-manager.cc (diagnostic_manager::prune_for_sm_diagnostic): Likewise. (diagnostic_manager::prune_interproc_events): Likewise. * program-state.cc (sm_state_map::to_json): Likewise. * region.cc (region::to_json): Likewise. * sm-malloc.cc (inform_nonnull_attribute): Likewise. * store.cc (binding_map::to_json): Likewise. (store::to_json): Likewise. * svalue.cc (svalue::to_json): Likewise. gcc/c-family/ChangeLog: * c-format.cc (range_label_for_format_type_mismatch::get_text): Update for removal of label_text::maybe_free in favor of automatic memory management. gcc/ChangeLog: * diagnostic-format-json.cc (json_from_location_range): Update for removal of label_text::maybe_free in favor of automatic memory management. * diagnostic-format-sarif.cc (sarif_builder::make_location_object): Likewise. * diagnostic-show-locus.cc (struct pod_label_text): New. (class line_label): Convert m_text from label_text to pod_label_text. (layout::print_any_labels): Move "text" to the line_label. * tree-diagnostic-path.cc (path_label::get_text): Update for removal of label_text::maybe_free in favor of automatic memory management. (event_range::print): Likewise. (default_tree_diagnostic_path_printer): Likewise. (default_tree_make_json_for_path): Likewise. libcpp/ChangeLog: * include/line-map.h: Include . (class label_text): Delete maybe_free method in favor of a destructor. Add move ctor and assignment operator. Add deletion of the copy ctor and copy-assignment operator. Rename field m_caller_owned to m_owned. Add std::move where necessary; add moved_from member function. Signed-off-by: David Malcolm --- gcc/analyzer/call-info.cc | 1 - gcc/analyzer/checker-path.cc | 97 +++++++++++++------------------------- gcc/analyzer/diagnostic-manager.cc | 8 ---- gcc/analyzer/program-state.cc | 1 - gcc/analyzer/region.cc | 1 - gcc/analyzer/sm-malloc.cc | 3 -- gcc/analyzer/store.cc | 3 -- gcc/analyzer/svalue.cc | 1 - gcc/c-family/c-format.cc | 1 - gcc/diagnostic-format-json.cc | 4 +- gcc/diagnostic-format-sarif.cc | 1 - gcc/diagnostic-show-locus.cc | 35 ++++++++++++-- gcc/tree-diagnostic-path.cc | 4 -- 13 files changed, 63 insertions(+), 97 deletions(-) (limited to 'gcc') diff --git a/gcc/analyzer/call-info.cc b/gcc/analyzer/call-info.cc index b3ff51e..e1142d7 100644 --- a/gcc/analyzer/call-info.cc +++ b/gcc/analyzer/call-info.cc @@ -76,7 +76,6 @@ call_info::print (pretty_printer *pp) const { label_text desc (get_desc (pp_show_color (pp))); pp_string (pp, desc.m_buffer); - desc.maybe_free (); } /* Implementation of custom_edge_info::add_events_to_path vfunc for diff --git a/gcc/analyzer/checker-path.cc b/gcc/analyzer/checker-path.cc index 953e192..959ffdd 100644 --- a/gcc/analyzer/checker-path.cc +++ b/gcc/analyzer/checker-path.cc @@ -196,7 +196,6 @@ checker_event::dump (pretty_printer *pp) const label_text event_desc (get_desc (false)); pp_printf (pp, "\"%s\" (depth %i", event_desc.m_buffer, m_effective_depth); - event_desc.maybe_free (); if (m_effective_depth != m_original_depth) pp_printf (pp, " corrected from %i", @@ -235,7 +234,6 @@ checker_event::prepare_for_emission (checker_path *, m_emission_id = emission_id; label_text desc = get_desc (false); - desc.maybe_free (); } /* class debug_event : public checker_event. */ @@ -402,9 +400,8 @@ state_change_event::get_desc (bool can_colorize) const meaning.dump_to_pp (&meaning_pp); /* Append debug version. */ - label_text result; if (m_origin) - result = make_label_text + return make_label_text (can_colorize, "%s (state of %qE: %qs -> %qs, origin: %qE, meaning: %s)", custom_desc.m_buffer, @@ -414,7 +411,7 @@ state_change_event::get_desc (bool can_colorize) const origin, pp_formatted_text (&meaning_pp)); else - result = make_label_text + return make_label_text (can_colorize, "%s (state of %qE: %qs -> %qs, NULL origin, meaning: %s)", custom_desc.m_buffer, @@ -422,9 +419,6 @@ state_change_event::get_desc (bool can_colorize) const m_from->get_name (), m_to->get_name (), pp_formatted_text (&meaning_pp)); - - custom_desc.maybe_free (); - return result; } else return custom_desc; @@ -435,28 +429,24 @@ state_change_event::get_desc (bool can_colorize) const if (m_sval) { label_text sval_desc = m_sval->get_desc (); - label_text result; if (m_origin) { label_text origin_desc = m_origin->get_desc (); - result = make_label_text + return make_label_text (can_colorize, "state of %qs: %qs -> %qs (origin: %qs)", sval_desc.m_buffer, m_from->get_name (), m_to->get_name (), origin_desc.m_buffer); - origin_desc.maybe_free (); } else - result = make_label_text + return make_label_text (can_colorize, "state of %qs: %qs -> %qs (NULL origin)", sval_desc.m_buffer, m_from->get_name (), m_to->get_name ()); - sval_desc.maybe_free (); - return result; } else { @@ -522,7 +512,6 @@ superedge_event::should_filter_p (int verbosity) const gcc_assert (desc.m_buffer); if (desc.m_buffer[0] == '\0') return true; - desc.maybe_free (); } } break; @@ -605,56 +594,39 @@ label_text start_cfg_edge_event::get_desc (bool can_colorize) const { bool user_facing = !flag_analyzer_verbose_edges; - char *edge_desc = m_sedge->get_description (user_facing); + label_text edge_desc + = label_text::take (m_sedge->get_description (user_facing)); if (user_facing) { - if (edge_desc && strlen (edge_desc) > 0) + if (edge_desc.m_buffer && strlen (edge_desc.m_buffer) > 0) { label_text cond_desc = maybe_describe_condition (can_colorize); label_text result; if (cond_desc.m_buffer) - { - result = make_label_text (can_colorize, - "following %qs branch (%s)...", - edge_desc, cond_desc.m_buffer); - cond_desc.maybe_free (); - } + return make_label_text (can_colorize, + "following %qs branch (%s)...", + edge_desc.m_buffer, cond_desc.m_buffer); else - { - result = make_label_text (can_colorize, - "following %qs branch...", - edge_desc); - } - free (edge_desc); - return result; + return make_label_text (can_colorize, + "following %qs branch...", + edge_desc.m_buffer); } else - { - free (edge_desc); - return label_text::borrow (""); - } + return label_text::borrow (""); } else { - if (strlen (edge_desc) > 0) - { - label_text result - = make_label_text (can_colorize, - "taking %qs edge SN:%i -> SN:%i", - edge_desc, - m_sedge->m_src->m_index, - m_sedge->m_dest->m_index); - free (edge_desc); - return result; - } + if (strlen (edge_desc.m_buffer) > 0) + return make_label_text (can_colorize, + "taking %qs edge SN:%i -> SN:%i", + edge_desc.m_buffer, + m_sedge->m_src->m_index, + m_sedge->m_dest->m_index); else - { - free (edge_desc); - return make_label_text (can_colorize, - "taking edge SN:%i -> SN:%i", - m_sedge->m_src->m_index, - m_sedge->m_dest->m_index); - } + return make_label_text (can_colorize, + "taking edge SN:%i -> SN:%i", + m_sedge->m_src->m_index, + m_sedge->m_dest->m_index); } } @@ -1138,19 +1110,16 @@ warning_event::get_desc (bool can_colorize) const { if (m_sm && flag_analyzer_verbose_state_changes) { - label_text result; if (var) - result = make_label_text (can_colorize, - "%s (%qE is in state %qs)", - ev_desc.m_buffer, - var, m_state->get_name ()); + return make_label_text (can_colorize, + "%s (%qE is in state %qs)", + ev_desc.m_buffer, + var, m_state->get_name ()); else - result = make_label_text (can_colorize, - "%s (in global state %qs)", - ev_desc.m_buffer, - m_state->get_name ()); - ev_desc.maybe_free (); - return result; + return make_label_text (can_colorize, + "%s (in global state %qs)", + ev_desc.m_buffer, + m_state->get_name ()); } else return ev_desc; @@ -1196,7 +1165,6 @@ checker_path::dump (pretty_printer *pp) const pp_string (pp, ", "); label_text event_desc (e->get_desc (false)); pp_printf (pp, "\"%s\"", event_desc.m_buffer); - event_desc.maybe_free (); } pp_character (pp, ']'); } @@ -1237,7 +1205,6 @@ checker_path::debug () const i, event_kind_to_string (m_events[i]->m_kind), event_desc.m_buffer); - event_desc.maybe_free (); } } diff --git a/gcc/analyzer/diagnostic-manager.cc b/gcc/analyzer/diagnostic-manager.cc index 4adfda1..083f66b 100644 --- a/gcc/analyzer/diagnostic-manager.cc +++ b/gcc/analyzer/diagnostic-manager.cc @@ -2298,7 +2298,6 @@ diagnostic_manager::prune_for_sm_diagnostic (checker_path *path, log ("considering event %i (%s), with sval: %qs, state: %qs", idx, event_kind_to_string (base_event->m_kind), sval_desc.m_buffer, state->get_name ()); - sval_desc.maybe_free (); } else log ("considering event %i (%s), with global state: %qs", @@ -2366,8 +2365,6 @@ diagnostic_manager::prune_for_sm_diagnostic (checker_path *path, " switching var of interest from %qs to %qs", idx, sval_desc.m_buffer, origin_sval_desc.m_buffer); - sval_desc.maybe_free (); - origin_sval_desc.maybe_free (); } sval = state_change->m_origin; } @@ -2395,7 +2392,6 @@ diagnostic_manager::prune_for_sm_diagnostic (checker_path *path, else log ("filtering event %i: state change to %qs", idx, change_sval_desc.m_buffer); - change_sval_desc.maybe_free (); } else log ("filtering event %i: global state change", idx); @@ -2465,7 +2461,6 @@ diagnostic_manager::prune_for_sm_diagnostic (checker_path *path, " recording critical state for %qs at call" " from %qE in callee to %qE in caller", idx, sval_desc.m_buffer, callee_var, caller_var); - sval_desc.maybe_free (); } if (expr.param_p ()) event->record_critical_state (caller_var, state); @@ -2509,7 +2504,6 @@ diagnostic_manager::prune_for_sm_diagnostic (checker_path *path, " recording critical state for %qs at return" " from %qE in caller to %qE in callee", idx, sval_desc.m_buffer, callee_var, callee_var); - sval_desc.maybe_free (); } if (expr.return_value_p ()) event->record_critical_state (callee_var, state); @@ -2593,7 +2587,6 @@ diagnostic_manager::prune_interproc_events (checker_path *path) const log ("filtering events %i-%i:" " irrelevant call/entry/return: %s", idx, idx + 2, desc.m_buffer); - desc.maybe_free (); } path->delete_event (idx + 2); path->delete_event (idx + 1); @@ -2616,7 +2609,6 @@ diagnostic_manager::prune_interproc_events (checker_path *path) const log ("filtering events %i-%i:" " irrelevant call/return: %s", idx, idx + 1, desc.m_buffer); - desc.maybe_free (); } path->delete_event (idx + 1); path->delete_event (idx); diff --git a/gcc/analyzer/program-state.cc b/gcc/analyzer/program-state.cc index 295c6ae..90a56e3 100644 --- a/gcc/analyzer/program-state.cc +++ b/gcc/analyzer/program-state.cc @@ -301,7 +301,6 @@ sm_state_map::to_json () const label_text sval_desc = sval->get_desc (); map_obj->set (sval_desc.m_buffer, e.m_state->to_json ()); - sval_desc.maybe_free (); /* This doesn't yet JSONify e.m_origin. */ } diff --git a/gcc/analyzer/region.cc b/gcc/analyzer/region.cc index a828623..5b00e6a 100644 --- a/gcc/analyzer/region.cc +++ b/gcc/analyzer/region.cc @@ -590,7 +590,6 @@ region::to_json () const { label_text desc = get_desc (true); json::value *reg_js = new json::string (desc.m_buffer); - desc.maybe_free (); return reg_js; } diff --git a/gcc/analyzer/sm-malloc.cc b/gcc/analyzer/sm-malloc.cc index 3bd4042..553fcd8 100644 --- a/gcc/analyzer/sm-malloc.cc +++ b/gcc/analyzer/sm-malloc.cc @@ -1008,7 +1008,6 @@ inform_nonnull_attribute (tree fndecl, int arg_idx) inform (DECL_SOURCE_LOCATION (fndecl), "argument %s of %qD must be non-null", arg_desc.m_buffer, fndecl); - arg_desc.maybe_free (); /* Ideally we would use the location of the parm and underline the attribute also - but we don't have the location_t values at this point in the middle-end. @@ -1072,7 +1071,6 @@ public: result = ev.formatted_print ("argument %s (%qE) could be NULL" " where non-null expected", arg_desc.m_buffer, ev.m_expr); - arg_desc.maybe_free (); return result; } @@ -1180,7 +1178,6 @@ public: result = ev.formatted_print ("argument %s (%qE) NULL" " where non-null expected", arg_desc.m_buffer, ev.m_expr); - arg_desc.maybe_free (); return result; } diff --git a/gcc/analyzer/store.cc b/gcc/analyzer/store.cc index 1b7c818..d558d47 100644 --- a/gcc/analyzer/store.cc +++ b/gcc/analyzer/store.cc @@ -676,7 +676,6 @@ binding_map::to_json () const const svalue *value = *const_cast (m_map).get (key); label_text key_desc = key->get_desc (); map_obj->set (key_desc.m_buffer, value->to_json ()); - key_desc.maybe_free (); } return map_obj; @@ -2405,11 +2404,9 @@ store::to_json () const label_text base_reg_desc = base_reg->get_desc (); clusters_in_parent_reg_obj->set (base_reg_desc.m_buffer, cluster->to_json ()); - base_reg_desc.maybe_free (); } label_text parent_reg_desc = parent_reg->get_desc (); store_obj->set (parent_reg_desc.m_buffer, clusters_in_parent_reg_obj); - parent_reg_desc.maybe_free (); } store_obj->set ("called_unknown_fn", new json::literal (m_called_unknown_fn)); diff --git a/gcc/analyzer/svalue.cc b/gcc/analyzer/svalue.cc index 7bad3ce..78a6eef 100644 --- a/gcc/analyzer/svalue.cc +++ b/gcc/analyzer/svalue.cc @@ -97,7 +97,6 @@ svalue::to_json () const { label_text desc = get_desc (true); json::value *sval_js = new json::string (desc.m_buffer); - desc.maybe_free (); return sval_js; } diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc index 7547804..2faed0c 100644 --- a/gcc/c-family/c-format.cc +++ b/gcc/c-family/c-format.cc @@ -4625,7 +4625,6 @@ class range_label_for_format_type_mismatch suffix.fill_buffer (p); char *result = concat (text.m_buffer, p, NULL); - text.maybe_free (); return label_text::take (result); } diff --git a/gcc/diagnostic-format-json.cc b/gcc/diagnostic-format-json.cc index d1d8d3f..872c67e 100644 --- a/gcc/diagnostic-format-json.cc +++ b/gcc/diagnostic-format-json.cc @@ -101,11 +101,9 @@ json_from_location_range (diagnostic_context *context, if (loc_range->m_label) { - label_text text; - text = loc_range->m_label->get_text (range_idx); + label_text text (loc_range->m_label->get_text (range_idx)); if (text.m_buffer) result->set ("label", new json::string (text.m_buffer)); - text.maybe_free (); } return result; diff --git a/gcc/diagnostic-format-sarif.cc b/gcc/diagnostic-format-sarif.cc index a7bb9fb..1e4ebc8 100644 --- a/gcc/diagnostic-format-sarif.cc +++ b/gcc/diagnostic-format-sarif.cc @@ -584,7 +584,6 @@ sarif_builder::make_location_object (const diagnostic_event &event) label_text ev_desc = event.get_desc (false); json::object *message_obj = make_message_object (ev_desc.m_buffer); location_obj->set ("message", message_obj); - ev_desc.maybe_free (); return location_obj; } diff --git a/gcc/diagnostic-show-locus.cc b/gcc/diagnostic-show-locus.cc index 6eafe19..9cd7794 100644 --- a/gcc/diagnostic-show-locus.cc +++ b/gcc/diagnostic-show-locus.cc @@ -1867,6 +1867,31 @@ layout::print_annotation_line (linenum_type row, const line_bounds lbounds) print_newline (); } +/* A version of label_text that can live inside a vec. + Requires manual cleanup via maybe_free. */ + +struct pod_label_text +{ + pod_label_text () + : m_buffer (NULL), m_caller_owned (false) + {} + + pod_label_text (label_text &&other) + : m_buffer (other.m_buffer), m_caller_owned (other.m_owned) + { + other.moved_from (); + } + + void maybe_free () + { + if (m_caller_owned) + free (m_buffer); + } + + char *m_buffer; + bool m_caller_owned; +}; + /* Implementation detail of layout::print_any_labels. A label within the given row of source. */ @@ -1878,10 +1903,10 @@ public: int state_idx, int column, label_text text) : m_state_idx (state_idx), m_column (column), - m_text (text), m_label_line (0), m_has_vbar (true) + m_text (std::move (text)), m_label_line (0), m_has_vbar (true) { - const int bytes = strlen (text.m_buffer); - m_display_width = cpp_display_width (text.m_buffer, bytes, policy); + const int bytes = strlen (m_text.m_buffer); + m_display_width = cpp_display_width (m_text.m_buffer, bytes, policy); } /* Sorting is primarily by column, then by state index. */ @@ -1900,7 +1925,7 @@ public: int m_state_idx; int m_column; - label_text m_text; + pod_label_text m_text; size_t m_display_width; int m_label_line; bool m_has_vbar; @@ -1941,7 +1966,7 @@ layout::print_any_labels (linenum_type row) if (text.m_buffer == NULL) continue; - labels.safe_push (line_label (m_policy, i, disp_col, text)); + labels.safe_push (line_label (m_policy, i, disp_col, std::move (text))); } } diff --git a/gcc/tree-diagnostic-path.cc b/gcc/tree-diagnostic-path.cc index ae2f8a2..2f297fa 100644 --- a/gcc/tree-diagnostic-path.cc +++ b/gcc/tree-diagnostic-path.cc @@ -66,7 +66,6 @@ class path_label : public range_label pp_show_color (&pp) = pp_show_color (global_dc->printer); diagnostic_event_id_t event_id (event_idx); pp_printf (&pp, "%@ %s", &event_id, event_text.m_buffer); - event_text.maybe_free (); label_text result = label_text::take (xstrdup (pp_formatted_text (&pp))); return result; } @@ -176,7 +175,6 @@ struct event_range pretty_printer *pp = dc->printer; pp_printf (pp, " %@: %s", &event_id, event_text.m_buffer); pp_newline (pp); - event_text.maybe_free (); } return; } @@ -484,7 +482,6 @@ default_tree_diagnostic_path_printer (diagnostic_context *context, else inform (event.get_location (), "%@ %s", &event_id, event_text.m_buffer); - event_text.maybe_free (); } } break; @@ -523,7 +520,6 @@ default_tree_make_json_for_path (diagnostic_context *context, event.get_location ())); label_text event_text (event.get_desc (false)); event_obj->set ("description", new json::string (event_text.m_buffer)); - event_text.maybe_free (); if (tree fndecl = event.get_fndecl ()) { const char *function -- cgit v1.1 From 52f538fa4a13d5d439f6db2c2657791fbddd934c Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 7 Jul 2022 15:50:26 -0400 Subject: analyzer: use label_text for superedge::get_description gcc/analyzer/ChangeLog: * checker-path.cc (start_cfg_edge_event::get_desc): Update for superedge::get_description returning a label_text. * engine.cc (feasibility_state::maybe_update_for_edge): Likewise. * supergraph.cc (superedge::dump): Likewise. (superedge::get_description): Convert return type from char * to label_text. * supergraph.h (superedge::get_description): Likewise. Signed-off-by: David Malcolm --- gcc/analyzer/checker-path.cc | 3 +-- gcc/analyzer/engine.cc | 5 ++--- gcc/analyzer/supergraph.cc | 13 +++++-------- gcc/analyzer/supergraph.h | 2 +- 4 files changed, 9 insertions(+), 14 deletions(-) (limited to 'gcc') diff --git a/gcc/analyzer/checker-path.cc b/gcc/analyzer/checker-path.cc index 959ffdd..211cf3e 100644 --- a/gcc/analyzer/checker-path.cc +++ b/gcc/analyzer/checker-path.cc @@ -594,8 +594,7 @@ label_text start_cfg_edge_event::get_desc (bool can_colorize) const { bool user_facing = !flag_analyzer_verbose_edges; - label_text edge_desc - = label_text::take (m_sedge->get_description (user_facing)); + label_text edge_desc (m_sedge->get_description (user_facing)); if (user_facing) { if (edge_desc.m_buffer && strlen (edge_desc.m_buffer) > 0) diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index 0674c8b..888123f 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -4586,12 +4586,11 @@ feasibility_state::maybe_update_for_edge (logger *logger, { if (logger) { - char *desc = sedge->get_description (false); + label_text desc (sedge->get_description (false)); logger->log (" sedge: SN:%i -> SN:%i %s", sedge->m_src->m_index, sedge->m_dest->m_index, - desc); - free (desc); + desc.m_buffer); } const gimple *last_stmt = src_point.get_supernode ()->get_last_stmt (); diff --git a/gcc/analyzer/supergraph.cc b/gcc/analyzer/supergraph.cc index f023c53..52b48524 100644 --- a/gcc/analyzer/supergraph.cc +++ b/gcc/analyzer/supergraph.cc @@ -854,13 +854,12 @@ void superedge::dump (pretty_printer *pp) const { pp_printf (pp, "edge: SN: %i -> SN: %i", m_src->m_index, m_dest->m_index); - char *desc = get_description (false); - if (strlen (desc) > 0) + label_text desc (get_description (false)); + if (strlen (desc.m_buffer) > 0) { pp_space (pp); - pp_string (pp, desc); + pp_string (pp, desc.m_buffer); } - free (desc); } /* Dump this superedge to stderr. */ @@ -998,17 +997,15 @@ superedge::get_any_callgraph_edge () const /* Build a description of this superedge (e.g. "true" for the true edge of a conditional, or "case 42:" for a switch case). - The caller is responsible for freeing the result. - If USER_FACING is false, the result also contains any underlying CFG edge flags. e.g. " (flags FALLTHRU | DFS_BACK)". */ -char * +label_text superedge::get_description (bool user_facing) const { pretty_printer pp; dump_label_to_pp (&pp, user_facing); - return xstrdup (pp_formatted_text (&pp)); + return label_text::take (xstrdup (pp_formatted_text (&pp))); } /* Implementation of superedge::dump_label_to_pp for non-switch CFG diff --git a/gcc/analyzer/supergraph.h b/gcc/analyzer/supergraph.h index 42c6df5..e9a5be2 100644 --- a/gcc/analyzer/supergraph.h +++ b/gcc/analyzer/supergraph.h @@ -331,7 +331,7 @@ class superedge : public dedge ::edge get_any_cfg_edge () const; cgraph_edge *get_any_callgraph_edge () const; - char *get_description (bool user_facing) const; + label_text get_description (bool user_facing) const; protected: superedge (supernode *src, supernode *dest, enum edge_kind kind) -- cgit v1.1 From 7b90f07f778caa5e09f3dc20a8c3da1f4cf60c20 Mon Sep 17 00:00:00 2001 From: Patrick Palka Date: Thu, 7 Jul 2022 16:46:29 -0400 Subject: c++: generic targs and identity substitution [PR105956] In r13-1045-gcb7fd1ea85feea I assumed that substitution into generic DECL_TI_ARGS corresponds to an identity mapping of the given arguments, and hence its safe to always elide such substitution. But this PR demonstrates that such a substitution isn't always the identity mapping, in particular when there's an ARGUMENT_PACK_SELECT argument, which gets handled specially during substitution: * when substituting an APS into a template parameter, we strip the APS to its underlying argument; * and when substituting an APS into a pack expansion, we strip the APS to its underlying argument pack. In this testcase, when expanding the pack expansion pattern (idx + Ns)... with Ns={0,1}, we specialize idx twice, first with Ns=APS<0,{0,1}> and then Ns=APS<1,{0,1}>. The DECL_TI_ARGS of idx are the generic template arguments of the enclosing class template impl, so before r13-1045, we'd substitute into its DECL_TI_ARGS which gave Ns={0,1} as desired. But after r13-1045, we elide this substitution and end up attempting to hash the original Ns argument, an APS, which ICEs. So this patch reverts that part of r13-1045. I considered using preserve_args in this case instead, but that'd break the static_assert in the testcase because preserve_args always strips APS to its underlying argument, but here we want to strip it to its underlying argument pack, so we'd incorrectly end up forming the specializations impl<0>::idx and impl<1>::idx instead of impl<0,1>::idx. Although we can't elide the substitution into DECL_TI_ARGS in light of ARGUMENT_PACK_SELECT, it should still be safe to elide template argument coercion in the case of a non-template decl, which this patch preserves. It's unfortunate that we need to remove this optimization just because it doesn't hold for one special tree code. So this patch implements a heuristic in tsubst_template_args to avoid allocating a new TREE_VEC if the substituted elements are identical to those of a level from ARGS, as well as a similar heuristic for tsubst_argument_pack. It turns out that about 40% of all calls to tsubst_template_args benefit from this, and it reduces memory usage by about 4% for e.g. range-v3's zip.cpp (relative to r13-1045) which more than makes up for the reversion. PR c++/105956 gcc/cp/ChangeLog: * pt.cc (template_arg_to_parm): Define. (tsubst_argument_pack): Try to reuse the corresponding ARGUMENT_PACK from 'args' when substituting into a generic ARGUMENT_PACK for a variadic template parameter. (tsubst_template_args): Move variable declarations closer to their first use. Replace 'orig_t' with 'r'. Rename 'need_new' to 'const_subst_p'. Heuristically detect if the substituted elements are identical to that of a level from 'args' and avoid allocating a new TREE_VEC if so. Add sanity check for the length of the new TREE_VEC, and remove dead ARGUMENT_PACK_P test. (tsubst_decl) : Revert r13-1045-gcb7fd1ea85feea change for avoiding substitution into DECL_TI_ARGS, but still avoid coercion in this case. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/variadic183.C: New test. --- gcc/cp/pt.cc | 202 +++++++++++++++++++++---------- gcc/testsuite/g++.dg/cpp0x/variadic183.C | 14 +++ 2 files changed, 152 insertions(+), 64 deletions(-) create mode 100644 gcc/testsuite/g++.dg/cpp0x/variadic183.C (limited to 'gcc') diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 8672da1..59ee50c 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see Fixed by: C++20 modules. */ #include "config.h" +#define INCLUDE_ALGORITHM // for std::equal #include "system.h" #include "coretypes.h" #include "cp-tree.h" @@ -4916,6 +4917,32 @@ template_parm_to_arg (tree t) return t; } +/* If T looks like a generic template argument produced by template_parm_to_arg, + return the corresponding template parameter, otherwise return NULL_TREE. */ + +static tree +template_arg_to_parm (tree t) +{ + if (t == NULL_TREE) + return NULL_TREE; + + if (ARGUMENT_PACK_P (t)) + { + tree args = ARGUMENT_PACK_ARGS (t); + if (TREE_VEC_LENGTH (args) == 1 + && PACK_EXPANSION_P (TREE_VEC_ELT (args, 0))) + t = PACK_EXPANSION_PATTERN (TREE_VEC_ELT (args, 0)); + } + + if (REFERENCE_REF_P (t)) + t = TREE_OPERAND (t, 0); + + if (TEMPLATE_PARM_P (t)) + return t; + else + return NULL_TREE; +} + /* Given a single level of template parameters (a TREE_VEC), return it as a set of template arguments. */ @@ -13516,26 +13543,49 @@ tree tsubst_argument_pack (tree orig_arg, tree args, tsubst_flags_t complain, tree in_decl) { + /* This flag is used only during deduction, and we don't expect to + substitute such ARGUMENT_PACKs. */ + gcc_assert (!ARGUMENT_PACK_INCOMPLETE_P (orig_arg)); + /* Substitute into each of the arguments. */ tree pack_args = tsubst_template_args (ARGUMENT_PACK_ARGS (orig_arg), args, complain, in_decl); - tree new_arg = error_mark_node; - if (pack_args != error_mark_node) - { - if (TYPE_P (orig_arg)) - { - new_arg = cxx_make_type (TREE_CODE (orig_arg)); - SET_TYPE_STRUCTURAL_EQUALITY (new_arg); - } - else - { - new_arg = make_node (TREE_CODE (orig_arg)); - TREE_CONSTANT (new_arg) = TREE_CONSTANT (orig_arg); - } + if (pack_args == error_mark_node) + return error_mark_node; - ARGUMENT_PACK_ARGS (new_arg) = pack_args; + if (pack_args == ARGUMENT_PACK_ARGS (orig_arg)) + return orig_arg; + + /* If we're substituting into a generic ARGUMENT_PACK for a variadic + template parameter, we might be able to avoid allocating a new + ARGUMENT_PACK and reuse the corresponding ARGUMENT_PACK from ARGS + if the substituted result is identical to it. */ + if (tree parm = template_arg_to_parm (orig_arg)) + { + int level, index; + template_parm_level_and_index (parm, &level, &index); + if (TMPL_ARGS_DEPTH (args) >= level) + if (tree arg = TMPL_ARG (args, level, index)) + if (TREE_CODE (arg) == TREE_CODE (orig_arg) + && ARGUMENT_PACK_ARGS (arg) == pack_args) + { + gcc_assert (!ARGUMENT_PACK_INCOMPLETE_P (arg)); + return arg; + } } + tree new_arg; + if (TYPE_P (orig_arg)) + { + new_arg = cxx_make_type (TREE_CODE (orig_arg)); + SET_TYPE_STRUCTURAL_EQUALITY (new_arg); + } + else + { + new_arg = make_node (TREE_CODE (orig_arg)); + TREE_CONSTANT (new_arg) = TREE_CONSTANT (orig_arg); + } + ARGUMENT_PACK_ARGS (new_arg) = pack_args; return new_arg; } @@ -13544,17 +13594,17 @@ tsubst_argument_pack (tree orig_arg, tree args, tsubst_flags_t complain, tree tsubst_template_args (tree t, tree args, tsubst_flags_t complain, tree in_decl) { - tree orig_t = t; - int len, need_new = 0, i, expanded_len_adjust = 0, out; - tree *elts; - if (t == error_mark_node) return error_mark_node; - len = TREE_VEC_LENGTH (t); - elts = XALLOCAVEC (tree, len); + const int len = TREE_VEC_LENGTH (t); + tree *elts = XALLOCAVEC (tree, len); + int expanded_len_adjust = 0; - for (i = 0; i < len; i++) + /* True iff the substituted result is identical to T. */ + bool const_subst_p = true; + + for (int i = 0; i < len; i++) { tree orig_arg = TREE_VEC_ELT (t, i); tree new_arg; @@ -13587,49 +13637,84 @@ tsubst_template_args (tree t, tree args, tsubst_flags_t complain, tree in_decl) elts[i] = new_arg; if (new_arg != orig_arg) - need_new = 1; + const_subst_p = false; } - if (!need_new) + if (const_subst_p) return t; + tree maybe_reuse = NULL_TREE; + + /* If ARGS and T are both multi-level, the substituted result may be + identical to ARGS. */ + if (TMPL_ARGS_HAVE_MULTIPLE_LEVELS (t) + && TMPL_ARGS_HAVE_MULTIPLE_LEVELS (args) + && TMPL_ARGS_DEPTH (t) == TMPL_ARGS_DEPTH (args)) + maybe_reuse = args; + /* If T appears to be a vector of generic template arguments, the + substituted result may be identical to the corresponding level + from ARGS. */ + else if (tree parm = template_arg_to_parm (TREE_VEC_ELT (t, 0))) + { + int level, index; + template_parm_level_and_index (parm, &level, &index); + if (index == 0 && TMPL_ARGS_DEPTH (args) >= level) + maybe_reuse = TMPL_ARGS_LEVEL (args, level); + } + + /* If the substituted result is identical to MAYBE_REUSE, return + it and avoid allocating a new TREE_VEC, as an optimization. */ + if (maybe_reuse != NULL_TREE + && TREE_VEC_LENGTH (maybe_reuse) == len + && std::equal (elts, elts+len, TREE_VEC_BEGIN (maybe_reuse))) + return maybe_reuse; + + /* If T consists of only a pack expansion for which substitution yielded + a TREE_VEC of the expanded elements, then reuse that TREE_VEC instead + of effectively making a copy. */ + if (len == 1 + && PACK_EXPANSION_P (TREE_VEC_ELT (t, 0)) + && TREE_CODE (elts[0]) == TREE_VEC) + return elts[0]; + /* Make space for the expanded arguments coming from template argument packs. */ - t = make_tree_vec (len + expanded_len_adjust); - /* ORIG_T can contain TREE_VECs. That happens if ORIG_T contains the + tree r = make_tree_vec (len + expanded_len_adjust); + /* T can contain TREE_VECs. That happens if T contains the arguments for a member template. - In that case each TREE_VEC in ORIG_T represents a level of template - arguments, and ORIG_T won't carry any non defaulted argument count. + In that case each TREE_VEC in T represents a level of template + arguments, and T won't carry any non defaulted argument count. It will rather be the nested TREE_VECs that will carry one. - In other words, ORIG_T carries a non defaulted argument count only + In other words, T carries a non defaulted argument count only if it doesn't contain any nested TREE_VEC. */ - if (NON_DEFAULT_TEMPLATE_ARGS_COUNT (orig_t)) + if (NON_DEFAULT_TEMPLATE_ARGS_COUNT (t)) { - int count = GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (orig_t); + int count = GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (t); count += expanded_len_adjust; - SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (t, count); + SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (r, count); } - for (i = 0, out = 0; i < len; i++) + + int out = 0; + for (int i = 0; i < len; i++) { - tree orig_arg = TREE_VEC_ELT (orig_t, i); + tree orig_arg = TREE_VEC_ELT (t, i); if (orig_arg - && (PACK_EXPANSION_P (orig_arg) || ARGUMENT_PACK_P (orig_arg)) + && PACK_EXPANSION_P (orig_arg) && TREE_CODE (elts[i]) == TREE_VEC) { - int idx; - /* Now expand the template argument pack "in place". */ - for (idx = 0; idx < TREE_VEC_LENGTH (elts[i]); idx++, out++) - TREE_VEC_ELT (t, out) = TREE_VEC_ELT (elts[i], idx); + for (int idx = 0; idx < TREE_VEC_LENGTH (elts[i]); idx++, out++) + TREE_VEC_ELT (r, out) = TREE_VEC_ELT (elts[i], idx); } else { - TREE_VEC_ELT (t, out) = elts[i]; + TREE_VEC_ELT (r, out) = elts[i]; out++; } } + gcc_assert (out == TREE_VEC_LENGTH (r)); - return t; + return r; } /* Substitute ARGS into one level PARMS of template parameters. */ @@ -14965,32 +15050,21 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain) if (!spec) { - int args_depth = TMPL_ARGS_DEPTH (args); - int parms_depth = TMPL_ARGS_DEPTH (DECL_TI_ARGS (t)); tmpl = DECL_TI_TEMPLATE (t); gen_tmpl = most_general_template (tmpl); - if (args_depth == parms_depth - && !PRIMARY_TEMPLATE_P (gen_tmpl)) - /* The DECL_TI_ARGS in this case are the generic template - arguments for the enclosing class template, so we can - shortcut substitution (which would just be the identity - mapping). */ - argvec = args; - else - { - argvec = tsubst (DECL_TI_ARGS (t), args, complain, in_decl); - /* Coerce the innermost arguments again if necessary. If - there's fewer levels of args than of parms, then the - substitution could not have changed the innermost args - (modulo level lowering). */ - if (args_depth >= parms_depth && argvec != error_mark_node) - argvec = (coerce_innermost_template_parms - (DECL_TEMPLATE_PARMS (gen_tmpl), - argvec, t, complain, - /*all*/true, /*defarg*/true)); - if (argvec == error_mark_node) - RETURN (error_mark_node); - } + argvec = tsubst (DECL_TI_ARGS (t), args, complain, in_decl); + if (argvec != error_mark_node + && PRIMARY_TEMPLATE_P (gen_tmpl) + && TMPL_ARGS_DEPTH (args) >= TMPL_ARGS_DEPTH (argvec)) + /* We're fully specializing a template declaration, so + we need to coerce the innermost arguments corresponding to + the template. */ + argvec = (coerce_innermost_template_parms + (DECL_TEMPLATE_PARMS (gen_tmpl), + argvec, t, complain, + /*all*/true, /*defarg*/true)); + if (argvec == error_mark_node) + RETURN (error_mark_node); hash = spec_hasher::hash (gen_tmpl, argvec); spec = retrieve_specialization (gen_tmpl, argvec, hash); } diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic183.C b/gcc/testsuite/g++.dg/cpp0x/variadic183.C new file mode 100644 index 0000000..27444eb --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/variadic183.C @@ -0,0 +1,14 @@ +// PR c++/105956 +// { dg-do compile { target c++11 } } + +template struct list; + +template struct impl { + static const int idx = 0; + using type = list<(idx + Ns)...>; + + static constexpr const int* a[2] = {(Ns, &idx)...}; + static_assert(a[0] == &idx && a[1] == &idx, ""); +}; + +template struct impl<0, 1>; -- cgit v1.1 From 6345c4145446ff9acc380cdef6bf83fdc3869db5 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Fri, 8 Jul 2022 00:16:22 +0000 Subject: Daily bump. --- gcc/ChangeLog | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/analyzer/ChangeLog | 43 ++++++++++++++++++++++++++++ gcc/c-family/ChangeLog | 6 ++++ gcc/cp/ChangeLog | 22 +++++++++++++++ gcc/testsuite/ChangeLog | 26 +++++++++++++++++ 6 files changed, 172 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0f291f9..2f5be38 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,77 @@ +2022-07-07 David Malcolm + + * diagnostic-format-json.cc (json_from_location_range): Update for + removal of label_text::maybe_free in favor of automatic memory + management. + * diagnostic-format-sarif.cc + (sarif_builder::make_location_object): Likewise. + * diagnostic-show-locus.cc (struct pod_label_text): New. + (class line_label): Convert m_text from label_text to pod_label_text. + (layout::print_any_labels): Move "text" to the line_label. + * tree-diagnostic-path.cc (path_label::get_text): Update for + removal of label_text::maybe_free in favor of automatic memory + management. + (event_range::print): Likewise. + (default_tree_diagnostic_path_printer): Likewise. + (default_tree_make_json_for_path): Likewise. + +2022-07-07 Prathamesh Kulkarni + + * statistics.cc (get_function_name): Add check to see if fn is not NULL. + +2022-07-07 Richard Biener + + * tree-into-ssa.cc (iterating_old_ssa_names): New. + (add_new_name_mapping): Grow {new,old}_ssa_names separately + and only when actually needed. Assert we are not growing + the old_ssa_names set when iterating over it. + (update_ssa): Remove old_ssa_names copying and empty_p + query, note we are iterating over it and expect no set changes. + +2022-07-07 Thomas Schwinge + + * config/i386/intelmic-mkoffload.cc (generate_host_descr_file) + (prepare_target_image, main): Handle OpenMP 'requires'. + (generate_host_descr_file): Switch to 'GOMP_offload_register_ver', + 'GOMP_offload_unregister_ver'. + +2022-07-07 Richard Biener + + PR target/106219 + * config/i386/i386-builtins.cc (ix86_add_new_builtins): Properly + set DECL_PURE_P. + +2022-07-07 Richard Biener + + * tree-ssa-loop-manip.cc (add_exit_phis_var): Return the + number of LC PHIs inserted. + (add_exit_phis): Return whether any variable required + multiple LC PHI nodes. + (rewrite_into_loop_closed_ssa_1): Use TODO_update_ssa_no_phi + when possible. + +2022-07-07 Richard Biener + + * tree-ssa-loop-manip.cc (compute_live_loop_exits): Take + the def loop exit block bitmap as argument instead of + re-computing it here. + (add_exit_phis_var): Adjust. + (loop_name_cmp): New function. + (add_exit_phis): Sort variables to insert LC PHI nodes + after definition loop, for each definition loop compute + the exit block bitmap once. + (get_loops_exit): Remove. + (rewrite_into_loop_closed_ssa_1): Do not pre-record + all loop exit blocks into bitmaps. Record loop exits + if required. + +2022-07-07 Dimitrije Milosevic + + * config/mips/mips.cc (mips_asan_shadow_offset): Reformat + to handle the N32 ABI. + * config/mips/mips.h (SUBTARGET_SHADOW_OFFSET): Remove + the macro, as it is not needed anymore. + 2022-07-06 Thomas Schwinge * config/gcn/mkoffload.cc (process_obj): Clarify 'target_data' -> diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 56ceb7f..aa8fe3c 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220707 +20220708 diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog index 0391870..06d8454 100644 --- a/gcc/analyzer/ChangeLog +++ b/gcc/analyzer/ChangeLog @@ -1,3 +1,46 @@ +2022-07-07 David Malcolm + + * checker-path.cc (start_cfg_edge_event::get_desc): Update for + superedge::get_description returning a label_text. + * engine.cc (feasibility_state::maybe_update_for_edge): Likewise. + * supergraph.cc (superedge::dump): Likewise. + (superedge::get_description): Convert return type from char * to + label_text. + * supergraph.h (superedge::get_description): Likewise. + +2022-07-07 David Malcolm + + * call-info.cc (call_info::print): Update for removal of + label_text::maybe_free in favor of automatic memory management. + * checker-path.cc (checker_event::dump): Likewise. + (checker_event::prepare_for_emission): Likewise. + (state_change_event::get_desc): Likewise. + (superedge_event::should_filter_p): Likewise. + (start_cfg_edge_event::get_desc): Likewise. + (warning_event::get_desc): Likewise. + (checker_path::dump): Likewise. + (checker_path::debug): Likewise. + * diagnostic-manager.cc + (diagnostic_manager::prune_for_sm_diagnostic): Likewise. + (diagnostic_manager::prune_interproc_events): Likewise. + * program-state.cc (sm_state_map::to_json): Likewise. + * region.cc (region::to_json): Likewise. + * sm-malloc.cc (inform_nonnull_attribute): Likewise. + * store.cc (binding_map::to_json): Likewise. + (store::to_json): Likewise. + * svalue.cc (svalue::to_json): Likewise. + +2022-07-07 David Malcolm + + PR analyzer/106225 + * sm-taint.cc (taint_state_machine::on_stmt): Move handling of + assignments from division to... + (taint_state_machine::check_for_tainted_divisor): ...this new + function. Reject warning when the divisor is known to be non-zero. + * sm.cc: Include "analyzer/program-state.h". + (sm_context::get_old_region_model): New. + * sm.h (sm_context::get_old_region_model): New decl. + 2022-07-06 Immad Mir PR analyzer/106184 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 2853661..e16014f 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2022-07-07 David Malcolm + + * c-format.cc (range_label_for_format_type_mismatch::get_text): + Update for removal of label_text::maybe_free in favor of automatic + memory management. + 2022-07-06 Lewis Hyatt PR preprocessor/53920 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 32ff5c0..ad72c03 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,25 @@ +2022-07-07 Patrick Palka + + PR c++/105956 + * pt.cc (template_arg_to_parm): Define. + (tsubst_argument_pack): Try to reuse the corresponding + ARGUMENT_PACK from 'args' when substituting into a generic + ARGUMENT_PACK for a variadic template parameter. + (tsubst_template_args): Move variable declarations closer to + their first use. Replace 'orig_t' with 'r'. Rename 'need_new' + to 'const_subst_p'. Heuristically detect if the substituted + elements are identical to that of a level from 'args' and avoid + allocating a new TREE_VEC if so. Add sanity check for the + length of the new TREE_VEC, and remove dead ARGUMENT_PACK_P test. + (tsubst_decl) : Revert + r13-1045-gcb7fd1ea85feea change for avoiding substitution into + DECL_TI_ARGS, but still avoid coercion in this case. + +2022-07-07 Jason Merrill + + PR c++/87729 + * class.cc (warn_hidden): Ignore [cd]tors. + 2022-07-06 Lewis Hyatt PR c++/53431 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d5a391e..1c948f5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,29 @@ +2022-07-07 Patrick Palka + + PR c++/105956 + * g++.dg/cpp0x/variadic183.C: New test. + +2022-07-07 David Malcolm + + PR analyzer/106225 + * gcc.dg/analyzer/taint-divisor-1.c: Add test coverage for various + correct and incorrect checks against zero. + +2022-07-07 Jason Merrill + + PR c++/87729 + * g++.dg/warn/Woverloaded-virt3.C: New test. + +2022-07-07 Richard Biener + + PR target/106219 + * g++.dg/pr106219.C: New testcase. + +2022-07-07 Jonathan Wakely + + * gcc.target/powerpc/ppc-fortran/pr80108-1.f90: Change + -mfloat128-type to -mfloat128. + 2022-07-06 Lewis Hyatt PR preprocessor/53920 -- cgit v1.1 From aa8fd7f65683ef9c3b6d2e9306bea2f28b5cadf7 Mon Sep 17 00:00:00 2001 From: Lulu Cheng Date: Thu, 7 Jul 2022 18:07:28 +0800 Subject: LoongArch: Modify fp_sp_offset and gp_sp_offset's calculation method when frame->mask or frame->fmask is zero. Under the LA architecture, when the stack is dropped too far, the process of dropping the stack is divided into two steps. step1: After dropping the stack, save callee saved registers on the stack. step2: The rest of it. The stack drop operation is optimized when frame->total_size minus frame->sp_fp_offset is an integer multiple of 4096, can reduce the number of instructions required to drop the stack. However, this optimization is not effective because of the original calculation method The following case: int main() { char buf[1024 * 12]; printf ("%p\n", buf); return 0; } As you can see from the generated assembler, the old GCC has two more instructions than the new GCC, lines 14 and line 24. new old 10 main: | 11 main: 11 addi.d $r3,$r3,-16 | 12 lu12i.w $r13,-12288>>12 12 lu12i.w $r13,-12288>>12 | 13 addi.d $r3,$r3,-2032 13 lu12i.w $r5,-12288>>12 | 14 ori $r13,$r13,2016 14 lu12i.w $r12,12288>>12 | 15 lu12i.w $r5,-12288>>12 15 st.d $r1,$r3,8 | 16 lu12i.w $r12,12288>>12 16 add.d $r12,$r12,$r5 | 17 st.d $r1,$r3,2024 17 add.d $r3,$r3,$r13 | 18 add.d $r12,$r12,$r5 18 add.d $r5,$r12,$r3 | 19 add.d $r3,$r3,$r13 19 la.local $r4,.LC0 | 20 add.d $r5,$r12,$r3 20 bl %plt(printf) | 21 la.local $r4,.LC0 21 lu12i.w $r13,12288>>12 | 22 bl %plt(printf) 22 add.d $r3,$r3,$r13 | 23 lu12i.w $r13,8192>>12 23 ld.d $r1,$r3,8 | 24 ori $r13,$r13,2080 24 or $r4,$r0,$r0 | 25 add.d $r3,$r3,$r13 25 addi.d $r3,$r3,16 | 26 ld.d $r1,$r3,2024 26 jr $r1 | 27 or $r4,$r0,$r0 | 28 addi.d $r3,$r3,2032 | 29 jr $r1 gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_compute_frame_info): Modify fp_sp_offset and gp_sp_offset's calculation method, when frame->mask or frame->fmask is zero, don't minus UNITS_PER_WORD or UNITS_PER_FP_REG. gcc/testsuite/ChangeLog: * gcc.target/loongarch/prolog-opt.c: New test. --- gcc/config/loongarch/loongarch.cc | 12 +++++++++--- gcc/testsuite/gcc.target/loongarch/prolog-opt.c | 15 +++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.target/loongarch/prolog-opt.c (limited to 'gcc') diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index d72b256..5c9a33c1 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -917,8 +917,12 @@ loongarch_compute_frame_info (void) frame->frame_pointer_offset = offset; /* Next are the callee-saved FPRs. */ if (frame->fmask) - offset += LARCH_STACK_ALIGN (num_f_saved * UNITS_PER_FP_REG); - frame->fp_sp_offset = offset - UNITS_PER_FP_REG; + { + offset += LARCH_STACK_ALIGN (num_f_saved * UNITS_PER_FP_REG); + frame->fp_sp_offset = offset - UNITS_PER_FP_REG; + } + else + frame->fp_sp_offset = offset; /* Next are the callee-saved GPRs. */ if (frame->mask) { @@ -931,8 +935,10 @@ loongarch_compute_frame_info (void) frame->save_libcall_adjustment = x_save_size; offset += x_save_size; + frame->gp_sp_offset = offset - UNITS_PER_WORD; } - frame->gp_sp_offset = offset - UNITS_PER_WORD; + else + frame->gp_sp_offset = offset; /* The hard frame pointer points above the callee-saved GPRs. */ frame->hard_frame_pointer_offset = offset; /* Above the hard frame pointer is the callee-allocated varags save area. */ diff --git a/gcc/testsuite/gcc.target/loongarch/prolog-opt.c b/gcc/testsuite/gcc.target/loongarch/prolog-opt.c new file mode 100644 index 0000000..0470a1f --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/prolog-opt.c @@ -0,0 +1,15 @@ +/* Test that LoongArch backend stack drop operation optimized. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -mabi=lp64d" } */ +/* { dg-final { scan-assembler "addi.d\t\\\$r3,\\\$r3,-16" } } */ + +extern int printf (char *, ...); + +int main() +{ + char buf[1024 * 12]; + printf ("%p\n", buf); + return 0; +} + -- cgit v1.1 From bf3695691f4fc964a3b1c8274a6949d844e3edff Mon Sep 17 00:00:00 2001 From: Haochen Jiang Date: Tue, 5 Jul 2022 14:12:18 +0800 Subject: i386: Handle memory operand for direct call to cvtps2pd in unpack gcc/ChangeLog: PR target/106180 * config/i386/sse.md (sse2_cvtps2pd_1): Rename from *sse2_cvtps2pd_1. (vec_unpacks_lo_v4sf): Add handler for memory operand. gcc/testsuite/ChangeLog: PR target/106180 * g++.target/i386/pr106180-1.C: New test. --- gcc/config/i386/sse.md | 12 ++++++++++-- gcc/testsuite/g++.target/i386/pr106180-1.C | 31 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/g++.target/i386/pr106180-1.C (limited to 'gcc') diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 81d32a8..a755d72 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -9204,7 +9204,7 @@ (set_attr "prefix" "maybe_vex") (set_attr "mode" "V2DF")]) -(define_insn "*sse2_cvtps2pd_1" +(define_insn "sse2_cvtps2pd_1" [(set (match_operand:V2DF 0 "register_operand" "=v") (float_extend:V2DF (match_operand:V2SF 1 "memory_operand" "m")))] @@ -9266,7 +9266,15 @@ (vec_select:V2SF (match_operand:V4SF 1 "vector_operand") (parallel [(const_int 0) (const_int 1)]))))] - "TARGET_SSE2") + "TARGET_SSE2" +{ + if (MEM_P (operands[1])) + { + operands[1] = adjust_address_nv (operands[1], V2SFmode, 0); + emit_insn (gen_sse2_cvtps2pd_1 (operands[0], operands[1])); + DONE; + } +}) (define_expand "vec_unpacks_lo_v8sf" [(set (match_operand:V4DF 0 "register_operand") diff --git a/gcc/testsuite/g++.target/i386/pr106180-1.C b/gcc/testsuite/g++.target/i386/pr106180-1.C new file mode 100644 index 0000000..7f73453 --- /dev/null +++ b/gcc/testsuite/g++.target/i386/pr106180-1.C @@ -0,0 +1,31 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -c -ffloat-store -std=c++11" } */ + +struct PointT +{ + double x, y; +}; +using PointF = PointT; + +template struct __array_traits { typedef PointT _Type[_Nm]; }; +template struct array +{ + typename __array_traits<_Nm>::_Type _M_elems; +}; + +float SampleGrid_low, SampleGrid_high; +using QuadrilateralF = array<4>; +struct PerspectiveTransform +{ + PerspectiveTransform (QuadrilateralF, QuadrilateralF); +}; + +void SampleGrid() +{ + PerspectiveTransform + { + { PointF {SampleGrid_high, SampleGrid_low}, + SampleGrid_low, SampleGrid_high }, + {} + }; +} -- cgit v1.1 From 13f44099bcc64ddb50a6dbd462bf79b258dfd02c Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 8 Jul 2022 07:37:20 +0100 Subject: middle-end: Use subregs to expand COMPLEX_EXPR to set the lowpart. When lowering COMPLEX_EXPR we currently emit two VEC_EXTRACTs. One for the lowpart and one for the highpart. The problem with this is that in RTL the lvalue of the RTX is the only thing tying the two instructions together. This means that e.g. combine is unable to try to combine the two instructions for setting the lowpart and highpart. For ISAs that have bit extract instructions we can eliminate one of the extracts if, and only if we're setting the entire complex number. This change changes the expand code when we're setting the entire complex number to generate a subreg for the lowpart instead of a vec_extract. This allows us to optimize sequences such as: _Complex int f(int a, int b) { _Complex int t = a + b * 1i; return t; } from: f: bfi x2, x0, 0, 32 bfi x2, x1, 32, 32 mov x0, x2 ret into: f: bfi x0, x1, 32, 32 ret I have also confirmed the codegen for x86_64 did not change. gcc/ChangeLog: * expmed.cc (store_bit_field_1): Add parameter that indicates if value is still undefined and if so emit a subreg move instead. (store_integral_bit_field): Likewise. (store_bit_field): Likewise. * expr.h (write_complex_part): Likewise. * expmed.h (store_bit_field): Add new parameter. * builtins.cc (expand_ifn_atomic_compare_exchange_into_call): Use new parameter. (expand_ifn_atomic_compare_exchange): Likewise. * calls.cc (store_unaligned_arguments_into_pseudos): Likewise. * emit-rtl.cc (validate_subreg): Likewise. * expr.cc (emit_group_store): Likewise. (copy_blkmode_from_reg): Likewise. (copy_blkmode_to_reg): Likewise. (clear_storage_hints): Likewise. (write_complex_part): Likewise. (emit_move_complex_parts): Likewise. (expand_assignment): Likewise. (store_expr): Likewise. (store_field): Likewise. (expand_expr_real_2): Likewise. * ifcvt.cc (noce_emit_move_insn): Likewise. * internal-fn.cc (expand_arith_set_overflow): Likewise. (expand_arith_overflow_result_store): Likewise. (expand_addsub_overflow): Likewise. (expand_neg_overflow): Likewise. (expand_mul_overflow): Likewise. (expand_arith_overflow): Likewise. gcc/testsuite/ChangeLog: * g++.target/aarch64/complex-init.C: New test. --- gcc/builtins.cc | 8 ++--- gcc/calls.cc | 2 +- gcc/emit-rtl.cc | 6 ++-- gcc/expmed.cc | 28 +++++++++------- gcc/expmed.h | 2 +- gcc/expr.cc | 44 +++++++++++++------------ gcc/expr.h | 2 +- gcc/ifcvt.cc | 5 +-- gcc/internal-fn.cc | 16 ++++----- gcc/testsuite/g++.target/aarch64/complex-init.C | 37 +++++++++++++++++++++ 10 files changed, 99 insertions(+), 51 deletions(-) create mode 100644 gcc/testsuite/g++.target/aarch64/complex-init.C (limited to 'gcc') diff --git a/gcc/builtins.cc b/gcc/builtins.cc index e6816d5..35b9197 100644 --- a/gcc/builtins.cc +++ b/gcc/builtins.cc @@ -6029,8 +6029,8 @@ expand_ifn_atomic_compare_exchange_into_call (gcall *call, machine_mode mode) if (GET_MODE (boolret) != mode) boolret = convert_modes (mode, GET_MODE (boolret), boolret, 1); x = force_reg (mode, x); - write_complex_part (target, boolret, true); - write_complex_part (target, x, false); + write_complex_part (target, boolret, true, true); + write_complex_part (target, x, false, false); } } @@ -6085,8 +6085,8 @@ expand_ifn_atomic_compare_exchange (gcall *call) rtx target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE); if (GET_MODE (boolret) != mode) boolret = convert_modes (mode, GET_MODE (boolret), boolret, 1); - write_complex_part (target, boolret, true); - write_complex_part (target, oldval, false); + write_complex_part (target, boolret, true, true); + write_complex_part (target, oldval, false, false); } } diff --git a/gcc/calls.cc b/gcc/calls.cc index 7f3cf5f..bc96aff 100644 --- a/gcc/calls.cc +++ b/gcc/calls.cc @@ -1226,7 +1226,7 @@ store_unaligned_arguments_into_pseudos (struct arg_data *args, int num_actuals) bytes -= bitsize / BITS_PER_UNIT; store_bit_field (reg, bitsize, endian_correction, 0, 0, - word_mode, word, false); + word_mode, word, false, false); } } } diff --git a/gcc/emit-rtl.cc b/gcc/emit-rtl.cc index 1e02ae2..3929ee0 100644 --- a/gcc/emit-rtl.cc +++ b/gcc/emit-rtl.cc @@ -947,9 +947,11 @@ validate_subreg (machine_mode omode, machine_mode imode, && GET_MODE_INNER (omode) == GET_MODE_INNER (imode)) ; /* Subregs involving floating point modes are not allowed to - change size. Therefore (subreg:DI (reg:DF) 0) is fine, but + change size unless it's an insert into a complex mode. + Therefore (subreg:DI (reg:DF) 0) and (subreg:CS (reg:SF) 0) are fine, but (subreg:SI (reg:DF) 0) isn't. */ - else if (FLOAT_MODE_P (imode) || FLOAT_MODE_P (omode)) + else if ((FLOAT_MODE_P (imode) || FLOAT_MODE_P (omode)) + && !COMPLEX_MODE_P (omode)) { if (! (known_eq (isize, osize) /* LRA can use subreg to store a floating point value in diff --git a/gcc/expmed.cc b/gcc/expmed.cc index c3e4aa8..9b01b5a 100644 --- a/gcc/expmed.cc +++ b/gcc/expmed.cc @@ -738,13 +738,16 @@ store_bit_field_using_insv (const extraction_insn *insv, rtx op0, If FALLBACK_P is true, fall back to store_fixed_bit_field if we have no other way of implementing the operation. If FALLBACK_P is false, - return false instead. */ + return false instead. + + if UNDEFINED_P is true then STR_RTX is undefined and may be set using + a subreg instead. */ static bool store_bit_field_1 (rtx str_rtx, poly_uint64 bitsize, poly_uint64 bitnum, poly_uint64 bitregion_start, poly_uint64 bitregion_end, machine_mode fieldmode, - rtx value, bool reverse, bool fallback_p) + rtx value, bool reverse, bool fallback_p, bool undefined_p) { rtx op0 = str_rtx; @@ -805,8 +808,9 @@ store_bit_field_1 (rtx str_rtx, poly_uint64 bitsize, poly_uint64 bitnum, return true; } } - else if (constant_multiple_p (bitnum, regsize * BITS_PER_UNIT, ®num) - && multiple_p (bitsize, regsize * BITS_PER_UNIT) + else if (((constant_multiple_p (bitnum, regsize * BITS_PER_UNIT, ®num) + && multiple_p (bitsize, regsize * BITS_PER_UNIT)) + || undefined_p) && known_ge (GET_MODE_BITSIZE (GET_MODE (op0)), bitsize)) { sub = simplify_gen_subreg (fieldmode, op0, GET_MODE (op0), @@ -869,7 +873,7 @@ store_bit_field_1 (rtx str_rtx, poly_uint64 bitsize, poly_uint64 bitnum, GET_MODE_SIZE (GET_MODE (op0))); emit_move_insn (temp, op0); store_bit_field_1 (temp, bitsize, bitnum, 0, 0, fieldmode, value, - reverse, fallback_p); + reverse, fallback_p, undefined_p); emit_move_insn (op0, temp); return true; } @@ -994,7 +998,7 @@ store_integral_bit_field (rtx op0, opt_scalar_int_mode op0_mode, bitnum + bit_offset, bitregion_start, bitregion_end, word_mode, - value_word, reverse, fallback_p)) + value_word, reverse, fallback_p, false)) { delete_insns_since (last); return false; @@ -1084,7 +1088,7 @@ store_integral_bit_field (rtx op0, opt_scalar_int_mode op0_mode, rtx tempreg = copy_to_reg (xop0); if (store_bit_field_1 (tempreg, bitsize, bitpos, bitregion_start, bitregion_end, - fieldmode, orig_value, reverse, false)) + fieldmode, orig_value, reverse, false, false)) { emit_move_insn (xop0, tempreg); return true; @@ -1112,13 +1116,15 @@ store_integral_bit_field (rtx op0, opt_scalar_int_mode op0_mode, FIELDMODE is the machine-mode of the FIELD_DECL node for this field. - If REVERSE is true, the store is to be done in reverse order. */ + If REVERSE is true, the store is to be done in reverse order. + + If UNDEFINED_P is true then STR_RTX is currently undefined. */ void store_bit_field (rtx str_rtx, poly_uint64 bitsize, poly_uint64 bitnum, poly_uint64 bitregion_start, poly_uint64 bitregion_end, machine_mode fieldmode, - rtx value, bool reverse) + rtx value, bool reverse, bool undefined_p) { /* Handle -fstrict-volatile-bitfields in the cases where it applies. */ unsigned HOST_WIDE_INT ibitsize = 0, ibitnum = 0; @@ -1151,7 +1157,7 @@ store_bit_field (rtx str_rtx, poly_uint64 bitsize, poly_uint64 bitnum, gcc_assert (ibitnum + ibitsize <= GET_MODE_BITSIZE (int_mode)); temp = copy_to_reg (str_rtx); if (!store_bit_field_1 (temp, ibitsize, ibitnum, 0, 0, - int_mode, value, reverse, true)) + int_mode, value, reverse, true, undefined_p)) gcc_unreachable (); emit_move_insn (str_rtx, temp); @@ -1186,7 +1192,7 @@ store_bit_field (rtx str_rtx, poly_uint64 bitsize, poly_uint64 bitnum, if (!store_bit_field_1 (str_rtx, bitsize, bitnum, bitregion_start, bitregion_end, - fieldmode, value, reverse, true)) + fieldmode, value, reverse, true, undefined_p)) gcc_unreachable (); } diff --git a/gcc/expmed.h b/gcc/expmed.h index ee1ddc8..0b2538c 100644 --- a/gcc/expmed.h +++ b/gcc/expmed.h @@ -715,7 +715,7 @@ extern rtx expand_divmod (int, enum tree_code, machine_mode, rtx, rtx, extern void store_bit_field (rtx, poly_uint64, poly_uint64, poly_uint64, poly_uint64, - machine_mode, rtx, bool); + machine_mode, rtx, bool, bool); extern rtx extract_bit_field (rtx, poly_uint64, poly_uint64, int, rtx, machine_mode, machine_mode, bool, rtx *); extern rtx extract_low_bits (machine_mode, machine_mode, rtx); diff --git a/gcc/expr.cc b/gcc/expr.cc index 6229737..eb280e6 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -2891,7 +2891,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, store_bit_field (dest, adj_bytelen * BITS_PER_UNIT, bytepos * BITS_PER_UNIT, bytepos * BITS_PER_UNIT, ssize * BITS_PER_UNIT - 1, - VOIDmode, tmps[i], false); + VOIDmode, tmps[i], false, false); } /* Optimize the access just a bit. */ @@ -2905,7 +2905,7 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, else store_bit_field (dest, bytelen * BITS_PER_UNIT, bytepos * BITS_PER_UNIT, - 0, 0, mode, tmps[i], false); + 0, 0, mode, tmps[i], false, false); } /* Copy from the pseudo into the (probable) hard reg. */ @@ -3038,7 +3038,7 @@ copy_blkmode_from_reg (rtx target, rtx srcreg, tree type) xbitpos % BITS_PER_WORD, 1, NULL_RTX, copy_mode, copy_mode, false, NULL), - false); + false, false); } } @@ -3140,7 +3140,7 @@ copy_blkmode_to_reg (machine_mode mode_in, tree src) bitpos % BITS_PER_WORD, 1, NULL_RTX, word_mode, word_mode, false, NULL), - false); + false, false); } if (mode == BLKmode) @@ -3308,8 +3308,8 @@ clear_storage_hints (rtx object, rtx size, enum block_op_methods method, zero = CONST0_RTX (GET_MODE_INNER (mode)); if (zero != NULL) { - write_complex_part (object, zero, 0); - write_complex_part (object, zero, 1); + write_complex_part (object, zero, 0, true); + write_complex_part (object, zero, 1, false); return NULL; } } @@ -3470,10 +3470,11 @@ set_storage_via_setmem (rtx object, rtx size, rtx val, unsigned int align, /* Write to one of the components of the complex value CPLX. Write VAL to - the real part if IMAG_P is false, and the imaginary part if its true. */ + the real part if IMAG_P is false, and the imaginary part if its true. + If UNDEFINED_P then the value in CPLX is currently undefined. */ void -write_complex_part (rtx cplx, rtx val, bool imag_p) +write_complex_part (rtx cplx, rtx val, bool imag_p, bool undefined_p) { machine_mode cmode; scalar_mode imode; @@ -3528,7 +3529,7 @@ write_complex_part (rtx cplx, rtx val, bool imag_p) } store_bit_field (cplx, ibitsize, imag_p ? ibitsize : 0, 0, 0, imode, val, - false); + false, undefined_p); } /* Extract one of the components of the complex value CPLX. Extract the @@ -3781,8 +3782,8 @@ emit_move_complex_parts (rtx x, rtx y) && REG_P (x) && !reg_overlap_mentioned_p (x, y)) emit_clobber (x); - write_complex_part (x, read_complex_part (y, false), false); - write_complex_part (x, read_complex_part (y, true), true); + write_complex_part (x, read_complex_part (y, false), false, true); + write_complex_part (x, read_complex_part (y, true), true, false); return get_last_insn (); } @@ -5441,7 +5442,7 @@ expand_assignment (tree to, tree from, bool nontemporal) } else store_bit_field (mem, GET_MODE_BITSIZE (mode), 0, 0, 0, mode, reg, - false); + false, false); return; } @@ -5663,8 +5664,8 @@ expand_assignment (tree to, tree from, bool nontemporal) concat_store_slow:; rtx temp = assign_stack_temp (GET_MODE (to_rtx), GET_MODE_SIZE (GET_MODE (to_rtx))); - write_complex_part (temp, XEXP (to_rtx, 0), false); - write_complex_part (temp, XEXP (to_rtx, 1), true); + write_complex_part (temp, XEXP (to_rtx, 0), false, true); + write_complex_part (temp, XEXP (to_rtx, 1), true, false); result = store_field (temp, bitsize, bitpos, bitregion_start, bitregion_end, mode1, from, get_alias_set (to), @@ -6222,7 +6223,8 @@ store_expr (tree exp, rtx target, int call_param_p, store_bit_field (target, rtx_to_poly_int64 (expr_size (exp)) * BITS_PER_UNIT, - 0, 0, 0, GET_MODE (temp), temp, reverse); + 0, 0, 0, GET_MODE (temp), temp, reverse, + false); } else convert_move (target, temp, TYPE_UNSIGNED (TREE_TYPE (exp))); @@ -7631,7 +7633,7 @@ store_field (rtx target, poly_int64 bitsize, poly_int64 bitpos, gcc_checking_assert (known_ge (bitpos, 0)); store_bit_field (target, bitsize, bitpos, bitregion_start, bitregion_end, - mode, temp, reverse); + mode, temp, reverse, false); return const0_rtx; } @@ -10120,8 +10122,8 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode, complex_expr_swap_order: /* Move the imaginary (op1) and real (op0) parts to their location. */ - write_complex_part (target, op1, true); - write_complex_part (target, op0, false); + write_complex_part (target, op1, true, true); + write_complex_part (target, op0, false, false); return target; } @@ -10150,8 +10152,8 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode, } /* Move the real (op0) and imaginary (op1) parts to their location. */ - write_complex_part (target, op0, false); - write_complex_part (target, op1, true); + write_complex_part (target, op0, false, true); + write_complex_part (target, op1, true, false); return target; @@ -10390,7 +10392,7 @@ expand_expr_real_2 (sepops ops, rtx target, machine_mode tmode, rtx dst = gen_reg_rtx (mode); emit_move_insn (dst, op0); store_bit_field (dst, bitsize, bitpos, 0, 0, - TYPE_MODE (TREE_TYPE (treeop1)), op1, false); + TYPE_MODE (TREE_TYPE (treeop1)), op1, false, false); return dst; } diff --git a/gcc/expr.h b/gcc/expr.h index b00c068..08b59b8 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -262,7 +262,7 @@ extern rtx_insn *emit_move_insn_1 (rtx, rtx); extern rtx_insn *emit_move_complex_push (machine_mode, rtx, rtx); extern rtx_insn *emit_move_complex_parts (rtx, rtx); extern rtx read_complex_part (rtx, bool); -extern void write_complex_part (rtx, rtx, bool); +extern void write_complex_part (rtx, rtx, bool, bool); extern rtx read_complex_part (rtx, bool); extern rtx emit_move_resolve_push (machine_mode, rtx); diff --git a/gcc/ifcvt.cc b/gcc/ifcvt.cc index 25aff38..2e8ab39 100644 --- a/gcc/ifcvt.cc +++ b/gcc/ifcvt.cc @@ -999,7 +999,8 @@ noce_emit_move_insn (rtx x, rtx y) } gcc_assert (start < (MEM_P (op) ? BITS_PER_UNIT : BITS_PER_WORD)); - store_bit_field (op, size, start, 0, 0, GET_MODE (x), y, false); + store_bit_field (op, size, start, 0, 0, GET_MODE (x), y, false, + false); return; } @@ -1056,7 +1057,7 @@ noce_emit_move_insn (rtx x, rtx y) outmode = GET_MODE (outer); bitpos = SUBREG_BYTE (outer) * BITS_PER_UNIT; store_bit_field (inner, GET_MODE_BITSIZE (outmode), bitpos, - 0, 0, outmode, y, false); + 0, 0, outmode, y, false, false); } /* Return the CC reg if it is used in COND. */ diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc index 91588f8..d666ccc 100644 --- a/gcc/internal-fn.cc +++ b/gcc/internal-fn.cc @@ -815,9 +815,9 @@ expand_arith_set_overflow (tree lhs, rtx target) { if (TYPE_PRECISION (TREE_TYPE (TREE_TYPE (lhs))) == 1 && !TYPE_UNSIGNED (TREE_TYPE (TREE_TYPE (lhs)))) - write_complex_part (target, constm1_rtx, true); + write_complex_part (target, constm1_rtx, true, false); else - write_complex_part (target, const1_rtx, true); + write_complex_part (target, const1_rtx, true, false); } /* Helper for expand_*_overflow. Store RES into the __real__ part @@ -872,7 +872,7 @@ expand_arith_overflow_result_store (tree lhs, rtx target, expand_arith_set_overflow (lhs, target); emit_label (done_label); } - write_complex_part (target, lres, false); + write_complex_part (target, lres, false, false); } /* Helper for expand_*_overflow. Store RES into TARGET. */ @@ -917,7 +917,7 @@ expand_addsub_overflow (location_t loc, tree_code code, tree lhs, { target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE); if (!is_ubsan) - write_complex_part (target, const0_rtx, true); + write_complex_part (target, const0_rtx, true, false); } /* We assume both operands and result have the same precision @@ -1362,7 +1362,7 @@ expand_neg_overflow (location_t loc, tree lhs, tree arg1, bool is_ubsan, { target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE); if (!is_ubsan) - write_complex_part (target, const0_rtx, true); + write_complex_part (target, const0_rtx, true, false); } enum insn_code icode = optab_handler (negv3_optab, mode); @@ -1487,7 +1487,7 @@ expand_mul_overflow (location_t loc, tree lhs, tree arg0, tree arg1, { target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE); if (!is_ubsan) - write_complex_part (target, const0_rtx, true); + write_complex_part (target, const0_rtx, true, false); } if (is_ubsan) @@ -2304,7 +2304,7 @@ expand_mul_overflow (location_t loc, tree lhs, tree arg0, tree arg1, do_compare_rtx_and_jump (op1, res, NE, true, mode, NULL_RTX, NULL, all_done_label, profile_probability::very_unlikely ()); emit_label (set_noovf); - write_complex_part (target, const0_rtx, true); + write_complex_part (target, const0_rtx, true, false); emit_label (all_done_label); } @@ -2573,7 +2573,7 @@ expand_arith_overflow (enum tree_code code, gimple *stmt) { /* The infinity precision result will always fit into result. */ rtx target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE); - write_complex_part (target, const0_rtx, true); + write_complex_part (target, const0_rtx, true, false); scalar_int_mode mode = SCALAR_INT_TYPE_MODE (type); struct separate_ops ops; ops.code = code; diff --git a/gcc/testsuite/g++.target/aarch64/complex-init.C b/gcc/testsuite/g++.target/aarch64/complex-init.C new file mode 100644 index 0000000..c3637d8 --- /dev/null +++ b/gcc/testsuite/g++.target/aarch64/complex-init.C @@ -0,0 +1,37 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { check-function-bodies "**" "" "" { target { le } } } } */ + +/* +** _Z1fii: +** ... +** bfi x0, x1, 32, 32 +** ret +*/ +_Complex int f(int a, int b) { + _Complex int t = a + b * 1i; + return t; +} + +/* +** _Z2f2ii: +** ... +** bfi x0, x1, 32, 32 +** ret +*/ +_Complex int f2(int a, int b) { + _Complex int t = {a, b}; + return t; +} + +/* +** _Z12f_convolutedii: +** ... +** bfi x0, x1, 32, 32 +** ret +*/ +_Complex int f_convoluted(int a, int b) { + _Complex int t = (_Complex int)a; + __imag__ t = b; + return t; +} -- cgit v1.1 From faa0c328ee65f0d6d65d6e20181d26e336071919 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 7 Jul 2022 15:11:03 +0200 Subject: Fix one issue in OpenMP 'requires' directive diagnostics Fix-up for recent commit 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0 "OpenMP: Move omp requires checks to libgomp". gcc/ * lto-cgraph.cc (input_offload_tables) : Correct 'fn2' computation. libgomp/ * testsuite/libgomp.c-c++-common/requires-1.c: Add 'dg-note's. * testsuite/libgomp.c-c++-common/requires-2.c: Likewise. * testsuite/libgomp.c-c++-common/requires-3.c: Likewise. * testsuite/libgomp.c-c++-common/requires-7.c: Likewise. * testsuite/libgomp.fortran/requires-1.f90: Likewise. --- gcc/lto-cgraph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/lto-cgraph.cc b/gcc/lto-cgraph.cc index 4862965..6d9c36e 100644 --- a/gcc/lto-cgraph.cc +++ b/gcc/lto-cgraph.cc @@ -1879,7 +1879,7 @@ input_offload_tables (bool do_force_output) && TREE_CODE (tmp_decl) != TRANSLATION_UNIT_DECL) tmp_decl = DECL_CONTEXT (tmp_decl); if (tmp_decl != NULL_TREE) - fn2 = IDENTIFIER_POINTER (DECL_NAME (requires_decl)); + fn2 = IDENTIFIER_POINTER (DECL_NAME (tmp_decl)); } char buf1[sizeof ("unified_address, unified_shared_memory, " -- cgit v1.1 From f7854e2faf7640230062dec3596e71773ca500ed Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 8 Jul 2022 08:30:22 +0100 Subject: middle-end: don't lower past veclower [PR106063] Hi All, My previous patch can cause a problem if the pattern matches after veclower as it may replace the construct with a vector sequence which the target may not directly support. As such don't perform the rewriting if after veclower unless the target supports the operation. If before veclower do the rewriting as well if the target didn't support the original operation either. gcc/ChangeLog: PR tree-optimization/106063 * match.pd: Do not apply pattern after veclower is not supported. gcc/testsuite/ChangeLog: PR tree-optimization/106063 * gcc.dg/pr106063.c: New test. --- gcc/match.pd | 14 ++++++++++---- gcc/testsuite/gcc.dg/pr106063.c | 9 +++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr106063.c (limited to 'gcc') diff --git a/gcc/match.pd b/gcc/match.pd index c43c528..6603f29 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -6008,10 +6008,16 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (cmp (bit_and:c@2 @0 cst@1) integer_zerop) (with { tree csts = bitmask_inv_cst_vector_p (@1); } (if (csts && (VECTOR_TYPE_P (TREE_TYPE (@1)) || single_use (@2))) - (if (TYPE_UNSIGNED (TREE_TYPE (@1))) - (icmp @0 { csts; }) - (with { tree utype = unsigned_type_for (TREE_TYPE (@1)); } - (icmp (view_convert:utype @0) { csts; })))))))) + (with { auto optab = VECTOR_TYPE_P (TREE_TYPE (@1)) + ? optab_vector : optab_default; + tree utype = unsigned_type_for (TREE_TYPE (@1)); } + (if (target_supports_op_p (utype, icmp, optab) + || (optimize_vectors_before_lowering_p () + && (!target_supports_op_p (type, cmp, optab) + || !target_supports_op_p (type, BIT_AND_EXPR, optab)))) + (if (TYPE_UNSIGNED (TREE_TYPE (@1))) + (icmp @0 { csts; }) + (icmp (view_convert:utype @0) { csts; }))))))))) /* When one argument is a constant, overflow detection can be simplified. Currently restricted to single use so as not to interfere too much with diff --git a/gcc/testsuite/gcc.dg/pr106063.c b/gcc/testsuite/gcc.dg/pr106063.c new file mode 100644 index 0000000..b235967 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr106063.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-tree-forwprop --disable-tree-evrp" } */ +typedef __int128 __attribute__((__vector_size__ (16))) V; + +V +foo (V v) +{ + return (v & (V){15}) == v; +} -- cgit v1.1 From 95a234f5cbd510e6b8c8e53dd9f1003fddc84c28 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 4 Jul 2022 16:32:51 +0200 Subject: lto-dump: Do not print output file Right now the following is printed: lto-dump .file "" .ident "GCC: (GNU) 13.0.0 20220707 (experimental)" .section .note.GNU-stack,"",@progbits After the patch we print -help and do not emit any assembly output: lto-dump Usage: lto-dump [OPTION]... SUB_COMMAND [OPTION]... LTO dump tool command line options. -list [options] Dump the symbol list. -demangle Dump the demangled output. -defined-only Dump only the defined symbols. ... gcc/lto/ChangeLog: * lto-dump.cc (lto_main): Exit in the function as we don't want any LTO bytecode processing. gcc/ChangeLog: * toplev.cc (init_asm_output): Do not init asm_out_file. --- gcc/lto/lto-dump.cc | 16 ++++++++++------ gcc/toplev.cc | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/lto/lto-dump.cc b/gcc/lto/lto-dump.cc index f88486b..f3d852d 100644 --- a/gcc/lto/lto-dump.cc +++ b/gcc/lto/lto-dump.cc @@ -316,7 +316,10 @@ lto_main (void) { quiet_flag = true; if (flag_lto_dump_tool_help) - dump_tool_help (); + { + dump_tool_help (); + exit (SUCCESS_EXIT_CODE); + } /* LTO is called as a front end, even though it is not a front end. Because it is called as a front end, TV_PHASE_PARSING and @@ -369,11 +372,12 @@ lto_main (void) { /* Dump specific gimple body of specified function. */ dump_body (); - return; } else if (flag_dump_callgraph) - { - dump_symtab_graphviz (); - return; - } + dump_symtab_graphviz (); + else + dump_tool_help (); + + /* Exit right now. */ + exit (SUCCESS_EXIT_CODE); } diff --git a/gcc/toplev.cc b/gcc/toplev.cc index a24ad5d..61d234a 100644 --- a/gcc/toplev.cc +++ b/gcc/toplev.cc @@ -721,7 +721,7 @@ init_asm_output (const char *name) "cannot open %qs for writing: %m", asm_file_name); } - if (!flag_syntax_only) + if (!flag_syntax_only && !(global_dc->lang_mask & CL_LTODump)) { targetm.asm_out.file_start (); -- cgit v1.1 From cf3a120084e94614a4917f71940325cd4b537f24 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 8 Jul 2022 10:41:59 +0200 Subject: tree-optimization/106226 - move vectorizer virtual SSA update When we knowingly have broken virtual SSA form we need to update it before we eventually perform slpeel manual updating which will call delete_update_ssa. Currently that's done on-demand but communicating whether it's a known unavoidable case is broken there. The following makes that a synchronous operation but instead of actually performing the update we instead recod the need, clear the update SSA sub-state and force virtual renaming at the very end of the vectorization pass. PR tree-optimization/106226 * tree-vect-loop-manip.cc (vect_do_peeling): Assert that no SSA update is needed. Move virtual SSA update ... * tree-vectorizer.cc (pass_vectorize::execute): ... here, via forced virtual renaming when TODO_update_ssa_only_virtuals is queued. (vect_transform_loops): Return TODO_update_ssa_only_virtuals when virtual SSA update is required. (try_vectorize_loop_1): Adjust. * tree-vect-stmts.cc (vectorizable_simd_clone_call): Allow virtual renaming if the ABI forces an aggregate return but the original call did not have a virtual definition. * gfortran.dg/pr106226.f: New testcase. --- gcc/testsuite/gfortran.dg/pr106226.f | 37 ++++++++++++++++++++++++++++++++++++ gcc/tree-vect-loop-manip.cc | 11 +++++------ gcc/tree-vect-stmts.cc | 8 ++++++++ gcc/tree-vectorizer.cc | 29 +++++++++++++++++++++++++--- 4 files changed, 76 insertions(+), 9 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/pr106226.f (limited to 'gcc') diff --git a/gcc/testsuite/gfortran.dg/pr106226.f b/gcc/testsuite/gfortran.dg/pr106226.f new file mode 100644 index 0000000..19237bc --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr106226.f @@ -0,0 +1,37 @@ +! { dg-do compile } +! { dg-options "-O3 -std=legacy" } + + SUBROUTINE EFTORD(DM,CHDINT,L4) + IMPLICIT DOUBLE PRECISION (A-H,O-Z) + PARAMETER (MXPT=100, MXFRG=50, MXFGPT=MXPT*MXFRG) + DIMENSION DM(*),CHDINT(L4) + COMMON /FGRAD / DEF0,DEFT0,TORQ0 + * ,ATORQ(3,MXFRG) + COMMON /CSSTV / CX,CY,CZ + * EFBTRM(MXFGPT),EFATRM2(MXFGPT),EFBTRM2(MXFGPT), + * EFDIP(3,MXFGPT),EFQAD(6,MXFGPT), + * EFOCT(10,MXFGPT),FRGNME(MXFGPT) + IF(NROOTS.EQ.5) CALL ROOT5 + IF(NROOTS.EQ.6) CALL ROOT6 + IF(NROOTS.GE.7) THEN + CALL ABRT + END IF + DO 403 I = 1,IJ + CHDINT(ICC)=CHDINT(ICC)-DUM*DUMY + ICC=ICC+1 + 403 CONTINUE + CHDINT(ICC)=CHDINT(ICC)-DUM*DUMY + DO 550 J=MINJ,MAX + LJ=LOCJ+J + IF (LI-LJ) 920,940,940 + 920 ID = LJ + GO TO 960 + 940 ID = LI + 960 NN = (ID*(ID-1))/2+JD + DUM = DM(NN) + ATORQ(1,INF)=ATORQ(1,INF)-DUM*(CHDINT(ICC+1)*EFDIP(3,IC) + $ -CHDINT(ICC+2)*EFDIP(2,IC)) + ICC=ICC+1 + ICC=ICC+1 + 550 CONTINUE + END diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index d7410d7..2c2b4f7 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -2696,12 +2696,11 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1, class loop *first_loop = loop; bool irred_flag = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP; - /* We should not have to update virtual SSA form here but some - transforms involve creating new virtual definitions which makes - updating difficult. */ - gcc_assert (!need_ssa_update_p (cfun) - || loop_vinfo->any_known_not_updated_vssa); - update_ssa (TODO_update_ssa_only_virtuals); + /* SSA form needs to be up-to-date since we are going to manually + update SSA form in slpeel_tree_duplicate_loop_to_edge_cfg and delete all + update SSA state after that, so we have to make sure to not lose any + pending update needs. */ + gcc_assert (!need_ssa_update_p (cfun)); create_lcssa_for_virtual_phi (loop); diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 3db6620..01d982e 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -4247,6 +4247,14 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, if (!vec_stmt) /* transformation not required. */ { + /* When the original call is pure or const but the SIMD ABI dictates + an aggregate return we will have to use a virtual definition and + in a loop eventually even need to add a virtual PHI. That's + not straight-forward so allow to fix this up via renaming. */ + if (gimple_call_lhs (stmt) + && !gimple_vdef (stmt) + && TREE_CODE (TREE_TYPE (TREE_TYPE (bestn->decl))) == ARRAY_TYPE) + vinfo->any_known_not_updated_vssa = true; STMT_VINFO_SIMD_CLONE_INFO (stmt_info).safe_push (bestn->decl); for (i = 0; i < nargs; i++) if ((bestn->simdclone->args[i].arg_type diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc index 53dc452..6ec4951 100644 --- a/gcc/tree-vectorizer.cc +++ b/gcc/tree-vectorizer.cc @@ -82,6 +82,7 @@ along with GCC; see the file COPYING3. If not see #include "opt-problem.h" #include "internal-fn.h" #include "tree-ssa-sccvn.h" +#include "tree-into-ssa.h" /* Loop or bb location, with hotness information. */ dump_user_location_t vect_location; @@ -982,7 +983,7 @@ set_uid_loop_bbs (loop_vec_info loop_vinfo, gimple *loop_vectorized_call, /* Generate vectorized code for LOOP and its epilogues. */ -static void +static unsigned vect_transform_loops (hash_table *&simduid_to_vf_htab, loop_p loop, gimple *loop_vectorized_call, function *fun) @@ -1020,9 +1021,25 @@ vect_transform_loops (hash_table *&simduid_to_vf_htab, = simduid_to_vf_data; } + /* We should not have to update virtual SSA form here but some + transforms involve creating new virtual definitions which makes + updating difficult. + We delay the actual update to the end of the pass but avoid + confusing ourselves by forcing need_ssa_update_p () to false. */ + unsigned todo = 0; + if (need_ssa_update_p (cfun)) + { + gcc_assert (loop_vinfo->any_known_not_updated_vssa); + fun->gimple_df->ssa_renaming_needed = false; + todo |= TODO_update_ssa_only_virtuals; + } + gcc_assert (!need_ssa_update_p (cfun)); + /* Epilogue of vectorized loop must be vectorized too. */ if (new_loop) - vect_transform_loops (simduid_to_vf_htab, new_loop, NULL, fun); + todo |= vect_transform_loops (simduid_to_vf_htab, new_loop, NULL, fun); + + return todo; } /* Try to vectorize LOOP. */ @@ -1133,7 +1150,8 @@ try_vectorize_loop_1 (hash_table *&simduid_to_vf_htab, (*num_vectorized_loops)++; /* Transform LOOP and its epilogues. */ - vect_transform_loops (simduid_to_vf_htab, loop, loop_vectorized_call, fun); + ret |= vect_transform_loops (simduid_to_vf_htab, loop, + loop_vectorized_call, fun); if (loop_vectorized_call) { @@ -1332,6 +1350,11 @@ pass_vectorize::execute (function *fun) if (num_vectorized_loops > 0) { + /* We are collecting some corner cases where we need to update + virtual SSA form via the TODO but delete the queued update-SSA + state. Force renaming if we think that might be necessary. */ + if (ret & TODO_update_ssa_only_virtuals) + mark_virtual_operands_for_renaming (cfun); /* If we vectorized any loop only virtual SSA form needs to be updated. ??? Also while we try hard to update loop-closed SSA form we fail to properly do this in some corner-cases (see PR56286). */ -- cgit v1.1 From 6da7f7c5ac03f85a753989712588511e5f56e73d Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 29 Jun 2022 10:26:52 +0200 Subject: sanitizer: Fix hwasan related option conflicts [PR106132] Split report_conflicting_sanitizer_options(..., SANITIZE_ADDRESS | SANITIZE_HWADDRESS) call into 2 calls as we don't have any option that would be address+hwaddress (that conflicts) as well. PR sanitizer/106132 gcc/ChangeLog: * opts.cc (finish_options): Use 2 calls to report_conflicting_sanitizer_options. gcc/testsuite/ChangeLog: * c-c++-common/hwasan/arguments-3.c: Cover new ICE. --- gcc/opts.cc | 4 +++- gcc/testsuite/c-c++-common/hwasan/arguments-3.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/opts.cc b/gcc/opts.cc index fe0293e..54e57f3 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -1214,7 +1214,9 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, /* Address sanitizers conflict with the thread sanitizer. */ report_conflicting_sanitizer_options (opts, loc, SANITIZE_THREAD, - SANITIZE_ADDRESS | SANITIZE_HWADDRESS); + SANITIZE_ADDRESS); + report_conflicting_sanitizer_options (opts, loc, SANITIZE_THREAD, + SANITIZE_HWADDRESS); /* The leak sanitizer conflicts with the thread sanitizer. */ report_conflicting_sanitizer_options (opts, loc, SANITIZE_LEAK, SANITIZE_THREAD); diff --git a/gcc/testsuite/c-c++-common/hwasan/arguments-3.c b/gcc/testsuite/c-c++-common/hwasan/arguments-3.c index 6e907b4..2bf8917 100644 --- a/gcc/testsuite/c-c++-common/hwasan/arguments-3.c +++ b/gcc/testsuite/c-c++-common/hwasan/arguments-3.c @@ -1,3 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-fsanitize=thread" } */ +/* { dg-additional-options "-fsanitize=thread,address" } */ +/* { dg-error ".*'-fsanitize=thread' is incompatible with '-fsanitize=address'.*" "" { target *-*-* } 0 } */ /* { dg-error ".*'-fsanitize=thread' is incompatible with '-fsanitize=hwaddress'.*" "" { target *-*-* } 0 } */ +/* { dg-error ".*'-fsanitize=hwaddress' is incompatible with '-fsanitize=address'.*" "" { target *-*-* } 0 } */ -- cgit v1.1 From 2bd15617e73acf76207127e5580cd10b1fab91a5 Mon Sep 17 00:00:00 2001 From: Lewis Hyatt Date: Thu, 7 Jul 2022 13:59:27 -0400 Subject: diagnostics: Make line-ending logic consistent with libcpp [PR91733] libcpp recognizes a lone \r as a valid line ending, so the infrastructure for retrieving source lines to be output in diagnostics needs to do the same. This patch fixes file_cache_slot::get_next_line() accordingly so that diagnostics display the correct part of the source when \r line endings are in use. gcc/ChangeLog: PR preprocessor/91733 * input.cc (find_end_of_line): New helper function. (file_cache_slot::get_next_line): Recognize \r as a line ending. * diagnostic-show-locus.cc (test_escaping_bytes_1): Adapt selftest since \r will now be interpreted as a line-ending. gcc/testsuite/ChangeLog: PR preprocessor/91733 * c-c++-common/pr91733.c: New test. --- gcc/diagnostic-show-locus.cc | 14 ++++---- gcc/input.cc | 67 ++++++++++++++++++++++++++++-------- gcc/testsuite/c-c++-common/pr91733.c | 17 +++++++++ 3 files changed, 76 insertions(+), 22 deletions(-) create mode 100644 gcc/testsuite/c-c++-common/pr91733.c (limited to 'gcc') diff --git a/gcc/diagnostic-show-locus.cc b/gcc/diagnostic-show-locus.cc index 9cd7794..08dab20 100644 --- a/gcc/diagnostic-show-locus.cc +++ b/gcc/diagnostic-show-locus.cc @@ -5533,7 +5533,7 @@ test_tab_expansion (const line_table_case &case_) static void test_escaping_bytes_1 (const line_table_case &case_) { - const char content[] = "before\0\1\2\3\r\x80\xff""after\n"; + const char content[] = "before\0\1\2\3\v\x80\xff""after\n"; const size_t sz = sizeof (content); temp_source_file tmp (SELFTEST_LOCATION, ".c", content, sz); line_table_test ltt (case_); @@ -5548,18 +5548,18 @@ test_escaping_bytes_1 (const line_table_case &case_) if (finish > LINE_MAP_MAX_LOCATION_WITH_COLS) return; - /* Locations of the NUL and \r bytes. */ + /* Locations of the NUL and \v bytes. */ location_t nul_loc = linemap_position_for_line_and_column (line_table, ord_map, 1, 7); - location_t r_loc + location_t v_loc = linemap_position_for_line_and_column (line_table, ord_map, 1, 11); gcc_rich_location richloc (nul_loc); - richloc.add_range (r_loc); + richloc.add_range (v_loc); { test_diagnostic_context dc; diagnostic_show_locus (&dc, &richloc, DK_ERROR); - ASSERT_STREQ (" before \1\2\3 \x80\xff""after\n" + ASSERT_STREQ (" before \1\2\3\v\x80\xff""after\n" " ^ ~\n", pp_formatted_text (dc.printer)); } @@ -5569,7 +5569,7 @@ test_escaping_bytes_1 (const line_table_case &case_) dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_UNICODE; diagnostic_show_locus (&dc, &richloc, DK_ERROR); ASSERT_STREQ - (" before<80>after\n" + (" before<80>after\n" " ^~~~~~~~ ~~~~~~~~\n", pp_formatted_text (dc.printer)); } @@ -5577,7 +5577,7 @@ test_escaping_bytes_1 (const line_table_case &case_) test_diagnostic_context dc; dc.escape_format = DIAGNOSTICS_ESCAPE_FORMAT_BYTES; diagnostic_show_locus (&dc, &richloc, DK_ERROR); - ASSERT_STREQ (" before<00><01><02><03><0d><80>after\n" + ASSERT_STREQ (" before<00><01><02><03><0b><80>after\n" " ^~~~ ~~~~\n", pp_formatted_text (dc.printer)); } diff --git a/gcc/input.cc b/gcc/input.cc index 2acbfde..060ca16 100644 --- a/gcc/input.cc +++ b/gcc/input.cc @@ -646,6 +646,37 @@ file_cache_slot::maybe_read_data () return read_data (); } +/* Helper function for file_cache_slot::get_next_line (), to find the end of + the next line. Returns with the memchr convention, i.e. nullptr if a line + terminator was not found. We need to determine line endings in the same + manner that libcpp does: any of \n, \r\n, or \r is a line ending. */ + +static char * +find_end_of_line (char *s, size_t len) +{ + for (const auto end = s + len; s != end; ++s) + { + if (*s == '\n') + return s; + if (*s == '\r') + { + const auto next = s + 1; + if (next == end) + { + /* Don't find the line ending if \r is the very last character + in the buffer; we do not know if it's the end of the file or + just the end of what has been read so far, and we wouldn't + want to break in the middle of what's actually a \r\n + sequence. Instead, we will handle the case of a file ending + in a \r later. */ + break; + } + return (*next == '\n' ? next : s); + } + } + return nullptr; +} + /* Read a new line from file FP, using C as a cache for the data coming from the file. Upon successful completion, *LINE is set to the beginning of the line found. *LINE points directly in the @@ -671,17 +702,16 @@ file_cache_slot::get_next_line (char **line, ssize_t *line_len) char *next_line_start = NULL; size_t len = 0; - char *line_end = (char *) memchr (line_start, '\n', remaining_size); + char *line_end = find_end_of_line (line_start, remaining_size); if (line_end == NULL) { - /* We haven't found the end-of-line delimiter in the cache. - Fill the cache with more data from the file and look for the - '\n'. */ + /* We haven't found an end-of-line delimiter in the cache. + Fill the cache with more data from the file and look again. */ while (maybe_read_data ()) { line_start = m_data + m_line_start_idx; remaining_size = m_nb_read - m_line_start_idx; - line_end = (char *) memchr (line_start, '\n', remaining_size); + line_end = find_end_of_line (line_start, remaining_size); if (line_end != NULL) { next_line_start = line_end + 1; @@ -690,14 +720,22 @@ file_cache_slot::get_next_line (char **line, ssize_t *line_len) } if (line_end == NULL) { - /* We've loadded all the file into the cache and still no - '\n'. Let's say the line ends up at one byte passed the + /* We've loaded all the file into the cache and still no + terminator. Let's say the line ends up at one byte past the end of the file. This is to stay consistent with the case - of when the line ends up with a '\n' and line_end points to - that terminal '\n'. That consistency is useful below in - the len calculation. */ - line_end = m_data + m_nb_read ; - m_missing_trailing_newline = true; + of when the line ends up with a terminator and line_end points to + that. That consistency is useful below in the len calculation. + + If the file ends in a \r, we didn't identify it as a line + terminator above, so do that now instead. */ + line_end = m_data + m_nb_read; + if (m_nb_read && line_end[-1] == '\r') + { + --line_end; + m_missing_trailing_newline = false; + } + else + m_missing_trailing_newline = true; } else m_missing_trailing_newline = false; @@ -711,9 +749,8 @@ file_cache_slot::get_next_line (char **line, ssize_t *line_len) if (m_fp && ferror (m_fp)) return false; - /* At this point, we've found the end of the of line. It either - points to the '\n' or to one byte after the last byte of the - file. */ + /* At this point, we've found the end of the of line. It either points to + the line terminator or to one byte after the last byte of the file. */ gcc_assert (line_end != NULL); len = line_end - line_start; diff --git a/gcc/testsuite/c-c++-common/pr91733.c b/gcc/testsuite/c-c++-common/pr91733.c new file mode 100644 index 0000000..1539bb4 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr91733.c @@ -0,0 +1,17 @@ +/* { dg-do preprocess } */ +/* { dg-additional-options "-fdiagnostics-show-caret" } */ + +const char *s = " "; + +/* { dg-warning "missing terminating \"" "test1" { target *-*-* } 4 } */ +/* { dg-warning "missing terminating \"" "test2" { target *-*-* } 5 } */ + +/* { dg-begin-multiline-output "test3" } + const char *s = " + ^ +{ dg-end-multiline-output "test3" } */ + +/* { dg-begin-multiline-output "test4" } + "; + ^ +{ dg-end-multiline-output "test4" } */ -- cgit v1.1 From b984b84cbe4bf026edef2ba37685f3958a1dc1cf Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 8 Jul 2022 18:12:26 +0200 Subject: testsuite: Fix tree-ssa/alias-access-path-13.c on 32bit platforms (PR 106216) For gcc.dg/tree-ssa/alias-access-path-13.c to work, SRA must think of accesses to foo.inn.val and to foo itself as different ones, i.e. they need to have different offset and size, which on 32bit platforms they do not. Fixed by replacing a dummy long int field of the union with a struct of two integers. Tested by: make -k check-gcc RUNTESTFLAGS="tree-ssa.exp=alias-access-path-13.c" and make -k check-gcc RUNTESTFLAGS="--target_board=unix'{-m32}' tree-ssa.exp=alias-access-path-13.c" on an x86_64-linux, also with patched SRA to verify it still tests the original intent. gcc/testsuite/ChangeLog: 2022-07-08 Martin Jambor PR testsuite/106216 * gcc.dg/tree-ssa/alias-access-path-13.c (union foo): Replace a long int field with a struct that is larger than an int also on 32bit platforms. --- gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c index e502a97..87a94f5 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c @@ -6,10 +6,15 @@ struct inn int val; }; +struct biggerstruct +{ + int a, b; +}; + union foo { struct inn inn; - long int baz; + struct biggerstruct baz; } *fooptr; struct bar -- cgit v1.1 From 0fe604a2d93168c8d19db83edf8a7f806aa4fe69 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sat, 9 Jul 2022 00:16:54 +0000 Subject: Daily bump. --- gcc/ChangeLog | 88 +++++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/lto/ChangeLog | 5 +++ gcc/testsuite/ChangeLog | 40 ++++++++++++++++++++++ 4 files changed, 134 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f5be38..9f56ba2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,91 @@ +2022-07-08 Lewis Hyatt + + PR preprocessor/91733 + * input.cc (find_end_of_line): New helper function. + (file_cache_slot::get_next_line): Recognize \r as a line ending. + * diagnostic-show-locus.cc (test_escaping_bytes_1): Adapt selftest + since \r will now be interpreted as a line-ending. + +2022-07-08 Martin Liska + + PR sanitizer/106132 + * opts.cc (finish_options): Use 2 calls to + report_conflicting_sanitizer_options. + +2022-07-08 Richard Biener + + PR tree-optimization/106226 + * tree-vect-loop-manip.cc (vect_do_peeling): Assert that + no SSA update is needed. Move virtual SSA update ... + * tree-vectorizer.cc (pass_vectorize::execute): ... here, + via forced virtual renaming when TODO_update_ssa_only_virtuals + is queued. + (vect_transform_loops): Return TODO_update_ssa_only_virtuals + when virtual SSA update is required. + (try_vectorize_loop_1): Adjust. + * tree-vect-stmts.cc (vectorizable_simd_clone_call): Allow + virtual renaming if the ABI forces an aggregate return + but the original call did not have a virtual definition. + +2022-07-08 Martin Liska + + * toplev.cc (init_asm_output): Do not init asm_out_file. + +2022-07-08 Tamar Christina + + PR tree-optimization/106063 + * match.pd: Do not apply pattern after veclower is not supported. + +2022-07-08 Thomas Schwinge + + * lto-cgraph.cc (input_offload_tables) : Correct + 'fn2' computation. + +2022-07-08 Tamar Christina + + * expmed.cc (store_bit_field_1): Add parameter that indicates if value is + still undefined and if so emit a subreg move instead. + (store_integral_bit_field): Likewise. + (store_bit_field): Likewise. + * expr.h (write_complex_part): Likewise. + * expmed.h (store_bit_field): Add new parameter. + * builtins.cc (expand_ifn_atomic_compare_exchange_into_call): Use new + parameter. + (expand_ifn_atomic_compare_exchange): Likewise. + * calls.cc (store_unaligned_arguments_into_pseudos): Likewise. + * emit-rtl.cc (validate_subreg): Likewise. + * expr.cc (emit_group_store): Likewise. + (copy_blkmode_from_reg): Likewise. + (copy_blkmode_to_reg): Likewise. + (clear_storage_hints): Likewise. + (write_complex_part): Likewise. + (emit_move_complex_parts): Likewise. + (expand_assignment): Likewise. + (store_expr): Likewise. + (store_field): Likewise. + (expand_expr_real_2): Likewise. + * ifcvt.cc (noce_emit_move_insn): Likewise. + * internal-fn.cc (expand_arith_set_overflow): Likewise. + (expand_arith_overflow_result_store): Likewise. + (expand_addsub_overflow): Likewise. + (expand_neg_overflow): Likewise. + (expand_mul_overflow): Likewise. + (expand_arith_overflow): Likewise. + +2022-07-08 Haochen Jiang + + PR target/106180 + * config/i386/sse.md (sse2_cvtps2pd_1): + Rename from *sse2_cvtps2pd_1. + (vec_unpacks_lo_v4sf): Add handler for memory operand. + +2022-07-08 Lulu Cheng + + * config/loongarch/loongarch.cc (loongarch_compute_frame_info): + Modify fp_sp_offset and gp_sp_offset's calculation method, + when frame->mask or frame->fmask is zero, don't minus UNITS_PER_WORD + or UNITS_PER_FP_REG. + 2022-07-07 David Malcolm * diagnostic-format-json.cc (json_from_location_range): Update for diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index aa8fe3c..2f349b0 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220708 +20220709 diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index fc61246..3cf57fa 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2022-07-08 Martin Liska + + * lto-dump.cc (lto_main): Exit in the function + as we don't want any LTO bytecode processing. + 2022-06-27 David Malcolm * lto-dump.cc: Add "final" and "override" to various vfunc diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1c948f5..e40061c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,43 @@ +2022-07-08 Martin Jambor + + PR testsuite/106216 + * gcc.dg/tree-ssa/alias-access-path-13.c (union foo): Replace a long + int field with a struct that is larger than an int also on 32bit + platforms. + +2022-07-08 Lewis Hyatt + + PR preprocessor/91733 + * c-c++-common/pr91733.c: New test. + +2022-07-08 Martin Liska + + PR sanitizer/106132 + * c-c++-common/hwasan/arguments-3.c: Cover new ICE. + +2022-07-08 Richard Biener + + PR tree-optimization/106226 + * gfortran.dg/pr106226.f: New testcase. + +2022-07-08 Tamar Christina + + PR tree-optimization/106063 + * gcc.dg/pr106063.c: New test. + +2022-07-08 Tamar Christina + + * g++.target/aarch64/complex-init.C: New test. + +2022-07-08 Haochen Jiang + + PR target/106180 + * g++.target/i386/pr106180-1.C: New test. + +2022-07-08 Lulu Cheng + + * gcc.target/loongarch/prolog-opt.c: New test. + 2022-07-07 Patrick Palka PR c++/105956 -- cgit v1.1 From 71e3daa31cfa35ee58e5899cb00767be92227fd2 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Thu, 7 Jul 2022 22:06:19 +0000 Subject: Fix tree-opt/PR106087: ICE with inline-asm with multiple output and assigned only static vars The problem here is that when we mark the ssa name that was referenced in the now removed dead store (to a write only static variable), the inline-asm would also be removed even though it was defining another ssa name. This fixes the problem by checking to make sure that the statement was only defining one ssa name. Committed as approved after a bootstrapped and tested on x86_64 with no regressions. PR tree-optimization/106087 gcc/ChangeLog: * tree-ssa-dce.cc (simple_dce_from_worklist): Check to make sure the statement is only defining one operand. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/inline-asm-1.c: New test. --- gcc/testsuite/gcc.c-torture/compile/inline-asm-1.c | 14 ++++++++++++++ gcc/tree-ssa-dce.cc | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/inline-asm-1.c (limited to 'gcc') diff --git a/gcc/testsuite/gcc.c-torture/compile/inline-asm-1.c b/gcc/testsuite/gcc.c-torture/compile/inline-asm-1.c new file mode 100644 index 0000000..0044cb7 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/inline-asm-1.c @@ -0,0 +1,14 @@ +/* PR tree-opt/106087, + simple_dce_from_worklist would delete the + inline-asm when it was still being referenced + by the other ssa name. */ + +static int t; + +int f(void) +{ + int tt, tt1; + asm("":"=r"(tt), "=r"(tt1)); + t = tt1; + return tt; +} diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc index bc53358..daf0782 100644 --- a/gcc/tree-ssa-dce.cc +++ b/gcc/tree-ssa-dce.cc @@ -2061,6 +2061,13 @@ simple_dce_from_worklist (bitmap worklist) if (gimple_has_side_effects (t)) continue; + /* The defining statement needs to be defining only this name. + ASM is the only statement that can define more than one + (non-virtual) name. */ + if (is_a(t) + && !single_ssa_def_operand (t, SSA_OP_DEF)) + continue; + /* Don't remove statements that are needed for non-call eh to work. */ if (stmt_unremovable_because_of_non_call_eh_p (cfun, t)) -- cgit v1.1 From 84ff566c63cde517c7d963a554e338531fb059f1 Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 8 Jul 2022 21:54:44 -0400 Subject: [PATCH][s390]: Fix the usage of store_bit_field in the backend. Hi All, I seem to have broken the s390 bootstrap because I added a new parameter to the store_bit_field function to indicate whether the value the field of is being set is currently undefined. If it's undefined we use a subreg instead. In this case the value of false restores the old behavior. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/s390/s390.cc (s390_expand_atomic): Pass false to store_bit_field to indicate that the value is not undefined. --- gcc/config/s390/s390.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc index 444b1ec..5aaf76a 100644 --- a/gcc/config/s390/s390.cc +++ b/gcc/config/s390/s390.cc @@ -7468,7 +7468,7 @@ s390_expand_atomic (machine_mode mode, enum rtx_code code, case SET: if (ac.aligned && MEM_P (val)) store_bit_field (new_rtx, GET_MODE_BITSIZE (mode), 0, - 0, 0, SImode, val, false); + 0, 0, SImode, val, false, false); else { new_rtx = expand_simple_binop (SImode, AND, new_rtx, ac.modemaski, -- cgit v1.1 From 002d81affa8a4e625993d3c9c7840ca4aba9750c Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Sat, 9 Jul 2022 09:02:14 +0100 Subject: Support *testdi_not_doubleword during STV pass on x86. This patch fixes the current two FAILs of pr65105-5.c on x86 when compiled with -m32. These (temporary) breakages were fallout from my patches to improve/upgrade (scalar) double word comparisons. On mainline, the i386 backend currently represents a critical comparison using (compare (and (not reg1) reg2) (const_int 0)) which isn't/wasn't recognized by the STV pass' convertible_comparison_p. This simple STV patch adds support for this pattern (*testdi_not_doubleword) and generates the vector pandn and ptest instructions expected in the existing (failing) test case. 2022-07-09 Roger Sayle gcc/ChangeLog * config/i386/i386-features.cc (convert_compare): Add support for *testdi_not_doubleword pattern, "(compare (and (not ...)))" by generating a pandn followed by ptest. (convertible_comparison_p): Recognize both *cmpdi_doubleword and recent *testdi_not_doubleword comparison patterns. --- gcc/config/i386/i386-features.cc | 53 +++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 12 deletions(-) (limited to 'gcc') diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc index be38586..a7bd172 100644 --- a/gcc/config/i386/i386-features.cc +++ b/gcc/config/i386/i386-features.cc @@ -938,10 +938,10 @@ general_scalar_chain::convert_compare (rtx op1, rtx op2, rtx_insn *insn) { rtx tmp = gen_reg_rtx (vmode); rtx src; - convert_op (&op1, insn); /* Comparison against anything other than zero, requires an XOR. */ if (op2 != const0_rtx) { + convert_op (&op1, insn); convert_op (&op2, insn); /* If both operands are MEMs, explicitly load the OP1 into TMP. */ if (MEM_P (op1) && MEM_P (op2)) @@ -953,8 +953,25 @@ general_scalar_chain::convert_compare (rtx op1, rtx op2, rtx_insn *insn) src = op1; src = gen_rtx_XOR (vmode, src, op2); } + else if (GET_CODE (op1) == AND + && GET_CODE (XEXP (op1, 0)) == NOT) + { + rtx op11 = XEXP (XEXP (op1, 0), 0); + rtx op12 = XEXP (op1, 1); + convert_op (&op11, insn); + convert_op (&op12, insn); + if (MEM_P (op11)) + { + emit_insn_before (gen_rtx_SET (tmp, op11), insn); + op11 = tmp; + } + src = gen_rtx_AND (vmode, gen_rtx_NOT (vmode, op11), op12); + } else - src = op1; + { + convert_op (&op1, insn); + src = op1; + } emit_insn_before (gen_rtx_SET (tmp, src), insn); if (vmode == V2DImode) @@ -1399,17 +1416,29 @@ convertible_comparison_p (rtx_insn *insn, enum machine_mode mode) rtx op1 = XEXP (src, 0); rtx op2 = XEXP (src, 1); - if (!CONST_INT_P (op1) - && ((!REG_P (op1) && !MEM_P (op1)) - || GET_MODE (op1) != mode)) - return false; - - if (!CONST_INT_P (op2) - && ((!REG_P (op2) && !MEM_P (op2)) - || GET_MODE (op2) != mode)) - return false; + /* *cmp_doubleword. */ + if ((CONST_INT_P (op1) + || ((REG_P (op1) || MEM_P (op1)) + && GET_MODE (op1) == mode)) + && (CONST_INT_P (op2) + || ((REG_P (op2) || MEM_P (op2)) + && GET_MODE (op2) == mode))) + return true; + + /* *test_not_doubleword. */ + if (op2 == const0_rtx + && GET_CODE (op1) == AND + && GET_CODE (XEXP (op1, 0)) == NOT) + { + rtx op11 = XEXP (XEXP (op1, 0), 0); + rtx op12 = XEXP (op1, 1); + return (REG_P (op11) || MEM_P (op11)) + && (REG_P (op12) || MEM_P (op12)) + && GET_MODE (op11) == mode + && GET_MODE (op12) == mode; + } - return true; + return false; } /* The general version of scalar_to_vector_candidate_p. */ -- cgit v1.1 From b434c94bf7a5d4bb9ca8f0b5442ca85b43f32a9a Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Sat, 9 Jul 2022 09:07:18 +0100 Subject: Improve preservation of FLAGS_REG mode in i386.md's peephole2s. The patch tweaks several peephole2s in i386.md that propagate the flags register, but take its mode from the SET_SRC rather than preserve the mode of the original SET_DEST. This encounters problems when the SET_SRC is a VOIDmode CONST_INT. Fixed by using match_operand with a flags_reg_operand predicate. 2022-07-09 Roger Sayle gcc/ChangeLog * config/i386/i386.md (define_peephole2): Use match_operand of flags_reg_operand to capture and preserve the mode of FLAGS_REG. (define_peephole2): Likewise. (define_peephole2): Likewise... --- gcc/config/i386/i386.md | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'gcc') diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index bdde577..3b02d0c 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -15220,7 +15220,7 @@ ;; Convert setcc + movzbl to xor + setcc if operands don't overlap. (define_peephole2 - [(set (reg FLAGS_REG) (match_operand 0)) + [(set (match_operand 4 "flags_reg_operand") (match_operand 0)) (set (match_operand:QI 1 "register_operand") (match_operator:QI 2 "ix86_comparison_operator" [(reg FLAGS_REG) (const_int 0)])) @@ -15234,13 +15234,12 @@ (set (strict_low_part (match_dup 5)) (match_dup 2))] { - operands[4] = gen_rtx_REG (GET_MODE (operands[0]), FLAGS_REG); operands[5] = gen_lowpart (QImode, operands[3]); ix86_expand_clear (operands[3]); }) (define_peephole2 - [(parallel [(set (reg FLAGS_REG) (match_operand 0)) + [(parallel [(set (match_operand 5 "flags_reg_operand") (match_operand 0)) (match_operand 4)]) (set (match_operand:QI 1 "register_operand") (match_operator:QI 2 "ix86_comparison_operator" @@ -15258,14 +15257,13 @@ (set (strict_low_part (match_dup 6)) (match_dup 2))] { - operands[5] = gen_rtx_REG (GET_MODE (operands[0]), FLAGS_REG); operands[6] = gen_lowpart (QImode, operands[3]); ix86_expand_clear (operands[3]); }) (define_peephole2 - [(set (reg FLAGS_REG) (match_operand 0)) - (parallel [(set (reg FLAGS_REG) (match_operand 1)) + [(set (match_operand 6 "flags_reg_operand") (match_operand 0)) + (parallel [(set (match_operand 7 "flags_reg_operand") (match_operand 1)) (match_operand 5)]) (set (match_operand:QI 2 "register_operand") (match_operator:QI 3 "ix86_comparison_operator" @@ -15286,8 +15284,6 @@ (set (strict_low_part (match_dup 8)) (match_dup 3))] { - operands[6] = gen_rtx_REG (GET_MODE (operands[0]), FLAGS_REG); - operands[7] = gen_rtx_REG (GET_MODE (operands[1]), FLAGS_REG); operands[8] = gen_lowpart (QImode, operands[4]); ix86_expand_clear (operands[4]); }) @@ -15295,7 +15291,7 @@ ;; Similar, but match zero extend with andsi3. (define_peephole2 - [(set (reg FLAGS_REG) (match_operand 0)) + [(set (match_operand 4 "flags_reg_operand") (match_operand 0)) (set (match_operand:QI 1 "register_operand") (match_operator:QI 2 "ix86_comparison_operator" [(reg FLAGS_REG) (const_int 0)])) @@ -15309,13 +15305,12 @@ (set (strict_low_part (match_dup 5)) (match_dup 2))] { - operands[4] = gen_rtx_REG (GET_MODE (operands[0]), FLAGS_REG); operands[5] = gen_lowpart (QImode, operands[3]); ix86_expand_clear (operands[3]); }) (define_peephole2 - [(parallel [(set (reg FLAGS_REG) (match_operand 0)) + [(parallel [(set (match_operand 5 "flags_reg_operand") (match_operand 0)) (match_operand 4)]) (set (match_operand:QI 1 "register_operand") (match_operator:QI 2 "ix86_comparison_operator" @@ -15334,14 +15329,13 @@ (set (strict_low_part (match_dup 6)) (match_dup 2))] { - operands[5] = gen_rtx_REG (GET_MODE (operands[0]), FLAGS_REG); operands[6] = gen_lowpart (QImode, operands[3]); ix86_expand_clear (operands[3]); }) (define_peephole2 - [(set (reg FLAGS_REG) (match_operand 0)) - (parallel [(set (reg FLAGS_REG) (match_operand 1)) + [(set (match_operand 6 "flags_reg_operand") (match_operand 0)) + (parallel [(set (match_operand 7 "flags_reg_operand") (match_operand 1)) (match_operand 5)]) (set (match_operand:QI 2 "register_operand") (match_operator:QI 3 "ix86_comparison_operator" @@ -15363,8 +15357,6 @@ (set (strict_low_part (match_dup 8)) (match_dup 3))] { - operands[6] = gen_rtx_REG (GET_MODE (operands[0]), FLAGS_REG); - operands[7] = gen_rtx_REG (GET_MODE (operands[1]), FLAGS_REG); operands[8] = gen_lowpart (QImode, operands[4]); ix86_expand_clear (operands[4]); }) -- cgit v1.1 From 46dc26fdfbf3e64f82188e21aa6a13ec23108e8e Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sat, 9 Jul 2022 11:11:00 -0400 Subject: [RFA] Improve initialization of objects when the initializer has trailing zeros. gcc/ * expr.cc (store_expr): Identify trailing NULs in a STRING_CST initializer and use clear_storage rather than copying the NULs to the destination array. --- gcc/expr.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gcc') diff --git a/gcc/expr.cc b/gcc/expr.cc index eb280e6..f9753d4 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -6088,6 +6088,17 @@ store_expr (tree exp, rtx target, int call_param_p, } str_copy_len = TREE_STRING_LENGTH (str); + + /* Trailing NUL bytes in EXP will be handled by the call to + clear_storage, which is more efficient than copying them from + the STRING_CST, so trim those from STR_COPY_LEN. */ + while (str_copy_len) + { + if (TREE_STRING_POINTER (str)[str_copy_len - 1]) + break; + str_copy_len--; + } + if ((STORE_MAX_PIECES & (STORE_MAX_PIECES - 1)) == 0) { str_copy_len += STORE_MAX_PIECES - 1; -- cgit v1.1 From d9fa599dc7584d89e758a09a3d68982f12d8751c Mon Sep 17 00:00:00 2001 From: Sam Feifer Date: Sat, 9 Jul 2022 12:08:01 -0400 Subject: [PATCH] match.pd: Add new bitwise arithmetic pattern [PR98304] PR tree-optimization/98304 gcc: * match.pd (n - (((n > C1) ? n : C1) & -C2)): New simplification. gcc/testsuite: * gcc.c-torture/execute/pr98304-2.c: New test. * gcc.dg/pr98304-1.c: New test. --- gcc/match.pd | 12 ++++++ gcc/testsuite/gcc.c-torture/execute/pr98304-2.c | 37 ++++++++++++++++ gcc/testsuite/gcc.dg/pr98304-1.c | 57 +++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr98304-2.c create mode 100644 gcc/testsuite/gcc.dg/pr98304-1.c (limited to 'gcc') diff --git a/gcc/match.pd b/gcc/match.pd index 6603f29..8bbc0db 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -8026,3 +8026,15 @@ and, (match (bitwise_induction_p @0 @2 @3) (bit_not (nop_convert1? (bit_xor@0 (convert2? (lshift integer_onep@1 @2)) @3)))) + +/* n - (((n > C1) ? n : C1) & -C2) -> n & C1 for unsigned case. + n - (((n > C1) ? n : C1) & -C2) -> (n <= C1) ? n : (n & C1) for signed case. */ +(simplify + (minus @0 (bit_and (max @0 INTEGER_CST@1) INTEGER_CST@2)) + (with { auto i = wi::neg (wi::to_wide (@2)); } + /* Check if -C2 is a power of 2 and C1 = -C2 - 1. */ + (if (wi::popcount (i) == 1 + && (wi::to_wide (@1)) == (i - 1)) + (if (TYPE_UNSIGNED (TREE_TYPE (@0))) + (bit_and @0 @1) + (cond (le @0 @1) @0 (bit_and @0 @1)))))) diff --git a/gcc/testsuite/gcc.c-torture/execute/pr98304-2.c b/gcc/testsuite/gcc.c-torture/execute/pr98304-2.c new file mode 100644 index 0000000..114c612 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr98304-2.c @@ -0,0 +1,37 @@ +/* PR tree-optimization/98304 */ + +#include "../../gcc.dg/pr98304-1.c" + +/* Runtime tests. */ +int main() { + + /* Signed tests. */ + if (foo(-42) != -42 + || foo(0) != 0 + || foo(63) != 63 + || foo(64) != 0 + || foo(65) != 1 + || foo(99) != 35) { + __builtin_abort(); + } + + /* Unsigned tests. */ + if (bar(42) != 42 + || bar(0) != 0 + || bar(63) != 63 + || bar(64) != 0 + || bar(65) != 1 + || bar(99) != 35) { + __builtin_abort(); + } + + /* Should not simplify. */ + if (corge(13) != 13 + || thud(13) != 13 + || qux(13) != 13 + || quux(13) != 13) { + __builtin_abort(); + } + + return 0; +} diff --git a/gcc/testsuite/gcc.dg/pr98304-1.c b/gcc/testsuite/gcc.dg/pr98304-1.c new file mode 100644 index 0000000..dce54dd --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr98304-1.c @@ -0,0 +1,57 @@ +/* PR tree-optimization/98304 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ + +/* Signed test function. */ +__attribute__((noipa)) int foo(int n) { + return n - (((n > 63) ? n : 63) & -64); +} + +/* Unsigned test function. */ +__attribute__((noipa)) unsigned int bar(unsigned int n) { + return n - (((n > 63) ? n : 63) & -64); +} + +/* Different power of 2. */ +__attribute__((noipa)) int goo(int n) { + return n - (((n > 31) ? n : 31) & -32); +} + +/* Commutative property (should be identical to foo) */ +__attribute__((noipa)) int baz(int n) { + return n - (((64 > n) ? 63 : n) & -64); +} + +/* < instead of >. */ +__attribute__((noipa)) int fred(int n) { + return n - (((63 < n) ? n : 63) & -64); +} + +/* Constant is not a power of 2 so should not simplify. */ +__attribute__((noipa)) int qux(int n) { + return n - (((n > 62) ? n : 62) & -63); +} + +/* Constant is not a power of 2 so should not simplify. */ +__attribute__((noipa)) unsigned int quux(unsigned int n) { + return n - (((n > 62) ? n : 62) & -63); +} + +/* Constant is a variable so should not simplify. */ +__attribute__((noipa)) int waldo(int n, int x) { + return n - (((n > 63) ? n : 63) & x); +} + +/* Difference between constants is not -1. */ +__attribute__((noipa)) int corge(int n) { + return n - (((n > 1) ? n : 1) & -64); +} + +/* Difference between constants is not -1. */ +__attribute__((noipa)) unsigned int thud(unsigned int n) +{ + return n - (((n > 1) ? n : 1) & -64); +} + +/* { dg-final { scan-tree-dump-times " - " 5 "optimized" } } */ +/* { dg-final { scan-tree-dump-times " <= " 4 "optimized" } } */ -- cgit v1.1 From 7a16d39903ed1bf159f7933a19ccae62155b371b Mon Sep 17 00:00:00 2001 From: Vit Kabele Date: Sat, 9 Jul 2022 13:06:43 -0400 Subject: [PATCH v3] c: Extend the -Wpadded message with actual padding size gcc/ChangeLog: * stor-layout.cc (finalize_record_size): Extend warning message. gcc/testsuite/ChangeLog: * c-c++-common/Wpadded.c: New test. --- gcc/stor-layout.cc | 7 ++++++- gcc/testsuite/c-c++-common/Wpadded.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/c-c++-common/Wpadded.c (limited to 'gcc') diff --git a/gcc/stor-layout.cc b/gcc/stor-layout.cc index 765f22f6..88923c4 100644 --- a/gcc/stor-layout.cc +++ b/gcc/stor-layout.cc @@ -1781,7 +1781,12 @@ finalize_record_size (record_layout_info rli) && simple_cst_equal (unpadded_size, TYPE_SIZE (rli->t)) == 0 && input_location != BUILTINS_LOCATION && !TYPE_ARTIFICIAL (rli->t)) - warning (OPT_Wpadded, "padding struct size to alignment boundary"); + { + tree pad_size + = size_binop (MINUS_EXPR, TYPE_SIZE_UNIT (rli->t), unpadded_size_unit); + warning (OPT_Wpadded, + "padding struct size to alignment boundary with %E bytes", pad_size); + } if (warn_packed && TREE_CODE (rli->t) == RECORD_TYPE && TYPE_PACKED (rli->t) && ! rli->packed_maybe_necessary diff --git a/gcc/testsuite/c-c++-common/Wpadded.c b/gcc/testsuite/c-c++-common/Wpadded.c new file mode 100644 index 0000000..c5be468 --- /dev/null +++ b/gcc/testsuite/c-c++-common/Wpadded.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-Wpadded" } */ + +/* + * The struct is on single line, because C++ compiler emits the -Wpadded + * warning at the first line of the struct definition, while the C compiler at + * the last line. This way the test passes on both. + * + * Attribute aligned is needed for the test to pass on targets where + * the default behaviour is to pack the struct and also on targets that align + * 4 byte fields to 2 byte boundary. + */ +struct S { __UINT32_TYPE__ i; char c; } __attribute__((aligned(4))); /* { dg-warning "padding struct size to alignment boundary with 3 bytes" } */ + -- cgit v1.1 From 030a53c613031d11e11fb7b1b08aec1a736da067 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Sat, 9 Jul 2022 17:43:44 +0200 Subject: Set VR_VARYING in irange::irange_single_pair_union. The fast union operation is sometimes setting a range of the entire domain, but leaving the kind bit as VR_RANGE instead of downgrading it to VR_VARYING. Tested on x86-64 Linux. gcc/ChangeLog: * value-range.cc (irange::irange_single_pair_union): Set VR_VARYING when appropriate. --- gcc/value-range.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'gcc') diff --git a/gcc/value-range.cc b/gcc/value-range.cc index 25f1acf..fd549b9 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -1777,11 +1777,7 @@ irange::irange_single_pair_union (const irange &r) // Check for overlap/touching ranges, or single target range. if (m_max_ranges == 1 || wi::to_widest (m_base[1]) + 1 >= wi::to_widest (r.m_base[0])) - { - m_base[1] = r.m_base[1]; - if (varying_compatible_p ()) - m_kind = VR_VARYING; - } + m_base[1] = r.m_base[1]; else { // This is a dual range result. @@ -1789,8 +1785,8 @@ irange::irange_single_pair_union (const irange &r) m_base[3] = r.m_base[1]; m_num_ranges = 2; } - if (flag_checking) - verify_range (); + if (varying_compatible_p ()) + m_kind = VR_VARYING; return true; } @@ -1817,8 +1813,8 @@ irange::irange_single_pair_union (const irange &r) m_base[3] = m_base[1]; m_base[1] = r.m_base[1]; } - if (flag_checking) - verify_range (); + if (varying_compatible_p ()) + m_kind = VR_VARYING; return true; } @@ -1857,6 +1853,8 @@ irange::irange_union (const irange &r) { bool ret = irange_single_pair_union (r); set_nonzero_bits (saved_nz); + if (flag_checking) + verify_range (); return ret || ret_nz; } -- cgit v1.1 From aa2eb25c94cde4c147443a562eadc69de03b1556 Mon Sep 17 00:00:00 2001 From: GCC Administrator Date: Sun, 10 Jul 2022 00:16:23 +0000 Subject: Daily bump. --- gcc/ChangeLog | 46 ++++++++++++++++++++++++++++++++++++++++++++++ gcc/DATESTAMP | 2 +- gcc/testsuite/ChangeLog | 15 +++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9f56ba2..fa3578e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,49 @@ +2022-07-09 Aldy Hernandez + + * value-range.cc (irange::irange_single_pair_union): Set + VR_VARYING when appropriate. + +2022-07-09 Vit Kabele + + * stor-layout.cc (finalize_record_size): Extend warning message. + +2022-07-09 Sam Feifer + + PR tree-optimization/98304 + * match.pd (n - (((n > C1) ? n : C1) & -C2)): New simplification. + +2022-07-09 Jeff Law + + * expr.cc (store_expr): Identify trailing NULs in a STRING_CST + initializer and use clear_storage rather than copying the + NULs to the destination array. + +2022-07-09 Roger Sayle + + * config/i386/i386.md (define_peephole2): Use match_operand of + flags_reg_operand to capture and preserve the mode of FLAGS_REG. + (define_peephole2): Likewise. + (define_peephole2): Likewise... + +2022-07-09 Roger Sayle + + * config/i386/i386-features.cc (convert_compare): Add support + for *testdi_not_doubleword pattern, "(compare (and (not ...)))" + by generating a pandn followed by ptest. + (convertible_comparison_p): Recognize both *cmpdi_doubleword and + recent *testdi_not_doubleword comparison patterns. + +2022-07-09 Tamar Christina + + * config/s390/s390.cc (s390_expand_atomic): Pass false to store_bit_field to + indicate that the value is not undefined. + +2022-07-09 Andrew Pinski + + PR tree-optimization/106087 + * tree-ssa-dce.cc (simple_dce_from_worklist): Check + to make sure the statement is only defining one operand. + 2022-07-08 Lewis Hyatt PR preprocessor/91733 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 2f349b0..6de1e01 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20220709 +20220710 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e40061c..2030900 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2022-07-09 Vit Kabele + + * c-c++-common/Wpadded.c: New test. + +2022-07-09 Sam Feifer + + PR tree-optimization/98304 + * gcc.c-torture/execute/pr98304-2.c: New test. + * gcc.dg/pr98304-1.c: New test. + +2022-07-09 Andrew Pinski + + PR tree-optimization/106087 + * gcc.c-torture/compile/inline-asm-1.c: New test. + 2022-07-08 Martin Jambor PR testsuite/106216 -- cgit v1.1 From 1fa42d62140b56589771eb3d46f89c810bfc8e0a Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 8 Jul 2022 21:09:25 +0800 Subject: loongarch: fix mulsidi3_64bit instruction (mult (sign_extend:DI rj:SI) (sign_extend:DI rk:SI)) should be "mulw.d.w", not "mul.d". gcc/ChangeLog: * config/loongarch/loongarch.md (mulsidi3_64bit): Use mulw.d.w instead of mul.d. gcc/testsuite/ChangeLog: * gcc.target/loongarch/mulw_d_w.c: New test. * gcc.c-torture/execute/mul-sext.c: New test. --- gcc/config/loongarch/loongarch.md | 2 +- gcc/testsuite/gcc.c-torture/execute/mul-sext.c | 20 ++++++++++++++++++++ gcc/testsuite/gcc.target/loongarch/mulw_d_w.c | 10 ++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/execute/mul-sext.c create mode 100644 gcc/testsuite/gcc.target/loongarch/mulw_d_w.c (limited to 'gcc') diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md index d3c809e..8f8412f 100644 --- a/gcc/config/loongarch/loongarch.md +++ b/gcc/config/loongarch/loongarch.md @@ -621,7 +621,7 @@ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))))] "TARGET_64BIT" - "mul.d\t%0,%1,%2" + "mulw.d.w\t%0,%1,%2" [(set_attr "type" "imul") (set_attr "mode" "DI")]) diff --git a/gcc/testsuite/gcc.c-torture/execute/mul-sext.c b/gcc/testsuite/gcc.c-torture/execute/mul-sext.c new file mode 100644 index 0000000..8b68008 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/mul-sext.c @@ -0,0 +1,20 @@ +/* { dg-do run } */ + +typedef __INT64_TYPE__ int64_t; +typedef __INT32_TYPE__ int32_t; + +/* f() was misoptimized to a single "mul.d" instruction on LA64. */ +__attribute__((noipa, noinline)) int64_t +f(int64_t a, int64_t b) +{ + return (int64_t)(int32_t)a * (int64_t)(int32_t)b; +} + +int +main() +{ + int64_t a = 0x1145140000000001; + int64_t b = 0x1919810000000001; + if (f(a, b) != 1) + __builtin_abort(); +} diff --git a/gcc/testsuite/gcc.target/loongarch/mulw_d_w.c b/gcc/testsuite/gcc.target/loongarch/mulw_d_w.c new file mode 100644 index 0000000..4ab7df8 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/mulw_d_w.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mabi=lp64d" } */ +/* { dg-final { scan-assembler "mulw.d.w" } } */ + +/* This should be optimized to mulw.d.w for LA64. */ +__attribute__((noipa, noinline)) long +f(long a, long b) +{ + return (long)(int)a * (long)(int)b; +} -- cgit v1.1 From a5d3826f7648c4c7763dba8882e6722deae0c116 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 6 Jul 2022 13:45:55 +0800 Subject: loongarch: add alternatives for idiv insns to improve code generation Currently in the description of LoongArch integer division instructions, the output is marked as earlyclobbered ('&'). It's necessary when loongarch_check_zero_div_p() because clobbering operand 2 (divisor) will make the checking for zero divisor impossible. But, for -mno-check-zero-division (the default of GCC >= 12.2 for optimized code), the output is not earlyclobbered at all. And, the read of operand 1 only occurs before clobbering the output. So we make three alternatives for an idiv instruction: * (=r,r,r): For -mno-check-zero-division. * (=&r,r,r): For -mcheck-zero-division. * (=&r,0,r): For -mcheck-zero-division, to explicitly allow patterns like "div.d $a0, $a0, $a1". gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_check_zero_div_p): Remove static, for use in the machine description file. * config/loongarch/loongarch-protos.h: (loongarch_check_zero_div_p): Add prototype. * config/loongarch/loongarch.md (enabled): New attr. (*3): Add (=r,r,r) and (=&r,0,r) alternatives for idiv. Conditionally enable the alternatives using loongarch_check_zero_div_p. (di3_fake): Likewise. gcc/testsuite/ChangeLog: * gcc.target/loongarch/div-1.c: New test. * gcc.target/loongarch/div-2.c: New test. * gcc.target/loongarch/div-3.c: New test. --- gcc/config/loongarch/loongarch-protos.h | 1 + gcc/config/loongarch/loongarch.cc | 2 +- gcc/config/loongarch/loongarch.md | 28 ++++++++++++++++++++-------- gcc/testsuite/gcc.target/loongarch/div-1.c | 9 +++++++++ gcc/testsuite/gcc.target/loongarch/div-2.c | 9 +++++++++ gcc/testsuite/gcc.target/loongarch/div-3.c | 9 +++++++++ 6 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 gcc/testsuite/gcc.target/loongarch/div-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/div-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/div-3.c (limited to 'gcc') diff --git a/gcc/config/loongarch/loongarch-protos.h b/gcc/config/loongarch/loongarch-protos.h index 2144c24..2287fd37 100644 --- a/gcc/config/loongarch/loongarch-protos.h +++ b/gcc/config/loongarch/loongarch-protos.h @@ -130,6 +130,7 @@ extern bool loongarch_symbol_binds_local_p (const_rtx); extern const char *current_section_name (void); extern unsigned int current_section_flags (void); extern bool loongarch_use_ins_ext_p (rtx, HOST_WIDE_INT, HOST_WIDE_INT); +extern bool loongarch_check_zero_div_p (void); union loongarch_gen_fn_ptrs { diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc index 5c9a33c1..8b0d7f4 100644 --- a/gcc/config/loongarch/loongarch.cc +++ b/gcc/config/loongarch/loongarch.cc @@ -2110,7 +2110,7 @@ loongarch_load_store_insns (rtx mem, rtx_insn *insn) /* Return true if we need to trap on division by zero. */ -static bool +bool loongarch_check_zero_div_p (void) { /* if -m[no-]check-zero-division is given explicitly. */ diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md index 8f8412f..6bca2ed 100644 --- a/gcc/config/loongarch/loongarch.md +++ b/gcc/config/loongarch/loongarch.md @@ -110,6 +110,8 @@ ;; ;; .................... +(define_attr "enabled" "no,yes" (const_string "yes")) + (define_attr "got" "unset,load" (const_string "unset")) @@ -763,26 +765,36 @@ }) (define_insn "*3" - [(set (match_operand:GPR 0 "register_operand" "=&r") - (any_div:GPR (match_operand:GPR 1 "register_operand" "r") - (match_operand:GPR 2 "register_operand" "r")))] + [(set (match_operand:GPR 0 "register_operand" "=r,&r,&r") + (any_div:GPR (match_operand:GPR 1 "register_operand" "r,r,0") + (match_operand:GPR 2 "register_operand" "r,r,r")))] "" { return loongarch_output_division (".\t%0,%1,%2", operands); } [(set_attr "type" "idiv") - (set_attr "mode" "")]) + (set_attr "mode" "") + (set (attr "enabled") + (if_then_else + (match_test "!!which_alternative == loongarch_check_zero_div_p()") + (const_string "yes") + (const_string "no")))]) (define_insn "di3_fake" - [(set (match_operand:SI 0 "register_operand" "=&r") - (any_div:SI (match_operand:DI 1 "register_operand" "r") - (match_operand:DI 2 "register_operand" "r")))] + [(set (match_operand:SI 0 "register_operand" "=r,&r,&r") + (any_div:SI (match_operand:DI 1 "register_operand" "r,r,0") + (match_operand:DI 2 "register_operand" "r,r,r")))] "" { return loongarch_output_division (".w\t%0,%1,%2", operands); } [(set_attr "type" "idiv") - (set_attr "mode" "SI")]) + (set_attr "mode" "SI") + (set (attr "enabled") + (if_then_else + (match_test "!!which_alternative == loongarch_check_zero_div_p()") + (const_string "yes") + (const_string "no")))]) ;; Floating point multiply accumulate instructions. diff --git a/gcc/testsuite/gcc.target/loongarch/div-1.c b/gcc/testsuite/gcc.target/loongarch/div-1.c new file mode 100644 index 0000000..b1683f8 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/div-1.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mcheck-zero-division" } */ +/* { dg-final { scan-assembler "div.\[wd\]\t\\\$r4,\\\$r4,\\\$r5" } } */ + +long +div(long a, long b) +{ + return a / b; +} diff --git a/gcc/testsuite/gcc.target/loongarch/div-2.c b/gcc/testsuite/gcc.target/loongarch/div-2.c new file mode 100644 index 0000000..4c2beb5 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/div-2.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mno-check-zero-division" } */ +/* { dg-final { scan-assembler "div.\[wd\]\t\\\$r4,\\\$r5,\\\$r4" } } */ + +long +div(long a, long b) +{ + return b / a; +} diff --git a/gcc/testsuite/gcc.target/loongarch/div-3.c b/gcc/testsuite/gcc.target/loongarch/div-3.c new file mode 100644 index 0000000..d259692 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/div-3.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mcheck-zero-division" } */ +/* { dg-final { scan-assembler-not "div.\[wd\]\t\\\$r4,\\\$r5,\\\$r4" } } */ + +long +div(long a, long b) +{ + return b / a; +} -- cgit v1.1 From a8cfc36b9964e5b62433269182232e59d82d6a23 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 6 Jul 2022 23:22:29 +0800 Subject: loongarch: avoid unnecessary sign-extend after 32-bit division Like add.w/sub.w/mul.w, div.w/mod.w/div.wu/mod.wu also sign-extend the output on LA64. But, LoongArch v1.00 mandates that the inputs of 32-bit division to be sign-extended so we have to expand 32-bit division into RTL sequences. We defined div.w/mod.w/div.wu/mod.wu as a (DI, DI) -> SI instruction. This definition does not indicate the fact that these instructions will store the result as sign-extended value in a 64-bit GR. Then the compiler would emit unnecessary sign-extend operations. For example: int div(int a, int b) { return a / b; } was compiled to: div.w $r4, $r4, $r5 slli.w $r4, $r4, 0 # this is unnecessary jr $r1 To remove this unnecessary operation, we change the division instructions to (DI, DI) -> DI and describe the sign-extend behavior explicitly in the RTL template. In the expander for 32-bit division we then use simplify_gen_subreg to extract the lower 32 bits. gcc/ChangeLog: * config/loongarch/loongarch.md (di3_fake): Describe the sign-extend of result in the RTL template. (3): Adjust for di3_fake change. gcc/testsuite/ChangeLog: * gcc.target/loongarch/div-4.c: New test. --- gcc/config/loongarch/loongarch.md | 12 ++++++++---- gcc/testsuite/gcc.target/loongarch/div-4.c | 9 +++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.target/loongarch/div-4.c (limited to 'gcc') diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md index 6bca2ed..5c0445d 100644 --- a/gcc/config/loongarch/loongarch.md +++ b/gcc/config/loongarch/loongarch.md @@ -752,6 +752,7 @@ { rtx reg1 = gen_reg_rtx (DImode); rtx reg2 = gen_reg_rtx (DImode); + rtx rd = gen_reg_rtx (DImode); operands[1] = gen_rtx_SIGN_EXTEND (word_mode, operands[1]); operands[2] = gen_rtx_SIGN_EXTEND (word_mode, operands[2]); @@ -759,7 +760,9 @@ emit_insn (gen_rtx_SET (reg1, operands[1])); emit_insn (gen_rtx_SET (reg2, operands[2])); - emit_insn (gen_di3_fake (operands[0], reg1, reg2)); + emit_insn (gen_di3_fake (rd, reg1, reg2)); + emit_insn (gen_rtx_SET (operands[0], + simplify_gen_subreg (SImode, rd, DImode, 0))); DONE; } }) @@ -781,9 +784,10 @@ (const_string "no")))]) (define_insn "di3_fake" - [(set (match_operand:SI 0 "register_operand" "=r,&r,&r") - (any_div:SI (match_operand:DI 1 "register_operand" "r,r,0") - (match_operand:DI 2 "register_operand" "r,r,r")))] + [(set (match_operand:DI 0 "register_operand" "=r,&r,&r") + (sign_extend:DI + (any_div:SI (match_operand:DI 1 "register_operand" "r,r,0") + (match_operand:DI 2 "register_operand" "r,r,r"))))] "" { return loongarch_output_division (".w\t%0,%1,%2", operands); diff --git a/gcc/testsuite/gcc.target/loongarch/div-4.c b/gcc/testsuite/gcc.target/loongarch/div-4.c new file mode 100644 index 0000000..a52f87d --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/div-4.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +/* { dg-final { scan-assembler-not "slli" } } */ + +int +div(int a, int b) +{ + return a / b; +} -- cgit v1.1 From c106825b936446c346d49ef10952e40370753b9d Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Sat, 9 Jul 2022 17:43:47 +0200 Subject: Cleanups to irange::nonzero bit code. In discussions with Andrew we realized varying_p() was returning true for a range of the entire domain with a non-empty nonzero mask. This is confusing as varying_p() should only return true when absolutely no information is available. A nonzero mask that has any cleared bits is extra information and must return false for varying_p(). This patch fixes this oversight. Now a range of the entire domain with nonzero bits, is internally set to VR_RANGE (with the appropriate end points set). VR_VARYING ranges must have a null nonzero mask. Also, the union and intersect code were not quite right in the presence of nonzero masks. Sometimes we would drop masks to -1 unnecessarily. I was trying to be too smart in avoiding extra work when the mask was NULL, but there's also an implicit mask in the range that must be taken into account. For example, [0,0] may have no nonzero bits set explicitly, but the mask is really 0x0. This will all be simpler when we drop trees, because the nonzero bits will always be set, even if -1. Finally, I've added unit tests to the nonzero mask code. This should help us maintain sanity going forward. There should be no visible changes, as the main consumer of this code is the SSA_NAME_RANGE_INFO patchset which has yet to be committed. Tested on x86-64 Linux. gcc/ChangeLog: * value-range.cc (irange::operator=): Call verify_range. (irange::irange_set): Normalize kind after everything else has been set. (irange::irange_set_anti_range): Same. (irange::set): Same. (irange::verify_range): Disallow nonzero masks for VARYING. (irange::irange_union): Call verify_range. Handle nonzero masks better. (irange::irange_intersect): Same. (irange::set_nonzero_bits): Calculate mask if either range has an explicit mask. (irange::intersect_nonzero_bits): Same. (irange::union_nonzero_bits): Same. (range_tests_nonzero_bits): New. (range_tests): Call range_tests_nonzero_bits. * value-range.h (class irange): Remove set_nonzero_bits method with trees. (irange::varying_compatible_p): Set nonzero mask. --- gcc/value-range.cc | 167 +++++++++++++++++++++++++++++++++++++++++------------ gcc/value-range.h | 5 +- 2 files changed, 133 insertions(+), 39 deletions(-) (limited to 'gcc') diff --git a/gcc/value-range.cc b/gcc/value-range.cc index fd549b9..a02fab4 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -275,6 +275,8 @@ irange::operator= (const irange &src) m_num_ranges = lim; m_kind = src.m_kind; m_nonzero_mask = src.m_nonzero_mask; + if (flag_checking) + verify_range (); return *this; } @@ -393,8 +395,8 @@ irange::irange_set (tree min, tree max) m_base[1] = max; m_num_ranges = 1; m_kind = VR_RANGE; - normalize_kind (); m_nonzero_mask = NULL; + normalize_kind (); if (flag_checking) verify_range (); @@ -467,8 +469,8 @@ irange::irange_set_anti_range (tree min, tree max) } m_kind = VR_RANGE; - normalize_kind (); m_nonzero_mask = NULL; + normalize_kind (); if (flag_checking) verify_range (); @@ -577,8 +579,8 @@ irange::set (tree min, tree max, value_range_kind kind) m_base[0] = min; m_base[1] = max; m_num_ranges = 1; - normalize_kind (); m_nonzero_mask = NULL; + normalize_kind (); if (flag_checking) verify_range (); } @@ -599,6 +601,7 @@ irange::verify_range () gcc_checking_assert (wi::to_wide (m_nonzero_mask) != -1); if (m_kind == VR_VARYING) { + gcc_checking_assert (!m_nonzero_mask); gcc_checking_assert (m_num_ranges == 1); gcc_checking_assert (varying_compatible_p ()); return; @@ -1759,6 +1762,8 @@ irange::legacy_verbose_intersect (const irange *other) // Perform an efficient union with R when both ranges have only a single pair. // Excluded are VARYING and UNDEFINED ranges. +// +// NOTE: It is the caller's responsibility to set the nonzero mask. bool irange::irange_single_pair_union (const irange &r) @@ -1831,23 +1836,28 @@ irange::irange_union (const irange &r) if (undefined_p ()) { operator= (r); + if (flag_checking) + verify_range (); return true; } - // Save the nonzero mask in case the set operations below clobber it. - bool ret_nz = union_nonzero_bits (r); - tree saved_nz = m_nonzero_mask; - if (varying_p ()) - return ret_nz; + return false; if (r.varying_p ()) { - set_varying (r.type ()); - set_nonzero_bits (saved_nz); + set_varying (type ()); return true; } + // Save the nonzero mask in case the set operations below clobber it. + bool ret_nz = union_nonzero_bits (r); + tree saved_nz = m_nonzero_mask; + + // The union_nonzero_bits may have turned things into a varying. + if (varying_p ()) + return true; + // Special case one range union one range. if (m_num_ranges == 1 && r.m_num_ranges == 1) { @@ -1948,8 +1958,8 @@ irange::irange_union (const irange &r) m_num_ranges = i / 2; m_kind = VR_RANGE; + m_nonzero_mask = saved_nz; normalize_kind (); - set_nonzero_bits (saved_nz); if (flag_checking) verify_range (); @@ -2029,13 +2039,19 @@ irange::irange_intersect (const irange &r) if (varying_p ()) { operator= (r); - set_nonzero_bits (saved_nz); + if (saved_nz) + set_nonzero_bits (saved_nz); + if (flag_checking) + verify_range (); return true; } if (r.num_pairs () == 1) { bool res = intersect (r.lower_bound (), r.upper_bound ()); + if (undefined_p ()) + return true; + set_nonzero_bits (saved_nz); return res || saved_nz; } @@ -2113,9 +2129,9 @@ irange::irange_intersect (const irange &r) m_num_ranges = bld_pair; m_kind = VR_RANGE; - normalize_kind (); if (!undefined_p ()) - set_nonzero_bits (saved_nz); + m_nonzero_mask = saved_nz; + normalize_kind (); if (flag_checking) verify_range (); @@ -2332,16 +2348,40 @@ irange::invert () } void +irange::set_nonzero_bits (tree mask) +{ + gcc_checking_assert (!undefined_p ()); + + if (!mask) + { + if (m_nonzero_mask) + { + m_nonzero_mask = NULL; + // Clearing the mask may have turned a range into VARYING. + normalize_kind (); + } + return; + } + m_nonzero_mask = mask; + // Setting the mask may have turned a VARYING into a range. + if (m_kind == VR_VARYING) + m_kind = VR_RANGE; + + if (flag_checking) + verify_range (); +} + +void irange::set_nonzero_bits (const wide_int_ref &bits) { gcc_checking_assert (!undefined_p ()); if (bits == -1) { - m_nonzero_mask = NULL; + set_nonzero_bits (NULL); return; } - m_nonzero_mask = wide_int_to_tree (type (), bits); + set_nonzero_bits (wide_int_to_tree (type (), bits)); } wide_int @@ -2378,17 +2418,14 @@ irange::intersect_nonzero_bits (const irange &r) { gcc_checking_assert (!undefined_p () && !r.undefined_p ()); - if (!r.m_nonzero_mask) - return false; - if (!m_nonzero_mask) + if (m_nonzero_mask || r.m_nonzero_mask) { - m_nonzero_mask = r.m_nonzero_mask; + wide_int nz = wi::bit_and (get_nonzero_bits (), + r.get_nonzero_bits ()); + set_nonzero_bits (nz); return true; } - wide_int i = wi::bit_and (wi::to_wide (m_nonzero_mask), - wi::to_wide (r.m_nonzero_mask)); - set_nonzero_bits (i); - return true; + return false; } // Union the nonzero bits in R into THIS. @@ -2398,21 +2435,14 @@ irange::union_nonzero_bits (const irange &r) { gcc_checking_assert (!undefined_p () && !r.undefined_p ()); - if (!m_nonzero_mask) - return false; - if (!r.m_nonzero_mask) + if (m_nonzero_mask || r.m_nonzero_mask) { - if (m_nonzero_mask) - { - m_nonzero_mask = NULL; - return true; - } - return false; + wide_int nz = wi::bit_or (get_nonzero_bits (), + r.get_nonzero_bits ()); + set_nonzero_bits (nz); + return true; } - wide_int i = wi::bit_or (wi::to_wide (m_nonzero_mask), - wi::to_wide (r.m_nonzero_mask)); - set_nonzero_bits (i); - return true; + return false; } static void @@ -3054,6 +3084,68 @@ range_tests_misc () ASSERT_TRUE (r0.contains_p (UINT (2))); } +static void +range_tests_nonzero_bits () +{ + int_range<2> r0, r1; + + // Adding nonzero bits to a varying drops the varying. + r0.set_varying (integer_type_node); + r0.set_nonzero_bits (255); + ASSERT_TRUE (!r0.varying_p ()); + // Dropping the nonzero bits brings us back to varying. + r0.set_nonzero_bits (-1); + ASSERT_TRUE (r0.varying_p ()); + + // Test contains_p with nonzero bits. + r0.set_zero (integer_type_node); + ASSERT_TRUE (r0.contains_p (INT (0))); + ASSERT_FALSE (r0.contains_p (INT (1))); + r0.set_nonzero_bits (0xfe); + ASSERT_FALSE (r0.contains_p (INT (0x100))); + ASSERT_FALSE (r0.contains_p (INT (0x3))); + + // Union of nonzero bits. + r0.set_varying (integer_type_node); + r0.set_nonzero_bits (0xf0); + r1.set_varying (integer_type_node); + r1.set_nonzero_bits (0xf); + r0.union_ (r1); + ASSERT_TRUE (r0.get_nonzero_bits () == 0xff); + + // Union where the mask of nonzero bits is implicit from the range. + r0.set_varying (integer_type_node); + r0.set_nonzero_bits (0xf00); + r1.set_zero (integer_type_node); // nonzero mask is implicitly 0 + r0.union_ (r1); + ASSERT_TRUE (r0.get_nonzero_bits () == 0xf00); + + // Intersect of nonzero bits. + r0.set (INT (0), INT (255)); + r0.set_nonzero_bits (0xfe); + r1.set_varying (integer_type_node); + r1.set_nonzero_bits (0xf0); + r0.intersect (r1); + ASSERT_TRUE (r0.get_nonzero_bits () == 0xf0); + + // Intersect where the mask of nonzero bits is implicit from the range. + r0.set_varying (integer_type_node); + r1.set (INT (0), INT (255)); + r0.intersect (r1); + ASSERT_TRUE (r0.get_nonzero_bits () == 0xff); + + // The union of a mask of 0xff..ffff00 with a mask of 0xff spans the + // entire domain, and makes the range a varying. + r0.set_varying (integer_type_node); + wide_int x = wi::shwi (0xff, TYPE_PRECISION (integer_type_node)); + x = wi::bit_not (x); + r0.set_nonzero_bits (x); // 0xff..ff00 + r1.set_varying (integer_type_node); + r1.set_nonzero_bits (0xff); + r0.union_ (r1); + ASSERT_TRUE (r0.varying_p ()); +} + void range_tests () { @@ -3061,6 +3153,7 @@ range_tests () range_tests_irange3 (); range_tests_int_range_max (); range_tests_strict_enum (); + range_tests_nonzero_bits (); range_tests_misc (); } diff --git a/gcc/value-range.h b/gcc/value-range.h index 2e48d92..0e34118 100644 --- a/gcc/value-range.h +++ b/gcc/value-range.h @@ -201,7 +201,7 @@ private: void irange_set_1bit_anti_range (tree, tree); bool varying_compatible_p () const; - void set_nonzero_bits (tree bits) { m_nonzero_mask = bits; } + void set_nonzero_bits (tree mask); bool intersect_nonzero_bits (const irange &r); bool union_nonzero_bits (const irange &r); void dump_bitmasks (FILE *) const; @@ -555,7 +555,8 @@ irange::varying_compatible_p () const signop sign = TYPE_SIGN (t); if (INTEGRAL_TYPE_P (t)) return (wi::to_wide (l) == wi::min_value (prec, sign) - && wi::to_wide (u) == wi::max_value (prec, sign)); + && wi::to_wide (u) == wi::max_value (prec, sign) + && !m_nonzero_mask); if (POINTER_TYPE_P (t)) return (wi::to_wide (l) == 0 && wi::to_wide (u) == wi::max_value (prec, sign)); -- cgit v1.1 From 4ebbf3906895bcb40d7ff2729cf46deae66bc268 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Sun, 10 Jul 2022 11:15:39 +0300 Subject: testsuite: Require int128 for gcc.dg/pr106063.c Require effective target int128 for gcc.dg/pr106063.c. PR tree-optimization/106063 gcc/testsuite/ChangeLog: * gcc.dg/pr106063.c: Require effective target int128. Signed-off-by: Dimitar Dimitrov --- gcc/testsuite/gcc.dg/pr106063.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/testsuite/gcc.dg/pr106063.c b/gcc/testsuite/gcc.dg/pr106063.c index b235967..467b31d 100644 --- a/gcc/testsuite/gcc.dg/pr106063.c +++ b/gcc/testsuite/gcc.dg/pr106063.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target int128 } } */ /* { dg-options "-O2 -fno-tree-forwprop --disable-tree-evrp" } */ typedef __int128 __attribute__((__vector_size__ (16))) V; -- cgit v1.1