DF_REF_MUST_CLOBBER = 1 << 7,
- /* This flag is set if this ref is inside a pre/post modify. */
- DF_REF_PRE_POST_MODIFY = 1 << 8,
+ /* If the ref has one of the following two flags set, then the
+ struct df_ref can be cast to struct df_ref_extract to access
+ the width and offset fields. */
+
+ /* This flag is set if the ref contains a SIGN_EXTRACT. */
+ DF_REF_SIGN_EXTRACT = 1 << 8,
- /* This flag is set if the ref contains a ZERO_EXTRACT or SIGN_EXTRACT. */
- DF_REF_EXTRACT = 1 << 9,
+ /* This flag is set if the ref contains a ZERO_EXTRACT. */
+ DF_REF_ZERO_EXTRACT = 1 << 9,
- /* This flag is set if the ref contains a STRICT_LOWER_PART. */
- DF_REF_STRICT_LOWER_PART = 1 << 10,
+ /* This flag is set if the ref contains a STRICT_LOW_PART. */
+ DF_REF_STRICT_LOW_PART = 1 << 10,
/* This flag is set if the ref contains a SUBREG. */
DF_REF_SUBREG = 1 << 11,
DF_REF_CALL_STACK_USAGE = 1 << 13,
/* This flag is used for verification of existing refs. */
- DF_REF_REG_MARKER = 1 << 14
+ DF_REF_REG_MARKER = 1 << 14,
+
+ /* This flag is set if this ref is inside a pre/post modify. */
+ DF_REF_PRE_POST_MODIFY = 1 << 15
+
};
/* The possible ordering of refs within the df_ref_info. */
struct df_ref *prev_reg; /* Prev ref with same regno and type. */
};
+/* A df_ref_extract is just a df_ref with a width and offset field at
+ the end of it. It is used to hold this information if the ref was
+ wrapped by a SIGN_EXTRACT or a ZERO_EXTRACT and to pass this info
+ to passes that wish to process partial regs precisely. */
+struct df_ref_extract
+{
+ struct df_ref ref;
+ int width;
+ int offset;
+};
+
/* These links are used for two purposes:
1) def-use or use-def chains.
2) Multiword hard registers that underly a single hardware register. */
#define DF_REF_IS_REG_MARKED(REF) (DF_REF_FLAGS_IS_SET ((REF),DF_REF_REG_MARKER))
#define DF_REF_NEXT_REG(REF) ((REF)->next_reg)
#define DF_REF_PREV_REG(REF) ((REF)->prev_reg)
-
+/* The following two macros may only be applied if one of
+ DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT is true. */
+#define DF_REF_WIDTH(REF) (((struct df_ref_extract *)(REF))->width)
+#define DF_REF_OFFSET(REF) (((struct df_ref_extract *)(REF))->offset)
/* Macros to determine the reference type. */
#define DF_REF_REG_DEF_P(REF) (DF_REF_TYPE (REF) == DF_REF_REG_DEF)
extern void df_grow_insn_info (void);
extern void df_scan_blocks (void);
extern struct df_ref *df_ref_create (rtx, rtx *, rtx,basic_block,
- enum df_ref_type, enum df_ref_flags);
+ enum df_ref_type, enum df_ref_flags,
+ int, int);
extern void df_ref_remove (struct df_ref *);
extern struct df_insn_info * df_insn_create_insn_record (rtx);
extern void df_insn_delete (basic_block, unsigned int);