summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2016-11-14 15:42:40 +0100
committerRichard Guenther <rguenther@suse.de>2016-11-14 15:42:40 +0100
commitca94f8c64654980144e88fb19b04adf5f023aa55 (patch)
treeef90f8461d210f78e7f7b0ba89923a5eda7b3758 /gcc/config
parent9e872f3fe8b4f6624e2edf5ee55a833e53f290c8 (diff)
parent5dc46e164993bbf658f61069823a1b37a2d715eb (diff)
downloadgcc-gimplefe.tar.gz
Merge remote-tracking branch 'trunk' of git://gcc.gnu.org/git/gcc into gimplefegimplefe
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/aarch64/aarch64.c6
-rw-r--r--gcc/config/aarch64/aarch64.md22
-rw-r--r--gcc/config/aarch64/thunderx.md2
-rw-r--r--gcc/config/arm/cortex-a53.md2
-rw-r--r--gcc/config/arm/cortex-a57.md4
-rw-r--r--gcc/config/arm/exynos-m1.md4
-rw-r--r--gcc/config/arm/types.md2
-rw-r--r--gcc/config/arm/xgene1.md2
-rw-r--r--gcc/config/avr/avr-arch.h4
-rw-r--r--gcc/config/avr/avr-mcus.def10
-rw-r--r--gcc/config/avr/avr.c8
-rw-r--r--gcc/config/avr/avr.opt4
-rw-r--r--gcc/config/avr/gen-avr-mmcu-specs.c5
-rw-r--r--gcc/config/avr/specs.h3
-rw-r--r--gcc/config/i386/i386.md12
-rw-r--r--gcc/config/rs6000/altivec.md2
-rw-r--r--gcc/config/rs6000/rs6000.c83
-rw-r--r--gcc/config/rs6000/vsx.md11
18 files changed, 106 insertions, 80 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index b7d4640826a..bd97c5b701c 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -398,12 +398,12 @@ static const struct cpu_vector_cost cortexa57_vector_cost =
1, /* scalar_stmt_cost */
4, /* scalar_load_cost */
1, /* scalar_store_cost */
- 3, /* vec_stmt_cost */
+ 2, /* vec_stmt_cost */
3, /* vec_permute_cost */
8, /* vec_to_scalar_cost */
8, /* scalar_to_vec_cost */
- 5, /* vec_align_load_cost */
- 5, /* vec_unalign_load_cost */
+ 4, /* vec_align_load_cost */
+ 4, /* vec_unalign_load_cost */
1, /* vec_unalign_store_cost */
1, /* vec_store_cost */
1, /* cond_taken_branch_cost */
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 46eaa30b159..a652a7c12bd 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -3955,7 +3955,7 @@
shl\t%<rtn>0<vas>, %<rtn>1<vas>, %2
ushl\t%<rtn>0<vas>, %<rtn>1<vas>, %<rtn>2<vas>"
[(set_attr "simd" "no,no,yes,yes")
- (set_attr "type" "bfm,shift_reg,neon_shift_imm<q>, neon_shift_reg<q>")]
+ (set_attr "type" "bfx,shift_reg,neon_shift_imm<q>, neon_shift_reg<q>")]
)
;; Logical right shift using SISD or Integer instruction
@@ -3972,7 +3972,7 @@
#
#"
[(set_attr "simd" "no,no,yes,yes,yes")
- (set_attr "type" "bfm,shift_reg,neon_shift_imm<q>,neon_shift_reg<q>,neon_shift_reg<q>")]
+ (set_attr "type" "bfx,shift_reg,neon_shift_imm<q>,neon_shift_reg<q>,neon_shift_reg<q>")]
)
(define_split
@@ -4019,7 +4019,7 @@
#
#"
[(set_attr "simd" "no,no,yes,yes,yes")
- (set_attr "type" "bfm,shift_reg,neon_shift_imm<q>,neon_shift_reg<q>,neon_shift_reg<q>")]
+ (set_attr "type" "bfx,shift_reg,neon_shift_imm<q>,neon_shift_reg<q>,neon_shift_reg<q>")]
)
(define_split
@@ -4129,7 +4129,7 @@
"@
<shift>\\t%w0, %w1, %2
<shift>\\t%w0, %w1, %w2"
- [(set_attr "type" "bfm,shift_reg")]
+ [(set_attr "type" "bfx,shift_reg")]
)
(define_insn "*<optab><mode>3_insn"
@@ -4141,7 +4141,7 @@
operands[3] = GEN_INT (<sizen> - UINTVAL (operands[2]));
return "<bfshift>\t%w0, %w1, %2, %3";
}
- [(set_attr "type" "bfm")]
+ [(set_attr "type" "bfx")]
)
(define_insn "*extr<mode>5_insn"
@@ -4234,7 +4234,7 @@
operands[3] = GEN_INT (<SHORT:sizen> - UINTVAL (operands[2]));
return "<su>bfiz\t%<GPI:w>0, %<GPI:w>1, %2, %3";
}
- [(set_attr "type" "bfm")]
+ [(set_attr "type" "bfx")]
)
(define_insn "*zero_extend<GPI:mode>_lshr<SHORT:mode>"
@@ -4247,7 +4247,7 @@
operands[3] = GEN_INT (<SHORT:sizen> - UINTVAL (operands[2]));
return "ubfx\t%<GPI:w>0, %<GPI:w>1, %2, %3";
}
- [(set_attr "type" "bfm")]
+ [(set_attr "type" "bfx")]
)
(define_insn "*extend<GPI:mode>_ashr<SHORT:mode>"
@@ -4260,7 +4260,7 @@
operands[3] = GEN_INT (<SHORT:sizen> - UINTVAL (operands[2]));
return "sbfx\\t%<GPI:w>0, %<GPI:w>1, %2, %3";
}
- [(set_attr "type" "bfm")]
+ [(set_attr "type" "bfx")]
)
;; -------------------------------------------------------------------
@@ -4292,7 +4292,7 @@
"IN_RANGE (INTVAL (operands[2]) + INTVAL (operands[3]),
1, GET_MODE_BITSIZE (<MODE>mode) - 1)"
"<su>bfx\\t%<w>0, %<w>1, %3, %2"
- [(set_attr "type" "bfm")]
+ [(set_attr "type" "bfx")]
)
;; Bitfield Insert (insv)
@@ -4374,7 +4374,7 @@
: GEN_INT (<GPI:sizen> - UINTVAL (operands[2]));
return "<su>bfiz\t%<GPI:w>0, %<GPI:w>1, %2, %3";
}
- [(set_attr "type" "bfm")]
+ [(set_attr "type" "bfx")]
)
;; XXX We should match (any_extend (ashift)) here, like (and (ashift)) below
@@ -4386,7 +4386,7 @@
(match_operand 3 "const_int_operand" "n")))]
"aarch64_mask_and_shift_for_ubfiz_p (<MODE>mode, operands[3], operands[2])"
"ubfiz\\t%<w>0, %<w>1, %2, %P3"
- [(set_attr "type" "bfm")]
+ [(set_attr "type" "bfx")]
)
(define_insn "bswap<mode>2"
diff --git a/gcc/config/aarch64/thunderx.md b/gcc/config/aarch64/thunderx.md
index 058713a2ad9..7c1c28b0498 100644
--- a/gcc/config/aarch64/thunderx.md
+++ b/gcc/config/aarch64/thunderx.md
@@ -39,7 +39,7 @@
(define_insn_reservation "thunderx_shift" 1
(and (eq_attr "tune" "thunderx")
- (eq_attr "type" "bfm,extend,rotate_imm,shift_imm,shift_reg,rbit,rev"))
+ (eq_attr "type" "bfm,bfx,extend,rotate_imm,shift_imm,shift_reg,rbit,rev"))
"thunderx_pipe0 | thunderx_pipe1")
diff --git a/gcc/config/arm/cortex-a53.md b/gcc/config/arm/cortex-a53.md
index 70c0f4daabe..eb6d0b04976 100644
--- a/gcc/config/arm/cortex-a53.md
+++ b/gcc/config/arm/cortex-a53.md
@@ -93,7 +93,7 @@
(and (eq_attr "tune" "cortexa53")
(eq_attr "type" "alu_shift_imm,alus_shift_imm,
crc,logic_shift_imm,logics_shift_imm,
- alu_ext,alus_ext,bfm,extend,mvn_shift"))
+ alu_ext,alus_ext,bfm,bfx,extend,mvn_shift"))
"cortex_a53_slot_any")
(define_insn_reservation "cortex_a53_alu_shift_reg" 3
diff --git a/gcc/config/arm/cortex-a57.md b/gcc/config/arm/cortex-a57.md
index 85b18e5970f..63072509e50 100644
--- a/gcc/config/arm/cortex-a57.md
+++ b/gcc/config/arm/cortex-a57.md
@@ -297,7 +297,7 @@
(eq_attr "type" "alu_imm,alus_imm,logic_imm,logics_imm,\
alu_sreg,alus_sreg,logic_reg,logics_reg,\
adc_imm,adcs_imm,adc_reg,adcs_reg,\
- adr,bfm,clz,csel,rbit,rev,alu_dsp_reg,\
+ adr,bfx,extend,clz,rbit,rev,alu_dsp_reg,\
rotate_imm,shift_imm,shift_reg,\
mov_imm,mov_reg,\
mvn_imm,mvn_reg,\
@@ -307,7 +307,7 @@
;; ALU ops with immediate shift
(define_insn_reservation "cortex_a57_alu_shift" 3
(and (eq_attr "tune" "cortexa57")
- (eq_attr "type" "extend,\
+ (eq_attr "type" "bfm,\
alu_shift_imm,alus_shift_imm,\
crc,logic_shift_imm,logics_shift_imm,\
mov_shift,mvn_shift"))
diff --git a/gcc/config/arm/exynos-m1.md b/gcc/config/arm/exynos-m1.md
index 318b151d646..00574d7930f 100644
--- a/gcc/config/arm/exynos-m1.md
+++ b/gcc/config/arm/exynos-m1.md
@@ -358,7 +358,7 @@
(eq_attr "type" "alu_imm, alus_imm, logic_imm, logics_imm,\
alu_sreg, alus_sreg, logic_reg, logics_reg,\
adc_imm, adcs_imm, adc_reg, adcs_reg,\
- adr, bfm, clz, rbit, rev, csel, alu_dsp_reg,\
+ adr, bfm, bfx, clz, rbit, rev, csel, alu_dsp_reg,\
shift_imm, shift_reg, rotate_imm, extend,\
mov_imm, mov_reg,\
mvn_imm, mvn_reg,\
@@ -372,7 +372,7 @@
(eq_attr "type" "alu_imm, alus_imm, logic_imm, logics_imm,\
alu_sreg, alus_sreg, logic_reg, logics_reg,\
adc_imm, adcs_imm, adc_reg, adcs_reg,\
- adr, bfm, clz, rbit, rev, alu_dsp_reg,\
+ adr, bfm, bfx, clz, rbit, rev, alu_dsp_reg,\
shift_imm, shift_reg, rotate_imm, extend,\
mov_imm, mov_reg,\
mvn_imm, mvn_reg,\
diff --git a/gcc/config/arm/types.md b/gcc/config/arm/types.md
index 25f79b4d010..7a95a3704d0 100644
--- a/gcc/config/arm/types.md
+++ b/gcc/config/arm/types.md
@@ -51,6 +51,7 @@
; alus_shift_imm as alu_shift_imm, setting condition flags.
; alus_shift_reg as alu_shift_reg, setting condition flags.
; bfm bitfield move operation.
+; bfx bitfield extract operation.
; block blockage insn, this blocks all functional units.
; branch branch.
; call subroutine call.
@@ -557,6 +558,7 @@
alus_shift_imm,\
alus_shift_reg,\
bfm,\
+ bfx,\
block,\
branch,\
call,\
diff --git a/gcc/config/arm/xgene1.md b/gcc/config/arm/xgene1.md
index b7aeac69163..4f27b28461f 100644
--- a/gcc/config/arm/xgene1.md
+++ b/gcc/config/arm/xgene1.md
@@ -164,7 +164,7 @@
(define_insn_reservation "xgene1_bfm" 2
(and (eq_attr "tune" "xgene1")
- (eq_attr "type" "bfm"))
+ (eq_attr "type" "bfm,bfx"))
"xgene1_decode1op,xgene1_fsu")
(define_insn_reservation "xgene1_f_rint" 5
diff --git a/gcc/config/avr/avr-arch.h b/gcc/config/avr/avr-arch.h
index 42eaee56b7b..a740a151105 100644
--- a/gcc/config/avr/avr-arch.h
+++ b/gcc/config/avr/avr-arch.h
@@ -157,7 +157,9 @@ enum avr_device_specific_features
AVR_ISA_NONE,
AVR_ISA_RMW = 0x1, /* device has RMW instructions. */
AVR_SHORT_SP = 0x2, /* Stack Pointer has 8 bits width. */
- AVR_ERRATA_SKIP = 0x4 /* device has a core erratum. */
+ AVR_ERRATA_SKIP = 0x4, /* device has a core erratum. */
+ AVR_ISA_LDS = 0x8 /* whether LDS / STS is valid for all data in static
+ storage. Only useful for reduced Tiny. */
};
/* Map architecture to its texinfo string. */
diff --git a/gcc/config/avr/avr-mcus.def b/gcc/config/avr/avr-mcus.def
index 6bcc6ff08ae..e5b4cdaf660 100644
--- a/gcc/config/avr/avr-mcus.def
+++ b/gcc/config/avr/avr-mcus.def
@@ -341,11 +341,11 @@ AVR_MCU ("atxmega128a1u", ARCH_AVRXMEGA7, AVR_ISA_RMW, "__AVR_ATxmega128A1U_
AVR_MCU ("atxmega128a4u", ARCH_AVRXMEGA7, AVR_ISA_RMW, "__AVR_ATxmega128A4U__", 0x2000, 0x0, 3)
/* Tiny family */
AVR_MCU ("avrtiny", ARCH_AVRTINY, AVR_ISA_NONE, NULL, 0x0040, 0x0, 1)
-AVR_MCU ("attiny4", ARCH_AVRTINY, AVR_ISA_NONE, "__AVR_ATtiny4__", 0x0040, 0x0, 1)
-AVR_MCU ("attiny5", ARCH_AVRTINY, AVR_ISA_NONE, "__AVR_ATtiny5__", 0x0040, 0x0, 1)
-AVR_MCU ("attiny9", ARCH_AVRTINY, AVR_ISA_NONE, "__AVR_ATtiny9__", 0x0040, 0x0, 1)
-AVR_MCU ("attiny10", ARCH_AVRTINY, AVR_ISA_NONE, "__AVR_ATtiny10__", 0x0040, 0x0, 1)
-AVR_MCU ("attiny20", ARCH_AVRTINY, AVR_ISA_NONE, "__AVR_ATtiny20__", 0x0040, 0x0, 1)
+AVR_MCU ("attiny4", ARCH_AVRTINY, AVR_ISA_LDS, "__AVR_ATtiny4__", 0x0040, 0x0, 1)
+AVR_MCU ("attiny5", ARCH_AVRTINY, AVR_ISA_LDS, "__AVR_ATtiny5__", 0x0040, 0x0, 1)
+AVR_MCU ("attiny9", ARCH_AVRTINY, AVR_ISA_LDS, "__AVR_ATtiny9__", 0x0040, 0x0, 1)
+AVR_MCU ("attiny10", ARCH_AVRTINY, AVR_ISA_LDS, "__AVR_ATtiny10__", 0x0040, 0x0, 1)
+AVR_MCU ("attiny20", ARCH_AVRTINY, AVR_ISA_LDS, "__AVR_ATtiny20__", 0x0040, 0x0, 1)
AVR_MCU ("attiny40", ARCH_AVRTINY, AVR_ISA_NONE, "__AVR_ATtiny40__", 0x0040, 0x0, 1)
/* Assembler only. */
AVR_MCU ("avr1", ARCH_AVR1, AVR_ISA_NONE, NULL, 0x0060, 0x0, 1)
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 7ad2b6422b0..b6899a4b69a 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -10182,14 +10182,18 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
&& SYMBOL_REF_P (XEXP (rtl, 0)))
{
rtx sym = XEXP (rtl, 0);
+ bool progmem_p = -1 == avr_progmem_p (decl, DECL_ATTRIBUTES (decl));
- if (-1 == avr_progmem_p (decl, DECL_ATTRIBUTES (decl)))
+ if (progmem_p)
{
// Tag symbols for later addition of 0x4000 (AVR_TINY_PM_OFFSET).
SYMBOL_REF_FLAGS (sym) |= AVR_SYMBOL_FLAG_TINY_PM;
}
if (avr_decl_absdata_p (decl, DECL_ATTRIBUTES (decl))
+ || (TARGET_ABSDATA
+ && !progmem_p
+ && !addr_attr)
|| (addr_attr
// If addr_attr is non-null, it has an argument. Peek into it.
&& TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (addr_attr))) < 0xc0))
@@ -10198,7 +10202,7 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
SYMBOL_REF_FLAGS (sym) |= AVR_SYMBOL_FLAG_TINY_ABSDATA;
}
- if (-1 == avr_progmem_p (decl, DECL_ATTRIBUTES (decl))
+ if (progmem_p
&& avr_decl_absdata_p (decl, DECL_ATTRIBUTES (decl)))
{
error ("%q+D has incompatible attributes %qs and %qs",
diff --git a/gcc/config/avr/avr.opt b/gcc/config/avr/avr.opt
index 1af792b8df0..9ad6c5ab8d7 100644
--- a/gcc/config/avr/avr.opt
+++ b/gcc/config/avr/avr.opt
@@ -99,6 +99,10 @@ mfract-convert-truncate
Target Report Mask(FRACT_CONV_TRUNC)
Allow to use truncation instead of rounding towards zero for fractional fixed-point types.
+mabsdata
+Target Report Mask(ABSDATA)
+Assume that all data in static storage can be accessed by LDS / STS. This option is only useful for reduced Tiny devices.
+
nodevicelib
Driver Target Report RejectNegative
Do not link against the device-specific library lib<MCU>.a.
diff --git a/gcc/config/avr/gen-avr-mmcu-specs.c b/gcc/config/avr/gen-avr-mmcu-specs.c
index 7fca756ae62..9ea987f6add 100644
--- a/gcc/config/avr/gen-avr-mmcu-specs.c
+++ b/gcc/config/avr/gen-avr-mmcu-specs.c
@@ -130,6 +130,7 @@ print_mcu (const avr_mcu_t *mcu)
FILE *f = fopen (name ,"w");
+ bool absdata = 0 != (mcu->dev_attribute & AVR_ISA_LDS);
bool errata_skip = 0 != (mcu->dev_attribute & AVR_ERRATA_SKIP);
bool rmw = 0 != (mcu->dev_attribute & AVR_ISA_RMW);
bool sp8 = 0 != (mcu->dev_attribute & AVR_SHORT_SP);
@@ -189,6 +190,10 @@ print_mcu (const avr_mcu_t *mcu)
? "\t%{!mno-skip-bug: -mskip-bug}"
: "\t%{!mskip-bug: -mno-skip-bug}");
+ fprintf (f, "*cc1_absdata:\n%s\n\n", absdata
+ ? "\t%{!mno-absdata: -mabsdata}"
+ : "\t%{mabsdata}");
+
// avr-gcc specific specs for assembling / the assembler.
fprintf (f, "*asm_arch:\n\t-mmcu=%s\n\n", arch->name);
diff --git a/gcc/config/avr/specs.h b/gcc/config/avr/specs.h
index 52763cc607a..222ad5badae 100644
--- a/gcc/config/avr/specs.h
+++ b/gcc/config/avr/specs.h
@@ -34,7 +34,8 @@ along with GCC; see the file COPYING3. If not see
#define CC1_SPEC \
"%(cc1_n_flash) " \
"%(cc1_errata_skip) " \
- "%(cc1_rmw) "
+ "%(cc1_rmw) " \
+ "%(cc1_absdata) "
#undef CC1PLUS_SPEC
#define CC1PLUS_SPEC \
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index a5650a1ea14..ac2650b2910 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -9704,7 +9704,7 @@
"ix86_expand_binary_operator (ASHIFT, <MODE>mode, operands); DONE;")
(define_insn "*ashl<mode>3_doubleword"
- [(set (match_operand:DWI 0 "register_operand" "=&r,r")
+ [(set (match_operand:DWI 0 "register_operand" "=&r,&r")
(ashift:DWI (match_operand:DWI 1 "reg_or_pm1_operand" "n,0")
(match_operand:QI 2 "nonmemory_operand" "<S>c,<S>c")))
(clobber (reg:CC FLAGS_REG))]
@@ -10908,8 +10908,9 @@
[(set (match_dup 0)
(rotatert:SWI48 (match_dup 1) (match_dup 2)))]
{
- operands[2]
- = GEN_INT (GET_MODE_BITSIZE (<MODE>mode) - INTVAL (operands[2]));
+ int bitsize = GET_MODE_BITSIZE (<MODE>mode);
+
+ operands[2] = GEN_INT ((bitsize - INTVAL (operands[2])) % bitsize);
})
(define_split
@@ -10975,8 +10976,9 @@
[(set (match_dup 0)
(zero_extend:DI (rotatert:SI (match_dup 1) (match_dup 2))))]
{
- operands[2]
- = GEN_INT (GET_MODE_BITSIZE (SImode) - INTVAL (operands[2]));
+ int bitsize = GET_MODE_BITSIZE (SImode);
+
+ operands[2] = GEN_INT ((bitsize - INTVAL (operands[2])) % bitsize);
})
(define_split
diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index 5cac839da28..802aa7459af 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -2785,7 +2785,7 @@
rtx vtmp1 = gen_reg_rtx (V4SImode);
rtx vtmp2 = gen_reg_rtx (<MODE>mode);
rtx dest = gen_lowpart (V4SImode, vtmp2);
- int elt = BYTES_BIG_ENDIAN ? GET_MODE_NUNITS (<MODE>mode) - 1 : 0;
+ int elt = VECTOR_ELT_ORDER_BIG ? GET_MODE_NUNITS (<MODE>mode) - 1 : 0;
emit_insn (gen_altivec_vspltisw (vzero, const0_rtx));
emit_insn (gen_altivec_vsum4s<VI_char>s (vtmp1, operands[1], vzero));
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index ac0bcbdcd50..609f26707c2 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -30412,53 +30412,54 @@ rs6000_output_function_epilogue (FILE *file,
seems to set the bit when not optimizing. */
fprintf (file, "%d\n", ((float_parms << 1) | (! optimize)));
- if (! optional_tbtab)
- return;
-
- /* Optional fields follow. Some are variable length. */
-
- /* Parameter types, left adjusted bit fields: 0 fixed, 10 single float,
- 11 double float. */
- /* There is an entry for each parameter in a register, in the order that
- they occur in the parameter list. Any intervening arguments on the
- stack are ignored. If the list overflows a long (max possible length
- 34 bits) then completely leave off all elements that don't fit. */
- /* Only emit this long if there was at least one parameter. */
- if (fixed_parms || float_parms)
- fprintf (file, "\t.long %d\n", parm_info);
-
- /* Offset from start of code to tb table. */
- fputs ("\t.long ", file);
- ASM_OUTPUT_INTERNAL_LABEL_PREFIX (file, "LT");
- RS6000_OUTPUT_BASENAME (file, fname);
- putc ('-', file);
- rs6000_output_function_entry (file, fname);
- putc ('\n', file);
+ if (optional_tbtab)
+ {
+ /* Optional fields follow. Some are variable length. */
+
+ /* Parameter types, left adjusted bit fields: 0 fixed, 10 single
+ float, 11 double float. */
+ /* There is an entry for each parameter in a register, in the order
+ that they occur in the parameter list. Any intervening arguments
+ on the stack are ignored. If the list overflows a long (max
+ possible length 34 bits) then completely leave off all elements
+ that don't fit. */
+ /* Only emit this long if there was at least one parameter. */
+ if (fixed_parms || float_parms)
+ fprintf (file, "\t.long %d\n", parm_info);
+
+ /* Offset from start of code to tb table. */
+ fputs ("\t.long ", file);
+ ASM_OUTPUT_INTERNAL_LABEL_PREFIX (file, "LT");
+ RS6000_OUTPUT_BASENAME (file, fname);
+ putc ('-', file);
+ rs6000_output_function_entry (file, fname);
+ putc ('\n', file);
- /* Interrupt handler mask. */
- /* Omit this long, since we never set the interrupt handler bit
- above. */
+ /* Interrupt handler mask. */
+ /* Omit this long, since we never set the interrupt handler bit
+ above. */
- /* Number of CTL (controlled storage) anchors. */
- /* Omit this long, since the has_ctl bit is never set above. */
+ /* Number of CTL (controlled storage) anchors. */
+ /* Omit this long, since the has_ctl bit is never set above. */
- /* Displacement into stack of each CTL anchor. */
- /* Omit this list of longs, because there are no CTL anchors. */
+ /* Displacement into stack of each CTL anchor. */
+ /* Omit this list of longs, because there are no CTL anchors. */
- /* Length of function name. */
- if (*fname == '*')
- ++fname;
- fprintf (file, "\t.short %d\n", (int) strlen (fname));
+ /* Length of function name. */
+ if (*fname == '*')
+ ++fname;
+ fprintf (file, "\t.short %d\n", (int) strlen (fname));
- /* Function name. */
- assemble_string (fname, strlen (fname));
+ /* Function name. */
+ assemble_string (fname, strlen (fname));
- /* Register for alloca automatic storage; this is always reg 31.
- Only emit this if the alloca bit was set above. */
- if (frame_pointer_needed)
- fputs ("\t.byte 31\n", file);
+ /* Register for alloca automatic storage; this is always reg 31.
+ Only emit this if the alloca bit was set above. */
+ if (frame_pointer_needed)
+ fputs ("\t.byte 31\n", file);
- fputs ("\t.align 2\n", file);
+ fputs ("\t.align 2\n", file);
+ }
}
/* Arrange to define .LCTOC1 label, if not already done. */
@@ -35672,7 +35673,9 @@ rs6000_asm_weaken_decl (FILE *stream, tree decl,
fputc ('\n', stream);
if (val)
{
+#ifdef ASM_OUTPUT_DEF
ASM_OUTPUT_DEF (stream, name, val);
+#endif
if (decl && TREE_CODE (decl) == FUNCTION_DECL
&& DEFAULT_ABI == ABI_AIX && DOT_SYMBOLS)
{
diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index ebb0f6dc099..c5a57cbebb6 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -2542,10 +2542,13 @@
"VECTOR_MEM_VSX_P (<MODE>mode) && TARGET_VEXTRACTUB
&& TARGET_VSX_SMALL_INTEGER"
{
- /* Note, the element number has already been adjusted for endianness, so we
- don't have to adjust it here. */
- int unit_size = GET_MODE_UNIT_SIZE (<MODE>mode);
- HOST_WIDE_INT offset = unit_size * INTVAL (operands[2]);
+ HOST_WIDE_INT elt = INTVAL (operands[2]);
+ HOST_WIDE_INT elt_adj = (!VECTOR_ELT_ORDER_BIG
+ ? GET_MODE_NUNITS (<MODE>mode) - 1 - elt
+ : elt);
+
+ HOST_WIDE_INT unit_size = GET_MODE_UNIT_SIZE (<MODE>mode);
+ HOST_WIDE_INT offset = unit_size * elt_adj;
operands[2] = GEN_INT (offset);
if (unit_size == 4)