-store_r => {
- reg_req => { in => [ "none", "gp", "gp" ], out => [ "none", "none" ] },
- emit => '
- mips_attr_t* attr = get_mips_attr(node);
- ir_mode* mode;
-
- mode = attr->modes.load_store_mode;
-
- switch (get_mode_size_bits(mode)) {
- case 8:
- if (mode_is_signed(mode))
- . sb %S3, %C(%S2)
- break;
- case 16:
- if (mode_is_signed(mode))
- . sh %S3, %C(%S2)
- break;
- case 32:
- . sw %S3, %C(%S2)
- break;
- default:
- assert(! "Only 8, 16 and 32 bit stores supported");
- break;
- }
-',
- cmp_attr => 'return attr_a->tv != attr_b->tv;',
-},
-
-store_i => {
- reg_req => { in => [ "none", "none", "gp" ], out => [ "none", "none" ] },
- emit => '
- mips_attr_t* attr = get_mips_attr(node);
- ir_mode *mode;
-
- mode = attr->modes.load_store_mode;
-
- switch (get_mode_size_bits(mode)) {
- case 8:
- . sb %S3, %C
- break;
- case 16:
- . sh %S3, %C
- break;
- case 32:
- . sw %S3, %C
- break;
- default:
- assert(! "Only 8, 16 and 32 bit stores supported");
- break;
- }
-',
- cmp_attr => 'return attr_a->stack_entity != attr_b->stack_entity;',
-},
-
-move => {
- reg_req => { in => [ "gp" ], out => [ "gp" ] },
- emit => '. move %D1, %S1',
- mode => "mode_Iu"
-},
-
-#
-# Conversion
-#
-
-reinterpret_conv => {
- reg_req => { in => [ "gp" ], out => [ "in_r1" ] },
- emit => '. # reinterpret %S1 -> %D1',
- mode => "mode_Iu"
+lw => {
+ op_flags => "L|F",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "none" ], out => [ "gp", "none" ] },
+ ins => [ "ptr", "mem" ],
+ outs => [ "res", "M" ],
+ emit => '. lw %D0, %A0',
+ attr_type => "mips_load_store_attr_t",
+ attr => "ir_entity *entity, long offset",
+},
+
+lh => {
+ op_flags => "L|F",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "none" ], out => [ "gp", "none" ] },
+ ins => [ "ptr", "mem" ],
+ outs => [ "res", "M" ],
+ emit => '. lh %D0, %A0',
+ attr_type => "mips_load_store_attr_t",
+ attr => "ir_entity *entity, long offset",
+},
+
+lhu => {
+ op_flags => "L|F",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "none" ], out => [ "gp", "none" ] },
+ ins => [ "ptr", "mem" ],
+ outs => [ "res", "M" ],
+ emit => '. lhu %D0, %A0',
+ attr_type => "mips_load_store_attr_t",
+ attr => "ir_entity *entity, long offset",
+},
+
+lb => {
+ op_flags => "L|F",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "none" ], out => [ "gp", "none" ] },
+ ins => [ "ptr", "mem" ],
+ outs => [ "res", "M" ],
+ emit => '. lb %D0, %A0',
+ attr_type => "mips_load_store_attr_t",
+ attr => "ir_entity *entity, long offset",
+},
+
+lbu => {
+ op_flags => "L|F",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "none" ], out => [ "gp", "none" ] },
+ ins => [ "ptr", "mem" ],
+ outs => [ "res", "M" ],
+ emit => '. lbu %D0, %A0',
+ attr_type => "mips_load_store_attr_t",
+ attr => "ir_entity *entity, long offset",
+},
+
+sw => {
+ op_flags => "L|F",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] },
+ ins => [ "ptr", "val", "mem" ],
+ emit => '. sw %S1, %A0',
+ mode => 'mode_M',
+ attr_type => "mips_load_store_attr_t",
+ attr => "ir_entity *entity, long offset",
+},
+
+sh => {
+ op_flags => "L|F",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] },
+ ins => [ "ptr", "val", "mem" ],
+ emit => '. sh %S1, %A0',
+ mode => 'mode_M',
+ attr_type => "mips_load_store_attr_t",
+ attr => "ir_entity *entity, long offset",
+},
+
+sb => {
+ op_flags => "L|F",
+ state => "exc_pinned",
+ reg_req => { in => [ "gp", "gp", "none" ], out => [ "none" ] },
+ ins => [ "ptr", "val", "mem" ],
+ emit => '. sb %S1, %A0',
+ mode => 'mode_M',
+ attr_type => "mips_load_store_attr_t",
+ attr => "ir_entity *entity, long offset",