aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2000-10-16 19:44:39 +0000
committerHans-Peter Nilsson <hp@axis.com>2000-10-16 19:44:39 +0000
commit266cb5f1fbe093c38b684e5074201cf62c54d140 (patch)
tree27a00faab6fde6d3d96ac751b93c5f8d17a9599b /gas
parent6e45556a3635f2c407cc5871457ca787e9e2578b (diff)
downloadgdb-266cb5f1fbe093c38b684e5074201cf62c54d140.zip
gdb-266cb5f1fbe093c38b684e5074201cf62c54d140.tar.gz
gdb-266cb5f1fbe093c38b684e5074201cf62c54d140.tar.bz2
* config/tc-sh.c (JREG): Remove.
(md_convert_frag): Remove #if 0:d code using JREG.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-sh.c85
2 files changed, 5 insertions, 85 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 59dd1a8..5905749 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-16 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/tc-sh.c (JREG): Remove.
+ (md_convert_frag): Remove #if 0:d code using JREG.
+
2000-10-15 Diego Novillo <dnovillo@cygnus.com>
* config/tc-i386.c (i386_operand_modifier): Only match
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index f2f27ad..cd7de47 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -123,7 +123,6 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP";
#define C(a,b) ENCODE_RELAX(a,b)
-#define JREG 14 /* Register used as a temp when relaxing */
#define ENCODE_RELAX(what,length) (((what) << 4) + (length))
#define GET_WHAT(x) ((x>>4))
@@ -2417,47 +2416,6 @@ md_convert_frag (headers, seg, fragP)
(unsigned long) fragP->fr_address,
S_GET_NAME (fragP->fr_symbol));
-#if 0
- /* This code works, but generates poor code and the compiler
- should never produce a sequence that requires it to be used. */
-
- /* A jump wont fit in 12 bits, make code which looks like
- bra foo
- mov.w @(0, PC), r14
- .long disp
- foo: bra @r14
- */
- int t = buffer[0] & 0x10;
-
- buffer[highbyte ] = 0xa0; /* branch over move and disp */
- buffer[lowbyte ] = 3;
- buffer[highbyte + 2] = 0xd0 | JREG; /* Build mov insn */
- buffer[lowbyte + 2] = 0x00;
-
- buffer[highbyte + 4] = 0; /* space for 32 bit jump disp */
- buffer[lowbyte + 4] = 0;
- buffer[highbyte + 6] = 0;
- buffer[lowbyte + 6] = 0;
-
- buffer[highbyte + 8] = 0x40 | JREG; /* Build jmp @JREG */
- buffer[lowbyte + 8] = t ? 0xb : 0x2b;
-
- buffer[highbyte + 10] = 0x20; /* build nop */
- buffer[lowbyte + 10] = 0x0b;
-
- /* Make reloc for the long disp. */
- fix_new (fragP,
- fragP->fr_fix + 4,
- 4,
- fragP->fr_symbol,
- fragP->fr_offset,
- 0,
- BFD_RELOC_32);
- fragP->fr_fix += UNCOND32_LENGTH;
- fragP->fr_var = 0;
- donerelax = 1;
-#endif
-
break;
case C (COND_JUMP, COND12):
@@ -2540,49 +2498,6 @@ md_convert_frag (headers, seg, fragP)
as_bad (_("at 0x%lx, displacement to undefined symbol %s overflows 8-bit field "),
(unsigned long) fragP->fr_address,
S_GET_NAME (fragP->fr_symbol));
-
-#if 0
- /* This code works, but generates poor code, and the compiler
- should never produce a sequence that requires it to be used. */
-
- /* A bcond won't fit and it won't go into a 12 bit
- displacement either, the code sequence looks like:
- b!cond foop
- mov.w @(n, PC), r14
- jmp @r14
- nop
- .long where
- foop:
- */
-
- buffer[0] ^= 0x2; /* Toggle T/F bit */
-#define JREG 14
- buffer[1] = 5; /* branch over mov, jump, nop and ptr */
- buffer[2] = 0xd0 | JREG; /* Build mov insn */
- buffer[3] = 0x2;
- buffer[4] = 0x40 | JREG; /* Build jmp @JREG */
- buffer[5] = 0x0b;
- buffer[6] = 0x20; /* build nop */
- buffer[7] = 0x0b;
- buffer[8] = 0; /* space for 32 bit jump disp */
- buffer[9] = 0;
- buffer[10] = 0;
- buffer[11] = 0;
- buffer[12] = 0;
- buffer[13] = 0;
- /* Make reloc for the long disp */
- fix_new (fragP,
- fragP->fr_fix + 8,
- 4,
- fragP->fr_symbol,
- fragP->fr_offset,
- 0,
- BFD_RELOC_32);
- fragP->fr_fix += COND32_LENGTH;
- fragP->fr_var = 0;
- donerelax = 1;
-#endif
-
break;
default: