diff options
author | Nick Clifton <nickc@redhat.com> | 2004-11-23 14:49:12 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-11-23 14:49:12 +0000 |
commit | dae1b34eabf9669f84490afb384c0281485b67ef (patch) | |
tree | 17ce68326083282eb615691d01aa44fc3a6fc445 /gas/config/tc-mn10300.c | |
parent | 7b5ba0cc21af7d622b99986b61a47979bc9943cf (diff) | |
download | gdb-dae1b34eabf9669f84490afb384c0281485b67ef.zip gdb-dae1b34eabf9669f84490afb384c0281485b67ef.tar.gz gdb-dae1b34eabf9669f84490afb384c0281485b67ef.tar.bz2 |
* config/tc-mn10300.c (md_relax_table): More fixes to the offsets in this table.
They should be correct now.
* gas/mn10300/relax.s: Add further tests of the relaxing of branch instructions.
* gas/mn10300/relax.d: Add expected relocations.
Diffstat (limited to 'gas/config/tc-mn10300.c')
-rw-r--r-- | gas/config/tc-mn10300.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index e2fcf75..847c974 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -54,15 +54,20 @@ const char EXP_CHARS[] = "eE"; as in 0d1.0. */ const char FLT_CHARS[] = "dD"; -const relax_typeS md_relax_table[] = { +const relax_typeS md_relax_table[] = +{ + /* The plus values for the bCC and fBCC instructions in the table below + are because the branch instruction is translated into a jump + instruction that is now +2 or +3 bytes further on in memory, and the + correct size of jump instruction must be selected. */ /* bCC relaxing */ {0x7f, -0x80, 2, 1}, - {0x7fff, -0x8000 + 1, 5, 2}, + {0x7fff + 2, -0x8000 + 2, 5, 2}, {0x7fffffff, -0x80000000, 7, 0}, - /* bCC relaxing (uncommon cases) */ + /* bCC relaxing (uncommon cases for 3byte length instructions) */ {0x7f, -0x80, 3, 4}, - {0x7fff, -0x8000 + 1, 6, 5}, + {0x7fff + 3, -0x8000 + 3, 6, 5}, {0x7fffffff, -0x80000000, 8, 0}, /* call relaxing */ @@ -80,7 +85,7 @@ const relax_typeS md_relax_table[] = { /* fbCC relaxing */ {0x7f, -0x80, 3, 14}, - {0x7fff, -0x8000 + 1, 6, 15}, + {0x7fff + 3, -0x8000 + 3, 6, 15}, {0x7fffffff, -0x80000000, 8, 0}, }; |