aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/config/arm/arm-ldmstm.ml
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/config/arm/arm-ldmstm.ml')
-rw-r--r--gcc-4.8/gcc/config/arm/arm-ldmstm.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc-4.8/gcc/config/arm/arm-ldmstm.ml b/gcc-4.8/gcc/config/arm/arm-ldmstm.ml
index 2bc9702be..0f637d3fe 100644
--- a/gcc-4.8/gcc/config/arm/arm-ldmstm.ml
+++ b/gcc-4.8/gcc/config/arm/arm-ldmstm.ml
@@ -67,10 +67,13 @@ let destreg nregs first op_type thumb =
Printf.sprintf ("(match_operand:SI %d \"s_register_operand\" \"%s%s\")")
(nregs + 1) (inout_constr op_type) (constr thumb)
+let reg_predicate thumb =
+ if thumb then "low_register_operand" else "arm_hard_general_register_operand"
+
let write_ldm_set thumb nregs offset opnr first =
let indent = " " in
Printf.printf "%s" (if first then " [" else indent);
- Printf.printf "(set (match_operand:SI %d \"arm_hard_register_operand\" \"\")\n" opnr;
+ Printf.printf "(set (match_operand:SI %d \"%s\" \"\")\n" opnr (reg_predicate thumb);
Printf.printf "%s (mem:SI " indent;
begin if offset != 0 then Printf.printf "(plus:SI " end;
Printf.printf "%s" (destreg nregs first IN thumb);
@@ -84,7 +87,7 @@ let write_stm_set thumb nregs offset opnr first =
begin if offset != 0 then Printf.printf "(plus:SI " end;
Printf.printf "%s" (destreg nregs first IN thumb);
begin if offset != 0 then Printf.printf " (const_int %d))" offset end;
- Printf.printf ")\n%s (match_operand:SI %d \"arm_hard_register_operand\" \"\"))" indent opnr
+ Printf.printf ")\n%s (match_operand:SI %d \"%s\" \"\"))" indent opnr (reg_predicate thumb)
let write_ldm_peep_set extra_indent nregs opnr first =
let indent = " " ^ extra_indent in