diff options
author | Nick Clifton <nickc@redhat.com> | 2002-05-02 09:11:14 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-05-02 09:11:14 +0000 |
commit | 358b94bdb1b02dbc21a19719fbaa9fbe9c93c61a (patch) | |
tree | d0b02dbcc68889da178e2d6726023ee0b6a0a9f5 /gas/config/tc-arm.c | |
parent | d3427997ad759f705f99611018da19512ca2bbb0 (diff) | |
download | gdb-358b94bdb1b02dbc21a19719fbaa9fbe9c93c61a.zip gdb-358b94bdb1b02dbc21a19719fbaa9fbe9c93c61a.tar.gz gdb-358b94bdb1b02dbc21a19719fbaa9fbe9c93c61a.tar.bz2 |
Do not convert a subtract of zero into an add of zero.
Diffstat (limited to 'gas/config/tc-arm.c')
-rw-r--r-- | gas/config/tc-arm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 162553f..1370f13 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -7433,11 +7433,11 @@ thumb_add_sub (str, subtract) int offset = inst.reloc.exp.X_add_number; if (subtract) - offset = -offset; + offset = - offset; if (offset < 0) { - offset = -offset; + offset = - offset; subtract = 1; /* Quick check, in case offset is MIN_INT. */ @@ -7447,7 +7447,9 @@ thumb_add_sub (str, subtract) return; } } - else + /* Note - you cannot convert a subtract of 0 into an + add of 0 because the carry flag is set differently. */ + else if (offset > 0) subtract = 0; if (Rd == REG_SP) |