/**
* Gets the type of an ia32_Const.
*/
-unsigned get_ia32_Const_type(ir_node *node) {
+unsigned get_ia32_Const_type(const ir_node *node) {
ia32_attr_t *attr = get_ia32_attr(node);
assert((is_ia32_Const(node) || is_ia32_fConst(node)) && "Need ia32_Const to get type");
na->tv = ca->tv;
if (ca->sc) {
- na->sc = copy_str(na->sc, ca->sc);
+ na->sc = copy_str(na->sc, ca->sc);
+ na->cnst = na->sc;
}
else {
na->cnst = set_cnst_from_tv(na->cnst, na->tv);
/**
* Returns whether or not the node is an AddrModeS node.
*/
-int is_ia32_AddrModeS(ir_node *node) {
+int is_ia32_AddrModeS(const ir_node *node) {
ia32_attr_t *attr = get_ia32_attr(node);
return (attr->tp == ia32_AddrModeS);
}
/**
* Returns whether or not the node is an AddrModeD node.
*/
-int is_ia32_AddrModeD(ir_node *node) {
+int is_ia32_AddrModeD(const ir_node *node) {
ia32_attr_t *attr = get_ia32_attr(node);
return (attr->tp == ia32_AddrModeD);
}
+/**
+ * Checks if node is a Load or fLoad.
+ */
+int is_ia32_Ld(const ir_node *node) {
+ return is_ia32_Load(node) || is_ia32_fLoad(node);
+}
+/**
+ * Checks if node is a Store or fStore.
+ */
+int is_ia32_St(const ir_node *node) {
+ return is_ia32_Store(node) || is_ia32_fStore(node);
+}
/***************************************************************************************
* _ _ _
/**
* Gets the type of an ia32_Const.
*/
-unsigned get_ia32_Const_type(ir_node *node);
+unsigned get_ia32_Const_type(const ir_node *node);
/**
* Sets the type of an ia32_Const.
/**
* Returns whether or not the node is an AddrModeS node.
*/
-int is_ia32_AddrModeS(ir_node *node);
+int is_ia32_AddrModeS(const ir_node *node);
/**
* Returns whether or not the node is an AddrModeD node.
*/
-int is_ia32_AddrModeD(ir_node *node);
+int is_ia32_AddrModeD(const ir_node *node);
+
+/**
+ * Checks if node is a Load or fLoad.
+ */
+int is_ia32_Ld(const ir_node *node);
+
+/**
+ * Checks if node is a Store or fStore.
+ */
+int is_ia32_St(const ir_node *node);
/* Include the generated headers */
#include "gen_ia32_new_nodes.h"