aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClinton Popetz <cpopetz@cpopetz.com>2000-01-14 17:58:29 +0000
committerClinton Popetz <cpopetz@cpopetz.com>2000-01-14 17:58:29 +0000
commita19d8eb03e2cf8ba0bf15f98e4f5b1e7d693b6f3 (patch)
tree8ac8d563f995fa4fb54dfb00b5f48d9f8fcaeac3
parent6b3b007bde0f9f46d184b8ecac57e1f91d3571f6 (diff)
downloadgdb-a19d8eb03e2cf8ba0bf15f98e4f5b1e7d693b6f3.zip
gdb-a19d8eb03e2cf8ba0bf15f98e4f5b1e7d693b6f3.tar.gz
gdb-a19d8eb03e2cf8ba0bf15f98e4f5b1e7d693b6f3.tar.bz2
2000-01-13 Clinton Popetz <cpopetz@cygnus.com>
* config/tc-mips.c (mips_do_align): New function. * config/tc-mips.h (md_do_align): Define.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-mips.c30
-rw-r--r--gas/config/tc-mips.h3
3 files changed, 38 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 99857e5..db21fcb 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2000-01-13 Clinton Popetz <cpopetz@cygnus.com>
+
+ * config/tc-mips.c (mips_do_align): New function.
+ * config/tc-mips.h (md_do_align): Define.
+
2000-01-10 Philip Blundell <philb@gnu.org>
* doc/c-arm.texi (ARM Options): Fix typo.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index d2fdca7..723357a 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -11436,6 +11436,36 @@ static procS cur_proc;
static procS *cur_proc_ptr;
static int numprocs;
+/* When we align code in the .text section of mips16, use the correct two
+ byte nop pattern of 0x6500 (move $0,$0) */
+
+int
+mips_do_align (n, fill, len, max)
+ int n;
+ const char *fill;
+ int len;
+ int max;
+{
+ if (fill == NULL
+ && subseg_text_p (now_seg)
+ && n > 1
+ && mips_opts.mips16)
+ {
+ static const unsigned char be_nop[] = { 0x65, 0x00 };
+ static const unsigned char le_nop[] = { 0x00, 0x65 };
+
+ frag_align (1, 0, 0);
+
+ if (target_big_endian)
+ frag_align_pattern (n, be_nop, 2, max);
+ else
+ frag_align_pattern (n, le_nop, 2, max);
+ return 1;
+ }
+
+ return 0;
+}
+
static void
md_obj_begin ()
{
diff --git a/gas/config/tc-mips.h b/gas/config/tc-mips.h
index ccfd998..a17c642 100644
--- a/gas/config/tc-mips.h
+++ b/gas/config/tc-mips.h
@@ -55,6 +55,9 @@ extern int mips_relax_frag PARAMS ((struct frag *, long));
#define md_undefined_symbol(name) (0)
#define md_operand(x)
+extern int mips_do_align PARAMS ((int, const char *, int, int));
+#define md_do_align(n,fill,len,max,l) if (mips_do_align (n,fill,len,max)) goto l
+
/* We permit PC relative difference expressions when generating
embedded PIC code. */
#define DIFF_EXPR_OK