diff options
author | Jiong Wang <jiong.wang@arm.com> | 2015-06-04 09:36:35 +0100 |
---|---|---|
committer | Jiong Wang <jiong.wang@arm.com> | 2015-06-04 09:36:35 +0100 |
commit | b968d18a6d3df13b92c98e813f3d2fb3bbd3d4ee (patch) | |
tree | e24ee053d3e262012726c78de7d7af50a027e0e2 /gas | |
parent | 8086551f52df808681fa09ca00dfb91e67d8d2ff (diff) | |
download | gdb-b968d18a6d3df13b92c98e813f3d2fb3bbd3d4ee.zip gdb-b968d18a6d3df13b92c98e813f3d2fb3bbd3d4ee.tar.gz gdb-b968d18a6d3df13b92c98e813f3d2fb3bbd3d4ee.tar.bz2 |
[ARM] Use frag's thumb_mode information when available
2015-06-04 Renlin Li <renlin.li@arm.com>
* config/tc-arm.c (arm_init_frag): Use frag's thumb_mode information
when available.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 57fc30a..96c1b32 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2015-06-04 Renlin Li <renlin.li@arm.com> + + * config/tc-arm.c (arm_init_frag): Use frag's thumb_mode information + when available. + 2015-06-03 Matthew Wahab <matthew.wahab@arm.com> * config/tc-arm.c (arm_archs): Add "armv8.1-a". diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index b57f85c..7ad55bf 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -21065,10 +21065,14 @@ arm_init_frag (fragS * fragP, int max_chars ATTRIBUTE_UNUSED) void arm_init_frag (fragS * fragP, int max_chars) { + int frag_thumb_mode; + /* If the current ARM vs THUMB mode has not already been recorded into this frag then do so now. */ if ((fragP->tc_frag_data.thumb_mode & MODE_RECORDED) == 0) - fragP->tc_frag_data.thumb_mode = thumb_mode | MODE_RECORDED; + fragP->tc_frag_data.thumb_mode = thumb_mode | MODE_RECORDED; + + frag_thumb_mode = fragP->tc_frag_data.thumb_mode ^ MODE_RECORDED; /* Record a mapping symbol for alignment frags. We will delete this later if the alignment ends up empty. */ @@ -21080,7 +21084,7 @@ arm_init_frag (fragS * fragP, int max_chars) mapping_state_2 (MAP_DATA, max_chars); break; case rs_align_code: - mapping_state_2 (thumb_mode ? MAP_THUMB : MAP_ARM, max_chars); + mapping_state_2 (frag_thumb_mode ? MAP_THUMB : MAP_ARM, max_chars); break; default: break; |