Skip to content

Commit 8fc1762

Browse files
author
Claudiu Zissulescu
committed
Make mdiv-rem default on for ARC HS
1 parent 8679625 commit 8fc1762

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

gcc/ChangeLog.ARC

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2013-08-09 Claudiu Zissulescu <[email protected]>
2+
3+
* common/config/arc/arc-common.c: mdiv-rem default on
4+
for ARC HS.
5+
16
2013-07-29 Claudiu Zissulescu <[email protected]>
27

38
* config/arc/arc.c (arc_setup_incoming_varargs): Pass

gcc/common/config/arc/arc-common.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
100100
opts->x_target_flags &= ~MASK_MPY16_SET;
101101
opts->x_target_flags &= ~MASK_CODE_DENSITY;
102102
opts->x_target_flags &= ~MASK_SHIFT_ASSIST;
103+
opts->x_target_flags &= ~MASK_DIVREM;
103104
break;
104105

105106
case PROCESSOR_ARC600:
@@ -114,6 +115,7 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
114115
opts->x_target_flags &= ~MASK_CODE_DENSITY;
115116
opts->x_target_flags &= ~MASK_SHIFT_ASSIST;
116117
opts->x_target_flags &= ~MASK_ATOMIC;
118+
opts->x_target_flags &= ~MASK_DIVREM;
117119
break;
118120

119121
case PROCESSOR_ARCv2HS:
@@ -136,6 +138,8 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
136138
opts->x_target_flags |= MASK_SWAP_SET; /* Default: on. */
137139
if ( !(opts_set->x_target_flags & MASK_ATOMIC))
138140
opts->x_target_flags |= MASK_ATOMIC; /* Default: on. */
141+
if ( !(opts_set->x_target_flags & MASK_DIVREM))
142+
opts->x_target_flags |= MASK_DIVREM; /* Default: on. */
139143
break;
140144

141145
case PROCESSOR_ARCv2EM:
@@ -158,6 +162,8 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
158162
opts->x_target_flags &= ~MASK_SWAP_SET; /* Default: off. */
159163
if ( !(opts_set->x_target_flags & MASK_ATOMIC))
160164
opts->x_target_flags &= ~MASK_ATOMIC; /* Default: off */
165+
if ( !(opts_set->x_target_flags & MASK_DIVREM))
166+
opts->x_target_flags &= ~MASK_DIVREM; /* Default: off. */
161167
break;
162168

163169
case PROCESSOR_ARC601:
@@ -172,6 +178,7 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
172178
opts->x_target_flags &= ~MASK_CODE_DENSITY;
173179
opts->x_target_flags &= ~MASK_SHIFT_ASSIST;
174180
opts->x_target_flags &= ~MASK_ATOMIC;
181+
opts->x_target_flags &= ~MASK_DIVREM;
175182
break;
176183

177184
default:
@@ -227,7 +234,7 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
227234
# define TARGET_DEFAULT_TARGET_FLAGS \
228235
(MASK_BARREL_SHIFTER | MASK_VOLATILE_CACHE_SET | DEFAULT_NO_SDATA \
229236
| MASK_MPY_SET | MASK_MPY16_SET | MASK_SHIFT_ASSIST | MASK_CODE_DENSITY \
230-
| MASK_NORM_SET | MASK_SWAP_SET | MASK_ATOMIC)
237+
| MASK_NORM_SET | MASK_SWAP_SET | MASK_ATOMIC | MASK_DIVREM)
231238
#elif TARGET_CPU_DEFAULT == TARGET_CPU_EM
232239
/* Default for EM: no barrel shifter*/
233240
# define TARGET_DEFAULT_TARGET_FLAGS \

0 commit comments

Comments
 (0)