Commit 6d7db3c5 by Richard Sandiford Committed by Richard Sandiford

expr.h (store_bit_field): Don't return a value.

gcc/
	* expr.h (store_bit_field): Don't return a value.
	* expmed.c (check_predicate_volatile_ok): New function.
	(store_bit_field_1): New function, extracted from store_bit_field.
	Take a fallback_p argument and return true if the operation succeeded.
	Only use store_fixed_bit_field if fallback_p.  Don't recompute
	mode_for_extraction; use op_mode instead.  Try forcing memories
	into registers if the insv expander fails.
	(store_bit_field): Use store_bit_field_1 with fallback_p true.
	Don't return a value.
	(convert_extracted_bit_field): New function, extracted from
	store_bit_field.
	(extract_bit_field_1): Likewise.  Take a fallback_p argument
	and return NULL if the operation succeeded.  Only use
	extract_fixed_bit_field if fallback_p.  Only calculate one
	extraction mode.  Combine code for extv and extzv.  Try forcing
	memories into registers if the ext(z)v expander fails.
	(extract_bit_field): Use extract_bit_field_1 with fallback_p true.

gcc/testsuite/
	* gcc.target/mips/ins-1.c: New test.

From-SVN: r126972
parent ab34041d
2007-07-27 Richard Sandiford <richard@codesourcery.com>
* expr.h (store_bit_field): Don't return a value.
* expmed.c (check_predicate_volatile_ok): New function.
(store_bit_field_1): New function, extracted from store_bit_field.
Take a fallback_p argument and return true if the operation succeeded.
Only use store_fixed_bit_field if fallback_p. Don't recompute
mode_for_extraction; use op_mode instead. Try forcing memories
into registers if the insv expander fails.
(store_bit_field): Use store_bit_field_1 with fallback_p true.
Don't return a value.
(convert_extracted_bit_field): New function, extracted from
store_bit_field.
(extract_bit_field_1): Likewise. Take a fallback_p argument
and return NULL if the operation succeeded. Only use
extract_fixed_bit_field if fallback_p. Only calculate one
extraction mode. Combine code for extv and extzv. Try forcing
memories into registers if the ext(z)v expander fails.
(extract_bit_field): Use extract_bit_field_1 with fallback_p true.
2007-07-27 Richard Sandiford <rsandifo@nildram.co.uk> 2007-07-27 Richard Sandiford <rsandifo@nildram.co.uk>
* df.h (df_mw_hardreg): Turn df_ref_type and df_ref_flags * df.h (df_mw_hardreg): Turn df_ref_type and df_ref_flags
......
...@@ -731,8 +731,8 @@ enum extraction_pattern { EP_insv, EP_extv, EP_extzv }; ...@@ -731,8 +731,8 @@ enum extraction_pattern { EP_insv, EP_extv, EP_extzv };
extern enum machine_mode extern enum machine_mode
mode_for_extraction (enum extraction_pattern, int); mode_for_extraction (enum extraction_pattern, int);
extern rtx store_bit_field (rtx, unsigned HOST_WIDE_INT, extern void store_bit_field (rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, enum machine_mode, rtx); unsigned HOST_WIDE_INT, enum machine_mode, rtx);
extern rtx extract_bit_field (rtx, unsigned HOST_WIDE_INT, extern rtx extract_bit_field (rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, int, rtx, unsigned HOST_WIDE_INT, int, rtx,
enum machine_mode, enum machine_mode); enum machine_mode, enum machine_mode);
......
2007-07-27 Richard Sandiford <richard@codesourcery.com>
* gcc.target/mips/ins-1.c: New test.
2007-07-26 Nathan Froyd <froydnj@codesourcery.com> 2007-07-26 Nathan Froyd <froydnj@codesourcery.com>
PR/19232 PR/19232
/* { dg-do compile } */
/* { dg-mips-options "-O -march=mips32r2 -mno-mips16" } */
/* { dg-final { scan-assembler "\tins\t" } } */
struct
{
unsigned int i : 2;
unsigned int j : 3;
unsigned int k : 4;
} s;
void
foo (void)
{
s.j = 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment